aboutsummaryrefslogtreecommitdiff
path: root/contrib/ntp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp')
-rw-r--r--contrib/ntp/COPYRIGHT223
-rw-r--r--contrib/ntp/ChangeLog22245
-rw-r--r--contrib/ntp/ChangeLog-4.1.02
-rw-r--r--contrib/ntp/Makefile.am44
-rw-r--r--contrib/ntp/Makefile.in440
-rw-r--r--contrib/ntp/NEWS26
-rw-r--r--contrib/ntp/README17
-rw-r--r--contrib/ntp/README.bk15
-rw-r--r--contrib/ntp/README.hackers3
-rw-r--r--contrib/ntp/README.patches39
-rw-r--r--contrib/ntp/TODO4
-rw-r--r--contrib/ntp/acinclude.m45
-rw-r--r--contrib/ntp/aclocal.m4744
-rw-r--r--contrib/ntp/adjtimed/Makefile.in269
-rw-r--r--contrib/ntp/arlib/COPYING46
-rw-r--r--contrib/ntp/arlib/INSTALL182
-rw-r--r--contrib/ntp/arlib/Makefile.am15
-rw-r--r--contrib/ntp/arlib/Makefile.in484
-rw-r--r--contrib/ntp/arlib/README49
-rw-r--r--contrib/ntp/arlib/UNSHAR.HDR32
-rw-r--r--contrib/ntp/arlib/aclocal.m4835
-rw-r--r--contrib/ntp/arlib/arlib.3230
-rw-r--r--contrib/ntp/arlib/arlib.c1056
-rw-r--r--contrib/ntp/arlib/arlib.h29
-rw-r--r--contrib/ntp/arlib/arplib.h45
-rwxr-xr-xcontrib/ntp/arlib/configure4424
-rw-r--r--contrib/ntp/arlib/configure.in57
-rwxr-xr-xcontrib/ntp/arlib/depcomp472
-rwxr-xr-xcontrib/ntp/arlib/install-sh294
-rwxr-xr-xcontrib/ntp/arlib/missing336
-rwxr-xr-xcontrib/ntp/arlib/mkinstalldirs111
-rw-r--r--contrib/ntp/arlib/sample.c143
-rwxr-xr-xcontrib/ntp/build5
-rw-r--r--contrib/ntp/clockstuff/Makefile.in280
-rwxr-xr-xcontrib/ntp/compile99
-rw-r--r--contrib/ntp/conf/README12
-rw-r--r--contrib/ntp/conf/baldwin.conf38
-rw-r--r--contrib/ntp/conf/grundoon.conf2
-rw-r--r--contrib/ntp/conf/malarky.conf2
-rw-r--r--contrib/ntp/conf/pogo.conf15
-rw-r--r--contrib/ntp/conf/rackety.conf10
-rwxr-xr-xcontrib/ntp/config.guess547
-rw-r--r--contrib/ntp/config.h.in114
-rwxr-xr-xcontrib/ntp/config.sub300
-rwxr-xr-xcontrib/ntp/configure10167
-rw-r--r--contrib/ntp/configure.in687
-rwxr-xr-xcontrib/ntp/depcomp275
-rwxr-xr-xcontrib/ntp/flock-build47
-rw-r--r--contrib/ntp/html/accopt.html70
-rw-r--r--contrib/ntp/html/assoc.html58
-rw-r--r--contrib/ntp/html/audio.html55
-rw-r--r--contrib/ntp/html/authopt.html144
-rw-r--r--contrib/ntp/html/build.html83
-rw-r--r--contrib/ntp/html/clockopt.html67
-rw-r--r--contrib/ntp/html/config.html168
-rw-r--r--contrib/ntp/html/confopt.html88
-rw-r--r--contrib/ntp/html/copyright.html95
-rw-r--r--contrib/ntp/html/debug.html171
-rw-r--r--contrib/ntp/html/drivers/driver1.html64
-rw-r--r--contrib/ntp/html/drivers/driver10.html53
-rw-r--r--contrib/ntp/html/drivers/driver11.html87
-rw-r--r--contrib/ntp/html/drivers/driver12.html49
-rw-r--r--contrib/ntp/html/drivers/driver16.html31
-rw-r--r--contrib/ntp/html/drivers/driver18.html87
-rw-r--r--contrib/ntp/html/drivers/driver19.html59
-rw-r--r--contrib/ntp/html/drivers/driver2.html67
-rw-r--r--contrib/ntp/html/drivers/driver20.html96
-rw-r--r--contrib/ntp/html/drivers/driver22.html56
-rw-r--r--contrib/ntp/html/drivers/driver23.html104
-rw-r--r--contrib/ntp/html/drivers/driver24.html46
-rw-r--r--contrib/ntp/html/drivers/driver26.html50
-rw-r--r--contrib/ntp/html/drivers/driver27.html249
-rw-r--r--contrib/ntp/html/drivers/driver28.html76
-rw-r--r--contrib/ntp/html/drivers/driver29.html797
-rw-r--r--contrib/ntp/html/drivers/driver3.html76
-rw-r--r--contrib/ntp/html/drivers/driver30.html84
-rw-r--r--contrib/ntp/html/drivers/driver32.html38
-rw-r--r--contrib/ntp/html/drivers/driver33.html35
-rw-r--r--contrib/ntp/html/drivers/driver34.html88
-rw-r--r--contrib/ntp/html/drivers/driver35.html47
-rw-r--r--contrib/ntp/html/drivers/driver36.html262
-rw-r--r--contrib/ntp/html/drivers/driver37.html50
-rw-r--r--contrib/ntp/html/drivers/driver38.html138
-rw-r--r--contrib/ntp/html/drivers/driver39.html116
-rw-r--r--contrib/ntp/html/drivers/driver4.html65
-rw-r--r--contrib/ntp/html/drivers/driver40.html99
-rw-r--r--contrib/ntp/html/drivers/driver42.html29
-rw-r--r--contrib/ntp/html/drivers/driver43.html64
-rwxr-xr-xcontrib/ntp/html/drivers/driver44.html92
-rw-r--r--contrib/ntp/html/drivers/driver5.html72
-rw-r--r--contrib/ntp/html/drivers/driver6.html89
-rw-r--r--contrib/ntp/html/drivers/driver7.html235
-rw-r--r--contrib/ntp/html/drivers/driver8.html136
-rw-r--r--contrib/ntp/html/drivers/driver9.html58
-rw-r--r--contrib/ntp/html/drivers/icons/home.gifbin0 -> 983 bytes
-rw-r--r--contrib/ntp/html/drivers/icons/mail2.gifbin0 -> 287 bytes
-rw-r--r--contrib/ntp/html/drivers/oncore-shmem.html158
-rw-r--r--contrib/ntp/html/extern.html32
-rw-r--r--contrib/ntp/html/hints.html23
-rw-r--r--contrib/ntp/html/hints/netbsd37
-rw-r--r--contrib/ntp/html/hints/sco.html24
-rw-r--r--contrib/ntp/html/hints/solaris-dosynctodr.html3
-rw-r--r--contrib/ntp/html/hints/solaris.html5
-rw-r--r--contrib/ntp/html/hints/vxworks.html92
-rw-r--r--contrib/ntp/html/hints/winnt.html259
-rw-r--r--contrib/ntp/html/howto.html108
-rw-r--r--contrib/ntp/html/icons/home.gifbin0 -> 983 bytes
-rw-r--r--contrib/ntp/html/icons/mail2.gifbin0 -> 287 bytes
-rw-r--r--contrib/ntp/html/index.html101
-rw-r--r--contrib/ntp/html/kern.html33
-rw-r--r--contrib/ntp/html/keygen.html112
-rw-r--r--contrib/ntp/html/ldisc.html46
-rw-r--r--contrib/ntp/html/manyopt.html69
-rw-r--r--contrib/ntp/html/measure.html22
-rw-r--r--contrib/ntp/html/miscopt.html93
-rw-r--r--contrib/ntp/html/monopt.html123
-rw-r--r--contrib/ntp/html/msyslog.html125
-rw-r--r--contrib/ntp/html/mx4200data.html1073
-rw-r--r--contrib/ntp/html/notes.html279
-rw-r--r--contrib/ntp/html/ntpd.html184
-rw-r--r--contrib/ntp/html/ntpdate.html69
-rw-r--r--contrib/ntp/html/ntpdc.html158
-rw-r--r--contrib/ntp/html/ntpdsim.html72
-rw-r--r--contrib/ntp/html/ntpq.html262
-rw-r--r--contrib/ntp/html/ntptime.html47
-rw-r--r--contrib/ntp/html/ntptrace.html48
-rw-r--r--contrib/ntp/html/parsedata.html336
-rw-r--r--contrib/ntp/html/parsenew.html195
-rw-r--r--contrib/ntp/html/patches.html36
-rw-r--r--contrib/ntp/html/porting.html40
-rw-r--r--contrib/ntp/html/pps.html40
-rw-r--r--contrib/ntp/html/prefer.html71
-rw-r--r--contrib/ntp/html/quick.html30
-rw-r--r--contrib/ntp/html/rdebug.html31
-rw-r--r--contrib/ntp/html/refclock.html103
-rw-r--r--contrib/ntp/html/release.html57
-rw-r--r--contrib/ntp/html/scripts/footer.txt7
-rw-r--r--contrib/ntp/html/scripts/links10.txt5
-rw-r--r--contrib/ntp/html/scripts/links11.txt5
-rw-r--r--contrib/ntp/html/scripts/links12.txt5
-rw-r--r--contrib/ntp/html/scripts/links7.txt5
-rw-r--r--contrib/ntp/html/scripts/links8.txt6
-rw-r--r--contrib/ntp/html/scripts/links9.txt7
-rw-r--r--contrib/ntp/html/scripts/style.css64
-rw-r--r--contrib/ntp/html/sntp.html56
-rw-r--r--contrib/ntp/html/tickadj.html48
-rw-r--r--contrib/ntp/include/Makefile.am9
-rw-r--r--contrib/ntp/include/Makefile.in361
-rw-r--r--contrib/ntp/include/adjtime.h6
-rw-r--r--contrib/ntp/include/audio.h7
-rw-r--r--contrib/ntp/include/isc/Makefile.am34
-rw-r--r--contrib/ntp/include/isc/Makefile.in380
-rw-r--r--contrib/ntp/include/isc/app.h212
-rw-r--r--contrib/ntp/include/isc/assertions.h120
-rw-r--r--contrib/ntp/include/isc/boolean.h29
-rw-r--r--contrib/ntp/include/isc/error.h55
-rw-r--r--contrib/ntp/include/isc/formatcheck.h34
-rw-r--r--contrib/ntp/include/isc/int.h53
-rw-r--r--contrib/ntp/include/isc/interfaceiter.h137
-rw-r--r--contrib/ntp/include/isc/ipv6.h153
-rw-r--r--contrib/ntp/include/isc/lang.h31
-rw-r--r--contrib/ntp/include/isc/lib.h39
-rw-r--r--contrib/ntp/include/isc/list.h180
-rw-r--r--contrib/ntp/include/isc/magic.h40
-rw-r--r--contrib/ntp/include/isc/mem.h31
-rw-r--r--contrib/ntp/include/isc/msgcat.h132
-rw-r--r--contrib/ntp/include/isc/msgs.h181
-rw-r--r--contrib/ntp/include/isc/mutex.h39
-rw-r--r--contrib/ntp/include/isc/net.h284
-rw-r--r--contrib/ntp/include/isc/netaddr.h139
-rw-r--r--contrib/ntp/include/isc/offset.h44
-rw-r--r--contrib/ntp/include/isc/once.h32
-rw-r--r--contrib/ntp/include/isc/platform.h40
-rw-r--r--contrib/ntp/include/isc/print.h69
-rw-r--r--contrib/ntp/include/isc/result.h103
-rw-r--r--contrib/ntp/include/isc/sockaddr.h196
-rw-r--r--contrib/ntp/include/isc/strerror.h42
-rw-r--r--contrib/ntp/include/isc/string.h56
-rw-r--r--contrib/ntp/include/isc/types.h102
-rw-r--r--contrib/ntp/include/isc/util.h225
-rw-r--r--contrib/ntp/include/l_stdlib.h11
-rw-r--r--contrib/ntp/include/ntp.h361
-rw-r--r--contrib/ntp/include/ntp_config.h69
-rw-r--r--contrib/ntp/include/ntp_control.h36
-rw-r--r--contrib/ntp/include/ntp_crypto.h205
-rw-r--r--contrib/ntp/include/ntp_fp.h17
-rw-r--r--contrib/ntp/include/ntp_if.h21
-rw-r--r--contrib/ntp/include/ntp_io.h17
-rw-r--r--contrib/ntp/include/ntp_machine.h51
-rw-r--r--contrib/ntp/include/ntp_md5.h9
-rw-r--r--contrib/ntp/include/ntp_refclock.h21
-rw-r--r--contrib/ntp/include/ntp_request.h124
-rw-r--r--contrib/ntp/include/ntp_rfc2553.h254
-rw-r--r--contrib/ntp/include/ntp_sprintf.h13
-rw-r--r--contrib/ntp/include/ntp_stdlib.h29
-rw-r--r--contrib/ntp/include/ntp_unixtime.h11
-rw-r--r--contrib/ntp/include/ntpd.h126
-rw-r--r--contrib/ntp/include/ntpsim.h93
-rw-r--r--contrib/ntp/include/recvbuff.h14
-rw-r--r--contrib/ntp/include/rsa_md5.h51
-rwxr-xr-xcontrib/ntp/install-sh169
-rw-r--r--contrib/ntp/kernel/Makefile.in247
-rw-r--r--contrib/ntp/kernel/sys/Makefile.am2
-rw-r--r--contrib/ntp/kernel/sys/Makefile.in216
-rw-r--r--contrib/ntp/kernel/sys/parsestreams.h2
-rw-r--r--contrib/ntp/kernel/sys/tt560_api.h489
-rw-r--r--contrib/ntp/libisc/assertions.c93
-rw-r--r--contrib/ntp/libisc/error.c101
-rw-r--r--contrib/ntp/libisc/ifiter_ioctl.c820
-rw-r--r--contrib/ntp/libisc/ifiter_sysctl.c305
-rw-r--r--contrib/ntp/libisc/inet_ntop.c198
-rw-r--r--contrib/ntp/libisc/interfaceiter.c159
-rw-r--r--contrib/ntp/libisc/isc_strerror.c74
-rw-r--r--contrib/ntp/libisc/lib.c77
-rw-r--r--contrib/ntp/libisc/mem.c42
-rw-r--r--contrib/ntp/libisc/msgcat.c130
-rw-r--r--contrib/ntp/libisc/net.c123
-rw-r--r--contrib/ntp/libisc/strerror.c72
-rw-r--r--contrib/ntp/libntp/Makefile.am42
-rw-r--r--contrib/ntp/libntp/Makefile.in1200
-rw-r--r--contrib/ntp/libntp/a_md5encrypt.c76
-rw-r--r--contrib/ntp/libntp/adjtime.c82
-rw-r--r--contrib/ntp/libntp/audio.c391
-rw-r--r--contrib/ntp/libntp/authkeys.c77
-rw-r--r--contrib/ntp/libntp/authreadkeys.c37
-rw-r--r--contrib/ntp/libntp/authusekey.c83
-rw-r--r--contrib/ntp/libntp/binio.c24
-rw-r--r--contrib/ntp/libntp/caljulian.c2
-rw-r--r--contrib/ntp/libntp/clocktypes.c8
-rw-r--r--contrib/ntp/libntp/decodenetnum.c51
-rw-r--r--contrib/ntp/libntp/dofptoa.c8
-rw-r--r--contrib/ntp/libntp/dolfptoa.c6
-rw-r--r--contrib/ntp/libntp/fptoa.c2
-rw-r--r--contrib/ntp/libntp/fptoms.c2
-rw-r--r--contrib/ntp/libntp/humandate.c10
-rw-r--r--contrib/ntp/libntp/icom.c1
-rw-r--r--contrib/ntp/libntp/ieee754io.c2
-rw-r--r--contrib/ntp/libntp/iosignal.c12
-rw-r--r--contrib/ntp/libntp/log.c17
-rw-r--r--contrib/ntp/libntp/machines.c10
-rw-r--r--contrib/ntp/libntp/md5c.c24
-rw-r--r--contrib/ntp/libntp/memmove.c8
-rw-r--r--contrib/ntp/libntp/mfptoa.c2
-rw-r--r--contrib/ntp/libntp/mfptoms.c2
-rw-r--r--contrib/ntp/libntp/mktime.c45
-rw-r--r--contrib/ntp/libntp/msyslog.c226
-rw-r--r--contrib/ntp/libntp/netof.c45
-rw-r--r--contrib/ntp/libntp/ntp_rfc2553.c331
-rw-r--r--contrib/ntp/libntp/refnumtoa.c25
-rw-r--r--contrib/ntp/libntp/snprintf.c13
-rw-r--r--contrib/ntp/libntp/socktoa.c48
-rw-r--r--contrib/ntp/libntp/socktohost.c32
-rw-r--r--contrib/ntp/libntp/statestr.c36
-rw-r--r--contrib/ntp/libntp/strerror.c2
-rw-r--r--contrib/ntp/libntp/strstr.c52
-rw-r--r--contrib/ntp/libntp/systime.c381
-rw-r--r--contrib/ntp/libntp/systime_s.c2
-rw-r--r--contrib/ntp/libparse/Makefile.in371
-rwxr-xr-xcontrib/ntp/missing69
-rwxr-xr-xcontrib/ntp/mkinstalldirs111
-rw-r--r--contrib/ntp/ntpd/Makefile.am28
-rw-r--r--contrib/ntp/ntpd/Makefile.in941
-rw-r--r--contrib/ntp/ntpd/check_y2k.c3
-rw-r--r--contrib/ntp/ntpd/cmd_args.c131
-rw-r--r--contrib/ntp/ntpd/ntp_config.c781
-rw-r--r--contrib/ntp/ntpd/ntp_control.c315
-rw-r--r--contrib/ntp/ntpd/ntp_crypto.c4815
-rw-r--r--contrib/ntp/ntpd/ntp_filegen.c8
-rw-r--r--contrib/ntp/ntpd/ntp_intres.c110
-rw-r--r--contrib/ntp/ntpd/ntp_io.c1933
-rw-r--r--contrib/ntp/ntpd/ntp_loopfilter.c312
-rw-r--r--contrib/ntp/ntpd/ntp_monitor.c144
-rw-r--r--contrib/ntp/ntpd/ntp_peer.c209
-rw-r--r--contrib/ntp/ntpd/ntp_proto.c2561
-rw-r--r--contrib/ntp/ntpd/ntp_refclock.c144
-rw-r--r--contrib/ntp/ntpd/ntp_request.c1143
-rw-r--r--contrib/ntp/ntpd/ntp_restrict.c724
-rw-r--r--contrib/ntp/ntpd/ntp_timer.c88
-rw-r--r--contrib/ntp/ntpd/ntp_util.c420
-rw-r--r--contrib/ntp/ntpd/ntpd.c248
-rw-r--r--contrib/ntp/ntpd/ntpsim.c368
-rw-r--r--contrib/ntp/ntpd/refclock_acts.c5
-rw-r--r--contrib/ntp/ntpd/refclock_arbiter.c3
-rw-r--r--contrib/ntp/ntpd/refclock_arc.c372
-rw-r--r--contrib/ntp/ntpd/refclock_as2201.c5
-rw-r--r--contrib/ntp/ntpd/refclock_atom.c28
-rw-r--r--contrib/ntp/ntpd/refclock_bancomm.c3
-rw-r--r--contrib/ntp/ntpd/refclock_chronolog.c4
-rw-r--r--contrib/ntp/ntpd/refclock_chu.c487
-rw-r--r--contrib/ntp/ntpd/refclock_conf.c2
-rw-r--r--contrib/ntp/ntpd/refclock_datum.c2
-rw-r--r--contrib/ntp/ntpd/refclock_dumbclock.c20
-rw-r--r--contrib/ntp/ntpd/refclock_fg.c12
-rw-r--r--contrib/ntp/ntpd/refclock_gpsvme.c13
-rw-r--r--contrib/ntp/ntpd/refclock_heath.c68
-rw-r--r--contrib/ntp/ntpd/refclock_hopfpci.c21
-rw-r--r--contrib/ntp/ntpd/refclock_hopfser.c22
-rw-r--r--contrib/ntp/ntpd/refclock_hpgps.c1
-rw-r--r--contrib/ntp/ntpd/refclock_irig.c363
-rw-r--r--contrib/ntp/ntpd/refclock_jjy.c22
-rw-r--r--contrib/ntp/ntpd/refclock_jupiter.c1192
-rw-r--r--contrib/ntp/ntpd/refclock_leitch.c1
-rw-r--r--contrib/ntp/ntpd/refclock_local.c131
-rw-r--r--contrib/ntp/ntpd/refclock_msfees.c4
-rw-r--r--contrib/ntp/ntpd/refclock_mx4200.c26
-rw-r--r--contrib/ntp/ntpd/refclock_neoclock4x.c580
-rw-r--r--contrib/ntp/ntpd/refclock_nmea.c32
-rw-r--r--contrib/ntp/ntpd/refclock_oncore.c3763
-rw-r--r--contrib/ntp/ntpd/refclock_palisade.c87
-rw-r--r--contrib/ntp/ntpd/refclock_palisade.h1
-rw-r--r--contrib/ntp/ntpd/refclock_parse.c36
-rw-r--r--contrib/ntp/ntpd/refclock_pcf.c5
-rw-r--r--contrib/ntp/ntpd/refclock_pst.c44
-rw-r--r--contrib/ntp/ntpd/refclock_ripencc.c10
-rw-r--r--contrib/ntp/ntpd/refclock_shm.c13
-rw-r--r--contrib/ntp/ntpd/refclock_tpro.c10
-rw-r--r--contrib/ntp/ntpd/refclock_trak.c1
-rw-r--r--contrib/ntp/ntpd/refclock_true.c4
-rw-r--r--contrib/ntp/ntpd/refclock_ulink.c13
-rw-r--r--contrib/ntp/ntpd/refclock_usno.c5
-rw-r--r--contrib/ntp/ntpd/refclock_wwv.c2143
-rw-r--r--contrib/ntp/ntpd/refclock_wwvb.c37
-rw-r--r--contrib/ntp/ntpdate/Makefile.am8
-rw-r--r--contrib/ntp/ntpdate/Makefile.in293
-rw-r--r--contrib/ntp/ntpdate/ntpdate.c339
-rw-r--r--contrib/ntp/ntpdate/ntpdate.h7
-rw-r--r--contrib/ntp/ntpdc/Makefile.am40
-rw-r--r--contrib/ntp/ntpdc/Makefile.in340
-rw-r--r--contrib/ntp/ntpdc/layout.std417
-rwxr-xr-xcontrib/ntp/ntpdc/nl.pl37
-rw-r--r--contrib/ntp/ntpdc/nl.pl.in37
-rw-r--r--contrib/ntp/ntpdc/nl_in.c3
-rw-r--r--contrib/ntp/ntpdc/ntpdc-layout.c21
-rw-r--r--contrib/ntp/ntpdc/ntpdc.c400
-rw-r--r--contrib/ntp/ntpdc/ntpdc.h11
-rw-r--r--contrib/ntp/ntpdc/ntpdc_ops.c972
-rw-r--r--contrib/ntp/ntpq/Makefile.am4
-rw-r--r--contrib/ntp/ntpq/Makefile.in279
-rw-r--r--contrib/ntp/ntpq/ntpq.c401
-rw-r--r--contrib/ntp/ntpq/ntpq.h7
-rw-r--r--contrib/ntp/ntpq/ntpq_ops.c233
-rw-r--r--contrib/ntp/parseutil/Makefile.am6
-rw-r--r--contrib/ntp/parseutil/Makefile.in272
-rw-r--r--contrib/ntp/parseutil/dcfd.c8
-rw-r--r--contrib/ntp/parseutil/testdcf.c2
-rw-r--r--contrib/ntp/scripts/Makefile.am2
-rw-r--r--contrib/ntp/scripts/Makefile.in211
-rwxr-xr-xcontrib/ntp/scripts/ntptrace.in60
-rw-r--r--contrib/ntp/sntp/Makefile.am38
-rw-r--r--contrib/ntp/sntp/Makefile.in534
-rw-r--r--contrib/ntp/sntp/README535
-rw-r--r--contrib/ntp/sntp/aclocal.m4835
-rwxr-xr-xcontrib/ntp/sntp/config.guess1407
-rwxr-xr-xcontrib/ntp/sntp/config.sub1504
-rwxr-xr-xcontrib/ntp/sntp/configure5916
-rw-r--r--contrib/ntp/sntp/configure.ac82
-rwxr-xr-xcontrib/ntp/sntp/depcomp472
-rw-r--r--contrib/ntp/sntp/header.h89
-rwxr-xr-xcontrib/ntp/sntp/install-sh294
-rw-r--r--contrib/ntp/sntp/internet.c221
-rw-r--r--contrib/ntp/sntp/internet.h47
-rw-r--r--contrib/ntp/sntp/kludges.h62
-rw-r--r--contrib/ntp/sntp/main.c1789
-rwxr-xr-xcontrib/ntp/sntp/missing336
-rwxr-xr-xcontrib/ntp/sntp/mkinstalldirs111
-rw-r--r--contrib/ntp/sntp/socket.c395
-rw-r--r--contrib/ntp/sntp/timing.c110
-rw-r--r--contrib/ntp/sntp/unix.c92
-rw-r--r--contrib/ntp/util/Makefile.am22
-rw-r--r--contrib/ntp/util/Makefile.in408
-rw-r--r--contrib/ntp/util/README4
-rw-r--r--contrib/ntp/util/audio-pcm.c154
-rw-r--r--contrib/ntp/util/hist.c23
-rw-r--r--contrib/ntp/util/ntp-keygen.c1953
-rw-r--r--contrib/ntp/util/ntptime.c16
-rw-r--r--contrib/ntp/util/pps-api.c100
-rw-r--r--contrib/ntp/util/sht.c2
-rw-r--r--contrib/ntp/util/tickadj.c4
-rw-r--r--contrib/ntp/util/timetrim.c21
-rw-r--r--contrib/ntp/version2
380 files changed, 97074 insertions, 17509 deletions
diff --git a/contrib/ntp/COPYRIGHT b/contrib/ntp/COPYRIGHT
index 8ee6eab0412d..1b5dc7f2404e 100644
--- a/contrib/ntp/COPYRIGHT
+++ b/contrib/ntp/COPYRIGHT
@@ -1,17 +1,19 @@
-This file is automatically generated from html/copyright.htm
+This file is automatically generated from html/copyright.html
Copyright Notice
-
- [sheepb.jpg] "Clone me," says Dolly sheepishly
+
+ jpg "Clone me," says Dolly sheepishly
+
+ Last update: 15:44 UTC Tuesday, July 15, 2003
_________________________________________________________________
-
+
The following copyright notice applies to all files collectively
called the Network Time Protocol Version 4 Distribution. Unless
specifically declared otherwise in an individual file, this notice
applies as if the text was explicitly included in the file.
***********************************************************************
* *
-* Copyright (c) David L. Mills 1992-2001 *
+* Copyright (c) David L. Mills 1992-2003 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose and without fee is hereby *
@@ -30,144 +32,145 @@ This file is automatically generated from html/copyright.htm
The following individuals contributed in part to the Network Time
Protocol Distribution Version 4 and are acknowledged as authors of
this work.
- 1. [1]Mark Andrews <marka@syd.dms.csiro.au> Leitch atomic clock
+ 1. [1]Mark Andrews <mark_andrews@isc.org> Leitch atomic clock
controller
2. [2]Bernd Altmeier <altmeier@atlsoft.de> hopf Elektronik serial
line and PCI-bus devices
3. [3]Viraj Bais <vbais@mailman1.intel.com> and [4]Clayton Kirkwood
<kirkwood@striderfm.intel.com> port to WindowsNT 3.5
4. [5]Michael Barone <michael,barone@lmco.com> GPSVME fixes
- 5. [6]Karl Berry <karl@owl.HQ.ileaf.com> syslog to file option
- 6. [7]Greg Brackley <greg.brackley@bigfoot.com> Major rework of WINNT
+ 5. [6]Jean-Francois Boudreault
+ <Jean-Francois.Boudreault@viagenie.qc.ca>IPv6 support
+ 6. [7]Karl Berry <karl@owl.HQ.ileaf.com> syslog to file option
+ 7. [8]Greg Brackley <greg.brackley@bigfoot.com> Major rework of WINNT
port. Clean up recvbuf and iosignal code into separate modules.
- 7. [8]Marc Brett <Marc.Brett@westgeo.com> Magnavox GPS clock driver
- 8. [9]Piete Brooks <Piete.Brooks@cl.cam.ac.uk> MSF clock driver,
+ 8. [9]Marc Brett <Marc.Brett@westgeo.com> Magnavox GPS clock driver
+ 9. [10]Piete Brooks <Piete.Brooks@cl.cam.ac.uk> MSF clock driver,
Trimble PARSE support
- 9. [10]Reg Clemens <reg@dwf.com> Oncore driver (Current maintainer)
- 10. [11]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
- 11. [12]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and
+ 10. [11]Reg Clemens <reg@dwf.com> Oncore driver (Current maintainer)
+ 11. [12]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
+ 12. [13]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and
help with target configuration
- 12. [13]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
+ 13. [14]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
clock driver, NT adj. residuals, integrated Greg's Winnt port.
- 13. [14]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
- 14. [15]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux
+ 14. [15]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
+ 15. [16]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux
port
- 15. [16]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
+ 16. [17]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
NTP Version 2 as specified in RFC-1119
- 16. [17]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
- 17. [18]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
- 18. [19]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
- 19. [20]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
+ 17. [18]John Hay <jhay@@icomtek.csir.co.za> IPv6 support and testing
+ 18. [19]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
+ 19. [20]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
+ 20. [21]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
+ 21. [22]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
overhaul
- 20. [21]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
- [22]<H.Lambermont@chello.nl> ntpsweep
- 21. [23]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
+ 22. [23]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
+ [24]<H.Lambermont@chello.nl> ntpsweep
+ 23. [25]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
author)
- 22. [24]Frank Kardel [25]<Frank.Kardel@informatik.uni-erlangen.de>
+ 24. [26]Frank Kardel [27]<Frank.Kardel@informatik.uni-erlangen.de>
PARSE <GENERIC> driver (14 reference clocks), STREAMS modules for
PARSE, support scripts, syslog cleanup
- 23. [26]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
+ 25. [28]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
modifications, HPUX modifications
- 24. [27]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
- 25. [28]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
+ 26. [29]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
+ 27. [30]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
GPS clock driver
- 26. [29]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
- 27. [30]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
- 28. [31]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
+ 28. [31]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
+ 29. [32]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
+ 30. [33]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
code for Version 3 as specified in RFC-1305
- 29. [32]David L. Mills <mills@udel.edu> Version 4 foundation: clock
+ 31. [34]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
+ Maintenance
+ 32. [35]David L. Mills <mills@udel.edu> Version 4 foundation: clock
discipline, authentication, precision kernel; clock drivers:
Spectracom, Austron, Arbiter, Heath, ATOM, ACTS, KSI/Odetics;
audio clock drivers: CHU, WWV/H, IRIG
- 30. [33]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
- 31. [34]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
- 32. [35]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
- 33. [36]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
- 34. [37]Derek Mulcahy <derek@toybox.demon.co.uk> and [38]Damon
+ 33. [36]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
+ 34. [37]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
+ 35. [38]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
+ 36. [39]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
+ 37. [40]Derek Mulcahy <derek@toybox.demon.co.uk> and [41]Damon
Hart-Davis <d@hd.org> ARCRON MSF clock driver
- 35. [39]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
+ 38. [42]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
monitoring/trap scripts, statistics file handling
- 36. [40]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
- 37. [41]Wilfredo Sánchez <wsanchez@apple.com> added support for
+ 39. [43]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
+ 40. [44]Wilfredo Sánchez <wsanchez@apple.com> added support for
NetInfo
- 38. [42]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
- 39. [43]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
+ 41. [45]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
+ 42. [46]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
space on the stuff in the html/pic/ subdirectory
- 40. [44]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
- 41. [45]Michael Shields <shields@tembel.org> USNO clock driver
- 42. [46]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
+ 43. [47]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
+ 44. [48]Michael Shields <shields@tembel.org> USNO clock driver
+ 45. [49]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
driver
- 43. [47]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
+ 46. [50]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
makeover, various other bits (see the ChangeLog)
- 44. [48]Kenneth Stone <ken@sdd.hp.com> HP-UX port
- 45. [49]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
+ 47. [51]Kenneth Stone <ken@sdd.hp.com> HP-UX port
+ 48. [52]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
support
- 46. [50]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
+ 49. [53]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
driver
- 47. [51]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
+ 50. [54]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
TrueTime clock driver
- 48. [52]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
+ 51. [55]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
validated HTML documents according to the HTML DTD
_________________________________________________________________
-
- [53]gif
-
-
- [54]David L. Mills <mills@udel.edu>
References
- 1. mailto:marka@syd.dms.csiro.au
- 2. mailto:altmeier@atlsoft.de
- 3. mailto:vbais@mailman1.intel.co
- 4. mailto:kirkwood@striderfm.intel.com
- 5. mailto:michael.barone@lmco.com
- 6. mailto:karl@owl.HQ.ileaf.com
- 7. mailto:greg.brackley@bigfoot.com
- 8. mailto:Marc.Brett@westgeo.com
- 9. mailto:Piete.Brooks@cl.cam.ac.uk
- 10. mailto:reg@dwf.com
- 11. mailto:clift@ml.csiro.au
- 12. mailto:casey@csc.co.za
- 13. mailto:Sven_Dietrich@trimble.COM
- 14. mailto:dundas@salt.jpl.nasa.gov
- 15. mailto:duwe@immd4.informatik.uni-erlangen.de
- 16. mailto:dennis@mrbill.canet.ca
- 17. mailto:glenn@herald.usask.ca
- 18. mailto:iglesias@uci.edu
- 19. mailto:jagubox.gsfc.nasa.gov
- 20. mailto:jbj@chatham.usdesign.com
- 21. mailto:Hans.Lambermont@nl.origin-it.com
- 22. mailto:H.Lambermont@chello.nl
- 23. mailto:phk@FreeBSD.ORG
- 24. http://www4.informatik.uni-erlangen.de/~kardel
- 25. mailto:Frank.Kardel@informatik.uni-erlangen.de
- 26. mailto:jones@hermes.chpc.utexas.edu
- 27. mailto:dkatz@cisco.com
- 28. mailto:leres@ee.lbl.gov
- 29. mailto:lindholm@ucs.ubc.ca
- 30. mailto:louie@ni.umd.edu
- 31. mailto:thorinn@diku.dk
- 32. mailto:mills@udel.edu
- 33. mailto:moeller@gwdgv1.dnet.gwdg.de
- 34. mailto:mogul@pa.dec.com
- 35. mailto:tmoore@fievel.daytonoh.ncr.com
- 36. mailto:kamal@whence.com
- 37. mailto:derek@toybox.demon.co.uk
- 38. mailto:d@hd.org
- 39. mailto:Rainer.Pruy@informatik.uni-erlangen.de
- 40. mailto:dirce@zk3.dec.com
- 41. mailto:wsanchez@apple.com
- 42. mailto:mrapple@quack.kfu.com
- 43. mailto:jack@innovativeinternet.com
- 44. mailto:schnitz@unipress.com
- 45. mailto:shields@tembel.org
- 46. mailto:pebbles.jpl.nasa.gov
- 47. mailto:harlan@pfcs.com
- 48. mailto:ken@sdd.hp.com
- 49. mailto:ajit@ee.udel.edu
- 50. mailto:tsuruoka@nc.fukuoka-u.ac.jp
- 51. mailto:vixie@vix.com
- 52. mailto:Ulrich.Windl@rz.uni-regensburg.de
- 53. file://localhost/backroom/ntp-stable/html/index.htm
- 54. mailto:mills@udel.edu
+ 1. mailto:%20mark_andrews@isc.org
+ 2. mailto:%20altmeier@atlsoft.de
+ 3. mailto:%20vbais@mailman1.intel.co
+ 4. mailto:%20kirkwood@striderfm.intel.com
+ 5. mailto:%20michael.barone@lmco.com
+ 6. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca
+ 7. mailto:%20karl@owl.HQ.ileaf.com
+ 8. mailto:%20greg.brackley@bigfoot.com
+ 9. mailto:%20Marc.Brett@westgeo.com
+ 10. mailto:%20Piete.Brooks@cl.cam.ac.uk
+ 11. mailto:%20reg@dwf.com
+ 12. mailto:%20clift@ml.csiro.au
+ 13. mailto:casey@csc.co.za
+ 14. mailto:%20Sven_Dietrich@trimble.COM
+ 15. mailto:%20dundas@salt.jpl.nasa.gov
+ 16. mailto:%20duwe@immd4.informatik.uni-erlangen.de
+ 17. mailto:%20dennis@mrbill.canet.ca
+ 18. mailto:%20jhay@icomtek.csir.co.za
+ 19. mailto:%20glenn@herald.usask.ca
+ 20. mailto:%20iglesias@uci.edu
+ 21. mailto:%20jagubox.gsfc.nasa.gov
+ 22. mailto:%20jbj@chatham.usdesign.com
+ 23. mailto:Hans.Lambermont@nl.origin-it.com
+ 24. mailto:H.Lambermont@chello.nl
+ 25. mailto:%20phk@FreeBSD.ORG
+ 26. http://www4.informatik.uni-erlangen.de/%7ekardel
+ 27. mailto:%20Frank.Kardel@informatik.uni-erlangen.de
+ 28. mailto:%20jones@hermes.chpc.utexas.edu
+ 29. mailto:%20dkatz@cisco.com
+ 30. mailto:%20leres@ee.lbl.gov
+ 31. mailto:%20lindholm@ucs.ubc.ca
+ 32. mailto:%20louie@ni.umd.edu
+ 33. mailto:%20thorinn@diku.dk
+ 34. mailto:%20mayer@ntp.org
+ 35. mailto:%20mills@udel.edu
+ 36. mailto:%20moeller@gwdgv1.dnet.gwdg.de
+ 37. mailto:%20mogul@pa.dec.com
+ 38. mailto:%20tmoore@fievel.daytonoh.ncr.com
+ 39. mailto:%20kamal@whence.com
+ 40. mailto:%20derek@toybox.demon.co.uk
+ 41. mailto:%20d@hd.org
+ 42. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
+ 43. mailto:%20dirce@zk3.dec.com
+ 44. mailto:%20wsanchez@apple.com
+ 45. mailto:%20mrapple@quack.kfu.com
+ 46. mailto:%20jack@innovativeinternet.com
+ 47. mailto:%20schnitz@unipress.com
+ 48. mailto:%20shields@tembel.org
+ 49. mailto:%20pebbles.jpl.nasa.gov
+ 50. mailto:%20harlan@pfcs.com
+ 51. mailto:%20ken@sdd.hp.com
+ 52. mailto:%20ajit@ee.udel.edu
+ 53. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
+ 54. mailto:%20vixie@vix.com
+ 55. mailto:%20Ulrich.Windl@rz.uni-regensburg.de
diff --git a/contrib/ntp/ChangeLog b/contrib/ntp/ChangeLog
index 0693482549d1..5b96fad77e0c 100644
--- a/contrib/ntp/ChangeLog
+++ b/contrib/ntp/ChangeLog
@@ -1,243 +1,16234 @@
-ChangeSet@1.786, 2002-02-26 22:44:34-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.1161 03/10/15 05:51:42 stenn@whimsy.udel.edu +2 -0
+ 4.2.0
+
+ configure.in
+ 1.333 03/10/15 05:50:45 stenn@whimsy.udel.edu +1 -1
+ 4.2.0
+
+ NEWS
+ 1.45 03/10/15 05:50:45 stenn@whimsy.udel.edu +3 -1
+ 4.2.0
+
+ChangeSet
+ 1.1160 03/10/15 05:48:17 stenn@whimsy.udel.edu +1 -0
+ cleanup
+
+ ntpdc/Makefile.am
+ 1.21 03/10/15 05:48:03 stenn@whimsy.udel.edu +1 -1
+ cleanup
+
+ChangeSet
+ 1.1159 03/10/15 04:43:35 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_parse.c
+ 1.23 03/10/15 04:43:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.52 03/10/15 04:41:28 stenn@whimsy.udel.edu +1 -0
+ Fix for bug 213
+
+ ntpd/refclock_parse.c
+ 1.18.2.2 03/10/15 04:41:10 stenn@whimsy.udel.edu +1 -1
+ Fix for bug 213
+
+ChangeSet
+ 1.1158 03/10/13 04:21:30 stenn@whimsy.udel.edu +16 -0
+ Cleanup from Dave Mills
+
+ html/ntpdsim.html
+ 1.3 03/10/13 04:21:16 stenn@whimsy.udel.edu +5 -5
+ Cleanup from Dave Mills
+
+ html/refclock.html
+ 1.28 03/10/13 04:21:15 stenn@whimsy.udel.edu +5 -5
+ Cleanup from Dave Mills
+
+ html/prefer.html
+ 1.14 03/10/13 04:21:15 stenn@whimsy.udel.edu +6 -6
+ Cleanup from Dave Mills
+
+ html/manyopt.html
+ 1.9 03/10/13 04:21:12 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills
+
+ html/index.html
+ 1.28 03/10/13 04:21:12 stenn@whimsy.udel.edu +9 -9
+ Cleanup from Dave Mills
+
+ html/keygen.html
+ 1.4 03/10/13 04:21:11 stenn@whimsy.udel.edu +12 -12
+ Cleanup from Dave Mills
+
+ html/howto.html
+ 1.15 03/10/13 04:21:11 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills
+
+ html/ntpd.html
+ 1.31 03/10/13 04:21:10 stenn@whimsy.udel.edu +13 -13
+ Cleanup from Dave Mills
+
+ html/confopt.html
+ 1.27 03/10/13 04:21:09 stenn@whimsy.udel.edu +5 -5
+ Cleanup from Dave Mills
+
+ html/config.html
+ 1.16 03/10/13 04:21:09 stenn@whimsy.udel.edu +9 -9
+ Cleanup from Dave Mills
+
+ html/clockopt.html
+ 1.17 03/10/13 04:21:08 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills
+
+ html/build.html
+ 1.18 03/10/13 04:21:08 stenn@whimsy.udel.edu +8 -8
+ Cleanup from Dave Mills
+
+ html/authopt.html
+ 1.30 03/10/13 04:21:08 stenn@whimsy.udel.edu +9 -9
+ Cleanup from Dave Mills
+
+ html/audio.html
+ 1.15 03/10/13 04:21:07 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills
+
+ html/assoc.html
+ 1.20 03/10/13 04:21:07 stenn@whimsy.udel.edu +8 -8
+ Cleanup from Dave Mills
+
+ html/accopt.html
+ 1.22 03/10/13 04:21:07 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills
+
+ChangeSet
+ 1.1157 03/10/11 04:01:59 stenn@whimsy.udel.edu +1 -0
+ Cleanup from Dave Mills
+
+ html/hints/sco.html
+ 1.6 03/10/11 04:01:43 stenn@whimsy.udel.edu +19 -37
+ Cleanup from Dave Mills
+
+ChangeSet
+ 1.1156 03/10/11 03:55:07 stenn@whimsy.udel.edu +1 -0
+ [Bug 207] ntpdc crashes in monlinst with pre-IPv6 ntpd
+
+ ntpdc/ntpdc.c
+ 1.31 03/10/11 03:54:51 stenn@whimsy.udel.edu +1 -1
+ [Bug 207] ntpdc crashes in monlinst with pre-IPv6 ntpd
+
+ChangeSet
+ 1.1153.2.1 03/10/09 00:24:40 stenn@whimsy.udel.edu +4 -0
+ Updates from Dave Mills (first pass)
+
+ html/index.html
+ 1.27 03/10/09 00:24:12 stenn@whimsy.udel.edu +2 -2
+ Updates from Dave Mills (first pass)
+
+ html/ntpd.html
+ 1.30 03/10/09 00:24:10 stenn@whimsy.udel.edu +10 -10
+ Updates from Dave Mills (first pass)
+
+ html/confopt.html
+ 1.26 03/10/09 00:24:09 stenn@whimsy.udel.edu +81 -77
+ Updates from Dave Mills (first pass)
+
+ html/accopt.html
+ 1.21 03/10/09 00:24:08 stenn@whimsy.udel.edu +3 -3
+ Updates from Dave Mills (first pass)
+
+ChangeSet
+ 1.1153.1.7 03/10/08 09:42:13 peda@sectra.se +1 -0
+ Check return value of localtime call to prevent NULL dereference.
+
+ libntp/humandate.c
+ 1.4 03/10/08 09:41:54 peda@sectra.se +8 -2
+ Check return value of localtime call to prevent NULL dereference.
+
+ChangeSet
+ 1.1153.1.6 03/10/07 17:10:34 stenn@whimsy.udel.edu +2 -0
+ Merge pogo:/usa/bruckman/ntp-dev into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpq/ntpq.c
+ 1.43 03/10/07 17:10:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpdc/ntpdc_ops.c
+ 1.27 03/10/07 17:10:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1153.1.5 03/10/07 06:44:19 stenn@whimsy.udel.edu +1 -0
+ Automerge
+
+ ntpd/ntp_request.c
+ 1.53 03/10/07 06:44:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1153.1.4 03/10/07 06:36:38 stenn@whimsy.udel.edu +1 -0
+ [Bug 205] Prevent a NULL dereference
+
+ ntpd/ntp_proto.c
+ 1.161 03/10/07 06:36:22 stenn@whimsy.udel.edu +4 -2
+ [Bug 205] Prevent a NULL dereference
+
+ChangeSet
+ 1.1153.1.2 03/10/07 05:51:38 stenn@whimsy.udel.edu +1 -0
+ [Bug 197] Only check-kayout if we have PATH_PERL
+
+ ntpdc/Makefile.am
+ 1.20 03/10/07 05:51:05 stenn@whimsy.udel.edu +15 -9
+ Only check-kayout if we have PATH_PERL
+
+ChangeSet
+ 1.1152.4.2 03/10/07 04:44:07 stenn@whimsy.udel.edu +7 -0
+ Changes from Dave Mills - "monitor" stuff, mostly.
+
+ ntpdc/ntpdc_ops.c
+ 1.25.1.1 03/10/07 04:43:11 stenn@whimsy.udel.edu +2 -2
+ Changes from Dave Mills - "monitor" stuff, mostly.
+
+ ntpd/ntp_request.c
+ 1.51.1.1 03/10/07 04:42:53 stenn@whimsy.udel.edu +3 -7
+ Changes from Dave Mills - "monitor" stuff, mostly.
+
+ ntpd/ntp_monitor.c
+ 1.12 03/10/07 04:42:52 stenn@whimsy.udel.edu +8 -3
+ Changes from Dave Mills - "monitor" stuff, mostly.
+
+ ntpd/ntp_config.c
+ 1.98 03/10/07 04:42:51 stenn@whimsy.udel.edu +17 -13
+ Changes from Dave Mills - "monitor" stuff, mostly.
+
+ include/ntpd.h
+ 1.59 03/10/07 04:42:40 stenn@whimsy.udel.edu +1 -0
+ Changes from Dave Mills - "monitor" stuff, mostly.
+
+ include/ntp_config.h
+ 1.28 03/10/07 04:42:37 stenn@whimsy.udel.edu +1 -0
+ Changes from Dave Mills - "monitor" stuff, mostly.
+
+ include/ntp.h
+ 1.92 03/10/07 04:42:36 stenn@whimsy.udel.edu +1 -2
+ Changes from Dave Mills - "monitor" stuff, mostly.
+
+ChangeSet
+ 1.1152.1.9 03/10/06 12:33:50 fredb@seduction.immanent.net +2 -0
+ Fix a couple more gcc warnings that are only seen on non-typical platforms.
+
+ ntpd/refclock_parse.c
+ 1.22 03/10/06 12:33:50 fredb@seduction.immanent.net +11 -11
+ Fix another gcc warning about "de-referencing type-punned pointer"
+ that is only seen on hosts with signed "char" type.
+
+ ntpd/refclock_jupiter.c
+ 1.14 03/10/06 12:33:49 fredb@seduction.immanent.net +4 -4
+ Fix cryptic gcc warning about "implicit truncation of unsigned type"
+ that is only seen on big endian hosts.
+
+ChangeSet
+ 1.1152.1.8 03/10/06 10:38:09 bruckman@pogo.udel.edu +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into pogo.udel.edu:/pogo/users/bruckman/ntp-dev
+
+ BitKeeper/etc/logging_ok
+ 1.40 03/10/06 10:37:56 bruckman@pogo.udel.edu +1 -0
+ Logging to logging@openlogging.org accepted
+
+ChangeSet
+ 1.1152.4.1 03/10/06 03:12:59 stenn@whimsy.udel.edu +1 -0
+ Distribution directory cleanup
+
+ Makefile.am
+ 1.44 03/10/06 03:12:35 stenn@whimsy.udel.edu +18 -1
+ Distribution directory cleanup
+
+ChangeSet
+ 1.1152.1.7 03/10/05 17:49:11 fredb@seduction.immanent.net +7 -0
+ Fixes for various and sundry compiler warnings, from NetBSD.
+
+ ntpq/ntpq_ops.c
+ 1.18 03/10/05 17:49:10 fredb@seduction.immanent.net +1 -1
+ Fix for gcc-3.3.1 warnings:
+
+ dereferencing type-punned pointer will break strict-aliasing rules
+
+ From NetBSD CVS, by Jason Thorpe.
+
+ ntpq/ntpq.c
+ 1.41.1.1 03/10/05 17:49:09 fredb@seduction.immanent.net +2 -2
+ Fix for gcc-3.3.1 warnings:
+
+ dereferencing type-punned pointer will break strict-aliasing rules
+
+ From NetBSD CVS, by Jason Thorpe.
+
+ ntpdc/ntpdc_ops.c
+ 1.26 03/10/05 17:49:09 fredb@seduction.immanent.net +17 -17
+ Fix for gcc-3.3.1 warnings:
+
+ dereferencing type-punned pointer will break strict-aliasing rules
+
+ From NetBSD CVS, by Jason Thorpe.
+
+ ntpd/refclock_shm.c
+ 1.15 03/10/05 17:49:09 fredb@seduction.immanent.net +3 -0
+ Supply missing prototype, by Matthias Drochner.
+
+ ntpd/ntp_io.c
+ 1.94 03/10/05 17:49:09 fredb@seduction.immanent.net +4 -0
+ Avoid a compiler warning when no refclocks are configured at all.
+ From NetBSD CVS, by Manuel Bouyer. (No, NetBSD doesn't explicitly
+ support building ntpd that way.)
+
+ ntpd/ntp_crypto.c
+ 1.89 03/10/05 17:49:09 fredb@seduction.immanent.net +6 -6
+ Fixes for gcc "incompatible pointer type" warnings, by Matthias Drochner.
+
+ ntpd/ntp_control.c
+ 1.63 03/10/05 17:49:09 fredb@seduction.immanent.net +4 -0
+ Avoid a compiler warning when no refclocks are configured at all.
+ From NetBSD CVS, by Manuel Bouyer. (No, NetBSD doesn't explicitly
+ support building ntpd that way.)
+
+ChangeSet
+ 1.1152.1.6 03/10/03 14:26:15 fredb@rapture.immanent.net +1 -0
+ Initialize the value of "v6_flag" in all cases in sys_info(), so that "ntpdc -c sysinfo"
+ won't display the random, uninitialized value of peer6 for the system peer in the
+ no syspeer case on IPv6-capable hosts. Problem noted and solution provided by Matthias
+ Drochner, with a minor optimization by myself.
+
+
+
+ ntpd/ntp_request.c
+ 1.52 03/10/03 14:26:13 fredb@rapture.immanent.net +6 -2
+ Initialize "v6_flag" in all cases.
+
+ChangeSet
+ 1.1152.1.5 03/10/03 09:12:23 fredb@rapture.immanent.net +1 -0
+ Resolve conflicts.
+
+ ntpd/ntp_io.c
+ 1.93 03/10/03 09:12:22 fredb@rapture.immanent.net +1 -7
+ Resolve conflicts.
+
+ChangeSet
+ 1.1152.1.4 03/09/30 11:35:30 fredb@rapture.immanent.net +2 -0
+ Some timers tweaks, including one build fix.
+
+ ntpd/ntp_timer.c
+ 1.26 03/09/30 11:35:29 fredb@rapture.immanent.net +2 -2
+ Fix paste-o in version 1.25, fixing build on NetBSD 1.6.1 and other platforms
+ without POSIX timers.
+
+ configure.in
+ 1.332 03/09/30 11:35:29 fredb@rapture.immanent.net +4 -1
+ NetBSD has a working timer_create() and timer_settime() since 1.6M, so
+ the first released version with them will be 2.0.
+
+ Folks running NetBSD-current (pre 2.0) can force the greater precision,
+ POSIX timers via
+
+ configure --build=$(uname -p)--netbsd2
+
+
+ChangeSet
+ 1.1152.1.3 03/09/30 10:11:28 fredb@seduction.immanent.net +1 -0
+ Merge
+
+ BitKeeper/etc/logging_ok
+ 1.39 03/09/30 10:11:28 fredb@seduction.immanent.net +1 -0
+ Logging to logging@openlogging.org accepted
+
+ BitKeeper/etc/logging_ok
+ 1.38 03/09/30 10:09:52 fredb@seduction.immanent.net +1 -1
+ 'Auto converge'
+
+ChangeSet
+ 1.1152.3.2 03/09/29 23:37:34 blu@corwin. +2 -0
+ ntp_timer.c:
+ Double check that value isn't zero and thus disarm the timer.
+
+ BitKeeper/etc/logging_ok
+ 1.37 03/09/29 23:37:34 blu@corwin. +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpd/ntp_timer.c
+ 1.25 03/09/29 23:36:09 blu@corwin. +14 -0
+ Double check that value isn't zero and thus disarm the timer.
+
+ChangeSet
+ 1.1152.2.2 03/08/26 22:19:32 mayer@tecotoo.myibg.com +2 -0
+ Add HAVE_VSNPRINTF macro to prevent extra declarations if already defined by the OS.
+
+ ports/winnt/include/config.h
+ 1.24 03/08/26 22:19:08 mayer@tecotoo.myibg.com +1 -0
+ Windows already declares vsnprintf. Disallow additional declarations.
+
+ include/l_stdlib.h
+ 1.14 03/08/26 22:19:05 mayer@tecotoo.myibg.com +2 -0
+ Added code to only declare vsnprintf if not declared elsewhere.
+
+ChangeSet
+ 1.1152.3.1 03/08/26 04:55:19 stenn@whimsy.udel.edu +1 -0
+ Also call findbcastinter() for MDF_ACAST | MDF_MCAST | MDF_BCAST. From Dave Mills.
+
+ ntpd/ntp_peer.c
+ 1.57 03/08/26 04:54:56 stenn@whimsy.udel.edu +1 -1
+ Also call findbcastinter() for MDF_ACAST | MDF_MCAST | MDF_BCAST. From Dave Mills.
+
+ChangeSet
+ 1.1148.1.5 03/08/22 21:24:57 mayer@tecotoo.myibg.com +1 -0
+ Changed vaddr to remaddr to avoid namespace collisions during build with NetBSD
+
+ ntpd/ntp_io.c
+ 1.91.1.1 03/08/22 21:23:16 mayer@tecotoo.myibg.com +9 -9
+ Changed vaddr to remaddr to avoid namespace collisions during build with NetBSD
+
+ChangeSet
+ 1.1152.1.1 03/08/20 21:31:45 fredb@tautology.immanent.net +1 -0
+ Fix for NetBSD 1.6.1.
+
+ ntpd/ntp_io.c
+ 1.92 03/08/20 21:31:43 fredb@tautology.immanent.net +7 -9
+ NetBSD 1.6.1 already has a conflicting typedef for vaddr_t in <machine/types.h>,
+ with a comment that says "This should probably be if defined(_KERNEL)", no less,
+ so just replace all mention of "vaddr_t" with "struct vaddr", rather than try to
+ think of a better name.
+
+ChangeSet
+ 1.1154 03/08/20 11:06:04 blu@jedi.east.sun.com +1 -0
+ ntpq.html:
+ Fix typos
+
+ html/ntpq.html
+ 1.23 03/08/20 11:03:21 blu@jedi.east.sun.com +2 -2
+ Fix typos
+
+ChangeSet
+ 1.1153 03/08/20 10:37:37 blu@jedi.east.sun.com +1 -0
+ ntpq.c:
+ If assoc_cache is loaded, clamp association ids using & notation to allow
+ specifying all associations without knowing how many there are.
+
+ ntpq/ntpq.c
+ 1.42 03/08/20 10:00:56 blu@jedi.east.sun.com +8 -4
+ If assoc_cache is loaded, clamp association ids using & notation to allow
+ specifying all associations without knowing how many there are.
+
+ChangeSet
+ 1.1148.1.4 03/08/19 15:07:53 mayer@tecotoo.myibg.com +1 -0
+ Comment out check for Up flag in Address_Okay
+
+ ntpd/ntp_io.c
+ 1.91 03/08/19 15:06:40 mayer@tecotoo.myibg.com +3 -2
+ Comment out check for Up flag in Address_Okay
+
+ChangeSet
+ 1.1148.1.3 03/08/19 14:55:51 mayer@tecotoo.myibg.com +1 -0
+ Add debug to address_okay
+
+ ntpd/ntp_io.c
+ 1.90 03/08/19 14:54:15 mayer@tecotoo.myibg.com +20 -0
+ Add debug to address_okay
+
+ChangeSet
+ 1.1150 03/08/17 04:05:20 stenn@whimsy.udel.edu +1 -0
+ Lint - reported by Danny Mayer
+
+ ntpq/ntpq.c
+ 1.41 03/08/17 04:05:03 stenn@whimsy.udel.edu +6 -6
+ Lint - reported by Danny Mayer
+
+ChangeSet
+ 1.1148.1.2 03/08/16 21:29:02 mayer@tecotoo.myibg.com +1 -0
+ Fix add_addr_to_list call
+
+ ntpd/ntp_io.c
+ 1.89 03/08/16 21:27:29 mayer@tecotoo.myibg.com +1 -1
+ 'Fix
+
+ChangeSet
+ 1.1148.1.1 03/08/16 20:59:26 mayer@tecotoo.myibg.com +1 -0
+ Add linked list to track remote addresses.
+
+ ntpd/ntp_io.c
+ 1.88 03/08/16 20:58:51 mayer@tecotoo.myibg.com +83 -0
+ Add linked list to track remote addresses.
+
+ChangeSet
+ 1.1149 03/08/15 14:18:53 blu@jedi.east.sun.com +3 -0
+ ntp_timer.c, ntp_loopfilter.c, ntpd.h:
+ Reinitialize the interval timer after stepping the clock. The behavior of
+ the timer after a clock step is not addressed by POSIX and is undefined,
+ so the safest course is to reintitialize it when we step the clock. Solaris,
+ for one, is known to stop triggering the timer after a step backward until
+ the system clock "catches up".
+
+ ntpd/ntp_timer.c
+ 1.24 03/08/15 14:15:47 blu@jedi.east.sun.com +38 -11
+ Reinitialize the interval timer after stepping the clock. The behavior of
+ the timer after a clock step is not addressed by POSIX and is undefined,
+ so the safest course is to reintitialize it when we step the clock. Solaris,
+ for one, is known to stop triggering the timer after a step backward until
+ the system clock "catches up".
+
+ ntpd/ntp_loopfilter.c
+ 1.85 03/08/15 14:15:34 blu@jedi.east.sun.com +2 -0
+ Reinitialize the interval timer after stepping the clock. The behavior of
+ the timer after a clock step is not addressed by POSIX and is undefined,
+ so the safest course is to reintitialize it when we step the clock. Solaris,
+ for one, is known to stop triggering the timer after a step backward until
+ the system clock "catches up".
+
+ include/ntpd.h
+ 1.58 03/08/15 14:15:19 blu@jedi.east.sun.com +1 -0
+ Reinitialize the interval timer after stepping the clock. The behavior of
+ the timer after a clock step is not addressed by POSIX and is undefined,
+ so the safest course is to reintitialize it when we step the clock. Solaris,
+ for one, is known to stop triggering the timer after a step backward until
+ the system clock "catches up".
+
+ChangeSet
+ 1.1146.1.1 03/08/14 03:02:42 stenn@whimsy.udel.edu +2 -0
+ some little changes
+
+ ntpdc/Makefile.am
+ 1.19 03/08/14 03:01:55 stenn@whimsy.udel.edu +1 -0
+ Fix the cleanup rules.
+
+ ntpd/ntp_io.c
+ 1.87 03/08/13 18:56:00 stenn@whimsy.udel.edu +2 -2
+ Changes from Danny Mayer
+
+ChangeSet
+ 1.1140.1.11 03/08/13 09:46:24 blu@jedi.east.sun.com +7 -0
+ ignore:
+ Added firefly.sh include/ntp.patch include/ntp_control.patch include/ntp_request.patch jedi.sh ntpd/ntp_control.patch ntpd/ntp_peer.patch ntpd/ntp_proto.patch ntpd/ntp_request.patch ntpq/ntpq.patch to the ignore list
+ ntp_proto.c, ntp_peer.c, ntp_control.c, ntp_control.h, ntp.h:
+ Add rank counter for each peer. This is incremented each time a peer reaches
+ candidate status, or is actually selected as the system peer. By this method,
+ peers that are contribute most often to the system time will have a higher
+ count.
+
+ BitKeeper/etc/logging_ok
+ 1.36 03/08/13 09:45:36 blu@jedi.east.sun.com +1 -0
+ Logging to logging@openlogging.org accepted
+
+ BitKeeper/etc/ignore
+ 1.34 03/08/13 09:24:49 blu@jedi.east.sun.com +10 -0
+ Added firefly.sh include/ntp.patch include/ntp_control.patch include/ntp_request.patch jedi.sh ntpd/ntp_control.patch ntpd/ntp_peer.patch ntpd/ntp_proto.patch ntpd/ntp_request.patch ntpq/ntpq.patch to the ignore list
+
+ ntpd/ntp_proto.c
+ 1.160 03/08/13 09:24:36 blu@jedi.east.sun.com +2 -0
+ Add rank counter for each peer. This is incremented each time a peer reaches
+ candidate status, or is actually selected as the system peer. By this method,
+ peers that are contribute most often to the system time will have a higher
+ count.
+
+ ntpd/ntp_peer.c
+ 1.56 03/08/13 09:24:26 blu@jedi.east.sun.com +1 -0
+ Add rank counter for each peer. This is incremented each time a peer reaches
+ candidate status, or is actually selected as the system peer. By this method,
+ peers that are contribute most often to the system time will have a higher
+ count.
+
+ ntpd/ntp_control.c
+ 1.62 03/08/13 09:24:15 blu@jedi.east.sun.com +14 -9
+ Add rank counter for each peer. This is incremented each time a peer reaches
+ candidate status, or is actually selected as the system peer. By this method,
+ peers that are contribute most often to the system time will have a higher
+ count.
+
+ include/ntp_control.h
+ 1.23 03/08/13 09:24:06 blu@jedi.east.sun.com +9 -8
+ Add rank counter for each peer. This is incremented each time a peer reaches
+ candidate status, or is actually selected as the system peer. By this method,
+ peers that are contribute most often to the system time will have a higher
+ count.
+
+ include/ntp.h
+ 1.91 03/08/13 09:23:56 blu@jedi.east.sun.com +1 -0
+ Add rank counter for each peer. This is incremented each time a peer reaches
+ candidate status, or is actually selected as the system peer. By this method,
+ peers that are contribute most often to the system time will have a higher
+ count.
+
+ChangeSet
+ 1.1146 03/08/11 11:30:34 fredb@tautology.immanent.net +2 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into tautology.immanent.net:/s/bitkeeper/ntp-dev
+
+ ntpq/ntpq.c
+ 1.40 03/08/11 11:30:31 fredb@tautology.immanent.net +0 -0
+ Auto merged
+
+ configure.in
+ 1.331 03/08/11 11:30:31 fredb@tautology.immanent.net +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1140.1.10 03/08/11 00:15:46 stenn@whimsy.udel.edu +1 -0
+ Bug 182: Clean up Solaris version checks
+
+ configure.in
+ 1.327.1.3 03/08/11 00:15:33 stenn@whimsy.udel.edu +11 -2
+ Bug 182: Clean up Solaris version checks
+
+ChangeSet
+ 1.1140.1.8 03/08/10 22:26:03 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_control.c
+ 1.61 03/08/10 22:25:59 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1140.1.7 03/08/10 21:52:49 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpq/ntpq.c
+ 1.38.1.1 03/08/10 21:52:45 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1140.1.6 03/08/10 21:26:08 stenn@whimsy.udel.edu +1 -0
+ Remove the old ntptrace/Makefile from configure.in
+
+ configure.in
+ 1.327.1.2 03/08/10 21:25:58 stenn@whimsy.udel.edu +0 -1
+ Remove the old ntptrace/Makefile from configure.in
+
+ChangeSet
+ 1.1140.1.5 03/08/10 18:41:23 stenn@whimsy.udel.edu +3 -0
+ Updates from Dave Mills
+
+ html/release.html
+ 1.28 03/08/10 18:40:54 stenn@whimsy.udel.edu +2 -2
+ Updates from Dave Mills
+
+ html/debug.html
+ 1.22 03/08/10 18:40:54 stenn@whimsy.udel.edu +2 -2
+ Updates from Dave Mills
+
+ html/accopt.html
+ 1.20 03/08/10 18:40:54 stenn@whimsy.udel.edu +4 -6
+ Updates from Dave Mills
+
+ChangeSet
+ 1.1140.1.4 03/08/10 18:35:30 stenn@whimsy.udel.edu +1 -0
+ typo
+
+ html/ntpdc.html
+ 1.19 03/08/10 18:35:17 stenn@whimsy.udel.edu +1 -1
+ typo
+
+ChangeSet
+ 1.1140.1.3 03/08/10 18:12:34 stenn@whimsy.udel.edu +1 -0
+ peer_unfit() needs to test for FLAG_NOSELECT. From Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.159 03/08/10 18:12:22 stenn@whimsy.udel.edu +3 -1
+ peer_unfit() needs to test for FLAG_NOSELECT. From Dave Mills.
+
+ChangeSet
+ 1.1145 03/08/10 10:27:44 fredb@tautology.immanent.net +1 -0
+ Don't try to create "ntptrace/Makefile", now that "ntptrace" is gone.
+
+ configure.in
+ 1.330 03/08/10 10:27:42 fredb@tautology.immanent.net +0 -1
+ Don't try to create "ntptrace/Makefile", now that "ntptrace" is gone.
+
+ChangeSet
+ 1.1144 03/08/10 08:50:40 fredb@tautology.immanent.net +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into tautology.immanent.net:/s/bitkeeper/ntp-dev
+
+ configure.in
+ 1.329 03/08/10 08:50:37 fredb@tautology.immanent.net +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1140.1.2 03/08/10 07:56:27 stenn@whimsy.udel.edu +5 -0
+ Remove the old ntptrace/ code.
+
+ Makefile.am
+ 1.43 03/08/10 07:56:15 stenn@whimsy.udel.edu +1 -1
+ Remove the old ntptrace/ code.
+
+ BitKeeper/deleted/.del-ntptrace.h~3e480692
+ 1.4 03/08/10 07:55:03 stenn@whimsy.udel.edu +0 -0
+ Delete: ntptrace/ntptrace.h
+
+ BitKeeper/deleted/.del-ntptrace.c~3aed0663
+ 1.17 03/08/10 07:55:03 stenn@whimsy.udel.edu +0 -0
+ Delete: ntptrace/ntptrace.c
+
+ BitKeeper/deleted/.del-README~3aed0663
+ 1.4 03/08/10 07:55:02 stenn@whimsy.udel.edu +0 -0
+ Delete: ntptrace/README
+
+ BitKeeper/deleted/.del-Makefile.am~3aed0663
+ 1.6 03/08/10 07:55:02 stenn@whimsy.udel.edu +0 -0
+ Delete: ntptrace/Makefile.am
+
+ChangeSet
+ 1.1140.1.1 03/08/10 06:31:13 stenn@whimsy.udel.edu +1 -0
+ configure.in:
+ Some HP-UX 11.11 systems don't have sockaddr_storage
+ so we can't allow the native IPv6 headers to be used.
+
+ configure.in
+ 1.327.1.1 03/08/10 06:30:13 stenn@whimsy.udel.edu +6 -0
+ Some HP-UX 11.11 systems don't have sockaddr_storage
+ so we can't allow the native IPv6 headers to be used.
+
+ChangeSet
+ 1.1143 03/08/09 09:44:36 fredb@rapture.immanent.net +2 -0
+ automake subtlety, to permit the bootstrapped sources to build and install with BSD make.
+
+ ntpq/Makefile.am
+ 1.11 03/08/09 09:44:35 fredb@rapture.immanent.net +1 -1
+ automake subtlety, to permit the bootstrapped sources to build and install with BSD make.
+
+ ntpdc/Makefile.am
+ 1.18 03/08/09 09:44:35 fredb@rapture.immanent.net +1 -1
+ automake subtlety, to permit the bootstrapped sources to build and install with BSD make.
+
+ChangeSet
+ 1.1142 03/08/09 06:15:08 fredb@tautology.immanent.net +1 -0
+ Another fix for "." not in $PATH.
+
+ ntpdc/Makefile.am
+ 1.17 03/08/09 06:15:06 fredb@tautology.immanent.net +1 -1
+ Another fix for "." not in $PATH.
+
+ChangeSet
+ 1.1141 03/08/09 06:13:01 fredb@tautology.immanent.net +3 -0
+ Do "readline" on NetBSD.
+
+ ntpq/ntpq.c
+ 1.39 03/08/09 06:12:59 fredb@tautology.immanent.net +5 -5
+ Do "readline" on NetBSD.
+
+ ntpdc/ntpdc.c
+ 1.30 03/08/09 06:12:59 fredb@tautology.immanent.net +5 -5
+ Do "readline" on NetBSD.
+
+ configure.in
+ 1.328 03/08/09 06:12:58 fredb@tautology.immanent.net +7 -2
+ Do "readline" on NetBSD.
+
+ChangeSet
+ 1.1140 03/08/09 04:23:40 stenn@whimsy.udel.edu +1 -0
+ Also use CPPFLAGS for nl.c.
+
+ ntpdc/Makefile.am
+ 1.16 03/08/09 04:23:29 stenn@whimsy.udel.edu +1 -1
+ Also use CPPFLAGS for nl.c.
+
+ChangeSet
+ 1.1139 03/08/09 02:06:09 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ ntpdc/Makefile.am
+ 1.15 03/08/09 02:05:53 stenn@whimsy.udel.edu +0 -1
+ Looks the same to me...
+
+ChangeSet
+ 1.1138 03/08/08 15:31:43 stenn@whimsy.udel.edu +1 -0
+ Invoke the layout generation script using ./nl.pl
+
+ ntpdc/Makefile.am
+ 1.14 03/08/08 15:31:31 stenn@whimsy.udel.edu +1 -1
+ Invoke the layout generation script using ./nl.pl
+
+ChangeSet
+ 1.1135.2.1 03/08/08 17:18:59 ro@xayide.techfak.uni-bielefeld.de +1 -0
+ [Bug 185] Fix compilation error on Tru64 UNIX V4.0F with cc.
+
+ include/l_stdlib.h
+ 1.13 03/08/08 17:18:29 ro@xayide.techfak.uni-bielefeld.de +2 -0
+ Include <varargs.h> on pre-ANSI C systems.
+
+ChangeSet
+ 1.1135.1.1 03/08/08 17:12:56 ro@xayide.techfak.uni-bielefeld.de +4 -0
+ Fix some problems in layout.std verification.
+
+ ntpdc/nl_in.c
+ 1.2 03/08/08 17:12:31 ro@xayide.techfak.uni-bielefeld.de +1 -0
+ Include config.h first to avoid compilation warnings.
+
+ ntpdc/nl.pl.in
+ 1.6 03/08/08 17:12:31 ro@xayide.techfak.uni-bielefeld.de +7 -2
+ Allow more whitespace in preprocessor output.
+ Add debug code.
+ Abort if some line isn't matched instead of failing silently
+
+ ntpdc/layout.std
+ 1.2 03/08/08 17:12:31 ro@xayide.techfak.uni-bielefeld.de +296 -3
+ Update after nl.pl has been fixed to handle the output of different
+ preprocessors.
+
+ ntpdc/Makefile.am
+ 1.12.1.1 03/08/08 17:12:30 ro@xayide.techfak.uni-bielefeld.de +1 -1
+ ntpdc-layout must be built before layout.here is created.
+
+ChangeSet
+ 1.1137 03/08/08 05:56:16 stenn@whimsy.udel.edu +1 -0
+ Typo
+
+ parseutil/Makefile.am
+ 1.6 03/08/08 05:56:05 stenn@whimsy.udel.edu +1 -1
+ Typo
+
+ChangeSet
+ 1.683.14.51 03/08/08 11:43:34 peda@sectra.se +1 -0
+ Correctly remove trailing space from arguments of incoming
+ request variables.
+
+ ntpd/ntp_control.c
+ 1.37.3.8 03/08/08 11:43:33 peda@sectra.se +2 -2
+ Correctly remove trailing space from arguments of incoming
+ request variables.
+
+ChangeSet
+ 1.1136 03/08/08 05:36:14 stenn@whimsy.udel.edu +4 -0
+ Move -lcrypto to its own variable and out of LIBS.
+
+ util/Makefile.am
+ 1.21 03/08/08 05:36:01 stenn@whimsy.udel.edu +10 -9
+ Move -lcrypto to its own variable and out of LIBS.
+
+ ntpdc/Makefile.am
+ 1.13 03/08/08 05:36:01 stenn@whimsy.udel.edu +2 -2
+ Move -lcrypto to its own variable and out of LIBS.
+
+ ntpd/Makefile.am
+ 1.36 03/08/08 05:36:01 stenn@whimsy.udel.edu +2 -2
+ Move -lcrypto to its own variable and out of LIBS.
+
+ configure.in
+ 1.327 03/08/08 05:36:01 stenn@whimsy.udel.edu +1 -1
+ Move -lcrypto to its own variable and out of LIBS.
+
+ChangeSet
+ 1.683.14.50 03/08/08 10:48:40 peda@sectra.se +1 -0
+ clean up keyid mess in ntpq.
+
+ ntpq/ntpq.c
+ 1.16.2.1 03/08/08 10:48:38 peda@sectra.se +16 -10
+ clean up keyid mess.
+
+ChangeSet
+ 1.1135 03/08/08 04:36:17 stenn@whimsy.udel.edu +2 -0
+ Bug 180: Verify mode 7 packet layout at build time.
+
+ ntpdc/Makefile.am
+ 1.12 03/08/08 04:34:51 stenn@whimsy.udel.edu +9 -2
+ Check the structure layout to insure compatibility.
+
+ ntpdc/layout.std
+ 1.1 03/08/08 04:32:43 stenn@whimsy.udel.edu +124 -0
+
+ ntpdc/layout.std
+ 1.0 03/08/08 04:32:43 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/ntpdc/layout.std
+
+ChangeSet
+ 1.1134 03/08/08 04:00:14 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ libntp/authkeys.c
+ 1.13 03/08/08 04:00:10 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1130.1.5 03/08/07 08:05:53 mayer@tecotoo.myibg.com +6 -0
+ Clean up includes
+
+ ports/winnt/ntpq/ntpq.dsp
+ 1.12 03/08/07 08:05:09 mayer@tecotoo.myibg.com +2 -2
+ Clean up includes
+
+ ports/winnt/ntpdc/ntpdc.dsp
+ 1.12 03/08/07 08:05:06 mayer@tecotoo.myibg.com +2 -2
+ Clean up includes
+
+ ports/winnt/ntpdate/ntpdate.dsp
+ 1.11 03/08/07 08:05:04 mayer@tecotoo.myibg.com +2 -2
+ Clean up includes
+
+ ports/winnt/ntpd/ntpd.dsp
+ 1.18 03/08/07 08:05:02 mayer@tecotoo.myibg.com +1 -1
+ Clean up includes
+
+ ports/winnt/ntp-keygen/ntpkeygen.dsp
+ 1.3 03/08/07 08:05:00 mayer@tecotoo.myibg.com +1 -1
+ Clean up includes
+
+ ports/winnt/libntp/libntp.dsp
+ 1.16 03/08/07 08:04:57 mayer@tecotoo.myibg.com +1 -1
+ Clean up includes
+
+ChangeSet
+ 1.1130.3.1 03/08/07 04:12:19 stenn@whimsy.udel.edu +1 -0
+ Use our md5.h header under RedHat. Reported by Reg Clemens.
+
+ configure.in
+ 1.326 03/08/07 04:12:07 stenn@whimsy.udel.edu +7 -1
+ Use our md5.h header under RedHat. Reported by Reg Clemens.
+
+ChangeSet
+ 1.1130.1.4 03/08/06 22:15:52 mayer@tecotoo.myibg.com +5 -0
+ Use the Win32InitSockets code now in port/winnt/libisc/net.c so we use common code.
+ Need to force the isc headers to not include the isc/ipv6.h code.
+
+ ports/winnt/libisc/net.c
+ 1.4 03/08/06 22:15:17 mayer@tecotoo.myibg.com +18 -0
+ Use the Win32InitSockets code now in port/winnt/libisc/net.c so we use common code.
+
+ ports/winnt/include/isc/net.h
+ 1.3 03/08/06 22:15:15 mayer@tecotoo.myibg.com +5 -0
+ Use the Win32InitSockets code now in port/winnt/libisc/net.c so we use common code.
+
+ ntpq/ntpq.c
+ 1.38 03/08/06 22:15:12 mayer@tecotoo.myibg.com +11 -10
+ Use the Win32InitSockets code now in port/winnt/libisc/net.c so we use common code.
+ Need to force the isc headers to not include the isc/ipv6.h code.
+
+ ntpdc/ntpdc.c
+ 1.29 03/08/06 22:15:10 mayer@tecotoo.myibg.com +11 -10
+ Use the Win32InitSockets code now in port/winnt/libisc/net.c so we use common code.
+ Need to force the isc headers to not include the isc/ipv6.h code.
+
+ ntpd/ntp_io.c
+ 1.86 03/08/06 22:15:05 mayer@tecotoo.myibg.com +1 -4
+ Use the Win32InitSockets code now in port/winnt/libisc/net.c so we use common code.
+
+ChangeSet
+ 1.1130.1.3 03/08/05 07:04:07 stenn@whimsy.udel.edu +3 -0
+ auto* magic for ntpdc-layout
+
+ ntpdc/nl.pl.in
+ 1.5 03/08/05 07:03:32 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ntpdc/nl.pl.in
+ 1.4 03/08/05 07:03:14 stenn@whimsy.udel.edu +1 -1
+ auto* magic for ntpdc-layout
+
+ ntpdc/Makefile.am
+ 1.11 03/08/05 07:03:14 stenn@whimsy.udel.edu +9 -2
+ auto* magic for ntpdc-layout
+
+ configure.in
+ 1.325 03/08/05 07:03:14 stenn@whimsy.udel.edu +1 -0
+ auto* magic for ntpdc-layout
+
+ ntpdc/nl.pl.in
+ 1.3 03/08/05 06:30:01 stenn@whimsy.udel.edu +0 -0
+ Rename: ntpdc/nl.pl -> ntpdc/nl.pl.in
+
+ ntpdc/nl.pl
+ 1.2 03/08/05 06:24:09 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rwxrwxr-x
+
+ChangeSet
+ 1.1130.2.1 03/08/05 02:49:37 stenn@whimsy.udel.edu +1 -0
+ [Bug 174] Use Dave's fix.
+
+ ntpd/ntp_refclock.c
+ 1.51 03/08/05 02:49:27 stenn@whimsy.udel.edu +4 -3
+ [Bug 174] Use Dave's fix.
+
+ ntpdc/ntpdc-layout.c
+ 1.1 03/08/04 20:28:10 ro@xayide.techfak.uni-bielefeld.de[ro] +21 -0
+ BitKeeper file /amnt/figaro/volumes/adm-src/adm/src/ntp/ntp-dev-local/ntpdc/ntpdc-layout.c
+
+ ntpdc/nl_in.c
+ 1.1 03/08/04 20:28:10 ro@xayide.techfak.uni-bielefeld.de[ro] +2 -0
+ BitKeeper file /amnt/figaro/volumes/adm-src/adm/src/ntp/ntp-dev-local/ntpdc/nl_in.c
+
+ ntpdc/nl.pl
+ 1.1 03/08/04 20:28:10 ro@xayide.techfak.uni-bielefeld.de[ro] +32 -0
+ BitKeeper file /amnt/figaro/volumes/adm-src/adm/src/ntp/ntp-dev-local/ntpdc/nl.pl
+
+ ntpdc/ntpdc_ops.c
+ 1.25 03/08/04 20:28:10 ro@xayide.techfak.uni-bielefeld.de[ro] +17 -19
+ Include <stddef.h> for offsetof.
+ Use v4sizeof to avoid manual calculations of IPv4 structure sizes.
+
+ ntpdc/ntpdc-layout.c
+ 1.0 03/08/04 20:28:10 ro@xayide.techfak.uni-bielefeld.de[ro] +0 -0
+ BitKeeper file /amnt/figaro/volumes/adm-src/adm/src/ntp/ntp-dev-clone/ntpdc/ntpdc-layout.c
+
+ ntpdc/nl_in.c
+ 1.0 03/08/04 20:28:10 ro@xayide.techfak.uni-bielefeld.de[ro] +0 -0
+ BitKeeper file /amnt/figaro/volumes/adm-src/adm/src/ntp/ntp-dev-clone/ntpdc/nl_in.c
+
+ ntpdc/nl.pl
+ 1.0 03/08/04 20:28:10 ro@xayide.techfak.uni-bielefeld.de[ro] +0 -0
+ BitKeeper file /amnt/figaro/volumes/adm-src/adm/src/ntp/ntp-dev-clone/ntpdc/nl.pl
+
+ ntpdc/Makefile.am
+ 1.10 03/08/04 20:28:10 ro@xayide.techfak.uni-bielefeld.de[ro] +3 -0
+ Add ntpdc-layout.
+
+ ntpd/ntp_request.c
+ 1.51 03/08/04 20:28:10 ro@xayide.techfak.uni-bielefeld.de[ro] +22 -64
+ Include <stddef.h> for offsetof.
+ Define and use v6sizeof to replace manual determination of IPv4 vs. IPv6
+ structure sizes.
+ Use v4sizeof to directly calculate IPv4 structure sizes.
+
+ include/ntp_request.h
+ 1.22 03/08/04 20:28:10 ro@xayide.techfak.uni-bielefeld.de[ro] +24 -18
+ Remove ALT_* macros, define v4sizeof instead.
+ Carefully pad all structs varying between IPv4 and IPv6 so their layout
+ is identical irrespective of alignment requirements of struct in6_addr
+ (may require 4-byte or 8-byte alignment).
+ Fix a few typos.
+
+ChangeSet
+ 1.1130.1.1 03/08/04 18:33:47 ro@xayide.techfak.uni-bielefeld.de[ro] +8 -0
+ [Bug 164, 165] Make sure NTP mode 7 request and response packets are layed
+ out identically irrespective of 32 vs. 64-bit systems or struct in6_addr
+ alignment requirements.
+
+ BitKeeper/etc/logging_ok
+ 1.35 03/08/04 18:33:26 ro@xayide.techfak.uni-bielefeld.de[ro] +1 -0
+ Logging to logging@openlogging.org accepted
+
+ChangeSet
+ 1.683.14.49 03/08/04 14:42:21 peda@sectra.se +1 -0
+ Remember all trusted keys in a hash bucket when deleting keys.
+
+ libntp/authkeys.c
+ 1.6.1.3 03/08/04 14:42:18 peda@sectra.se +1 -0
+ Remember all trusted keys in a hash bucket when deleting keys.
+
+ChangeSet
+ 1.1131 03/08/04 14:02:44 peda@sectra.se +1 -0
+ Problem deleting keys when rereading them from file.
+ - Don't crash on odd number of keys in one hash.
+ - Delete all keys, not just every other key.
+
+ libntp/authkeys.c
+ 1.12 03/08/04 14:02:41 peda@sectra.se +0 -1
+ Don't crash on odd number of keys in one hash.
+ Delete all keys, not just every other key.
+
+ChangeSet
+ 1.1130 03/08/01 04:24:02 stenn@pogo.udel.edu +2 -0
+ Default to -4 if isc_net_probeipv6() fails.
+
+ ntpq/ntpq.c
+ 1.37 03/08/01 04:23:23 stenn@pogo.udel.edu +9 -1
+ Default to -4 if isc_net_probeipv6() fails.
+
+ ntpdc/ntpdc.c
+ 1.28 03/08/01 04:23:23 stenn@pogo.udel.edu +9 -1
+ Default to -4 if isc_net_probeipv6() fails.
+
+ChangeSet
+ 1.1129 03/08/01 01:54:04 stenn@whimsy.udel.edu +3 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_jupiter.c
+ 1.13 03/08/01 01:54:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.34 03/08/01 01:54:00 stenn@whimsy.udel.edu +1 -0
+ 'Auto converge'
+
+ BitKeeper/etc/logging_ok
+ 1.33 03/08/01 01:53:59 stenn@whimsy.udel.edu +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.26 03/08/01 01:53:59 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.32 03/08/01 01:53:58 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.25 03/08/01 01:53:56 stenn@whimsy.udel.edu +0 -0
+ auto-union
+
+ChangeSet
+ 1.683.18.1 03/07/31 15:29:27 peda@sectra.se +2 -0
+ Make the jupiter refclock aware of the year. I.e. don't trust the
+ system clock to have the correct year.
+
+ BitKeeper/etc/logging_ok
+ 1.1.1.12 03/07/31 15:29:26 peda@sectra.se +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpd/refclock_jupiter.c
+ 1.8.1.3 03/07/31 15:28:09 peda@sectra.se +4 -4
+ Get the correct year.
+
+ChangeSet
+ 1.1128 03/07/30 22:47:39 stenn@whimsy.udel.edu +1 -0
+ Merge pogo:/usa/mayer/ntp-dev-io into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_config.c
+ 1.97 03/07/30 22:47:35 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1111.2.7 03/07/30 22:31:25 mayer@tecotoo.myibg.com +1 -0
+ Put back the SOCK_DGRAM hints and the "ntp" service into getaddrinfo.
+ Remove the freeaddrinfo() when getaddrinfo fails.
+
+ ntpd/ntp_config.c
+ 1.95.1.2 03/07/30 22:30:54 mayer@tecotoo.myibg.com +2 -2
+ Put back the SOCK_DGRAM hints and the "ntp" service into getaddrinfo.
+ Remove the freeaddrinfo() when getaddrinfo fails.
+
+ChangeSet
+ 1.1111.2.6 03/07/29 15:25:52 mayer@tecotoo.myibg.com +1 -0
+ Minor updates
+
+ ntpd/ntp_config.c
+ 1.95.1.1 03/07/29 15:25:25 mayer@tecotoo.myibg.com +1 -3
+ Minor updates
+
+ChangeSet
+ 1.1111.3.1 03/07/29 15:10:37 mayer@tecotoo.myibg.com +1 -0
+ 'Minor
+
+ ntpd/ntp_config.c
+ 1.94.1.1 03/07/29 15:09:22 mayer@tecotoo.myibg.com +3 -2
+ 'Minor
+
+ChangeSet
+ 1.1127 03/07/28 20:32:47 stenn@whimsy.udel.edu +2 -0
+ Merge pogo:/usa/mayer/ntp-dev-io into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_io.c
+ 1.85 03/07/28 20:32:43 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.96 03/07/28 20:32:43 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1111.2.5 03/07/28 20:26:50 mayer@pogo.udel.edu +1 -0
+ Update config to check for IP version
+
+ ntpd/ntp_config.c
+ 1.95 03/07/28 20:26:08 mayer@pogo.udel.edu +4 -2
+ Update config to check for IP version
+
+ChangeSet
+ 1.1111.2.4 03/07/28 20:11:37 mayer@pogo.udel.edu +1 -0
+ Undo findinterface changes
+
+ ntpd/ntp_io.c
+ 1.83.1.1 03/07/28 20:09:49 mayer@pogo.udel.edu +0 -14
+ Undo findinterface changes
+
+ChangeSet
+ 1.1126 03/07/27 21:45:48 stenn@whimsy.udel.edu +1 -0
+ lint
+
+ sntp/unix.c
+ 1.3 03/07/27 21:45:38 stenn@whimsy.udel.edu +3 -4
+ lint
+
+ChangeSet
+ 1.1125 03/07/27 21:34:08 stenn@whimsy.udel.edu +2 -0
+ lint
+
+ sntp/header.h
+ 1.3 03/07/27 21:33:57 stenn@whimsy.udel.edu +1 -1
+ typo fix
+
+ ntpd/ntp_proto.c
+ 1.158 03/07/27 21:33:39 stenn@whimsy.udel.edu +1 -1
+ peer_unfit() is static.
+
+ChangeSet
+ 1.1124 03/07/27 21:07:08 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_shm.c
+ 1.14 03/07/27 21:07:04 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.47 03/07/27 21:04:14 stenn@whimsy.udel.edu +1 -0
+ lint
+
+ ntpd/refclock_shm.c
+ 1.10.1.2 03/07/27 21:04:04 stenn@whimsy.udel.edu +2 -2
+ lint
+
+ChangeSet
+ 1.1123 03/07/27 19:58:21 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_neoclock4x.c
+ 1.9 03/07/27 19:58:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.46 03/07/27 19:56:58 stenn@whimsy.udel.edu +1 -0
+ neol_atoi_len() is static. Clean up some fn definitions.
+
+ ntpd/refclock_neoclock4x.c
+ 1.1.1.6 03/07/27 19:56:46 stenn@whimsy.udel.edu +26 -21
+ neol_atoi_len() is static. Clean up some fn definitions.
+
+ChangeSet
+ 1.1122 03/07/27 18:16:44 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_neoclock4x.c
+ 1.8 03/07/27 18:16:41 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.45 03/07/27 18:14:41 stenn@whimsy.udel.edu +1 -0
+ Clean up some type mismatches.
+
+ ntpd/refclock_neoclock4x.c
+ 1.1.1.5 03/07/27 18:14:32 stenn@whimsy.udel.edu +2 -2
+ Clean up some type mismatches.
+
+ChangeSet
+ 1.1121 03/07/27 17:52:35 stenn@whimsy.udel.edu +1 -0
+ chu_newchan() is static...
+
+ ntpd/refclock_chu.c
+ 1.34 03/07/27 17:52:24 stenn@whimsy.udel.edu +1 -1
+ chu_newchan() is static...
+
+ChangeSet
+ 1.683.14.44 03/07/27 06:11:23 stenn@whimsy.udel.edu +1 -0
+ syslog does %m, not printf.
+
+ util/tickadj.c
+ 1.6 03/07/27 06:11:11 stenn@whimsy.udel.edu +2 -2
+ syslog does %m, not printf.
+
+ChangeSet
+ 1.1119 03/07/27 02:44:00 stenn@whimsy.udel.edu +6 -0
+ Bug 162: Quiet some warnings. From Rainer Orth, with some wiggles by Harlan.
+
+ ntpd/ntp_loopfilter.c
+ 1.84 03/07/27 02:42:39 stenn@whimsy.udel.edu +1 -1
+ Bug 162: Quiet some warnings. From Rainer Orth, with some wiggles by Harlan.
+
+ ntpd/ntp_io.c
+ 1.84 03/07/27 02:42:38 stenn@whimsy.udel.edu +0 -4
+ Bug 162: Quiet some warnings. From Rainer Orth, with some wiggles by Harlan.
+
+ ntpd/ntp_config.c
+ 1.93.1.1 03/07/27 02:42:38 stenn@whimsy.udel.edu +2 -0
+ Bug 162: Quiet some warnings. From Rainer Orth, with some wiggles by Harlan.
+
+ libntp/snprintf.c
+ 1.8 03/07/27 02:42:38 stenn@whimsy.udel.edu +6 -5
+ Bug 162: Quiet some warnings. From Rainer Orth, with some wiggles by Harlan.
+
+ libisc/isc_strerror.c
+ 1.3 03/07/27 02:42:38 stenn@whimsy.udel.edu +2 -0
+ Bug 162: Quiet some warnings. From Rainer Orth, with some wiggles by Harlan.
+
+ include/l_stdlib.h
+ 1.12 03/07/27 02:42:38 stenn@whimsy.udel.edu +7 -0
+ Bug 162: Quiet some warnings. From Rainer Orth, with some wiggles by Harlan.
+
+ChangeSet
+ 1.1114.1.1 03/07/27 00:58:17 stenn@whimsy.udel.edu +3 -0
+ Bug 162: Only link programs with libreadline that use it (ntpdc and ntpq), From Rainer Orth.
+
+ ntpq/Makefile.am
+ 1.10 03/07/27 00:57:31 stenn@whimsy.udel.edu +1 -1
+ Bug 162: Only link programs with libreadline that use it (ntpdc and ntpq), From Rainer Orth.
+
+ ntpdc/Makefile.am
+ 1.9 03/07/27 00:57:31 stenn@whimsy.udel.edu +1 -1
+ Bug 162: Only link programs with libreadline that use it (ntpdc and ntpq), From Rainer Orth.
+
+ configure.in
+ 1.324 03/07/27 00:57:30 stenn@whimsy.udel.edu +6 -1
+ Bug 162: Only link programs with libreadline that use it (ntpdc and ntpq), From Rainer Orth.
+
+ChangeSet
+ 1.1117 03/07/26 15:38:23 stenn@whimsy.udel.edu +62 -0
+ Bug 168: Rainer Orth: Fix world-writable files
+
+ libisc/strerror.c
+ 1.2 03/07/26 15:36:25 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/net.c
+ 1.3 03/07/26 15:36:24 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/msgcat.c
+ 1.3 03/07/26 15:36:24 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/mem.c
+ 1.2 03/07/26 15:36:24 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/lib.c
+ 1.2 03/07/26 15:36:23 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/isc_strerror.c
+ 1.2 03/07/26 15:36:23 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/interfaceiter.c
+ 1.3 03/07/26 15:36:23 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/inet_ntop.c
+ 1.4 03/07/26 15:36:22 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/ifiter_sysctl.c
+ 1.6 03/07/26 15:36:22 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/ifiter_ioctl.c
+ 1.11 03/07/26 15:36:22 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/error.c
+ 1.2 03/07/26 15:36:22 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ntp-keygen/ntpkeygen.dsp
+ 1.2 03/07/26 15:36:21 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libisc/win32os.c
+ 1.2 03/07/26 15:36:21 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libisc/assertions.c
+ 1.2 03/07/26 15:36:21 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libisc/once.c
+ 1.2 03/07/26 15:36:20 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libisc/net.c
+ 1.3 03/07/26 15:36:20 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libisc/isc_strerror.c
+ 1.3 03/07/26 15:36:20 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libisc/interfaceiter.c
+ 1.3 03/07/26 15:36:20 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/isc/win32os.h
+ 1.2 03/07/26 15:36:19 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/isc/strerror.h
+ 1.2 03/07/26 15:36:19 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/isc/platform.h
+ 1.2 03/07/26 15:36:19 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/isc/once.h
+ 1.2 03/07/26 15:36:18 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/isc/offset.h
+ 1.2 03/07/26 15:36:18 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/isc/net.h
+ 1.2 03/07/26 15:36:18 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/isc/mutex.h
+ 1.2 03/07/26 15:36:18 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libntp/syslog.c
+ 1.2 03/07/26 15:36:17 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/isc/ipv6.h
+ 1.2 03/07/26 15:36:17 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/isc/int.h
+ 1.2 03/07/26 15:36:17 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libntp/strerror.c
+ 1.2 03/07/26 15:36:16 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libntp/randfile.c
+ 1.2 03/07/26 15:36:16 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libntp/log.c
+ 1.2 03/07/26 15:36:16 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libntp/interfaceiter.c
+ 1.2 03/07/26 15:36:16 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ libntp/net.c.bak
+ 1.2 03/07/26 15:36:15 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/util.h
+ 1.2 03/07/26 15:36:15 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/string.h
+ 1.2 03/07/26 15:36:15 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/types.h
+ 1.2 03/07/26 15:36:14 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/strerror.h
+ 1.2 03/07/26 15:36:14 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/sockaddr.h
+ 1.2 03/07/26 15:36:14 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/result.h
+ 1.2 03/07/26 15:36:14 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/print.h
+ 1.2 03/07/26 15:36:13 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/platform.h
+ 1.2 03/07/26 15:36:13 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/once.h
+ 1.2 03/07/26 15:36:13 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/offset.h
+ 1.2 03/07/26 15:36:13 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/netaddr.h
+ 1.3 03/07/26 15:36:12 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/net.h
+ 1.4 03/07/26 15:36:12 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/mutex.h
+ 1.2 03/07/26 15:36:12 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/msgs.h
+ 1.2 03/07/26 15:36:11 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/msgcat.h
+ 1.2 03/07/26 15:36:11 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/mem.h
+ 1.2 03/07/26 15:36:11 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/magic.h
+ 1.2 03/07/26 15:36:11 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/list.h
+ 1.2 03/07/26 15:36:10 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/lib.h
+ 1.2 03/07/26 15:36:10 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/lang.h
+ 1.2 03/07/26 15:36:10 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/ipv6.h
+ 1.3 03/07/26 15:36:09 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/interfaceiter.h
+ 1.2 03/07/26 15:36:09 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/int.h
+ 1.2 03/07/26 15:36:09 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/formatcheck.h
+ 1.2 03/07/26 15:36:09 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/error.h
+ 1.2 03/07/26 15:36:08 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/boolean.h
+ 1.2 03/07/26 15:36:08 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/assertions.h
+ 1.2 03/07/26 15:36:08 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/isc/app.h
+ 1.2 03/07/26 15:36:07 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ include/interfaceiter.h
+ 1.2 03/07/26 15:36:07 stenn@whimsy.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ChangeSet
+ 1.1116 03/07/26 03:47:40 stenn@whimsy.udel.edu +1 -0
+ Add ss_family support
+
+ sntp/configure.ac
+ 1.6 03/07/26 03:47:29 stenn@whimsy.udel.edu +39 -0
+ Add ss_family support
+
+ChangeSet
+ 1.1115 03/07/26 02:36:07 stenn@whimsy.udel.edu +2 -0
+ Clean up some Makefile.am fun.
+
+ parseutil/Makefile.am
+ 1.5 03/07/26 02:34:03 stenn@whimsy.udel.edu +4 -2
+ Better handling of the dcfd program.
+
+ Makefile.am
+ 1.42 03/07/26 02:31:15 stenn@whimsy.udel.edu +1 -1
+ Add sntp as a DIST_SUBDIRS
+
+ChangeSet
+ 1.1114 03/07/26 00:18:17 stenn@whimsy.udel.edu +1 -0
+ ntp_crypto.c:
+ In crypto_update() in the loop when an expired certificate has been freed,
+ its cp->link is still used in the next itteration of the loop. This is
+ bad. :-) FreeBSD-current does not like that at all. This patch is my
+ attempt to fix the problem.
+
+ ntpd/ntp_crypto.c
+ 1.88 03/07/26 00:17:24 stenn@whimsy.udel.edu +5 -4
+ In crypto_update() in the loop when an expired certificate has been freed,
+ its cp->link is still used in the next itteration of the loop. This is
+ bad. :-) FreeBSD-current does not like that at all. This patch is my
+ attempt to fix the problem.
+
+ChangeSet
+ 1.1111.1.8 03/07/25 04:45:53 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.323 03/07/25 04:45:49 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.43 03/07/25 04:44:37 stenn@whimsy.udel.edu +1 -0
+ [Bug 161] Lose -pipe for gcc
+
+ configure.in
+ 1.219.3.50 03/07/25 04:44:13 stenn@whimsy.udel.edu +0 -15
+ [Bug 161] Lose -pipe for gcc
+
+ChangeSet
+ 1.1111.2.3 03/07/24 19:59:58 mayer@pogo.udel.edu +1 -0
+ Call to getaddrinfo in getnetnum was wrong
+
+ ntpd/ntp_config.c
+ 1.94 03/07/24 19:59:06 mayer@pogo.udel.edu +5 -3
+ Call to getaddrinfo in getnetnum was wrong
+
+ChangeSet
+ 1.1111.1.7 03/07/24 04:24:29 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.322 03/07/24 04:24:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.42 03/07/24 04:11:04 stenn@whimsy.udel.edu +1 -0
+ While I don't know the original reason for using -std1 for OSF, -std1 is now a lose on 4.0d with a c99 compiler, and AC_PROG_CC_STDC can check for this.
+
+ configure.in
+ 1.219.3.49 03/07/24 04:10:52 stenn@whimsy.udel.edu +0 -7
+ While I don't know the original reason for using -std1 for OSF, -std1 is now a lose on 4.0d with a c99 compiler, and AC_PROG_CC_STDC can check for this.
+
+ChangeSet
+ 1.1111.1.5 03/07/22 18:53:07 stenn@whimsy.udel.edu +1 -0
+ Dave Mills: Fix an old bug, according to spec.
+
+ ntpd/ntp_proto.c
+ 1.157 03/07/22 18:52:58 stenn@whimsy.udel.edu +4 -5
+ Dave Mills: Fix an old bug, according to spec.
+
+ChangeSet
+ 1.1111.2.2 03/07/22 17:55:31 mayer@pogo.udel.edu +1 -0
+ Fix missing conditional code around check for socket error
+
+ ntpd/ntp_io.c
+ 1.83 03/07/22 17:54:27 mayer@pogo.udel.edu +8 -0
+ Fix missing conditional code around check for socket error
+
+ChangeSet
+ 1.1111.2.1 03/07/22 08:44:54 mayer@tecotoo.myibg.com +1 -0
+ Back out the last change but test the local addresses first.
+
+ ntpd/ntp_io.c
+ 1.82 03/07/22 08:44:26 mayer@tecotoo.myibg.com +46 -3
+ Back out the last change but test the local addresses first.
+
+ChangeSet
+ 1.1111.1.4 03/07/22 00:26:15 stenn@whimsy.udel.edu +1 -0
+ Typo fixes from Martin Burnicki
+
+ html/drivers/driver8.html
+ 1.12 03/07/22 00:26:00 stenn@whimsy.udel.edu +8 -8
+ Typo fixes from Martin Burnicki
+
+ChangeSet
+ 1.1111.1.3 03/07/21 06:53:27 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ configure.in
+ 1.321 03/07/21 06:53:08 stenn@whimsy.udel.edu +1 -2
+ ntp-dev uses its own version numbers.
+
+ChangeSet
+ 1.683.17.1 03/07/21 06:47:46 stenn@whimsy.udel.edu +1 -0
+ 4.1.2a
+
+ configure.in
+ 1.219.3.48 03/07/21 06:47:34 stenn@whimsy.udel.edu +1 -1
+ 4.1.2a
+
+ChangeSet
+ 1.1111.1.2 03/07/21 06:33:29 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable-157
+ into whimsy.udel.edu:/backroom/ntp-dev-157
+
+ ntpd/refclock_jupiter.c
+ 1.12 03/07/21 06:33:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.40 03/07/21 06:30:16 stenn@whimsy.udel.edu +1 -0
+ assert edge typo fix from Peter Ekberg
+
+ ntpd/refclock_jupiter.c
+ 1.8.1.2 03/07/21 06:30:04 stenn@whimsy.udel.edu +1 -1
+ assert edge typo fix from Peter Ekberg
+
+ChangeSet
+ 1.1111.1.1 03/07/20 21:17:19 stenn@whimsy.udel.edu +1 -0
+ Autodetect refclock_shm prerequisites. Fix the defaults for the non-parse refclocks.
+
+ configure.in
+ 1.320 03/07/20 21:17:08 stenn@whimsy.udel.edu +32 -16
+ Autodetect refclock_shm prerequisites. Fix the defaults for the non-parse refclocks.
+
+ChangeSet
+ 1.1112 03/07/18 13:38:09 claas@nixfix.(none) +1 -0
+ driver44.html:
+ Update the URL for the NeoClock4X website
+
+ html/drivers/driver44.html
+ 1.9 03/07/18 13:36:47 claas@nixfix.(none) +1 -1
+ Update the URL for the NeoClock4X website
+
+ChangeSet
+ 1.1111 03/07/17 06:31:45 stenn@whimsy.udel.edu +2 -0
+ Merge
+
+ configure.in
+ 1.319 03/07/17 06:31:28 stenn@whimsy.udel.edu +0 -1
+ ntp-dev uses ntp-dev version numbers.
+
+ NEWS
+ 1.44 03/07/17 06:30:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.39 03/07/17 05:57:46 stenn@whimsy.udel.edu +2 -0
+ ntp-4.1.2
+
+ configure.in
+ 1.219.3.47 03/07/17 05:56:36 stenn@whimsy.udel.edu +1 -1
+ ntp-4.1.2
+
+ NEWS
+ 1.31.1.11 03/07/17 05:56:04 stenn@whimsy.udel.edu +16 -0
+ Update the NEWS file
+
+ChangeSet
+ 1.1099.2.3 03/07/15 23:16:27 mayer@tecotoo.myibg.com +1 -0
+ Add Danny Mayer to the contributor's list and fix Mark Andrew's address.
+
+ html/copyright.html
+ 1.27 03/07/15 23:15:55 mayer@tecotoo.myibg.com +4 -3
+ Add Danny Mayer to the contributor's list and fix Mark Andrew's address.
+
+ChangeSet
+ 1.1109 03/07/15 03:52:14 stenn@whimsy.udel.edu +2 -0
+ Avoid gcc warning, "cast discards qualifiers from pointer target type". (Frederick Bruckman)
+
+ ntpq/ntpq.c
+ 1.36 03/07/15 03:52:01 stenn@whimsy.udel.edu +3 -3
+ Avoid gcc warning, "cast discards qualifiers from pointer target type". (Frederick Bruckman)
+
+ ntpdc/ntpdc.c
+ 1.27 03/07/15 03:52:01 stenn@whimsy.udel.edu +3 -3
+ Avoid gcc warning, "cast discards qualifiers from pointer target type". (Frederick Bruckman)
+
+ChangeSet
+ 1.1106.1.2 03/07/14 05:53:34 stenn@whimsy.udel.edu +3 -0
+ Get approval from Dave Mills before changing these files.
+
+ libntp/systime.c
+ 1.27 03/07/14 05:53:20 stenn@whimsy.udel.edu +3 -0
+ Get approval from Dave Mills before changing these files.
+
+ ntpd/ntp_proto.c
+ 1.156 03/07/14 05:53:19 stenn@whimsy.udel.edu +3 -0
+ Get approval from Dave Mills before changing these files.
+
+ ntpd/ntp_loopfilter.c
+ 1.83 03/07/14 05:53:19 stenn@whimsy.udel.edu +2 -0
+ Get approval from Dave Mills before changing these files.
+
+ChangeSet
+ 1.1099.2.2 03/07/13 08:35:51 mayer@tecotoo.myibg.com +1 -0
+ The order of the arguments were wrong.
+
+ ntpd/ntp_config.c
+ 1.93 03/07/13 08:34:57 mayer@tecotoo.myibg.com +2 -3
+ The order of the arguments were wrong.
+
+ChangeSet
+ 1.1107 03/07/13 03:27:25 stenn@pogo.udel.edu +3 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-stable-150
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-150
+
+ ntpd/refclock_arc.c
+ 1.14 03/07/13 03:27:10 stenn@pogo.udel.edu +0 -0
+ SCCS merged
+
+ BitKeeper/etc/logging_ok
+ 1.31 03/07/13 03:17:51 stenn@pogo.udel.edu +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.24 03/07/13 03:17:51 stenn@pogo.udel.edu +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.30 03/07/13 03:17:47 stenn@pogo.udel.edu +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.23 03/07/13 03:17:33 stenn@pogo.udel.edu +1 -1
+ auto-union
+
+ChangeSet
+ 1.1106 03/07/11 22:31:00 stenn@whimsy.udel.edu +1 -0
+ Cleanup from Dave Mills.
+
+ util/ntptime.c
+ 1.17 03/07/11 22:30:51 stenn@whimsy.udel.edu +1 -5
+ Cleanup from Dave Mills.
+
+ChangeSet
+ 1.1099.2.1 03/07/11 14:27:56 mayer@tecotoo.myibg.com +1 -0
+ Fix Multicast to not set the flag until used.
+ Remove the unnecessary socket-querying code in findinterface and just
+ look up the interface.
+
+ ntpd/ntp_io.c
+ 1.81 03/07/11 14:27:19 mayer@tecotoo.myibg.com +3 -44
+ Fix Multicast to not set the flag until used.
+ Remove the unnecessary socket-querying code in findinterface and just
+ look up the interface.
+
+ChangeSet
+ 1.683.14.38 03/07/11 11:01:59 fredb@rapture.immanent.net +2 -0
+ Fix a warning compiling "refclock_arc.c".
+
+ BitKeeper/etc/logging_ok
+ 1.1.1.11 03/07/11 11:01:59 fredb@rapture.immanent.net +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpd/refclock_arc.c
+ 1.8.1.3 03/07/11 11:01:52 fredb@rapture.immanent.net +2 -2
+ Fix a warning, "passing arg 1 of `get_systime' from incompatible pointer type",
+ by gcc-2.95.3.
+
+ChangeSet
+ 1.1105 03/07/10 06:10:50 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable-ca
+ into whimsy.udel.edu:/backroom/ntp-dev-ca
+
+ ntpd/refclock_neoclock4x.c
+ 1.7 03/07/10 06:10:46 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.16.1 03/07/10 10:03:01 claas@nixfix.(none) +1 -0
+ refclock_neoclock4x.c:
+ fix status reporting, update driver to v1.13
+
+ ntpd/refclock_neoclock4x.c
+ 1.1.1.4 03/07/10 09:58:32 claas@nixfix.(none) +10 -1
+ fix status reporting, update driver to v1.13
+
+ChangeSet
+ 1.1104 03/07/08 21:47:12 fredb@tautology.immanent.net +3 -0
+ Corect a couple more misspelings of "occurred".
+
+ html/rdebug.html
+ 1.14 03/07/08 21:47:08 fredb@tautology.immanent.net +2 -2
+ occured -> occurred
+
+ html/drivers/driver36.html
+ 1.20 03/07/08 21:47:08 fredb@tautology.immanent.net +2 -2
+ occured -> occurred
+
+ html/debug.html
+ 1.21 03/07/08 21:47:08 fredb@tautology.immanent.net +3 -3
+ occured -> occurred
+
+ChangeSet
+ 1.1103 03/07/08 16:00:17 fredb@tautology.immanent.net +18 -0
+ Try again to merge spelling fixes from ntp-stable.
+
+ parseutil/dcfd.c
+ 1.13 03/07/08 16:00:15 fredb@tautology.immanent.net +0 -0
+ Try again to merge spelling fixes from ntp-stable.
+
+ ntpd/refclock_wwv.c
+ 1.44 03/07/08 16:00:15 fredb@tautology.immanent.net +1 -2
+ Try again to merge spelling fixes from ntp-stable.
+
+ ntpd/refclock_parse.c
+ 1.21 03/07/08 16:00:15 fredb@tautology.immanent.net +0 -0
+ Try again to merge spelling fixes from ntp-stable.
+
+ ntpd/refclock_oncore.c
+ 1.46 03/07/08 16:00:15 fredb@tautology.immanent.net +0 -0
+ Try again to merge spelling fixes from ntp-stable.
+
+ ntpd/refclock_msfees.c
+ 1.10 03/07/08 16:00:15 fredb@tautology.immanent.net +0 -0
+ Try again to merge spelling fixes from ntp-stable.
+
+ ntpd/refclock_fg.c
+ 1.9 03/07/08 16:00:15 fredb@tautology.immanent.net +0 -0
+ Try again to merge spelling fixes from ntp-stable.
+
+ ntpd/refclock_chu.c
+ 1.33 03/07/08 16:00:15 fredb@tautology.immanent.net +0 -4
+ Try again to merge spelling fixes from ntp-stable.
+
+ ntpd/ntp_filegen.c
+ 1.8 03/07/08 16:00:15 fredb@tautology.immanent.net +0 -0
+ Try again to merge spelling fixes from ntp-stable.
+
+ libntp/authkeys.c
+ 1.11 03/07/08 16:00:15 fredb@tautology.immanent.net +0 -0
+ Try again to merge spelling fixes from ntp-stable.
+
+ html/patches.html
+ 1.15 03/07/08 16:00:14 fredb@tautology.immanent.net +2 -3
+ Try again to merge spelling fixes from ntp-stable.
+
+ html/parsenew.html
+ 1.8 03/07/08 16:00:14 fredb@tautology.immanent.net +1 -1
+ Try again to merge spelling fixes from ntp-stable.
+
+ html/ntpq.html
+ 1.22 03/07/08 16:00:14 fredb@tautology.immanent.net +2 -5
+ Try again to merge spelling fixes from ntp-stable.
+
+ html/ntpdc.html
+ 1.18 03/07/08 16:00:14 fredb@tautology.immanent.net +3 -7
+ Try again to merge spelling fixes from ntp-stable.
+
+ html/ntpdate.html
+ 1.16 03/07/08 16:00:14 fredb@tautology.immanent.net +0 -1
+ Try again to merge spelling fixes from ntp-stable.
+
+ html/ntpd.html
+ 1.29 03/07/08 16:00:14 fredb@tautology.immanent.net +0 -1
+ Try again to merge spelling fixes from ntp-stable.
+
+ html/drivers/driver6.html
+ 1.16 03/07/08 16:00:14 fredb@tautology.immanent.net +0 -3
+ Try again to merge spelling fixes from ntp-stable.
+
+ html/patches.html
+ 1.4.1.3 03/07/08 15:47:04 fredb@tautology.immanent.net +0 -0
+ Merge rename: html/patches.htm -> html/patches.html
+
+ html/parsenew.html
+ 1.1.1.3 03/07/08 15:47:04 fredb@tautology.immanent.net +0 -0
+ Merge rename: html/parsenew.htm -> html/parsenew.html
+
+ html/ntpq.html
+ 1.6.1.3 03/07/08 15:47:04 fredb@tautology.immanent.net +0 -0
+ Merge rename: html/ntpq.htm -> html/ntpq.html
+
+ html/ntpdc.html
+ 1.5.1.3 03/07/08 15:47:04 fredb@tautology.immanent.net +0 -0
+ Merge rename: html/ntpdc.htm -> html/ntpdc.html
+
+ html/ntpdate.html
+ 1.5.1.3 03/07/08 15:47:04 fredb@tautology.immanent.net +0 -0
+ Merge rename: html/ntpdate.htm -> html/ntpdate.html
+
+ html/ntpd.html
+ 1.13.1.3 03/07/08 15:47:03 fredb@tautology.immanent.net +0 -0
+ Merge rename: html/ntpd.htm -> html/ntpd.html
+
+ html/drivers/driver6.html
+ 1.4.1.3 03/07/08 15:47:03 fredb@tautology.immanent.net +0 -0
+ Merge rename: html/driver6.htm -> html/drivers/driver6.html
+
+ BitKeeper/etc/logging_ok
+ 1.29 03/07/08 15:46:46 fredb@tautology.immanent.net +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.22 03/07/08 15:46:46 fredb@tautology.immanent.net +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.28 03/07/08 15:46:45 fredb@tautology.immanent.net +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.21 03/07/08 15:46:44 fredb@tautology.immanent.net +1 -1
+ auto-union
+
+ChangeSet
+ 1.1099.1.2 03/07/08 03:13:53 stenn@whimsy.udel.edu +1 -0
+ Typo, reported by Michael Rios
+
+ html/drivers/driver1.html
+ 1.13 03/07/08 03:13:21 stenn@whimsy.udel.edu +2 -2
+ Typo, reported by Michael Rios
+
+ChangeSet
+ 1.683.14.36 03/07/06 21:31:24 fredb@tautology.immanent.net +8 -0
+ Correct usage, spelling of "lose", "loses", and "losing" where appropriate.
+
+ parseutil/dcfd.c
+ 1.11.1.1 03/07/06 21:31:23 fredb@tautology.immanent.net +1 -1
+ Let's see now... "loose" is the opposite of "tight", while "lose"
+ is something you do, at say, poker, or a spelling bee.
+
+ ntpd/refclock_parse.c
+ 1.18.2.1 03/07/06 21:31:23 fredb@tautology.immanent.net +2 -2
+ "lose", "loses", losing": verbs. "loose" is a noun.
+
+ ntpd/refclock_oncore.c
+ 1.38.1.2 03/07/06 21:31:22 fredb@tautology.immanent.net +3 -3
+ Let's see now... "loose" is the opposite of "tight", while "lose"
+ is something you do, at say, poker, or a spelling bee.
+
+ ntpd/refclock_msfees.c
+ 1.8.1.1 03/07/06 21:31:22 fredb@tautology.immanent.net +1 -1
+ Correct usage: "lose" vs. "loose".
+
+ ntpd/ntp_filegen.c
+ 1.6.1.1 03/07/06 21:31:22 fredb@tautology.immanent.net +1 -1
+ "losing", not "loosing".
+
+ libntp/authkeys.c
+ 1.6.1.2 03/07/06 21:31:22 fredb@tautology.immanent.net +1 -1
+ "loose" and "lose" are two different words, plus make this parse.
+
+ html/parsenew.htm
+ 1.1.1.2 03/07/06 21:31:22 fredb@tautology.immanent.net +2 -2
+ "loosing" isn't a word. Surely the author meant to say "losing".
+
+ ChangeLog-4.1.0
+ 1.590 03/07/06 21:31:22 fredb@tautology.immanent.net +1 -1
+ "loose" and "lose" are two different words!
+
+ChangeSet
+ 1.1092.1.2 03/07/06 21:53:39 mayer@tecotoo.myibg.com +1 -0
+ Miscellaneous changes for Winnt support
+
+ html/hints/winnt.html
+ 1.13 03/07/06 21:53:02 mayer@tecotoo.myibg.com +59 -17
+ Miscellaneous changes for Winnt support
+
+ChangeSet
+ 1.683.14.35 03/07/06 18:22:37 fredb@tautology.immanent.net +11 -0
+ Fix spelling, typos, usage. Mined from NetBSD CVS.
+
+ BitKeeper/etc/logging_ok
+ 1.1.1.10 03/07/06 18:22:37 fredb@tautology.immanent.net +1 -0
+ Logging to logging@openlogging.org accepted
+
+ util/README
+ 1.4 03/07/06 18:22:23 fredb@tautology.immanent.net +2 -2
+ Fix spelling, typos. From Thomas Klausner <wiz@netbsd.org>.
+
+ ntpd/refclock_wwv.c
+ 1.26.1.1 03/07/06 18:22:23 fredb@tautology.immanent.net +2 -2
+ Fix spelling, typos. From Thomas Klausner <wiz@netbsd.org>.
+
+ ntpd/refclock_fg.c
+ 1.7.1.1 03/07/06 18:22:23 fredb@tautology.immanent.net +1 -1
+ Fix spelling, typos. From Thomas Klausner <wiz@netbsd.org>.
+
+ ntpd/refclock_chu.c
+ 1.21.1.2 03/07/06 18:22:23 fredb@tautology.immanent.net +4 -4
+ Fix spelling, typos. From Thomas Klausner <wiz@netbsd.org>.
+
+ html/patches.htm
+ 1.4.1.2 03/07/06 18:22:23 fredb@tautology.immanent.net +1 -1
+ Fix spelling, typos. From Thomas Klausner <wiz@netbsd.org>.
+
+ html/ntpq.htm
+ 1.6.1.2 03/07/06 18:22:22 fredb@tautology.immanent.net +3 -3
+ Fix spelling, typos. Mined from NetBSD CVS. Originally
+ submitted by Adrian Mrva.
+
+ html/ntpdc.htm
+ 1.5.1.2 03/07/06 18:22:22 fredb@tautology.immanent.net +4 -4
+ Fix spelling, typos. Mined from NetBSD CVS. Originally
+ submitted by Adrian Mrva.
+
+ html/ntpdate.htm
+ 1.5.1.2 03/07/06 18:22:22 fredb@tautology.immanent.net +1 -1
+ Fix spelling, typos. Mined from NetBSD CVS. Originally
+ submitted by Adrian Mrva.
+
+ html/ntpd.htm
+ 1.13.1.2 03/07/06 18:22:22 fredb@tautology.immanent.net +1 -1
+ Fix spelling, typos. From Thomas Klausner <wiz@netbsd.org>.
+
+ html/driver6.htm
+ 1.4.1.2 03/07/06 18:22:22 fredb@tautology.immanent.net +3 -3
+ Fix spelling, typos. From Thomas Klausner <wiz@netbsd.org>.
+
+ChangeSet
+ 1.1101 03/07/05 05:33:14 fredb@tautology.immanent.net +1 -0
+ Make this build with pre-C99 compilers, too (which is, most of them!).
+
+ ntpd/ntpd.c
+ 1.52 03/07/05 05:33:12 fredb@tautology.immanent.net +11 -9
+ Define variables only at the beginning of a block.
+
+ChangeSet
+ 1.1100 03/07/04 17:48:26 fredb@tautology.immanent.net +2 -0
+ For BSD's, use setrlimit() to limit the stacksize to something considerably
+ smaller than the default, similarly to what's done on AIX. This was culled
+ from the NetBSD sources. Christos Zoulas gave credit for the patch, in the
+ commit log, to Witold J. Wnuk (against ntp-4.0.99i, 2002-04-18). I've added
+ a configure-time check for setrlimit(), and I had to up the pages from "8"
+ to "20" to keep from dumping core in the resolver. (Apparently, the resolver
+ now uses "a lot" of stack space to initialize, relatively speaking: the
+ default is something like "512", but p_vm_ssize is only about "5" with the
+ running program at any moment I look at it on both of the hosts I tested.)
+
+ The bottom line is that it reduces the resident set size by about 2 Mb, from
+ 4.5 Mb, or by about 44%.
+
+ ntpd/ntpd.c
+ 1.51 03/07/04 17:48:24 fredb@tautology.immanent.net +17 -0
+ Limit the stack size with setrlimit(), on systems that have it, before locking
+ down all those pages with mlockall().
+
+ configure.in
+ 1.318 03/07/04 17:48:24 fredb@tautology.immanent.net +1 -0
+ Add check for setrlimit().
+
+ChangeSet
+ 1.1099 03/07/04 05:06:17 stenn@whimsy.udel.edu +1 -0
+ Replace debug notice - if we squeal when we lose kernel sync, we should also note when it is recovered.
+
+ ntpd/ntp_loopfilter.c
+ 1.82 03/07/04 05:06:05 stenn@whimsy.udel.edu +6 -0
+ Replace debug notice - if we squeal when we lose kernel sync, we should also note when it is recovered.
+
+ChangeSet
+ 1.1097 03/07/03 03:23:06 stenn@whimsy.udel.edu +3 -0
+ Fixes from Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.81 03/07/03 03:21:16 stenn@whimsy.udel.edu +41 -48
+ 1. At the longest poll intervals the FLL didn't kick in. While the typo
+ was easilyl fixed, the simulator suggested some fine tuning. FLL is now
+ disabled below the intercept and the averaging time constant reduced
+ above the intercept.
+ 2. If the initial time error is large and a frequency file is present
+ and the frequency is not specified in the configuration file, the clock
+ state machine started in the wrong state. The state machine eventually
+ came on track, but the transitions were hideous. This might be the root
+ cause of a couple of strange reports on the news wire.
+
+ 3. was the change to include/ntp.h
+
+ 4. Found a couple of misleading debug trace comments and fixed them.
+
+ libntp/systime.c
+ 1.26 03/07/03 03:19:03 stenn@whimsy.udel.edu +2 -2
+ (This could be the typo fixes)
+
+ include/ntp.h
+ 1.90 03/07/03 02:22:00 stenn@whimsy.udel.edu +2 -2
+ The maximum number of mitigated servers was only 10; that was
+ determined in the bad old Fuzzball days and is needlessly small for
+ current silicon. Upped it to 50. Put all twenty pool servers in the
+ configuration file and wind up ntpd. Awesome.
+
+ChangeSet
+ 1.1092.1.1 03/07/03 00:31:37 mayer@tecotoo.myibg.com +2 -0
+ Remove references to IPv6 broadcast
+
+ ntpd/ntp_io.c
+ 1.80 03/07/03 00:30:58 mayer@tecotoo.myibg.com +0 -10
+ Remove references to IPv6 broadcast
+
+ libisc/ifiter_ioctl.c
+ 1.10 03/07/03 00:30:53 mayer@tecotoo.myibg.com +16 -38
+ Remove references to IPv6 broadcast
+
+ChangeSet
+ 1.1095 03/06/30 07:14:08 stenn@whimsy.udel.edu +1 -0
+ More cleanup to the refclock_jupiter clock.
+
+ ntpd/refclock_jupiter.c
+ 1.11 03/06/30 07:13:53 stenn@whimsy.udel.edu +1 -1
+ More cleanup to the refclock_jupiter clock.
+
+ChangeSet
+ 1.1094 03/06/30 06:51:05 stenn@whimsy.udel.edu +5 -0
+ Merge
+
+ ntpd/refclock_jupiter.c
+ 1.10 03/06/30 06:47:16 stenn@whimsy.udel.edu +1 -2
+ Try Real Hard to apply the original stable -> dev
+ patches to the new stable -> new dev code.
+
+ ports/winnt/ntpd/ntpd.dsp
+ 1.17 03/06/30 05:52:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ports/winnt/include/config.h
+ 1.23 03/06/30 05:52:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/refclock_conf.c
+ 1.22 03/06/30 05:52:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.317 03/06/30 05:52:15 stenn@whimsy.udel.edu +4 -15
+ Auto merged
+
+ChangeSet
+ 1.1092 03/06/29 10:11:07 mayer@tecotoo.myibg.com +2 -0
+ kill_asyncio was changed for Unix but not Windows
+ Initialize .rnd file if it doesn't exist.
+
+ ntpd/ntpd.c
+ 1.50 03/06/29 10:10:26 mayer@tecotoo.myibg.com +6 -0
+ Add initialization of .rnd file in case OpenSSL needs it.
+
+ ntpd/ntp_io.c
+ 1.79 03/06/29 10:10:18 mayer@tecotoo.myibg.com +1 -1
+ Fix argument to match Unix version
+
+ChangeSet
+ 1.1090.1.1 03/06/29 06:26:57 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_request.c
+ 1.50 03/06/29 06:26:52 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.15.1 03/06/29 06:19:50 stenn@whimsy.udel.edu +1 -0
+ [Bug 129] msyslog() more debug output.
+
+ ntpd/ntp_request.c
+ 1.23.3.4 03/06/29 06:19:38 stenn@whimsy.udel.edu +11 -3
+ [Bug 129] msyslog() more debug output.
+
+ChangeSet
+ 1.683.14.33 03/06/28 04:14:43 stenn@whimsy.udel.edu +5 -0
+ [Bug 136] PPS fixes for refclock_jupiter, from peda@sectra.se (Peter Ekberg)
+
+ ports/winnt/ntpd/ntpd.dsp
+ 1.11.1.1 03/06/28 04:14:20 stenn@whimsy.udel.edu +0 -1
+ [Bug 136] PPS fixes for refclock_jupiter, from peda@sectra.se (Peter Ekberg)
+
+ ports/winnt/include/config.h
+ 1.9.2.2 03/06/28 04:14:20 stenn@whimsy.udel.edu +1 -0
+ [Bug 136] PPS fixes for refclock_jupiter, from peda@sectra.se (Peter Ekberg)
+
+ ntpd/refclock_jupiter.c
+ 1.8.1.1 03/06/28 04:14:20 stenn@whimsy.udel.edu +529 -650
+ [Bug 136] PPS fixes for refclock_jupiter, from peda@sectra.se (Peter Ekberg)
+
+ ntpd/refclock_conf.c
+ 1.13.1.7 03/06/28 04:14:20 stenn@whimsy.udel.edu +1 -1
+ [Bug 136] PPS fixes for refclock_jupiter, from peda@sectra.se (Peter Ekberg)
+
+ configure.in
+ 1.219.3.46 03/06/28 04:14:20 stenn@whimsy.udel.edu +6 -11
+ [Bug 136] PPS fixes for refclock_jupiter, from peda@sectra.se (Peter Ekberg)
+
+ChangeSet
+ 1.1062.1.4 03/06/27 22:19:49 mayer@tecotoo.myibg.com +7 -0
+ Add Win32 support for ntp-keygen and upgrade OpenSSL to 0.9.7b.
+
+ ports/winnt/ntp-keygen/ntpkeygen.dsp
+ 1.1 03/06/27 22:19:13 mayer@tecotoo.myibg.com +150 -0
+
+ ports/winnt/ntp-keygen/ntpkeygen.dsp
+ 1.0 03/06/27 22:19:13 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/ntp-keygen/ntpkeygen.dsp
+
+ ports/winnt/libntp/randfile.c
+ 1.1 03/06/27 22:19:10 mayer@tecotoo.myibg.com +114 -0
+
+ ports/winnt/libntp/randfile.c
+ 1.0 03/06/27 22:19:10 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/libntp/randfile.c
+
+ util/ntp-keygen.c
+ 1.24 03/06/27 22:19:08 mayer@tecotoo.myibg.com +56 -7
+ Fix code to support Win32.
+
+ ports/winnt/ntpd/ntpd.dsp
+ 1.16 03/06/27 22:19:05 mayer@tecotoo.myibg.com +4 -4
+ Change OpenSSL to 0.9.7b
+
+ ports/winnt/ntp.dsw
+ 1.7 03/06/27 22:19:02 mayer@tecotoo.myibg.com +12 -0
+ Add ntp-keygen to the list of projects to build
+
+ ports/winnt/libntp/libntp.dsp
+ 1.15 03/06/27 22:19:00 mayer@tecotoo.myibg.com +6 -2
+ Add the randfile.c file.
+
+ ports/winnt/include/config.h
+ 1.22 03/06/27 22:18:56 mayer@tecotoo.myibg.com +1 -0
+ WIn32 has snprintf so we need to declare it.
+
+ChangeSet
+ 1.1090 03/06/27 06:17:58 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_request.c
+ 1.49 03/06/27 06:17:54 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.32 03/06/27 05:44:00 stenn@whimsy.udel.edu +1 -0
+ [Bug 129] Add more debug output.
+
+ ntpd/ntp_request.c
+ 1.23.3.3 03/06/27 05:43:50 stenn@whimsy.udel.edu +8 -0
+ [Bug 129] Add more debug output.
+
+ChangeSet
+ 1.683.14.31 03/06/27 04:49:29 stenn@whimsy.udel.edu +2 -0
+ Have README.hackers and README.patches refer to each other.
+
+ README.patches
+ 1.2 03/06/27 04:49:19 stenn@whimsy.udel.edu +2 -0
+ Have README.hackers and README.patches refer to each other.
+
+ README.hackers
+ 1.10 03/06/27 04:49:19 stenn@whimsy.udel.edu +2 -0
+ Have README.hackers and README.patches refer to each other.
+
+ChangeSet
+ 1.1088 03/06/27 04:40:18 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ Makefile.am
+ 1.41 03/06/27 04:40:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.30 03/06/27 04:36:08 stenn@whimsy.udel.edu +3 -0
+ Move the "patching" info from README.hackers to README.patches.
+
+ README.hackers
+ 1.9 03/06/27 04:35:39 stenn@whimsy.udel.edu +0 -38
+ Move the "patching" info from README.hackers to README.patches.
+
+ Makefile.am
+ 1.12.1.22 03/06/27 04:35:37 stenn@whimsy.udel.edu +1 -0
+ Move the "patching" info from README.hackers to README.patches.
+
+ README.patches
+ 1.1 03/06/27 04:34:04 stenn@whimsy.udel.edu +37 -0
+
+ README.patches
+ 1.0 03/06/27 04:34:04 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable-129/README.patches
+
+ChangeSet
+ 1.1087 03/06/25 18:18:11 fredb@tautology.immanent.net +1 -0
+ Simplify (re-enbaled -> enabled).
+
+ ntpd/ntp_loopfilter.c
+ 1.80 03/06/25 18:18:09 fredb@tautology.immanent.net +1 -1
+ Simplify (re-enbaled -> enabled).
+
+ChangeSet
+ 1.1086 03/06/25 17:33:22 fredb@tautology.immanent.net +1 -0
+ Fix merge botch.
+
+ libntp/a_md5encrypt.c
+ 1.17 03/06/25 15:23:54 fredb@tautology.immanent.net +3 -1
+ Fix merge botch.
+
+ChangeSet
+ 1.1085 03/06/25 14:20:33 fredb@rapture.immanent.net +1 -0
+ We log the initial state of the kernel discipline, and we log when we
+ lose sync. So to restore parallelism, log when we reacquire sync, too.
+
+ ntpd/ntp_loopfilter.c
+ 1.79 03/06/25 14:20:30 fredb@rapture.immanent.net +6 -0
+ We log the initial state of the kernel discipline, and we log when we
+ lose sync. So to restore parallelism, log when we reacquire sync, too.
+
+ChangeSet
+ 1.1084 03/06/25 08:40:15 fredb@rapture.immanent.net +3 -0
+ Merge tautology:/s/bitkeeper/ntp-dev
+ into rapture.immanent.net:/home/fredb/source/ntp-dev
+
+ BitKeeper/etc/logging_ok
+ 1.27 03/06/25 08:40:09 fredb@rapture.immanent.net +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpq/ntpq.c
+ 1.35 03/06/25 08:39:32 fredb@rapture.immanent.net +0 -1
+ Auto merged
+
+ ntpdc/ntpdc.c
+ 1.26 03/06/25 08:39:32 fredb@rapture.immanent.net +0 -1
+ Auto merged
+
+ChangeSet
+ 1.1076.1.9 03/06/24 04:07:32 stenn@whimsy.udel.edu +2 -0
+ [Bug 133] From fredb@tautology.immanent.net: Handle nonstandard EIA_NODATA return from getaddrinfo()
+
+ ntpq/ntpq.c
+ 1.33.1.1 03/06/24 04:07:09 stenn@whimsy.udel.edu +1 -1
+ [Bug 133] From fredb@tautology.immanent.net: Handle nonstandard EIA_NODATA return from getaddrinfo()
+
+ ntpdc/ntpdc.c
+ 1.24.1.1 03/06/24 04:07:09 stenn@whimsy.udel.edu +1 -1
+ [Bug 133] From fredb@tautology.immanent.net: Handle nonstandard EIA_NODATA return from getaddrinfo()
+
+ChangeSet
+ 1.1076.1.8 03/06/24 03:42:09 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ ntpd/ntp_config.c
+ 1.92 03/06/24 03:41:36 stenn@whimsy.udel.edu +0 -2
+
+ChangeSet
+ 1.683.14.29 03/06/24 03:38:13 stenn@whimsy.udel.edu +1 -0
+ Typo.
+
+ ntpd/ntp_config.c
+ 1.50.4.5 03/06/24 03:37:59 stenn@whimsy.udel.edu +2 -2
+ Typo.
+
+ChangeSet
+ 1.1076.1.7 03/06/24 03:35:02 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ ntpd/ntp_config.c
+ 1.91 03/06/24 03:34:33 stenn@whimsy.udel.edu +2 -3
+ ntp-dev uses getaddrinfo()...
+
+ChangeSet
+ 1.683.14.28 03/06/24 03:30:08 stenn@whimsy.udel.edu +1 -0
+ [Bug 129] Clean up a diagnostic message.
+
+ ntpd/ntp_config.c
+ 1.50.4.4 03/06/24 03:29:58 stenn@whimsy.udel.edu +4 -1
+ [Bug 129] Clean up a diagnostic message.
+
+ChangeSet
+ 1.1076.1.6 03/06/23 04:08:37 stenn@whimsy.udel.edu +1 -0
+ [Bug 134] Log when we sync to a new source.
+
+ ntpd/ntp_proto.c
+ 1.155 03/06/23 04:08:23 stenn@whimsy.udel.edu +27 -15
+ [Bug 134] Log when we sync to a new source.
+
+ChangeSet
+ 1.1076.1.5 03/06/22 05:52:57 stenn@whimsy.udel.edu +4 -0
+ Merge
+
+ BitKeeper/deleted/.del-ntp-genkeys.c~5de683d0
+ 1.77 03/06/22 05:52:38 stenn@whimsy.udel.edu +0 -3
+ Old file - we don't care.
+
+ ntpd/ntp_io.c
+ 1.78 03/06/22 05:26:59 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.90 03/06/22 05:26:59 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.57 03/06/22 05:26:58 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-ntp-genkeys.c~5de683d0
+ 1.56.1.6 03/06/22 05:26:58 stenn@whimsy.udel.edu +0 -0
+ Merge rename: util/ntp-genkeys.c -> BitKeeper/deleted/.del-ntp-genkeys.c~5de683d0
+
+ChangeSet
+ 1.683.14.27 03/06/22 05:13:57 stenn@whimsy.udel.edu +4 -0
+ [Bug 47] kill_asyncio() now takes 1 parameter - the lowest fd to close.
+
+ util/ntp-genkeys.c
+ 1.56.1.5 03/06/22 05:13:40 stenn@whimsy.udel.edu +3 -1
+ [Bug 47] kill_asyncio() now takes 1 parameter - the lowest fd to close.
+
+ ntpd/ntp_io.c
+ 1.20.3.4 03/06/22 05:13:40 stenn@whimsy.udel.edu +4 -2
+ [Bug 47] kill_asyncio() now takes 1 parameter - the lowest fd to close.
+
+ ntpd/ntp_config.c
+ 1.50.4.3 03/06/22 05:13:40 stenn@whimsy.udel.edu +1 -1
+ [Bug 47] kill_asyncio() now takes 1 parameter - the lowest fd to close.
+
+ include/ntpd.h
+ 1.27.3.1 03/06/22 05:13:40 stenn@whimsy.udel.edu +1 -1
+ [Bug 47] kill_asyncio() now takes 1 parameter - the lowest fd to close.
+
+ChangeSet
+ 1.1076.1.4 03/06/21 06:09:07 stenn@whimsy.udel.edu +3 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntpd.c
+ 1.49 03/06/21 06:09:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_resolver.c
+ 1.16 03/06/21 06:09:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_intres.c
+ 1.31 03/06/21 06:09:02 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.26 03/06/21 06:03:07 stenn@whimsy.udel.edu +1 -0
+ [Bug 129] Improve and normalize some error messages.
+
+ ntpd/ntp_intres.c
+ 1.17.2.2 03/06/21 06:02:57 stenn@whimsy.udel.edu +6 -6
+ [Bug 129] Improve and normalize some error messages.
+
+ChangeSet
+ 1.683.14.25 03/06/21 05:56:12 stenn@whimsy.udel.edu +1 -0
+ Cuddle a comment.
+
+ ntpd/ntpd.c
+ 1.33.2.3 03/06/21 05:56:02 stenn@whimsy.udel.edu +1 -1
+ Cuddle a comment.
+
+ChangeSet
+ 1.1082 03/06/20 14:53:46 fredb@tautology.immanent.net +2 -0
+ Broader support for IPv6 hostnames by "ntpdc" and "ntpq". On NetBSD
+ from NetBSD 1.5 to NetBSD 1.6.1, getaddrinfo() returned EAI_NODATA
+ in some cases where RFC's 2553 (and now 3493) required EAI_NONAME.
+ Allow for that. The (mis-)interpretation was from the Kame project,
+ so other platforms may be affected as well.
+
+ ntpq/ntpq.c
+ 1.34 03/06/20 14:20:28 fredb@tautology.immanent.net +1 -1
+ getaddrinfo() can return EAI_NODATA on NetBSD-1.5 to NetBSD-1.6.1
+ in the AI_NUMERICHOST case (from kame, so other platforms may be
+ affected as well).
+
+ ntpdc/ntpdc.c
+ 1.25 03/06/20 14:17:22 fredb@tautology.immanent.net +1 -1
+ getaddrinfo() can return EAI_NODATA on NetBSD-1.5 to NetBSD-1.6.1
+ in the AI_NUMERICHOST case (from kame, so other platforms may be
+ affected as well).
+
+ChangeSet
+ 1.1081 03/06/20 05:45:27 fredb@tautology.immanent.net +1 -0
+ Resolve bug #123: fix build on NetBSD.
+
+ libntp/a_md5encrypt.c
+ 1.16 03/06/20 05:45:26 fredb@tautology.immanent.net +0 -7
+ Accept Harlen Stenn's solution for bug #123.
+
+ChangeSet
+ 1.683.14.24 03/06/20 04:32:07 stenn@whimsy.udel.edu +1 -0
+ Note that ntp_resolver.c is currently unused in the file.
+
+ ntpd/ntp_resolver.c
+ 1.11.1.3 03/06/20 04:31:47 stenn@whimsy.udel.edu +3 -0
+ Note that ntp_resolver.c is currently unused in the file.
+
+ChangeSet
+ 1.1076.1.3 03/06/20 00:45:40 stenn@whimsy.udel.edu +1 -0
+ [Bug 123] More portable MD5 conditionalization
+
+ libntp/a_md5encrypt.c
+ 1.13.1.1 03/06/20 00:45:28 stenn@whimsy.udel.edu +5 -10
+ [Bug 123] More portable MD5 conditionalization
+
+ChangeSet
+ 1.1080 03/06/19 20:01:31 fredb@tautology.immanent.net +1 -0
+ Clean up the includes in a_md5encrypt.c. Proposed fix for bug #123.
+
+ libntp/a_md5encrypt.c
+ 1.15 03/06/19 20:01:29 fredb@tautology.immanent.net +6 -8
+ Trim the fat. We were including "ntpd.h" just to get "ntp_fp.h",
+ and <stdio.h> and "ntp_machine.h" aren't used for anything here.
+ Proposed fix for bug #123.
+
+ChangeSet
+ 1.1076.1.2 03/06/19 03:58:31 stenn@whimsy.udel.edu +1 -0
+ [Bug 128] ntpq coredump with IPv6
+
+ ntpq/ntpq.c
+ 1.33 03/06/19 03:57:56 stenn@whimsy.udel.edu +1 -1
+ [Bug 128] ntpq coredump with IPv6
+
+ChangeSet
+ 1.1076.1.1 03/06/18 00:23:05 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/cmd_args.c
+ 1.22 03/06/18 00:23:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.23 03/06/18 00:20:55 stenn@whimsy.udel.edu +1 -0
+ [Bug 125] Add a missing newline from an fprintf
+
+ ntpd/cmd_args.c
+ 1.7.2.2 03/06/18 00:20:43 stenn@whimsy.udel.edu +1 -1
+ [Bug 125] Add a missing newline from an fprintf
+
+ChangeSet
+ 1.1077 03/06/16 12:09:12 fredb@tautology.immanent.net +2 -0
+ Make this build on NetBSD.
+
+ BitKeeper/etc/logging_ok
+ 1.26 03/06/16 12:09:12 fredb@tautology.immanent.net +1 -0
+ Logging to logging@openlogging.org accepted
+
+ libntp/a_md5encrypt.c
+ 1.14 03/06/16 12:09:01 fredb@tautology.immanent.net +3 -4
+ Really disable the OpenSSL MD5 includes.
+
+ChangeSet
+ 1.1076 03/06/13 02:44:04 stenn@whimsy.udel.edu +2 -0
+ 4.1.80-rc1
+
+ configure.in
+ 1.316 03/06/13 02:41:55 stenn@whimsy.udel.edu +1 -1
+ 4.1.80-rc1
+
+ NEWS
+ 1.43 03/06/13 02:41:55 stenn@whimsy.udel.edu +1 -0
+ 4.1.80-rc1
+
+ChangeSet
+ 1.1075 03/06/13 02:28:46 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_intres.c
+ 1.30 03/06/13 02:28:43 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.22 03/06/13 02:27:26 stenn@whimsy.udel.edu +1 -0
+ [Bug 110] Don't syslog EINTR returns from select().
+
+ ntpd/ntp_intres.c
+ 1.17.2.1 03/06/13 02:27:07 stenn@whimsy.udel.edu +2 -1
+ [Bug 110] Don't syslog EINTR returns from select().
+
+ChangeSet
+ 1.1062.1.3 03/06/12 23:19:43 mayer@tecotoo.myibg.com +2 -0
+ Remove support for building ntptrace on Win32.
+ Improvement for generating the version number on Win32.
+
+ ports/winnt/scripts/mkver.bat
+ 1.5 03/06/12 23:19:11 mayer@tecotoo.myibg.com +26 -3
+ Improvement for generating the version number for Win32.
+
+ ports/winnt/ntp.dsw
+ 1.6 03/06/12 23:19:08 mayer@tecotoo.myibg.com +0 -47
+ Remove support for building ntptrace on Win32.
+ The perl script should be used instead.
+
+ChangeSet
+ 1.1073 03/06/12 21:28:30 stenn@whimsy.udel.edu +1 -0
+ Merge pogo:/usa/mayer/ntp-dev-io into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_io.c
+ 1.77 03/06/12 21:28:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1072 03/06/12 02:49:43 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ ntpd/ntp_io.c
+ 1.75.1.1 03/06/12 02:49:24 stenn@whimsy.udel.edu +4 -4
+ Conflict resolution
+
+ChangeSet
+ 1.683.14.21 03/06/12 02:43:58 stenn@whimsy.udel.edu +1 -0
+ [Bug 110] Don't log EINTR return from select()
+
+ ntpd/ntp_io.c
+ 1.20.3.3 03/06/12 02:43:48 stenn@whimsy.udel.edu +5 -2
+ [Bug 110] Don't log EINTR return from select()
+
+ChangeSet
+ 1.1071 03/06/12 01:49:22 stenn@whimsy.udel.edu +1 -0
+ [bug 44] patch from Simon Burge
+
+ ntpd/ntp_crypto.c
+ 1.87 03/06/12 01:49:11 stenn@whimsy.udel.edu +3 -3
+ [bug 44] patch from Simon Burge
+
+ChangeSet
+ 1.1062.1.2 03/06/11 22:52:29 mayer@tecotoo.myibg.com +1 -0
+ Use -n for nt running as a servce instead of borrowing -d for Win32.
+
+ ntpd/cmd_args.c
+ 1.21 03/06/11 22:52:02 mayer@tecotoo.myibg.com +3 -16
+ Use -n for nt running as a servce instead of borrowing -d for Win32.
+
+ChangeSet
+ 1.1062.1.1 03/06/11 18:44:49 mayer@tecotoo.myibg.com +4 -0
+ Add workaround for Win32 to fix MS bug with UDP sockets.
+ See KB Q263823.
+
+ ports/winnt/libisc/win32os.c
+ 1.1 03/06/11 18:44:13 mayer@tecotoo.myibg.com +101 -0
+
+ ports/winnt/libisc/win32os.c
+ 1.0 03/06/11 18:44:13 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/libisc/win32os.c
+
+ ports/winnt/include/isc/win32os.h
+ 1.1 03/06/11 18:44:05 mayer@tecotoo.myibg.com +71 -0
+
+ ports/winnt/include/isc/win32os.h
+ 1.0 03/06/11 18:44:05 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/include/isc/win32os.h
+
+ ports/winnt/libntp/libntp.dsp
+ 1.14 03/06/11 18:44:02 mayer@tecotoo.myibg.com +8 -0
+ Added libisc/win32os.c .h files
+
+ ntpd/ntp_io.c
+ 1.76 03/06/11 18:43:58 mayer@tecotoo.myibg.com +47 -0
+ Add workaround for Win32 to fix MS bug with UDP sockets.
+ See KB Q263823
+
+ChangeSet
+ 1.1070 03/06/10 04:51:47 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ configure.in
+ 1.315 03/06/10 04:51:31 stenn@whimsy.udel.edu +0 -1
+ ntp-dev uses its own version numbers.
+
+ChangeSet
+ 1.683.14.20 03/06/10 04:09:53 stenn@whimsy.udel.edu +1 -0
+ 4.1.1c-rc3
+
+ configure.in
+ 1.219.3.45 03/06/10 04:08:47 stenn@whimsy.udel.edu +1 -1
+ 4.1.1c-rc3
+
+ChangeSet
+ 1.1069 03/06/10 03:07:07 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ README
+ 1.20 03/06/10 03:07:04 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.19 03/06/10 03:04:28 stenn@whimsy.udel.edu +2 -0
+ Update the bug submission process.
+
+ README
+ 1.14.1.6 03/06/10 03:04:14 stenn@whimsy.udel.edu +4 -2
+ Update the bug submission process.
+
+ README.hackers
+ 1.8 03/06/10 03:04:14 stenn@whimsy.udel.edu +6 -9
+ Update the bug submission process.
+
+ChangeSet
+ 1.1068 03/06/09 04:35:19 stenn@whimsy.udel.edu +7 -0
+ [Bug 87] Use md5 from the OS if available.
+
+ libntp/md5c.c
+ 1.7 03/06/09 04:33:40 stenn@whimsy.udel.edu +8 -4
+ [Bug 87] Use md5 from the OS if available.
+
+ libntp/a_md5encrypt.c
+ 1.13 03/06/09 04:33:37 stenn@whimsy.udel.edu +4 -4
+ [Bug 87] Use md5 from the OS if available.
+
+ libntp/Makefile.am
+ 1.29 03/06/09 04:33:37 stenn@whimsy.udel.edu +0 -1
+ [Bug 87] Use md5 from the OS if available.
+
+ include/rsa_md5.h
+ 1.5 03/06/09 04:33:33 stenn@whimsy.udel.edu +4 -4
+ [Bug 87] Use md5 from the OS if available.
+
+ include/Makefile.am
+ 1.18 03/06/09 04:33:29 stenn@whimsy.udel.edu +1 -0
+ [Bug 87] Use md5 from the OS if available.
+
+ configure.in
+ 1.314 03/06/09 04:33:11 stenn@whimsy.udel.edu +6 -2
+ [Bug 87] Use md5 from the OS if available.
+
+ include/ntp_md5.h
+ 1.1 03/06/09 04:29:07 stenn@whimsy.udel.edu +9 -0
+
+ include/ntp_md5.h
+ 1.0 03/06/09 04:29:07 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev-md5/include/ntp_md5.h
+
+ChangeSet
+ 1.1067 03/06/07 04:37:44 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ Makefile.am
+ 1.40 03/06/07 04:37:41 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ChangeSet
+ 1.683.14.18 03/06/07 04:34:10 stenn@whimsy.udel.edu +1 -0
+ Tell automake we expect at least 1.5
+
+ Makefile.am
+ 1.12.1.21 03/06/07 04:33:53 stenn@whimsy.udel.edu +1 -1
+ Tell automake we expect at least 1.5
+
+ChangeSet
+ 1.1066 03/06/06 03:53:06 stenn@whimsy.udel.edu +1 -0
+ Tell automake we expect at least 1.5
+
+ Makefile.am
+ 1.39 03/06/06 03:52:57 stenn@whimsy.udel.edu +1 -1
+ Tell automake we expect at least 1.5
+
+ChangeSet
+ 1.1065 03/06/06 03:45:01 stenn@whimsy.udel.edu +1 -0
+ [bug 87] Add /usr/lib/openssl as a place to look for openssl libs.
+
+ configure.in
+ 1.313 03/06/06 03:44:49 stenn@whimsy.udel.edu +1 -1
+ [bug 87] Add /usr/lib/openssl as a place to look for openssl libs.
+
+ChangeSet
+ 1.1064 03/06/06 01:49:57 stenn@whimsy.udel.edu +4 -0
+ [bug 86] Rename md5.h to rsa_md5.h to avoid a conflict.
+
+ libntp/md5c.c
+ 1.6 03/06/06 01:49:44 stenn@whimsy.udel.edu +1 -1
+ [bug 86] Rename md5.h to rsa_md5.h to avoid a conflict.
+
+ libntp/a_md5encrypt.c
+ 1.12 03/06/06 01:49:20 stenn@whimsy.udel.edu +1 -1
+ [bug 86] Rename md5.h to rsa_md5.h to avoid a conflict.
+
+ include/Makefile.am
+ 1.17 03/06/06 01:49:20 stenn@whimsy.udel.edu +1 -1
+ [bug 86] Rename md5.h to rsa_md5.h to avoid a conflict.
+
+ include/rsa_md5.h
+ 1.4 03/06/06 01:42:50 stenn@whimsy.udel.edu +0 -0
+ Rename: include/md5.h -> include/rsa_md5.h
+
+ChangeSet
+ 1.1063 03/06/06 01:35:09 stenn@whimsy.udel.edu +1 -0
+ typo cleanup
+
+ChangeSet
+ 1.1062 03/06/02 08:54:15 mayer@tecotoo.myibg.com +3 -0
+ Changes in support for I/O Completion Ports. Added additional argument to call.
+ Added support for broadcast socket through I/O Completion Ports, which was
+ not previously being added.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c
+ 1.9 03/06/02 08:53:43 mayer@tecotoo.myibg.com +8 -5
+ Added SOCKET argument to function call to make more general. Associated changes
+ to use the argument in the code.
+
+ ports/winnt/include/ntp_iocompletionport.h
+ 1.7 03/06/02 08:53:40 mayer@tecotoo.myibg.com +1 -1
+ Added SOCKET argument to make more general.
+
+ ntpd/ntp_io.c
+ 1.75 03/06/02 08:53:35 mayer@tecotoo.myibg.com +21 -12
+ Changes in support for I/O Completion Ports. Added additional argument to call.
+ Added support for broadcast socket through I/O Completion Ports, which was
+ not previously being added.
+
+ libntp/iosignal.c
+ 1.11 03/06/01 03:55:22 stenn@whimsy.udel.edu +3 -3
+ typo cleanup
+
+ChangeSet
+ 1.1061 03/05/31 21:59:48 mayer@tecotoo.myibg.com +1 -0
+ Fixes to eliminate warning messages on Unix O/S's.
+
+ libntp/msyslog.c
+ 1.18 03/05/31 21:59:18 mayer@tecotoo.myibg.com +6 -5
+ Fixes to eliminate warning messages on Unix O/S's.
+
+ChangeSet
+ 1.1049.1.3 03/05/31 20:05:01 mayer@tecotoo.myibg.com +2 -0
+ Win32 Fixes for Bugs #67 and #70
+
+ ports/winnt/ntpd/win32_io.c
+ 1.7 03/05/31 20:04:29 mayer@tecotoo.myibg.com +3 -3
+ Fix baud rate declarations.
+
+ ntpd/ntpd.c
+ 1.48 03/05/31 20:04:24 mayer@tecotoo.myibg.com +8 -22
+ Fix Win32 WaitForMultipleObjectsEx to take correct argument
+ Fix checks on output. Log any WAIT_FAILED messages.
+
+ChangeSet
+ 1.1059 03/05/30 05:24:53 stenn@whimsy.udel.edu +1 -0
+ [Bug 72] Use an explicit $(srcdir) to avoid a VPATH difference with Solaris make.
+
+ libntp/Makefile.am
+ 1.28 03/05/30 05:23:48 stenn@whimsy.udel.edu +5 -3
+ [Bug 72] Use an explicit $(srcdir) to avoid a VPATH difference with Solaris make.
+
+ChangeSet
+ 1.1058 03/05/30 05:10:15 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ Makefile.am
+ 1.38 03/05/30 05:09:38 stenn@whimsy.udel.edu +1 -2
+ copyright.htm was renamed to copyright.html in ntp-dev.
+
+ChangeSet
+ 1.683.14.17 03/05/30 05:04:38 stenn@whimsy.udel.edu +1 -0
+ [Bug 71] Use an explicit $(srcdir) to avoid a VPATH difference with Solaris make.
+
+ Makefile.am
+ 1.12.1.20 03/05/30 05:04:25 stenn@whimsy.udel.edu +1 -1
+ [Bug 71] Use an explicit $(srcdir) to avoid a VPATH difference with Solaris make.
+
+ChangeSet
+ 1.1057 03/05/27 22:38:21 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_request.c
+ 1.48 03/05/27 22:38:17 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ChangeSet
+ 1.683.14.16 03/05/27 22:36:50 stenn@whimsy.udel.edu +1 -0
+ Bug 65: ntpdc clockstat reports fudgetime1 twice
+
+ ntpd/ntp_request.c
+ 1.23.3.2 03/05/27 22:36:32 stenn@whimsy.udel.edu +1 -1
+ Bug 65: ntpdc clockstat reports fudgetime1 twice
+
+ChangeSet
+ 1.1056 03/05/27 04:43:39 stenn@whimsy.udel.edu +1 -0
+ Handle the CLOCKCTL command-line options like the others.
+
+ ntpd/cmd_args.c
+ 1.20 03/05/27 04:43:22 stenn@whimsy.udel.edu +7 -7
+ Handle the CLOCKCTL command-line options like the others.
+
+ChangeSet
+ 1.1049.1.2 03/05/21 22:43:30 mayer@tecotoo.myibg.com +6 -0
+ Miscellaneous updates and cosmetic changes.
+ Updates to ntptrace to get it to build properly.
+
+ ports/winnt/ntpdate/ntpdate.dsp
+ 1.10 03/05/21 22:42:59 mayer@tecotoo.myibg.com +1 -1
+ Fix for browse support in debug
+
+ ntptrace/ntptrace.h
+ 1.3 03/05/21 22:42:58 mayer@tecotoo.myibg.com +1 -1
+ Fix address structure for IPv6
+
+ ntptrace/ntptrace.c
+ 1.16 03/05/21 22:42:56 mayer@tecotoo.myibg.com +16 -15
+ Fix for sockaddr_storage to deal with IPv6.
+ Note this implementation only supports IPv4.
+
+ ntpdate/ntpdate.c
+ 1.43 03/05/21 22:42:55 mayer@tecotoo.myibg.com +17 -17
+ Use the right definitions to allow support for Windows
+
+ ntpd/ntp_io.c
+ 1.74 03/05/21 22:42:50 mayer@tecotoo.myibg.com +10 -9
+ Fix to put the reporting of the list of listening sockets in the right place.
+
+ html/hints/winnt.html
+ 1.12 03/05/21 22:42:42 mayer@tecotoo.myibg.com +33 -11
+ Update the Windows Build/Release notes to reflect the latest state.
+
+ChangeSet
+ 1.1053 03/05/19 04:28:59 stenn@whimsy.udel.edu +1 -0
+ Handle ss_len the same way we handle ss_family. From Lars-Owe.Ivarsson@its.uu.se
+
+ configure.in
+ 1.312 03/05/19 04:28:46 stenn@whimsy.udel.edu +1 -0
+ Handle ss_len the same way we handle ss_family. From Lars-Owe.Ivarsson@its.uu.se
+
+ChangeSet
+ 1.1052 03/05/18 04:23:04 stenn@whimsy.udel.edu +1 -0
+ ss_family tests (stolen from openssh)
+
+ configure.in
+ 1.311 03/05/18 04:22:48 stenn@whimsy.udel.edu +38 -0
+ ss_family tests (stolen from openssh)
+
+ChangeSet
+ 1.1049.1.1 03/05/17 21:18:16 mayer@tecotoo.myibg.com +2 -0
+ Update for Listening Interfaces and not put out duplicate info to stdout.
+
+ ntpd/ntp_io.c
+ 1.73 03/05/17 21:17:52 mayer@tecotoo.myibg.com +14 -1
+ Print Listening Interfaces and any listening broadcast interfaces.
+
+ libntp/msyslog.c
+ 1.17 03/05/17 21:17:48 mayer@tecotoo.myibg.com +5 -9
+ Changes to not put out data twice if already going to stdout or stderr.
+
+ChangeSet
+ 1.1051 03/05/13 20:21:21 stenn@whimsy.udel.edu +3 -0
+ Documentation updates from Dave Mills
+
+ html/scripts/footer.txt
+ 1.2 03/05/13 20:19:37 stenn@whimsy.udel.edu +1 -2
+ Documentation updates from Dave Mills
+
+ html/drivers/driver36.html
+ 1.19 03/05/13 20:19:33 stenn@whimsy.udel.edu +16 -25
+ Documentation updates from Dave Mills
+
+ html/miscopt.html
+ 1.28 03/05/13 20:19:31 stenn@whimsy.udel.edu +6 -4
+ Documentation updates from Dave Mills
+
+ChangeSet
+ 1.1050 03/05/12 03:59:17 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ ntpd/refclock_neoclock4x.c
+ 1.6 03/05/12 03:58:58 stenn@whimsy.udel.edu +1 -1
+ Danny and Harlan fixed the same thing differently.
+
+ChangeSet
+ 1.1046.1.2 03/05/12 02:45:13 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_neoclock4x.c
+ 1.4.1.1 03/05/12 02:45:08 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.310 03/05/12 02:45:08 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1046.1.1 03/05/12 02:43:20 stenn@whimsy.udel.edu +4 -0
+ Allow the intial frequency to be set. Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.78 03/05/12 02:42:56 stenn@whimsy.udel.edu +5 -0
+ Allow the intial frequency to be set. Dave Mills.
+
+ ntpd/ntp_config.c
+ 1.89 03/05/12 02:42:56 stenn@whimsy.udel.edu +5 -0
+ Allow the intial frequency to be set. Dave Mills.
+
+ include/ntp_config.h
+ 1.27 03/05/12 02:42:56 stenn@whimsy.udel.edu +1 -0
+ Allow the intial frequency to be set. Dave Mills.
+
+ include/ntp.h
+ 1.89 03/05/12 02:42:55 stenn@whimsy.udel.edu +1 -0
+ Allow the intial frequency to be set. Dave Mills.
+
+ChangeSet
+ 1.683.14.15 03/05/12 01:30:41 stenn@whimsy.udel.edu +1 -0
+ Under AIX, if we have utmpx.h don't look for utmp.h . From Lars-Owe Ivarsson
+
+ configure.in
+ 1.219.3.44 03/05/12 01:30:08 stenn@whimsy.udel.edu +11 -1
+ Under AIX, if we have utmpx.h don't look for utmp.h . From Lars-Owe Ivarsson
+
+ChangeSet
+ 1.683.14.14 03/05/12 00:23:21 stenn@whimsy.udel.edu +1 -0
+ Lose a C++ comment. From: Lars-Owe Ivarsson
+
+ ntpd/refclock_neoclock4x.c
+ 1.1.1.3 03/05/12 00:23:00 stenn@whimsy.udel.edu +59 -57
+ Lose a C++ comment. From: Lars-Owe Ivarsson
+
+ChangeSet
+ 1.1049 03/05/09 22:08:39 mayer@tecotoo.myibg.com +1 -0
+ Declare the functions even if they don't get used. Move the macro #ifdef below
+ the declaration.
+
+ include/isc/net.h
+ 1.3 03/05/09 22:08:12 mayer@tecotoo.myibg.com +3 -3
+ Declare the functions even if they don't get used. Move the macro #ifdef below
+ the declaration.
+
+ChangeSet
+ 1.1048 03/05/09 21:46:35 mayer@tecotoo.myibg.com +5 -0
+ Change C++ comment to C comment. Fix sprintf call to use SPRINTF macro in inet_ntop.c.
+
+ util/sht.c
+ 1.3 03/05/09 21:46:00 mayer@tecotoo.myibg.com +1 -1
+ Change C++ comment to C comment
+
+ util/pps-api.c
+ 1.2 03/05/09 21:45:59 mayer@tecotoo.myibg.com +1 -1
+ Change C++ comment to C comment
+
+ ntpd/refclock_neoclock4x.c
+ 1.5 03/05/09 21:45:55 mayer@tecotoo.myibg.com +1 -1
+ Change C++ comment to C comment
+
+ ntpd/refclock_hopfpci.c
+ 1.9 03/05/09 21:45:52 mayer@tecotoo.myibg.com +1 -1
+ Change C++ comment to C comment
+
+ libisc/inet_ntop.c
+ 1.3 03/05/09 21:45:49 mayer@tecotoo.myibg.com +1 -1
+ Change other call to sprintf to use the SPRINTF macro.
+
+ChangeSet
+ 1.1043.1.2 03/05/05 09:40:44 mayer@tecotoo.myibg.com +3 -0
+ Add support for running the nodebug version no as a service
+
+ ports/winnt/libntp/libntp.dsp
+ 1.13 03/05/05 09:40:12 mayer@tecotoo.myibg.com +4 -4
+ Location of log.c has changed. It is Win32 specific.
+
+ ntpd/ntpd.c
+ 1.47 03/05/05 09:40:09 mayer@tecotoo.myibg.com +28 -18
+ Add support for running the nodebug version no as a service
+
+ ntpd/cmd_args.c
+ 1.19 03/05/05 09:40:01 mayer@tecotoo.myibg.com +19 -0
+ Add support for running the nodebug version no as a service
+
+ChangeSet
+ 1.1043.1.1 03/05/04 10:51:16 mayer@tecotoo.myibg.com +4 -0
+ Changes to support netsyslog in addition to msyslog.
+ the libntp/log.c was in the wrong place. It should have been under winnt/libntp.
+
+ ports/winnt/libntp/log.c
+ 1.1 03/05/04 10:50:36 mayer@tecotoo.myibg.com +161 -0
+
+ ports/winnt/libntp/log.c
+ 1.0 03/05/04 10:50:36 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/libntp/log.c
+
+ ntpd/ntp_io.c
+ 1.72 03/05/04 10:50:33 mayer@tecotoo.myibg.com +1 -4
+ Make the netsyslog call real. Make sure that the address_okay function's return
+ value gets used properly.
+
+ libntp/msyslog.c
+ 1.16 03/05/04 10:50:29 mayer@tecotoo.myibg.com +126 -49
+ Add netsyslog to syslog functions. Reorganize code to make it more modular
+ and allow both msyslog and netsyslog to share the same logic. Fix the \n so
+ that we don't lose message information.
+
+ include/ntp_stdlib.h
+ 1.20 03/05/04 10:50:25 mayer@tecotoo.myibg.com +3 -0
+ Add netsyslog declaration.
+
+ChangeSet
+ 1.1046 03/04/30 02:03:30 stenn@whimsy.udel.edu +5 -0
+ sprintf portability fixes (thanks Paul!)
+
+ libisc/inet_ntop.c
+ 1.2 03/04/30 01:39:55 stenn@whimsy.udel.edu +3 -1
+ Use ntp_sprintf.h .
+
+ configure.in
+ 1.309 03/04/30 01:33:22 stenn@whimsy.udel.edu +6 -0
+ Define SPRINTF_CHAR where needed (sunos4).
+
+ ntpd/refclock_mx4200.c
+ 1.18 03/04/30 01:32:48 stenn@whimsy.udel.edu +4 -16
+ Use ntp_sprintf.h and clean up the code accordingly.
+
+ include/Makefile.am
+ 1.16 03/04/30 01:31:52 stenn@whimsy.udel.edu +1 -0
+ Added ntp_sprintf.h
+
+ include/ntp_sprintf.h
+ 1.1 03/04/30 01:30:21 stenn@whimsy.udel.edu +13 -0
+
+ include/ntp_sprintf.h
+ 1.0 03/04/30 01:30:21 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/include/ntp_sprintf.h
+
+ChangeSet
+ 1.1045 03/04/29 16:56:14 stenn@whimsy.udel.edu +1 -0
+ [Bug 48]: SOCKNUL test backwords, causes spurious error.
+
+ ntpd/ntp_intres.c
+ 1.29 03/04/29 16:56:03 stenn@whimsy.udel.edu +1 -1
+ [Bug 48]: SOCKNUL test backwords, causes spurious error.
+
+ChangeSet
+ 1.1043 03/04/26 23:04:38 mayer@tecotoo.myibg.com +1 -0
+ Change to put address in result rather than 5.
+
+ ntpd/ntp_request.c
+ 1.47 03/04/26 23:04:08 mayer@tecotoo.myibg.com +6 -8
+ Change to put address in result rather than 5.
+
+ChangeSet
+ 1.1042 03/04/26 19:25:21 mayer@tecotoo.myibg.com +2 -0
+ Fixes to deal with compiler warnings.
+
+ ntpq/ntpq_ops.c
+ 1.17 03/04/26 19:24:50 mayer@tecotoo.myibg.com +12 -6
+ Fix to take care of the implicit cast.
+ Initialize some variables to stop the compiler warning about possible uninitialized variables.
+
+ ntpd/ntp_crypto.c
+ 1.86 03/04/26 19:24:46 mayer@tecotoo.myibg.com +1 -1
+ Refix the cast to shut up the compiler warnings.
+
+ChangeSet
+ 1.1040.1.2 03/04/26 05:02:11 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ configure.in
+ 1.308 03/04/26 05:01:50 stenn@whimsy.udel.edu +0 -1
+ ntp-dev uses its own release numbers.
+
+ChangeSet
+ 1.683.14.13 03/04/26 04:36:51 stenn@whimsy.udel.edu +1 -0
+ 4.1.1c-rc2
+
+ configure.in
+ 1.219.3.43 03/04/26 04:36:35 stenn@whimsy.udel.edu +1 -1
+ 4.1.1c-rc2
+
+ChangeSet
+ 1.1040.1.1 03/04/26 03:36:06 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_shm.c
+ 1.13 03/04/26 03:36:02 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.12 03/04/26 03:34:12 stenn@whimsy.udel.edu +1 -0
+ Lose a syslog message per Jonathan Buzzard
+
+ ntpd/refclock_shm.c
+ 1.10.1.1 03/04/26 03:34:02 stenn@whimsy.udel.edu +2 -0
+ Lose a syslog message per Jonathan Buzzard
+
+ChangeSet
+ 1.1041 03/04/26 00:14:02 mayer@pogo.udel.edu +1 -0
+ Merge
+
+ ntpd/ntp_crypto.c
+ 1.85 03/04/26 00:13:53 mayer@pogo.udel.edu +1 -2
+
+ChangeSet
+ 1.1032.1.2 03/04/26 00:07:53 mayer@tecotoo.myibg.com +3 -0
+ Fixes to deal with bug #37 and fix for non-IPv6 stack machines to deal with IPv6 addresses.
+
+ ports/winnt/include/config.h
+ 1.21 03/04/26 00:07:06 mayer@tecotoo.myibg.com +1 -0
+ Add Platform requirement to use the isc_inet_ntop() routine.
+
+ ntpd/ntp_request.c
+ 1.46 03/04/26 00:07:03 mayer@tecotoo.myibg.com +6 -0
+ Temporary fix for bug #37. Needs additioonal work
+
+ libntp/socktoa.c
+ 1.5 03/04/26 00:06:55 mayer@tecotoo.myibg.com +3 -8
+ Replace Windows specific includes with config.h and use Platform define for
+ isc/net.h include
+
+ChangeSet
+ 1.1040 03/04/25 22:52:14 stenn@whimsy.udel.edu +1 -0
+ Cleanup
+
+ configure.in
+ 1.307 03/04/25 22:52:06 stenn@whimsy.udel.edu +0 -7
+ Cleanup
+
+ChangeSet
+ 1.1039 03/04/25 22:05:05 stenn@whimsy.udel.edu +1 -0
+ Clean up the configure warnings for net/if.h and netinet/ip.h
+
+ configure.in
+ 1.306 03/04/25 22:04:52 stenn@whimsy.udel.edu +17 -3
+ Clean up the configure warnings for net/if.h and netinet/ip.h
+
+ChangeSet
+ 1.1038 03/04/25 03:28:22 stenn@whimsy.udel.edu +1 -0
+ Define ISC_PLATFORM_NEEDNTOP if inet_ntop() is not available.
+
+ configure.in
+ 1.305 03/04/25 03:28:09 stenn@whimsy.udel.edu +3 -1
+ Define ISC_PLATFORM_NEEDNTOP if inet_ntop() is not available.
+
+ChangeSet
+ 1.1032.1.1 03/04/24 11:50:33 mayer@tecotoo.myibg.com +6 -0
+ Updates to handle IPv6 addresses for non-IPv6 capable systems.
+
+ libisc/inet_ntop.c
+ 1.1 03/04/24 11:49:48 mayer@tecotoo.myibg.com +196 -0
+
+ libisc/inet_ntop.c
+ 1.0 03/04/24 11:49:47 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/inet_ntop.c
+
+ ports/winnt/libntp/libntp.dsp
+ 1.12 03/04/24 11:49:45 mayer@tecotoo.myibg.com +8 -0
+ At the inet_ntop.c file to build list
+
+ ntpd/ntp_crypto.c
+ 1.83.1.1 03/04/24 11:49:42 mayer@tecotoo.myibg.com +2 -3
+ Fix cast problem.
+
+ libntp/socktoa.c
+ 1.4 03/04/24 11:49:37 mayer@tecotoo.myibg.com +12 -5
+ Fix to allow non-IPv6 systems to handle IPv6 addresses.
+
+ libntp/log.c
+ 1.4 03/04/24 11:49:33 mayer@tecotoo.myibg.com +5 -0
+ Fix RPC ASYNCH problem
+
+ libntp/Makefile.am
+ 1.27 03/04/24 11:49:27 mayer@tecotoo.myibg.com +1 -1
+ Add new file to list
+
+ChangeSet
+ 1.1037 03/04/23 22:40:09 stenn@whimsy.udel.edu +2 -0
+ Quiet some warnings
+
+ ntpd/ntp_io.c
+ 1.71 03/04/23 22:39:56 stenn@whimsy.udel.edu +2 -2
+ Quiet some warnings
+
+ libntp/mktime.c
+ 1.6 03/04/23 22:39:56 stenn@whimsy.udel.edu +1 -1
+ Quiet some warnings
+
+ChangeSet
+ 1.1036 03/04/23 01:34:08 stenn@whimsy.udel.edu +1 -0
+ John Hay: revert incorrect cleanup
+
+ ntpd/ntp_crypto.c
+ 1.84 03/04/23 01:33:04 stenn@whimsy.udel.edu +1 -2
+ John Hay: revert incorrect cleanup
+
+ChangeSet
+ 1.1035 03/04/22 05:10:39 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.304 03/04/22 05:10:35 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ README.bk
+ 1.16 03/04/22 05:10:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.11 03/04/22 04:53:32 stenn@whimsy.udel.edu +2 -0
+ Require autoconf-2.53 for cross-compile endian support
+
+ configure.in
+ 1.219.3.42 03/04/22 04:53:19 stenn@whimsy.udel.edu +2 -17
+ Require autoconf-2.53 for cross-compile endian support
+
+ README.bk
+ 1.1.1.17 03/04/22 04:53:19 stenn@whimsy.udel.edu +1 -1
+ Require autoconf-2.53 for cross-compile endian support
+
+ChangeSet
+ 1.1034 03/04/22 04:05:18 stenn@whimsy.udel.edu +1 -0
+ More improvements from Dave Mills.
+
+ ntpd/refclock_wwv.c
+ 1.43 03/04/22 04:05:06 stenn@whimsy.udel.edu +115 -150
+ More improvements from Dave Mills.
+
+ChangeSet
+ 1.1029.1.4 03/04/20 01:39:04 mayer@tecotoo.myibg.com +5 -0
+ Fix casting issues and other warnings.
+
+ ports/winnt/ntpd/hopf_PCI_io.c
+ 1.5 03/04/20 01:38:21 mayer@tecotoo.myibg.com +6 -0
+ Disable warning about nonstandard declarations in Windows-omly code.
+
+ ports/winnt/include/config.h
+ 1.20 03/04/20 01:38:19 mayer@tecotoo.myibg.com +5 -0
+ Readd the RPCASYNC_H macro to get rid of warnings.
+
+ ntpd/refclock_palisade.c
+ 1.16 03/04/20 01:38:16 mayer@tecotoo.myibg.com +4 -1
+ Fix casting issues.
+
+ ntpd/ntp_monitor.c
+ 1.11 03/04/20 01:38:13 mayer@tecotoo.myibg.com +2 -2
+ Fix casting issues.
+
+ ntpd/ntp_loopfilter.c
+ 1.77 03/04/20 01:38:09 mayer@tecotoo.myibg.com +2 -2
+ Fix casting issues.
+
+ChangeSet
+ 1.1029.1.3 03/04/19 09:10:42 mayer@tecotoo.myibg.com +3 -0
+ Fix casting issues.
+
+ ntpd/ntp_restrict.c
+ 1.17 03/04/19 09:10:01 mayer@tecotoo.myibg.com +3 -1
+ Fix casting issues.
+
+ ntpd/ntp_request.c
+ 1.45 03/04/19 09:09:57 mayer@tecotoo.myibg.com +4 -4
+ Fix casting issues.
+
+ ntpd/ntp_proto.c
+ 1.154 03/04/19 09:09:51 mayer@tecotoo.myibg.com +4 -4
+ Fix casting issues.
+
+ChangeSet
+ 1.1030.1.2 03/04/17 06:36:35 stenn@whimsy.udel.edu +6 -0
+ Merge
+
+ ntpq/Makefile.am
+ 1.9 03/04/17 06:36:06 stenn@whimsy.udel.edu +1 -2
+ -dev doesn't use RSAREF libs.
+
+ ntpdc/Makefile.am
+ 1.8 03/04/17 06:35:25 stenn@whimsy.udel.edu +1 -2
+ -dev doesn't use RSAREF libs.
+
+ ntpdate/Makefile.am
+ 1.11 03/04/17 06:34:54 stenn@whimsy.udel.edu +1 -2
+ -dev doesn't use RSAREF libs.
+
+ ntpd/Makefile.am
+ 1.35 03/04/17 06:34:02 stenn@whimsy.udel.edu +1 -2
+ -dev doesn't use RSAREF libs
+
+ NEWS
+ 1.42 03/04/17 06:32:44 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.37 03/04/17 06:32:44 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.10 03/04/17 06:31:00 stenn@whimsy.udel.edu +7 -0
+ version -> version.c improvements
+
+ ntptrace/Makefile.am
+ 1.5 03/04/17 06:30:46 stenn@whimsy.udel.edu +1 -1
+ version -> version.c improvements
+
+ ntpq/Makefile.am
+ 1.4.1.3 03/04/17 06:30:46 stenn@whimsy.udel.edu +1 -1
+ version -> version.c improvements
+
+ ntpdc/Makefile.am
+ 1.3.1.3 03/04/17 06:30:46 stenn@whimsy.udel.edu +1 -1
+ version -> version.c improvements
+
+ ntpdate/Makefile.am
+ 1.5.1.3 03/04/17 06:30:45 stenn@whimsy.udel.edu +1 -1
+ version -> version.c improvements
+
+ ntpd/Makefile.am
+ 1.18.2.9 03/04/17 06:30:45 stenn@whimsy.udel.edu +1 -1
+ version -> version.c improvements
+
+ NEWS
+ 1.31.1.10 03/04/17 06:30:45 stenn@whimsy.udel.edu +1 -0
+ version -> version.c improvements
+
+ Makefile.am
+ 1.12.1.19 03/04/17 06:30:45 stenn@whimsy.udel.edu +3 -2
+ version -> version.c improvements
+
+ChangeSet
+ 1.1030.1.1 03/04/17 06:25:19 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntpd.c
+ 1.46 03/04/17 06:25:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.9 03/04/17 06:20:30 stenn@whimsy.udel.edu +1 -0
+ If we're debugging, emit Version first.
+
+ ntpd/ntpd.c
+ 1.33.2.2 03/04/17 06:20:16 stenn@whimsy.udel.edu +3 -0
+ If we're debugging, emit Version first.
+
+ChangeSet
+ 1.1029.1.2 03/04/16 22:09:32 mayer@tecotoo.myibg.com +1 -0
+ Enabled checking of the UP flag.
+
+ ntpd/ntp_io.c
+ 1.70 03/04/16 22:09:01 mayer@tecotoo.myibg.com +2 -2
+ Enabled checking of the UP flag.
+
+ChangeSet
+ 1.1029.1.1 03/04/16 09:18:44 mayer@tecotoo.myibg.com +1 -0
+ Remove unnecessary time adjustment call.
+
+ ports/winnt/ntpd/nt_clockstuff.c
+ 1.13 03/04/16 09:18:16 mayer@tecotoo.myibg.com +0 -3
+ Remove unnecessary time adjustment call.
+
+ChangeSet
+ 1.1030 03/04/16 03:07:41 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.303 03/04/16 03:07:37 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.8 03/04/16 03:06:14 stenn@whimsy.udel.edu +1 -0
+ AIX 5 changes from Petter Reinholdtsen <pere@hungry.com>
+
+ configure.in
+ 1.219.3.41 03/04/16 03:05:00 stenn@whimsy.udel.edu +9 -9
+ AIX 5 changes from Petter Reinholdtsen <pere@hungry.com>
+
+ChangeSet
+ 1.1021.1.3 03/04/15 01:32:13 mayer@tecotoo.myibg.com +5 -0
+ Miscellaneous cleanup for clean Windows build.
+
+ ports/winnt/include/config.h
+ 1.19 03/04/15 01:31:48 mayer@tecotoo.myibg.com +0 -5
+ Remove RPCASYNC Macro as no longer necessary.
+
+ ntpd/ntp_crypto.c
+ 1.83 03/04/15 01:31:46 mayer@tecotoo.myibg.com +10 -10
+ Fix initalization warning.
+
+ ntpd/ntp_config.c
+ 1.88 03/04/15 01:31:42 mayer@tecotoo.myibg.com +2 -2
+ Fix initialization warning.
+
+ libntp/dolfptoa.c
+ 1.5 03/04/15 01:31:38 mayer@tecotoo.myibg.com +1 -1
+ Fix casting issues.
+
+ libntp/dofptoa.c
+ 1.6 03/04/15 01:31:34 mayer@tecotoo.myibg.com +1 -1
+ Fix casting issues.
+
+ChangeSet
+ 1.1028 03/04/14 22:06:47 stenn@whimsy.udel.edu +2 -0
+ Improvements from Dave Mills
+
+ ntpd/refclock_wwv.c
+ 1.42 03/04/14 22:06:28 stenn@whimsy.udel.edu +195 -147
+ WWV improvements
+
+ ntpd/ntp_peer.c
+ 1.55 03/04/14 22:05:17 stenn@whimsy.udel.edu +3 -1
+ If emulating ntpdate, force iburst
+
+ChangeSet
+ 1.1021.1.2 03/04/12 00:38:17 mayer@tecotoo.myibg.com +5 -0
+ MIscellaneous fixes for warnings and include problems for NT.
+
+ ports/winnt/include/config.h
+ 1.18 03/04/12 00:37:51 mayer@tecotoo.myibg.com +3 -0
+ Add windows.h header.
+
+ ntpd/ntpd.c
+ 1.45 03/04/12 00:37:49 mayer@tecotoo.myibg.com +4 -1
+ Don't include unusable code on WINNT.
+
+ libntp/machines.c
+ 1.17 03/04/12 00:37:47 mayer@tecotoo.myibg.com +1 -1
+ Include just the one required function definition.
+
+ libntp/ieee754io.c
+ 1.5 03/04/12 00:37:44 mayer@tecotoo.myibg.com +1 -1
+ Comparison between different int types was causing type match warnings.
+
+ libntp/dofptoa.c
+ 1.5 03/04/12 00:37:41 mayer@tecotoo.myibg.com +1 -1
+ Fix for cast issue.
+
+ChangeSet
+ 1.683.14.7 03/04/10 02:56:17 stenn@whimsy.udel.edu +1 -0
+ Fix the VERB
+
+ BitKeeper/triggers/commitlogs
+ 1.3 03/04/10 02:55:55 stenn@whimsy.udel.edu +9 -9
+ Fix the VERB
+
+ChangeSet
+ 1.683.14.6 03/04/10 02:48:11 stenn@whimsy.udel.edu +1 -0
+ Provide a default VERB for now
+
+ BitKeeper/triggers/commitlogs
+ 1.2 03/04/10 02:47:43 stenn@whimsy.udel.edu +1 -0
+ Provide a default VERB for now
+
+ChangeSet
+ 1.1024 03/04/09 18:30:52 stenn@whimsy.udel.edu +2 -0
+ Initial refid patch from Dave Mills
+
+ ntpd/refclock_atom.c
+ 1.42 03/04/09 18:30:32 stenn@whimsy.udel.edu +2 -1
+ Initial refid patch from Dave Mills
+
+ ntpd/ntp_refclock.c
+ 1.50 03/04/09 18:30:30 stenn@whimsy.udel.edu +4 -3
+ Initial refid patch from Dave Mills
+
+ChangeSet
+ 1.1015.1.3 03/04/05 19:14:20 mayer@tecotoo.myibg.com +1 -0
+ Fixes for broadcast sockets. IPv6 broadcast sockets are invalid.
+
+ ntpd/ntp_io.c
+ 1.69 03/04/05 18:59:51 mayer@tecotoo.myibg.com +18 -6
+ Have the Convert_if code ignore IPv6 broadcast data since it can't exist.
+ Skip non-IPv4 broadcast addresses in setting the broadcast client.
+ Check to make sure that the broadcast socket was opened before setting
+ the broadcast open flag. Use the isc_net_probeipv6() code to check that it can
+ open an IPv6 socket.
+
+ChangeSet
+ 1.1015.1.2 03/04/05 16:08:13 mayer@tecotoo.myibg.com +1 -0
+ The wrong flag macros were being used for check.
+
+ libisc/ifiter_sysctl.c
+ 1.5 03/04/05 16:07:52 mayer@tecotoo.myibg.com +2 -2
+ The wrong flag macros were being used for check.
+
+ChangeSet
+ 1.1020.1.1 03/04/03 20:53:35 stenn@whimsy.udel.edu +1 -0
+ Improvements from Dave Mills.
+
+ ntpd/refclock_wwv.c
+ 1.41 03/04/03 20:53:22 stenn@whimsy.udel.edu +7 -2
+ Improvements from Dave Mills.
+
+ChangeSet
+ 1.1015.1.1 03/03/31 00:24:37 mayer@tecotoo.myibg.com +1 -0
+ Fixes to specify the IPv4 wildcard and IPv6 wildcard separately.
+ Added debug code for the broadcast client.
+ Socket definition cleanup.
+
+ ntpd/ntp_io.c
+ 1.68 03/03/31 00:24:11 mayer@tecotoo.myibg.com +17 -10
+ Fixes to specify the IPv4 wildcard and IPv6 wildcard separately.
+ Added debug code for the broadcast client.
+ Socket definition cleanup.
+
+ChangeSet
+ 1.1020 03/03/30 22:49:43 stenn@whimsy.udel.edu +3 -0
+ Cleanup and fixes from Dave Mills
+
+ ntpd/refclock_wwv.c
+ 1.40 03/03/30 22:49:26 stenn@whimsy.udel.edu +35 -32
+ Fixes to WWV and CHU drivers
+
+ html/drivers/driver22.html
+ 1.14 03/03/30 22:47:37 stenn@whimsy.udel.edu +6 -7
+ Cleanup
+
+ html/index.html
+ 1.26 03/03/30 22:46:41 stenn@whimsy.udel.edu +2 -2
+ Typo fix
+
+ChangeSet
+ 1.1019 03/03/30 16:51:05 stenn@whimsy.udel.edu +6 -0
+ Typo fixes from Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+
+ parseutil/testdcf.c
+ 1.4 03/03/30 16:50:49 stenn@whimsy.udel.edu +1 -1
+ Typo fixes from Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+
+ parseutil/dcfd.c
+ 1.12 03/03/30 16:50:49 stenn@whimsy.udel.edu +1 -1
+ Typo fixes from Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+
+ ntpd/refclock_ripencc.c
+ 1.4 03/03/30 16:50:48 stenn@whimsy.udel.edu +1 -1
+ Typo fixes from Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+
+ ntpd/refclock_mx4200.c
+ 1.17 03/03/30 16:50:48 stenn@whimsy.udel.edu +1 -1
+ Typo fixes from Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+
+ ntpd/refclock_chu.c
+ 1.32 03/03/30 16:50:48 stenn@whimsy.udel.edu +43 -34
+ Typo fixes from Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+
+ html/mx4200data.html
+ 1.10 03/03/30 16:50:48 stenn@whimsy.udel.edu +1 -1
+ Typo fixes from Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+
+ChangeSet
+ 1.1018 03/03/25 04:34:17 stenn@pogo.udel.edu +3 -0
+ Merge
+
+ ntpd/refclock_oncore.c
+ 1.45 03/03/25 04:33:20 stenn@pogo.udel.edu +10 -229
+ Brute-force resolution.
+
+ BitKeeper/etc/logging_ok
+ 1.25 03/03/25 04:25:41 stenn@pogo.udel.edu +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.20 03/03/25 04:25:41 stenn@pogo.udel.edu +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.24 03/03/25 04:25:39 stenn@pogo.udel.edu +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.19 03/03/25 04:25:32 stenn@pogo.udel.edu +0 -0
+ auto-union
+
+ChangeSet
+ 1.683.14.5 03/03/25 04:23:12 stenn@pogo.udel.edu +2 -0
+ refclock_oncore.c:
+ Driver restructured to make it easier to follow.
+ The driver no longer uses the Oncore model number to
+ determine what features are available, but rather tests
+ for them. The driver now supports the M12+T.
+ From Reg Clemens.
+
+ BitKeeper/etc/logging_ok
+ 1.1.1.9 03/03/25 04:23:11 stenn@pogo.udel.edu +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpd/refclock_oncore.c
+ 1.38.1.1 03/03/25 04:20:34 stenn@pogo.udel.edu +2338 -1423
+ Driver restructured to make it easier to follow.
+ The driver no longer uses the Oncore model number to
+ determine what features are available, but rather tests
+ for them. The driver now supports the M12+T.
+ From Reg Clemens.
+
+ChangeSet
+ 1.1017 03/03/21 20:27:39 stenn@whimsy.udel.edu +1 -0
+ chu cleanup from Dave Mills
+
+ ntpd/refclock_chu.c
+ 1.31 03/03/21 20:27:26 stenn@whimsy.udel.edu +116 -82
+ chu cleanup from Dave Mills
+
+ChangeSet
+ 1.1016 03/03/17 22:36:39 stenn@whimsy.udel.edu +2 -0
+ Improvements from Dave Mills and a typo fix.
+
+ ntpd/refclock_chu.c
+ 1.30 03/03/17 22:35:19 stenn@whimsy.udel.edu +149 -53
+ Improvements from Dave Mills
+
+ html/ntpq.html
+ 1.21 03/03/17 22:32:31 stenn@whimsy.udel.edu +1 -1
+ typo
+
+ChangeSet
+ 1.1015 03/03/16 22:40:46 mayer@pogo.udel.edu +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into pogo.udel.edu:/pogo/users/mayer/ntp-dev-io
+
+ include/ntp.h
+ 1.88 03/03/16 22:40:39 mayer@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1014 03/03/16 14:39:22 stenn@whimsy.udel.edu +5 -0
+ More fixes and cleanup from Dave Mills
+
+ ntpd/refclock_wwv.c
+ 1.39 03/03/16 14:38:51 stenn@whimsy.udel.edu +16 -7
+ The rest of Dave's wwv improvements
+
+ html/scripts/style.css
+ 1.2 03/03/16 14:37:16 stenn@whimsy.udel.edu +1 -1
+ Documentation updates from Dave Mills
+
+ html/drivers/driver6.html
+ 1.15 03/03/16 14:37:16 stenn@whimsy.udel.edu +6 -6
+ Documentation updates from Dave Mills
+
+ html/drivers/driver36.html
+ 1.18 03/03/16 14:37:16 stenn@whimsy.udel.edu +40 -38
+ Documentation updates from Dave Mills
+
+ html/authopt.html
+ 1.29 03/03/16 14:37:16 stenn@whimsy.udel.edu +6 -2
+ Documentation updates from Dave Mills
+
+ChangeSet
+ 1.1001.1.32 03/03/16 05:24:05 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ BitKeeper/triggers/trigger.cfg
+ 1.12 03/03/16 05:24:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.4 03/03/16 05:19:20 stenn@whimsy.udel.edu +2 -0
+ Use new commitlogs trigger instead of the delta-changelog and lg-changeset triggers.
+
+ BitKeeper/triggers/trigger.cfg
+ 1.9.1.2 03/03/16 05:18:52 stenn@whimsy.udel.edu +7 -2
+ Use new commitlogs trigger instead of the delta-changelog and lg-changeset triggers.
+
+ BitKeeper/triggers/commitlogs
+ 1.1 03/03/16 05:17:41 stenn@whimsy.udel.edu +81 -0
+
+ BitKeeper/triggers/commitlogs
+ 1.0 03/03/16 05:17:41 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/commitlogs
+
+ChangeSet
+ 1.1001.1.31 03/03/16 04:17:01 stenn@whimsy.udel.edu +2 -0
+ More cleanup and fixes from Dave Mills
+
+ ntpd/refclock_wwv.c
+ 1.38 03/03/16 04:16:23 stenn@whimsy.udel.edu +98 -20
+ More cleanup and fixes from Dave Mills
+
+ ntpd/refclock_irig.c
+ 1.20 03/03/16 04:16:23 stenn@whimsy.udel.edu +8 -17
+ More cleanup and fixes from Dave Mills
+
+ChangeSet
+ 1.1001.1.30 03/03/16 04:06:25 stenn@whimsy.udel.edu +2 -0
+ Improve the name length stuff for crypto host/node names (DLM from ???)
+
+ ntpd/ntp_crypto.c
+ 1.82 03/03/16 04:05:47 stenn@whimsy.udel.edu +2 -4
+ Improve the name length stuff for crypto host/node names
+
+ include/ntp.h
+ 1.86.1.1 03/03/16 04:05:47 stenn@whimsy.udel.edu +1 -2
+ Improve the name length stuff for crypto host/node names
+
+ChangeSet
+ 1.1001.1.29 03/03/16 03:51:09 stenn@whimsy.udel.edu +2 -0
+ cleanup
+
+ flock-build
+ 1.27 03/03/16 03:50:53 stenn@whimsy.udel.edu +9 -2
+ cleanup
+
+ configure.in
+ 1.302 03/03/16 03:40:56 stenn@whimsy.udel.edu +12 -2
+ cleanup
+
+ChangeSet
+ 1.1001.4.4 03/03/16 01:52:29 mayer@tecotoo.myibg.com +2 -0
+ Track the number of multicast addresses on a socket.
+ Check to see if to listen on all interfaces.
+
+ ntpd/ntp_io.c
+ 1.67 03/03/16 01:52:03 mayer@tecotoo.myibg.com +19 -12
+ Track the number of multicast addresses on a socket.
+ Check to see if to listen on all interfaces.
+
+ include/ntp.h
+ 1.87 03/03/16 01:51:59 mayer@tecotoo.myibg.com +1 -0
+ Keep a count of the number of multicast addresses on the socket.
+
+ChangeSet
+ 1.1011 03/03/14 20:08:24 gnu@ring.wraith.sf.ca.us +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into ring.wraith.sf.ca.us:/home/gnu/src/ntp/ntp-dev
+
+ libntp/audio.c
+ 1.21 03/03/14 20:08:24 gnu@ring.wraith.sf.ca.us +0 -0
+ Auto merged
+
+ChangeSet
+ 1.1010 03/03/14 20:08:13 gnu@ring.wraith.sf.ca.us +1 -0
+ audio.c:
+ quick linux/freebsd audio fixup.
+
+ChangeSet
+ 1.1001.1.28 03/03/14 04:25:10 stenn@whimsy.udel.edu +1 -0
+ Dave rolled an interim tarball
+
+ configure.in
+ 1.301 03/03/14 04:24:54 stenn@whimsy.udel.edu +1 -1
+ Dave rolled an interim tarball
+
+ChangeSet
+ 1.1001.1.27 03/03/14 04:21:57 stenn@whimsy.udel.edu +1 -0
+ Use correct variable types. From: Jason L. Wright <jason@thought.net>
+
+ ntpd/refclock_neoclock4x.c
+ 1.4 03/03/14 04:21:33 stenn@whimsy.udel.edu +4 -3
+ Use correct variable types. From: Jason L. Wright <jason@thought.net>
+
+ChangeSet
+ 1.1001.1.26 03/03/11 15:39:21 stenn@whimsy.udel.edu +2 -0
+ Improvements from Dave Mills
+
+ ntpd/refclock_irig.c
+ 1.19 03/03/11 15:38:39 stenn@whimsy.udel.edu +54 -33
+ Improvements from Dave Mills
+
+ libntp/audio.c
+ 1.17.1.2 03/03/11 15:24:35 stenn@whimsy.udel.edu +2 -3
+ Show info.record.balance debug info
+
+ChangeSet
+ 1.1001.1.25 03/03/11 05:42:25 stenn@whimsy.udel.edu +2 -0
+ Improvements from Dave Mills.
+
+ ntpd/refclock_wwv.c
+ 1.37 03/03/11 05:42:12 stenn@whimsy.udel.edu +410 -342
+ Improvements from Dave Mills.
+
+ libntp/audio.c
+ 1.17.1.1 03/03/11 05:31:10 stenn@whimsy.udel.edu +4 -2
+ Improvements from Dave Mills.
+
+ChangeSet
+ 1.1009 03/03/10 15:46:27 gnu@ring.wraith.sf.ca.us +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into ring.wraith.sf.ca.us:/home/gnu/src/ntp/ntp-dev
+
+ BitKeeper/etc/logging_ok
+ 1.23 03/03/10 15:46:26 gnu@ring.wraith.sf.ca.us +0 -0
+ auto-union
+
+ libntp/audio.c
+ 1.20 03/03/10 15:30:56 gnu@ring.wraith.sf.ca.us +9 -2
+ quick linux/freebsd audio fixup.
+
+ChangeSet
+ 1.1001.4.3 03/03/09 23:12:12 mayer@tecotoo.myibg.com +1 -0
+ address_okay note. Fixes to take account of wildcard addresses. Fix SOCKET usage.
+ Cleanup conditional ioctl for nonblocking.
+
+ ntpd/ntp_io.c
+ 1.66 03/03/09 23:11:35 mayer@tecotoo.myibg.com +16 -13
+ address_okay note. Fixes to take account of wildcard addresses. Fix SOCKET usage.
+ Cleanup conditional ioctl for nonblocking.
+
+ChangeSet
+ 1.1001.1.23 03/03/07 23:44:26 stenn@whimsy.udel.edu +1 -0
+ Darwin patch for openssl
+
+ configure.in
+ 1.300 03/03/07 23:44:19 stenn@whimsy.udel.edu +2 -0
+ Darwin patch for openssl
+
+ChangeSet
+ 1.1001.1.22 03/03/07 23:29:56 stenn@whimsy.udel.edu +1 -0
+ Darwin patch for openssl
+
+ configure.in
+ 1.299 03/03/07 23:29:43 stenn@whimsy.udel.edu +6 -1
+ Darwin patch for openssl
+
+ChangeSet
+ 1.1001.4.2 03/03/07 21:48:43 mayer@tecotoo.myibg.com +1 -0
+ Start the check after the wildcards.
+
+ ntpd/ntp_io.c
+ 1.65 03/03/07 21:48:07 mayer@tecotoo.myibg.com +4 -4
+ Start the check after the wildcards.
+
+ChangeSet
+ 1.1001.1.21 03/03/05 22:45:40 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_arc.c
+ 1.13 03/03/05 22:45:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.3 03/03/05 22:43:10 stenn@whimsy.udel.edu +1 -0
+ We use u_long, not ulong.
+
+ ntpd/refclock_arc.c
+ 1.8.1.2 03/03/05 22:42:54 stenn@whimsy.udel.edu +1 -1
+ We use u_long, not ulong.
+
+ChangeSet
+ 1.1001.1.19 03/03/05 21:04:21 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntpd.c
+ 1.44 03/03/05 21:04:18 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.14.2 03/03/05 21:02:52 stenn@whimsy.udel.edu +1 -0
+ Add missing #ifdef DEBUG stuff. From Greg Dowd <GDowd@symmetricom.com>
+
+ ntpd/ntpd.c
+ 1.33.2.1 03/03/05 21:02:42 stenn@whimsy.udel.edu +3 -2
+ Add missing #ifdef DEBUG stuff. From Greg Dowd <GDowd@symmetricom.com>
+
+ChangeSet
+ 1.1001.4.1 03/03/05 01:02:14 mayer@tecotoo.myibg.com +2 -0
+ Ignore ENXIO errors for IPv6 flags and add address info for bad data packets.
+
+ ntpd/ntp_proto.c
+ 1.153 03/03/05 01:01:39 mayer@tecotoo.myibg.com +2 -2
+ Report the source address when receiving bad data packets.
+
+ libisc/ifiter_ioctl.c
+ 1.9 03/03/05 01:01:33 mayer@tecotoo.myibg.com +11 -3
+ Ignore ENXIO errors when getting the IPv6 flags.
+
+ChangeSet
+ 1.1001.1.17 03/02/28 11:00:25 cprice@cs-home.com +4 -0
+ Arcron clock - enhanced driver and documentation, removed possible
+ leapyear bug, additional features included
+
+ ntpd/refclock_arc.c
+ 1.12 03/02/28 11:00:24 cprice@cs-home.com +51 -156
+ Arcron clock - removed possible leapyear bug, added new mode
+ selectable msf, dcf and wwvb code, added a utc/localtime flag,
+ added average signal quality poll, several badformat errors
+ fixed, removal of unused code and general code cleanup including
+ standardizing debug routines and syslog messages
+
+ html/drivers/driver27.html
+ 1.12 03/02/28 11:00:24 cprice@cs-home.com +46 -155
+ Arcron clock - update html reference driver documentation to
+ correspond with most recent driver updates
+
+ BitKeeper/etc/logging_ok
+ 1.20.1.4 03/02/28 10:38:12 cprice@cs-home.com +1 -0
+ 'Auto converge'
+
+ html/drivers/driver27.html
+ 1.2.1.3 03/02/28 10:38:13 cprice@cs-home.com +0 -0
+ Merge rename: html/driver27.htm -> html/drivers/driver27.html
+
+ BitKeeper/etc/logging_ok
+ 1.20.1.3 03/02/28 10:38:12 cprice@cs-home.com +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.18 03/02/28 10:38:12 cprice@cs-home.com +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.20.1.2 03/02/28 10:38:12 cprice@cs-home.com +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.17 03/02/28 10:38:11 cprice@cs-home.com +1 -1
+ auto-union
+
+ChangeSet
+ 1.683.13.2 03/02/28 04:52:34 stenn@whimsy.udel.edu +1 -0
+ How to patch ntp-stable and ntp-dev.
+
+ README.hackers
+ 1.7 03/02/28 04:52:22 stenn@whimsy.udel.edu +25 -0
+ How to patch ntp-stable and ntp-dev.
+
+ChangeSet
+ 1.1001.1.15 03/02/28 04:15:42 stenn@whimsy.udel.edu +2 -0
+ Merge
+
+ ntpd/cmd_args.c
+ 1.18 03/02/28 04:15:24 stenn@whimsy.udel.edu +2 -3
+ merge cleanup.
+
+ README.bk
+ 1.15 03/02/28 04:11:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.13.1 03/02/28 04:09:07 stenn@whimsy.udel.edu +1 -0
+ long option support from: Hugh Daniel <hugh@road.toad.com>
+
+ ntpd/cmd_args.c
+ 1.7.2.1 03/02/28 04:08:47 stenn@whimsy.udel.edu +20 -1
+ long option support from: Hugh Daniel <hugh@road.toad.com>
+
+ChangeSet
+ 1.1001.1.14 03/02/26 01:04:03 mayer@tecotoo.myibg.com +1 -0
+ Merge mayer@pogo.udel.edu:ntp-dev-io/
+ into tecotoo.myibg.com:H:/ntpbk/ntp-dev
+
+ libisc/ifiter_ioctl.c
+ 1.8 03/02/26 01:03:41 mayer@tecotoo.myibg.com +0 -2
+ Auto merged
+
+ChangeSet
+ 1.1001.3.7 03/02/26 00:58:00 mayer@tecotoo.myibg.com +2 -0
+ Check to see that Multicast Flag is defined before using it.
+
+ libisc/ifiter_sysctl.c
+ 1.4 03/02/26 00:57:33 mayer@tecotoo.myibg.com +3 -1
+ Check to see that Multicast Flag is defined before using it.
+
+ libisc/ifiter_ioctl.c
+ 1.5.1.2 03/02/26 00:57:30 mayer@tecotoo.myibg.com +4 -0
+ Check to see that Multicast Flag is defined before using it.
+
+ChangeSet
+ 1.1001.1.13 03/02/26 00:42:59 mayer@pogo.udel.edu +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into pogo.udel.edu:/pogo/users/mayer/ntp-dev-io
+
+ libisc/ifiter_ioctl.c
+ 1.7 03/02/26 00:42:54 mayer@pogo.udel.edu +0 -1
+ Auto merged
+
+ChangeSet
+ 1.1001.3.6 03/02/25 23:34:27 mayer@tecotoo.myibg.com +3 -0
+ Macro changes.
+
+ ntpd/ntp_io.c
+ 1.64 03/02/25 23:34:00 mayer@tecotoo.myibg.com +5 -3
+ Restore previous changes to for loops and conditional code for findbcast.
+
+ libisc/ifiter_ioctl.c
+ 1.5.1.1 03/02/25 23:33:57 mayer@tecotoo.myibg.com +1 -1
+ Fix ioctl macro usage.
+
+ include/ntp_rfc2553.h
+ 1.9 03/02/25 23:33:54 mayer@tecotoo.myibg.com +4 -1
+ Make IPv6 Macros conditional.
+
+ChangeSet
+ 1.1001.1.12 03/02/24 23:37:01 stenn@whimsy.udel.edu +1 -0
+ IFF_MULTICAST #ifdef and typo fix from John Hay.
+
+ libisc/ifiter_ioctl.c
+ 1.6 03/02/24 23:36:57 stenn@whimsy.udel.edu +3 -1
+ IFF_MULTICAST #ifdef and typo fix from John Hay.
+
+ChangeSet
+ 1.1001.3.5 03/02/24 01:19:19 mayer@tecotoo.myibg.com +1 -0
+ Fix typos
+
+ libisc/ifiter_ioctl.c
+ 1.5 03/02/24 01:18:52 mayer@tecotoo.myibg.com +4 -4
+ Fix typos
+
+ChangeSet
+ 1.1001.3.4 03/02/24 00:50:34 mayer@tecotoo.myibg.com +1 -0
+ Fix variable names and add macro definition.
+
+ libisc/ifiter_ioctl.c
+ 1.4 03/02/24 00:50:11 mayer@tecotoo.myibg.com +5 -4
+ Fix variable names and add macro definition.
+
+ChangeSet
+ 1.1001.3.3 03/02/23 23:25:50 mayer@tecotoo.myibg.com +6 -0
+ Fixes for multicast and broadcast and IPv6 interfaces.
+
+ ports/winnt/libisc/net.c
+ 1.2 03/02/23 23:25:21 mayer@tecotoo.myibg.com +0 -4
+ Remove unneccesary macro and allow the IPV6 probe to answer.
+
+ ports/winnt/libisc/interfaceiter.c
+ 1.2 03/02/23 23:25:19 mayer@tecotoo.myibg.com +0 -6
+ Remove commented out code.
+
+ ntpd/ntp_io.c
+ 1.63 03/02/23 23:25:16 mayer@tecotoo.myibg.com +1 -2
+ Make sure for I/O Completion Ports the correct error info is used.
+ Remove unnecessary macro
+
+ libisc/net.c
+ 1.2 03/02/23 23:25:13 mayer@tecotoo.myibg.com +0 -4
+ Remove unnecessary WANT_IPV6 macro and allow IPV6 probes to return real answers.
+
+ libisc/ifiter_sysctl.c
+ 1.3 03/02/23 23:25:11 mayer@tecotoo.myibg.com +10 -0
+ Add flags for broadcast and multicast interfaces and fetch the broadcast address.
+
+ libisc/ifiter_ioctl.c
+ 1.3 03/02/23 23:25:09 mayer@tecotoo.myibg.com +59 -0
+ Add flags for broadcast and multicast interfaces and fetch the broadcast address.
+
+ChangeSet
+ 1.683.4.144 03/02/22 04:47:19 cprice@cs-home.com +3 -0
+ Arcron clock - enchanged driver and documentation, additional
+ features included
+
+ BitKeeper/etc/logging_ok
+ 1.1.1.8 03/02/22 04:47:19 cprice@cs-home.com +1 -0
+ Logging to logging@openlogging.org accepted
+
+ html/driver27.htm
+ 1.2.1.2 03/02/22 04:42:22 cprice@cs-home.com +117 -102
+ Arcron clock - update html reference driver documentation to correspond
+ with most recent driver updates
+
+ChangeSet
+ 1.683.4.143 03/02/22 05:04:54 stenn@whimsy.udel.edu +2 -0
+ Instructions on submitting patches
+
+ README.hackers
+ 1.6 03/02/22 05:04:36 stenn@whimsy.udel.edu +17 -0
+ Instructions on submitting patches
+
+ README.bk
+ 1.1.1.16 03/02/22 05:04:36 stenn@whimsy.udel.edu +2 -0
+ Instructions on submitting patches
+
+ ntpd/refclock_arc.c
+ 1.8.1.1 03/02/22 04:01:54 cprice@cs-home.com +287 -81
+ Arcron clock - added new mode selectable msf, dcf and wwvb code, added a
+ utc/locatime flag, added average singal quality poll, several badformat
+ errors fixed, removal of unused code and general code cleanup including
+ standardizing debug routines and syslog messages
+
+ChangeSet
+ 1.1001.1.10 03/02/22 04:43:12 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ README.bk
+ 1.14 03/02/22 04:43:09 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.142 03/02/22 04:39:59 stenn@whimsy.udel.edu +1 -0
+ Updated.
+
+ README.bk
+ 1.1.1.15 03/02/22 04:39:47 stenn@whimsy.udel.edu +0 -11
+ Updated.
+
+ChangeSet
+ 1.1001.3.2 03/02/22 00:54:36 mayer@tecotoo.myibg.com +1 -0
+ Check the wildcards as well when looking for the broadcast client.
+
+ ntpd/ntp_io.c
+ 1.62 03/02/22 00:53:50 mayer@tecotoo.myibg.com +1 -1
+ Check the wildcards as well when looking for the broadcast client.
+
+ChangeSet
+ 1.1001.3.1 03/02/21 01:13:32 mayer@tecotoo.myibg.com +1 -0
+ Put the executable in the relevant bin subdirectory.
+
+ ports/winnt/ntpd/ntpd.dsp
+ 1.15 03/02/21 01:12:57 mayer@tecotoo.myibg.com +2 -2
+ Put the executable in the relevant bin subdirectory.
+
+ChangeSet
+ 1.1001.1.8 03/02/21 00:19:05 stenn@whimsy.udel.edu +1 -0
+ Cleanup from the recent patches
+
+ ntpd/refclock_arc.c
+ 1.11 03/02/21 00:18:52 stenn@whimsy.udel.edu +3 -4
+ Cleanup from the recent patches
+
+ChangeSet
+ 1.1005 03/02/20 21:03:53 gnu@ring.wraith.sf.ca.us +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into ring.wraith.sf.ca.us:/home/gnu/src/ntp/ntp-dev
+
+ BitKeeper/etc/logging_ok
+ 1.22 03/02/20 21:03:51 gnu@ring.wraith.sf.ca.us +0 -0
+ auto-union
+
+ChangeSet
+ 1.1001.1.7 03/02/20 20:18:20 paul@k2.alfille +3 -0
+ Arcron radio clock update -- support WWVB version. Transparently backwards
+ compatible with MSF version, but requires flag1=1 to signal WWVB region.
+
+ BitKeeper/etc/logging_ok
+ 1.20.1.1 03/02/20 20:18:20 paul@k2.alfille +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpd/refclock_arc.c
+ 1.10 03/02/20 20:18:06 paul@k2.alfille +157 -54
+ Now support Arcron WWVB radio clock. Timezone not detected, to preemptively
+ set to UTC prior to each read. Use flag1 to distinguish from MSF version.
+ Update to version 1.2
+
+ html/drivers/driver27.html
+ 1.11 03/02/20 20:18:06 paul@k2.alfille +14 -8
+ Change docs to cover the WWVB version of the Arcron radio clock.
+ Added explanation of new parameter, and URLs to the manufacturer.
+
+ChangeSet
+ 1.1001.1.6 03/02/20 04:10:16 stenn@whimsy.udel.edu +1 -0
+ HAVE_IFLIST_SYSCTL cleanup.
+
+ configure.in
+ 1.298 03/02/20 04:09:57 stenn@whimsy.udel.edu +1 -7
+ HAVE_IFLIST_SYSCTL cleanup.
+
+ChangeSet
+ 1.1001.1.5 03/02/20 02:19:57 stenn@whimsy.udel.edu +1 -0
+ Added HAVE_IFLIST_SYSCTL for ISC code.
+
+ configure.in
+ 1.297 03/02/20 02:19:29 stenn@whimsy.udel.edu +16 -0
+ Added HAVE_IFLIST_SYSCTL for ISC code.
+
+ChangeSet
+ 1.1001.1.4 03/02/19 23:23:59 stenn@whimsy.udel.edu +1 -0
+ Distribute libisc/ in the tarball
+
+ Makefile.am
+ 1.36 03/02/19 23:23:48 stenn@whimsy.udel.edu +1 -0
+ Distribute libisc/ in the tarball
+
+ChangeSet
+ 1.1001.1.2 03/02/18 22:10:09 mayer@tecotoo.myibg.com +6 -0
+ Use the name of the service and not the port number as a string.
+
+ ntpq/ntpq.c
+ 1.32 03/02/18 22:09:39 mayer@tecotoo.myibg.com +1 -1
+ Use the name of the service and not the port number as a string.
+
+ ntpdc/ntpdc.c
+ 1.24 03/02/18 22:09:38 mayer@tecotoo.myibg.com +1 -1
+ Use the name of the service and not the port number as a string.
+
+ ntpdate/ntpdate.c
+ 1.42 03/02/18 22:09:36 mayer@tecotoo.myibg.com +2 -2
+ Use the name of the service and not the port number as a string.
+
+ ntpd/ntp_intres.c
+ 1.28 03/02/18 22:09:33 mayer@tecotoo.myibg.com +1 -1
+ Use the name of the service and not the port number as a string.
+
+ ntpd/ntp_config.c
+ 1.87 03/02/18 22:09:29 mayer@tecotoo.myibg.com +1 -1
+ Use the name of the service and not the port number as a string.
+
+ libntp/ntp_rfc2553.c
+ 1.14 03/02/18 22:09:24 mayer@tecotoo.myibg.com +1 -1
+ Use the name of the service and not the port number as a string.
+
+ChangeSet
+ 1.1004 03/02/18 12:35:26 gnu@ring.wraith.sf.ca.us +1 -0
+ linux,freebsd audio quick fix
+
+ChangeSet
+ 1.1001.2.3 03/02/17 02:51:28 stenn@whimsy.udel.edu +1 -0
+ Cleanup from Dave Mills
+
+ libntp/systime.c
+ 1.25 03/02/17 02:51:17 stenn@whimsy.udel.edu +2 -3
+ Cleanup from Dave Mills
+
+ChangeSet
+ 1.1001.2.2 03/02/17 02:48:13 stenn@whimsy.udel.edu +1 -0
+ Intersection algorithm fixes from Dave Mills
+
+ ntpd/ntp_proto.c
+ 1.152 03/02/17 02:47:55 stenn@whimsy.udel.edu +8 -2
+ Intersection algorithm fixes from Dave Mills
+
+ChangeSet
+ 1.1001.2.1 03/02/17 02:43:12 stenn@whimsy.udel.edu +1 -0
+ ICOM fixes from Dave Mills
+
+ ntpd/refclock_wwv.c
+ 1.36 03/02/17 02:42:58 stenn@whimsy.udel.edu +49 -32
+ ICOM fixes from Dave Mills
+
+ChangeSet
+ 1.1001.1.1 03/02/15 22:40:34 mayer@tecotoo.myibg.com +2 -0
+ Scan all interfaces.
+
+ ntpdc/ntpdc.c
+ 1.23 03/02/15 22:40:09 mayer@tecotoo.myibg.com +1 -1
+ x.
+
+ ntpd/ntp_io.c
+ 1.61 03/02/15 22:40:00 mayer@tecotoo.myibg.com +2 -2
+ Scan all interfaces.
+
+ libntp/audio.c
+ 1.19 03/02/14 15:15:41 gnu@ring.wraith.sf.ca.us +2 -9
+ quick fix just to get audio going on freebsd, linux
+
+ChangeSet
+ 1.1002 03/02/14 14:51:03 gnu@ring.wraith.sf.ca.us +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into ring.wraith.sf.ca.us:/home/gnu/src/ntp/ntp-dev
+
+ BitKeeper/etc/logging_ok
+ 1.21 03/02/14 14:51:00 gnu@ring.wraith.sf.ca.us +0 -0
+ auto-union
+
+ChangeSet
+ 1.1001 03/02/13 02:22:14 stenn@pogo.udel.edu +1 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+
+ configure.in
+ 1.296 03/02/13 02:22:07 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.957.3.9 03/02/13 02:19:12 stenn@whimsy.udel.edu +1 -0
+ 4.1.74a
+
+ configure.in
+ 1.285.1.6 03/02/13 02:18:59 stenn@whimsy.udel.edu +1 -1
+ 4.1.74a
+
+ChangeSet
+ 1.957.3.8 03/02/13 01:51:32 stenn@whimsy.udel.edu +2 -0
+ ntp-4.1.74
+
+ configure.in
+ 1.285.1.5 03/02/13 01:51:16 stenn@whimsy.udel.edu +1 -1
+ ntp-4.1.74
+
+ NEWS
+ 1.41 03/02/13 01:51:16 stenn@whimsy.udel.edu +1 -0
+ ntp-4.1.74
+
+ChangeSet
+ 1.957.3.7 03/02/13 01:11:35 stenn@whimsy.udel.edu +1 -0
+ Cleanup from Dave Mills
+
+ ntpd/ntp_util.c
+ 1.31 03/02/13 01:11:22 stenn@whimsy.udel.edu +18 -4
+ Cleanup from Dave Mills
+
+ChangeSet
+ 1.957.3.6 03/02/12 22:07:55 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ flock-build
+ 1.26 03/02/12 22:07:52 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.141 03/02/12 22:03:31 stenn@whimsy.udel.edu +1 -0
+ Added albert to the flock-build
+
+ flock-build
+ 1.23.1.1 03/02/12 22:03:18 stenn@whimsy.udel.edu +16 -14
+ Added albert to the flock-build
+
+ChangeSet
+ 1.957.3.5 03/02/12 02:14:37 stenn@whimsy.udel.edu +2 -0
+ Cleanup from Dave Mills
+
+ html/sntp.html
+ 1.3 03/02/12 02:14:26 stenn@whimsy.udel.edu +4 -1
+ Cleanup from Dave Mills
+
+ html/pic/dogsnake.gif
+ 1.1 03/02/12 02:12:02 stenn@whimsy.udel.edu +122 -0
+
+ html/pic/dogsnake.gif
+ 1.0 03/02/12 02:12:02 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/pic/dogsnake.gif
+
+ChangeSet
+ 1.957.3.4 03/02/12 01:13:08 stenn@whimsy.udel.edu +1 -0
+ gap tweaks
+
+ ntpd/ntp_proto.c
+ 1.151 03/02/12 01:12:49 stenn@whimsy.udel.edu +31 -19
+ gap tweaks
+
+ChangeSet
+ 1.957.3.3 03/02/10 00:09:57 stenn@whimsy.udel.edu +2 -0
+ gap tweaks from Dave Mills
+
+ ntpd/ntp_util.c
+ 1.30 03/02/10 00:09:44 stenn@whimsy.udel.edu +0 -4
+ gap tweaks from Dave Mills
+
+ ntpd/ntp_proto.c
+ 1.150 03/02/10 00:09:44 stenn@whimsy.udel.edu +37 -30
+ gap tweaks from Dave Mills
+
+ChangeSet
+ 1.998 03/02/09 20:13:44 stenn@pogo.udel.edu +1 -0
+ Add WANT_IPV6 for ISC if we have ipv6
+
+ configure.in
+ 1.295 03/02/09 20:13:30 stenn@pogo.udel.edu +8 -7
+ Add WANT_IPV6 for ISC if we have ipv6
+
+ChangeSet
+ 1.957.3.2 03/02/09 03:09:36 stenn@whimsy.udel.edu +2 -0
+ Updates from Dave Mills
+
+ html/miscopt.html
+ 1.27 03/02/09 03:09:16 stenn@whimsy.udel.edu +2 -3
+ Updaets from Dave Mills
+
+ html/authopt.html
+ 1.28 03/02/09 03:09:16 stenn@whimsy.udel.edu +3 -4
+ Updaets from Dave Mills
+
+ChangeSet
+ 1.996 03/02/08 02:09:33 stenn@pogo.udel.edu +1 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+
+ configure.in
+ 1.294 03/02/08 02:09:24 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.957.3.1 03/02/08 01:49:26 stenn@whimsy.udel.edu +11 -0
+ NIST lockclock stuff form Dave Mills.
+
+ ntpd/refclock_local.c
+ 1.13 03/02/08 01:49:09 stenn@whimsy.udel.edu +18 -4
+ NIST lockclock stuff form Dave Mills.
+
+ ntpd/ntp_util.c
+ 1.29 03/02/08 01:49:09 stenn@whimsy.udel.edu +5 -6
+ NIST lockclock stuff form Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.149 03/02/08 01:49:09 stenn@whimsy.udel.edu +25 -6
+ NIST lockclock stuff form Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.76 03/02/08 01:49:09 stenn@whimsy.udel.edu +21 -1
+ NIST lockclock stuff form Dave Mills.
+
+ ntpd/ntp_control.c
+ 1.60 03/02/08 01:49:08 stenn@whimsy.udel.edu +2 -1
+ NIST lockclock stuff form Dave Mills.
+
+ ntpd/ntp_config.c
+ 1.86 03/02/08 01:49:08 stenn@whimsy.udel.edu +0 -39
+ NIST lockclock stuff form Dave Mills.
+
+ html/monopt.html
+ 1.17 03/02/08 01:49:08 stenn@whimsy.udel.edu +26 -4
+ NIST lockclock stuff form Dave Mills.
+
+ html/miscopt.html
+ 1.26 03/02/08 01:49:08 stenn@whimsy.udel.edu +8 -4
+ NIST lockclock stuff form Dave Mills.
+
+ html/drivers/driver1.html
+ 1.12 03/02/08 01:49:08 stenn@whimsy.udel.edu +12 -1
+ NIST lockclock stuff form Dave Mills.
+
+ html/accopt.html
+ 1.19 03/02/08 01:49:08 stenn@whimsy.udel.edu +24 -18
+ NIST lockclock stuff form Dave Mills.
+
+ configure.in
+ 1.285.1.4 03/02/08 01:49:07 stenn@whimsy.udel.edu +10 -1
+ NIST lockclock stuff form Dave Mills.
+
+ChangeSet
+ 1.995 03/02/07 21:50:32 stenn@pogo.udel.edu +1 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+
+ include/ntp.h
+ 1.86 03/02/07 21:50:25 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.992.1.1 03/02/07 00:18:29 mayer@tecotoo.myibg.com +3 -0
+ Build/Run fixes for Unix boxes
+
+ libisc/msgcat.c
+ 1.2 03/02/07 00:18:07 mayer@tecotoo.myibg.com +1 -0
+ Add header so that NULL gets defined on SunOS 4.1.3 system.
+
+ libisc/ifiter_sysctl.c
+ 1.2 03/02/07 00:18:06 mayer@tecotoo.myibg.com +0 -1
+ Remove unnecessary require (no locking)
+
+ libisc/ifiter_ioctl.c
+ 1.2 03/02/07 00:18:04 mayer@tecotoo.myibg.com +0 -1
+ Remove unnecessary require (no locking)
+
+ChangeSet
+ 1.957.1.34 03/02/06 19:14:43 gnu@ring.wraith.sf.ca.us +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into ring.wraith.sf.ca.us:/home/gnu/src/ntp/ntp-dev
+
+ BitKeeper/etc/logging_ok
+ 1.19.1.2 03/02/06 19:14:41 gnu@ring.wraith.sf.ca.us +1 -1
+ 'Auto converge'
+
+ChangeSet
+ 1.957.2.1 03/02/06 18:01:13 gnu@ring.wraith.sf.ca.us +2 -0
+ fix up line/mic select, agc setting, monitor level.
+
+ BitKeeper/etc/logging_ok
+ 1.19.1.1 03/02/06 18:01:12 gnu@ring.wraith.sf.ca.us +1 -0
+ Logging to logging@openlogging.org accepted
+
+ libntp/audio.c
+ 1.18 03/02/06 17:45:32 gnu@ring.wraith.sf.ca.us +9 -2
+
+ChangeSet
+ 1.957.1.33 03/02/06 17:37:07 stenn@whimsy.udel.edu +8 -0
+ More call-gap stuff from Dave Mills.
+
+ ntpdc/ntpdc_ops.c
+ 1.24 03/02/06 17:36:40 stenn@whimsy.udel.edu +11 -11
+ More call-gap stuff from Dave Mills.
+
+ ntpd/ntp_util.c
+ 1.28 03/02/06 17:36:40 stenn@whimsy.udel.edu +5 -3
+ More call-gap stuff from Dave Mills.
+
+ ntpd/ntp_restrict.c
+ 1.16 03/02/06 17:36:40 stenn@whimsy.udel.edu +10 -3
+ More call-gap stuff from Dave Mills.
+
+ ntpd/ntp_request.c
+ 1.44 03/02/06 17:36:40 stenn@whimsy.udel.edu +1 -1
+ More call-gap stuff from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.148 03/02/06 17:36:40 stenn@whimsy.udel.edu +11 -11
+ More call-gap stuff from Dave Mills.
+
+ ntpd/ntp_monitor.c
+ 1.10 03/02/06 17:36:39 stenn@whimsy.udel.edu +3 -11
+ More call-gap stuff from Dave Mills.
+
+ include/ntp_request.h
+ 1.21 03/02/06 17:36:39 stenn@whimsy.udel.edu +18 -18
+ More call-gap stuff from Dave Mills.
+
+ include/ntp.h
+ 1.79.1.6 03/02/06 17:36:39 stenn@whimsy.udel.edu +0 -2
+ More call-gap stuff from Dave Mills.
+
+ChangeSet
+ 1.993 03/02/06 03:10:42 stenn@pogo.udel.edu +2 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+
+ include/ntpd.h
+ 1.56 03/02/06 03:10:34 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.85 03/02/06 03:10:34 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.957.1.32 03/02/06 02:41:35 stenn@whimsy.udel.edu +10 -0
+ Call gap stuff from Dave Mills
+
+ ntpdc/ntpdc_ops.c
+ 1.23 03/02/06 02:41:12 stenn@whimsy.udel.edu +26 -25
+ Call gap stuff from Dave Mills
+
+ ntpd/ntp_restrict.c
+ 1.15 03/02/06 02:41:12 stenn@whimsy.udel.edu +28 -145
+ Call gap stuff from Dave Mills
+
+ ntpd/ntp_request.c
+ 1.43 03/02/06 02:41:12 stenn@whimsy.udel.edu +6 -23
+ Call gap stuff from Dave Mills
+
+ ntpd/ntp_proto.c
+ 1.147 03/02/06 02:41:11 stenn@whimsy.udel.edu +16 -8
+ Call gap stuff from Dave Mills
+
+ ntpd/ntp_monitor.c
+ 1.9 03/02/06 02:41:11 stenn@whimsy.udel.edu +26 -48
+ Call gap stuff from Dave Mills
+
+ ntpd/ntp_config.c
+ 1.85 03/02/06 02:41:11 stenn@whimsy.udel.edu +63 -60
+ Call gap stuff from Dave Mills
+
+ include/ntpd.h
+ 1.53.1.2 03/02/06 02:41:11 stenn@whimsy.udel.edu +3 -2
+ Call gap stuff from Dave Mills
+
+ include/ntp_request.h
+ 1.20 03/02/06 02:41:11 stenn@whimsy.udel.edu +4 -4
+ Call gap stuff from Dave Mills
+
+ include/ntp_config.h
+ 1.26 03/02/06 02:41:11 stenn@whimsy.udel.edu +9 -4
+ Call gap stuff from Dave Mills
+
+ include/ntp.h
+ 1.79.1.5 03/02/06 02:41:11 stenn@whimsy.udel.edu +5 -4
+ Call gap stuff from Dave Mills
+
+ChangeSet
+ 1.992 03/02/05 23:00:56 mayer@pogo.udel.edu +1 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+ into pogo.udel.edu:/pogo/users/mayer/ntp-dev-io
+
+ libntp/ntp_rfc2553.c
+ 1.13 03/02/05 23:00:48 mayer@pogo.udel.edu +0 -1
+ Auto merged
+
+ChangeSet
+ 1.988.1.1 03/02/05 22:58:52 mayer@tecotoo.myibg.com +4 -0
+ IPv6 fixes to handle both NTP and ISC definitions.
+
+ BitKeeper/etc/ignore
+ 1.33 03/02/05 22:58:28 mayer@tecotoo.myibg.com +1 -0
+ Added {include/isc/netaddr.h.$$$} to the ignore list
+
+ libntp/ntp_rfc2553.c
+ 1.11.1.1 03/02/05 22:58:25 mayer@tecotoo.myibg.com +1 -1
+ Fix lengt
+
+ include/ntp_rfc2553.h
+ 1.8 03/02/05 22:58:23 mayer@tecotoo.myibg.com +6 -0
+ Don't allow isc/ipv6.h include as all of the structures and macros are defined here.
+
+ include/isc/netaddr.h
+ 1.2 03/02/05 22:58:21 mayer@tecotoo.myibg.com +3 -0
+ Include IPv6 definitions.
+
+ChangeSet
+ 1.957.1.31 03/02/05 20:08:26 stenn@whimsy.udel.edu +1 -0
+ Terje found a short malloc.
+
+ libntp/ntp_rfc2553.c
+ 1.12 03/02/05 20:08:15 stenn@whimsy.udel.edu +1 -1
+ Terje found a short malloc.
+
+ChangeSet
+ 1.990 03/02/05 17:40:14 stenn@pogo.udel.edu +1 -0
+ isc/platform.h is no longer auto-generated
+
+ BitKeeper/deleted/.del-platform.h.in~9c157531
+ 1.2 03/02/05 17:37:23 stenn@pogo.udel.edu +0 -0
+ Delete: include/isc/platform.h.in
+
+ChangeSet
+ 1.989 03/02/05 03:52:48 stenn@pogo.udel.edu +1 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+
+ include/ntpd.h
+ 1.55 03/02/05 03:52:41 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.988 03/02/05 00:52:02 mayer@tecotoo.myibg.com +2 -0
+ Define needs a value.
+
+ BitKeeper/etc/ignore
+ 1.32 03/02/05 00:51:43 mayer@tecotoo.myibg.com +1 -0
+ Added {configure.in.$$$} to the ignore list
+
+ configure.in
+ 1.293 03/02/05 00:51:40 mayer@tecotoo.myibg.com +1 -1
+ Define needs a value.
+
+ChangeSet
+ 1.683.4.140 03/02/04 05:49:13 stenn@whimsy.udel.edu +1 -0
+ Added -d and -q to the send trigger
+
+ BitKeeper/triggers/send
+ 1.3 03/02/04 05:48:31 stenn@whimsy.udel.edu +1 -1
+ Added -d and -q to the send trigger
+
+ChangeSet
+ 1.683.4.139 03/02/04 05:38:05 stenn@whimsy.udel.edu +1 -0
+ Fix a typo.
+
+ BitKeeper/triggers/send
+ 1.2 03/02/04 05:37:33 stenn@whimsy.udel.edu +1 -1
+ Fix a typo.
+
+ChangeSet
+ 1.957.1.28 03/02/04 05:28:46 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ BitKeeper/triggers/trigger.cfg
+ 1.11 03/02/04 05:28:43 stenn@whimsy.udel.edu +0 -2
+ Auto merged
+
+ BitKeeper/deleted/.del-send
+ 1.2 03/02/04 05:28:43 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/triggers/send
+
+ChangeSet
+ 1.683.4.138 03/02/04 05:23:18 stenn@whimsy.udel.edu +2 -0
+ New send trigger
+
+ BitKeeper/triggers/trigger.cfg
+ 1.9.1.1 03/02/04 05:22:53 stenn@whimsy.udel.edu +2 -2
+ New send trigger
+
+ BitKeeper/triggers/send
+ 1.1 03/02/04 05:21:55 stenn@whimsy.udel.edu +39 -0
+
+ BitKeeper/triggers/send
+ 1.0 03/02/04 05:21:55 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/send
+
+ChangeSet
+ 1.957.1.27 03/02/04 05:16:33 stenn@whimsy.udel.edu +2 -0
+ New send trigger
+
+ BitKeeper/triggers/trigger.cfg
+ 1.10 03/02/04 05:15:33 stenn@whimsy.udel.edu +2 -2
+ New send trigger
+
+ BitKeeper/triggers/send
+ 1.1 03/02/04 05:14:08 stenn@whimsy.udel.edu +39 -0
+
+ BitKeeper/triggers/send
+ 1.0 03/02/04 05:14:08 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/BitKeeper/triggers/send
+
+ChangeSet
+ 1.957.1.26 03/02/04 03:16:45 stenn@whimsy.udel.edu +5 -0
+ Cleanup; added system statistics logfile. From Dave Mills.
+
+ ntpd/refclock_local.c
+ 1.12 03/02/04 03:15:52 stenn@whimsy.udel.edu +54 -66
+ Cleanup; added system statistics logfile. From Dave Mills.
+
+ ntpd/ntp_util.c
+ 1.27 03/02/04 03:15:51 stenn@whimsy.udel.edu +55 -1
+ Cleanup; added system statistics logfile. From Dave Mills.
+
+ ntpd/ntp_restrict.c
+ 1.14 03/02/04 03:15:51 stenn@whimsy.udel.edu +97 -95
+ Cleanup; added system statistics logfile. From Dave Mills.
+
+ ntpd/ntp_monitor.c
+ 1.8 03/02/04 03:15:51 stenn@whimsy.udel.edu +45 -39
+ Cleanup; added system statistics logfile. From Dave Mills.
+
+ include/ntpd.h
+ 1.53.1.1 03/02/04 03:15:51 stenn@whimsy.udel.edu +1 -0
+ Cleanup; added system statistics logfile. From Dave Mills.
+
+ChangeSet
+ 1.987 03/02/03 22:59:24 mayer@tecotoo.myibg.com +1 -0
+ Put platform.h.in back and remove platform.h.
+
+ include/isc/platform.h.in
+ 1.1 03/02/03 22:59:02 mayer@tecotoo.myibg.com +230 -0
+
+ include/isc/platform.h.in
+ 1.0 03/02/03 22:59:02 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/platform.h.in
+
+ChangeSet
+ 1.986 03/02/03 22:41:28 mayer@tecotoo.myibg.com +1 -0
+ Removed erroneous const for pointer.
+
+ ntpd/ntp_crypto.c
+ 1.81 03/02/03 22:41:05 mayer@tecotoo.myibg.com +3 -3
+ Removed erroneous const for pointer.
+
+ChangeSet
+ 1.985 03/02/03 01:40:19 stenn@pogo.udel.edu +2 -0
+ More ISC macro cleanup
+
+ configure.in
+ 1.292 03/02/03 01:39:54 stenn@pogo.udel.edu +25 -48
+ More ISC macro cleanup
+
+ChangeSet
+ 1.984 03/02/03 01:34:22 stenn@pogo.udel.edu +1 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+
+ ntpd/ntp_crypto.c
+ 1.80 03/02/03 01:34:16 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.957.1.25 03/02/03 01:28:25 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_config.c
+ 1.84 03/02/03 01:28:22 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.957.1.24 03/02/03 00:32:41 stenn@whimsy.udel.edu +6 -0
+ Cleanup from Dave Mills.
+
+ util/ntp-keygen.c
+ 1.23 03/02/03 00:32:24 stenn@whimsy.udel.edu +2 -0
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_crypto.c
+ 1.76.1.2 03/02/03 00:32:24 stenn@whimsy.udel.edu +84 -55
+ Cleanup from Dave Mills.
+
+ html/extern.html
+ 1.13 03/02/03 00:32:23 stenn@whimsy.udel.edu +10 -6
+ Cleanup from Dave Mills.
+
+ html/debug.html
+ 1.20 03/02/03 00:32:23 stenn@whimsy.udel.edu +15 -14
+ Cleanup from Dave Mills.
+
+ html/copyright.html
+ 1.26 03/02/03 00:32:23 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/clockopt.html
+ 1.16 03/02/03 00:32:23 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ BitKeeper/deleted/.del-platform.h.in~cfcbc83b
+ 1.2 03/02/03 00:01:07 stenn@pogo.udel.edu +0 -0
+ Delete: include/isc/platform.h.in
+
+ChangeSet
+ 1.983 03/02/02 01:36:31 stenn@pogo.udel.edu +1 -0
+ Merge
+
+ ntpd/ntp_crypto.c
+ 1.79 03/02/02 01:36:25 stenn@pogo.udel.edu +0 -0
+ SCCS merged
+
+ChangeSet
+ 1.957.1.23 03/02/02 01:26:15 stenn@whimsy.udel.edu +4 -0
+ Cleanup and fixes from Dave Mills.
+
+ ntpd/ntp_crypto.c
+ 1.76.1.1 03/02/02 01:26:00 stenn@whimsy.udel.edu +9 -14
+ Cleanup and fixes from Dave Mills.
+
+ html/msyslog.html
+ 1.3 03/02/02 01:26:00 stenn@whimsy.udel.edu +2 -1
+ Cleanup and fixes from Dave Mills.
+
+ html/keygen.html
+ 1.3 03/02/02 01:25:59 stenn@whimsy.udel.edu +34 -115
+ Cleanup and fixes from Dave Mills.
+
+ html/authopt.html
+ 1.27 03/02/02 01:25:59 stenn@whimsy.udel.edu +17 -30
+ Cleanup and fixes from Dave Mills.
+
+ChangeSet
+ 1.982 03/02/01 21:35:16 mayer@tecotoo.myibg.com +1 -0
+ readlink function is for Win32 only.
+
+ ntpd/ntp_crypto.c
+ 1.78 03/02/01 21:34:42 mayer@tecotoo.myibg.com +2 -1
+ readlink function is for Win32 only.
+
+ChangeSet
+ 1.981 03/02/01 20:41:01 mayer@pogo.udel.edu +2 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+ into pogo.udel.edu:/pogo/users/mayer/ntp-dev-io
+
+ BitKeeper/etc/logging_ok
+ 1.20 03/02/01 20:40:40 mayer@pogo.udel.edu +1 -0
+ Logging to logging@openlogging.org accepted
+
+ include/ntp.h
+ 1.84 03/02/01 20:40:13 mayer@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.977.1.3 03/02/01 19:55:51 mayer@tecotoo.myibg.com +1 -0
+ Replaced include/isc/platform.h.in with include/isc/platform.h. We no longer need
+ to generate the platform.h file. All Macros are now defined in config.h.
+
+ include/isc/platform.h
+ 1.1 03/02/01 19:55:14 mayer@tecotoo.myibg.com +40 -0
+
+ include/isc/platform.h
+ 1.0 03/02/01 19:55:13 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/platform.h
+
+ChangeSet
+ 1.977.1.2 03/02/01 19:06:14 mayer@tecotoo.myibg.com +2 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into tecotoo.myibg.com:H:/ntpbk/ntp-dev
+
+ ntpd/ntp_crypto.c
+ 1.77 03/02/01 19:05:37 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.81.1.2 03/02/01 19:05:29 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ChangeSet
+ 1.977.1.1 03/02/01 18:58:49 mayer@tecotoo.myibg.com +17 -0
+ Add support for OpenSSL, fixing type bugs and asn2ntp unsigned error and add
+ Win32 support for readlink.
+
+ ports/winnt/ntptrace/ntptrace.dsp
+ 1.9 03/02/01 18:58:09 mayer@tecotoo.myibg.com +2 -2
+ Fix include to add support for OpenSSL.
+
+ ports/winnt/ntpq/ntpq.dsp
+ 1.11 03/02/01 18:58:07 mayer@tecotoo.myibg.com +2 -2
+ Fix include to add support for OpenSSL
+
+ ports/winnt/ntpdc/ntpdc.dsp
+ 1.11 03/02/01 18:58:06 mayer@tecotoo.myibg.com +2 -2
+ Fix include to add support for OpenSSL
+
+ ports/winnt/ntpdate/ntpdate.dsp
+ 1.9 03/02/01 18:58:04 mayer@tecotoo.myibg.com +2 -2
+ Fix include to add support for OpenSSL
+
+ ports/winnt/ntpd/ntpd.dsp
+ 1.14 03/02/01 18:58:03 mayer@tecotoo.myibg.com +4 -4
+ Fix include to add support for OpenSSL.
+
+ ports/winnt/ntpd/nt_clockstuff.c
+ 1.12 03/02/01 18:58:01 mayer@tecotoo.myibg.com +8 -0
+ Force update for CMOS (from Terje Mathisen).
+
+ ports/winnt/libntp/libntp.dsp
+ 1.11 03/02/01 18:58:00 mayer@tecotoo.myibg.com +6 -6
+ Fixes for include order and add openssl include path.
+
+ ports/winnt/libisc/isc_strerror.c
+ 1.2 03/02/01 18:57:58 mayer@tecotoo.myibg.com +1 -1
+ Change include to windows.h (for now) rather than winsock2.h.
+
+ ports/winnt/include/config.h
+ 1.17 03/02/01 18:57:57 mayer@tecotoo.myibg.com +5 -2
+ Enable OpenSSL support for Win32.
+
+ ntpdate/ntpdate.c
+ 1.41 03/02/01 18:57:55 mayer@tecotoo.myibg.com +4 -1
+ Macros needed to be redefined for Windows sockets.
+
+ ntpd/ntp_timer.c
+ 1.23 03/02/01 18:57:53 mayer@tecotoo.myibg.com +1 -1
+ String need to be char and not u_char.
+
+ ntpd/ntp_peer.c
+ 1.54 03/02/01 18:57:49 mayer@tecotoo.myibg.com +2 -2
+ String need to be char and not u_char.
+
+ ntpd/ntp_crypto.c
+ 1.74.1.1 03/02/01 18:57:45 mayer@tecotoo.myibg.com +32 -24
+ Define a function for Win32 for readlink which does not exist on Windows.
+ character string needs to be defined as char and not u_char.
+ asn2ntp() is defined as returning u_long, so returning -1 is invalid. Return (~0) instead.
+
+ include/ntpd.h
+ 1.54 03/02/01 18:57:41 mayer@tecotoo.myibg.com +1 -1
+ Specify arg as char and not u_char.
+
+ include/ntp_machine.h
+ 1.17 03/02/01 18:57:39 mayer@tecotoo.myibg.com +1 -0
+ For Win32 need to specify snprintf in order for link to work correctly.
+
+ include/ntp_crypto.h
+ 1.32 03/02/01 18:57:37 mayer@tecotoo.myibg.com +2 -2
+ Wrong type was specified.
+
+ include/ntp.h
+ 1.81.1.1 03/02/01 18:57:32 mayer@tecotoo.myibg.com +2 -2
+ Wrong type was specified.
+
+ChangeSet
+ 1.980 03/02/01 03:40:01 stenn@pogo.udel.edu +1 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+
+ include/ntp.h
+ 1.83 03/02/01 03:39:52 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.979 03/02/01 03:05:20 stenn@pogo.udel.edu +1 -0
+ ISC_PLATFORM sniffing
+
+ configure.in
+ 1.291 03/02/01 03:04:54 stenn@pogo.udel.edu +72 -5
+ ISC_PLATFORM sniffing
+
+ChangeSet
+ 1.957.1.22 03/01/31 22:27:13 stenn@whimsy.udel.edu +8 -0
+ Support for the new "tick" adjustment config variable.
+ Crypto random seed file cleanup.
+ Various cleanup and fixes.
+ From Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.146 03/01/31 22:27:08 stenn@whimsy.udel.edu +23 -30
+ Cleanup and tick adjustment changes from Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.75 03/01/31 22:27:08 stenn@whimsy.udel.edu +5 -0
+ Log out-of-range frequency error. From Dave Mills.
+
+ ntpd/ntp_crypto.c
+ 1.76 03/01/31 22:27:08 stenn@whimsy.udel.edu +11 -9
+ random seed file cleanup from Dave Mills.
+
+ ntpd/ntp_config.c
+ 1.83 03/01/31 22:27:07 stenn@whimsy.udel.edu +9 -1
+ Support for the new "tick" adjustment config variable.
+ From Dave Mills.
+
+ libntp/systime.c
+ 1.24 03/01/31 22:27:07 stenn@whimsy.udel.edu +113 -113
+ New tick adjustment stuff from Dave Mills.
+
+ include/ntp_stdlib.h
+ 1.19 03/01/31 22:27:07 stenn@whimsy.udel.edu +1 -1
+ New tick adjustment stuff from Dave Mills.
+
+ include/ntp_config.h
+ 1.25 03/01/31 22:27:07 stenn@whimsy.udel.edu +2 -1
+ Support for the new "tick" adjustment config variable.
+ From Dave Mills.
+
+ include/ntp.h
+ 1.79.1.4 03/01/31 22:27:07 stenn@whimsy.udel.edu +1 -0
+ Support for the new "tick" adjustment config variable.
+ From Dave Mills.
+
+ChangeSet
+ 1.978 03/01/31 03:29:28 stenn@pogo.udel.edu +1 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+
+ include/ntp.h
+ 1.82 03/01/31 03:29:19 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.957.1.21 03/01/30 22:18:28 stenn@whimsy.udel.edu +9 -0
+ Upgrade from msec/usec to nsec. From: EGauselmann@beit.de
+
+ Also, some documentation updates from Dave Mills.
+
+ ntpd/refclock_shm.c
+ 1.12 03/01/30 22:18:25 stenn@whimsy.udel.edu +1 -2
+ Upgrade from msec/usec to nsec. From: EGauselmann@beit.de
+
+ html/scripts/links9.txt
+ 1.2 03/01/30 22:18:24 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/msyslog.html
+ 1.2 03/01/30 22:18:24 stenn@whimsy.udel.edu +3 -2
+ Documentation cleanup from Dave Mills.
+
+ BitKeeper/deleted/.del-sunrise1.jpg~63c5b2a2d671408e
+ 1.2 03/01/29 22:10:15 stenn@whimsy.udel.edu +0 -0
+ Delete: html/pic/sunrise1.jpg
+
+ BitKeeper/deleted/.del-butterfly.gif~401fa5d28ff83389
+ 1.2 03/01/29 22:10:15 stenn@whimsy.udel.edu +0 -0
+ Delete: html/pic/butterfly.gif
+
+ BitKeeper/deleted/.del-boom4.gif~33271372
+ 1.2 03/01/29 22:10:15 stenn@whimsy.udel.edu +0 -0
+ Delete: html/pic/boom4.gif
+
+ BitKeeper/deleted/.del-alautun4b.gif~3b35421b5b1f44b7
+ 1.2 03/01/29 22:10:15 stenn@whimsy.udel.edu +0 -0
+ Delete: html/pic/alautun4b.gif
+
+ BitKeeper/deleted/.del-header.txt~60e60bf9df0ed7cf
+ 1.2 03/01/29 22:09:46 stenn@whimsy.udel.edu +0 -0
+ Delete: html/scripts/header.txt
+
+ BitKeeper/deleted/.del-genkeys.html~b4f10b19
+ 1.18 03/01/29 22:09:45 stenn@whimsy.udel.edu +0 -0
+ Delete: html/genkeys.html
+
+ChangeSet
+ 1.683.4.137 03/01/29 00:27:41 stenn@whimsy.udel.edu +1 -0
+ Off by one error. From: Chad Loder <cloder@loder.us>
+
+ ntpd/ntp_config.c
+ 1.50.4.2 03/01/29 00:27:19 stenn@whimsy.udel.edu +1 -1
+ Off by one error. From: Chad Loder <cloder@loder.us>
+
+ChangeSet
+ 1.957.1.20 03/01/27 16:24:14 stenn@whimsy.udel.edu +8 -0
+ Cleanup from Dave Mills.
+
+ html/scripts/links10.txt
+ 1.2 03/01/27 16:24:08 stenn@whimsy.udel.edu +0 -1
+ Cleanup from Dave Mills.
+
+ html/rdebug.html
+ 1.13 03/01/27 16:24:08 stenn@whimsy.udel.edu +5 -3
+ Cleanup from Dave Mills.
+
+ html/ntpq.html
+ 1.20 03/01/27 16:24:08 stenn@whimsy.udel.edu +3 -1
+ Cleanup from Dave Mills.
+
+ html/ntpdc.html
+ 1.17 03/01/27 16:24:08 stenn@whimsy.udel.edu +3 -1
+ Cleanup from Dave Mills.
+
+ html/ntpd.html
+ 1.28 03/01/27 16:24:08 stenn@whimsy.udel.edu +37 -19
+ Cleanup from Dave Mills.
+
+ html/keygen.html
+ 1.2 03/01/27 16:24:07 stenn@whimsy.udel.edu +57 -67
+ Cleanup from Dave Mills.
+
+ html/index.html
+ 1.25 03/01/27 16:24:07 stenn@whimsy.udel.edu +4 -2
+ Cleanup from Dave Mills.
+
+ html/debug.html
+ 1.19 03/01/27 16:24:07 stenn@whimsy.udel.edu +3 -1
+ Cleanup from Dave Mills.
+
+ChangeSet
+ 1.957.1.19 03/01/27 16:10:47 stenn@whimsy.udel.edu +8 -0
+ Cleanup from Dave Mills.
+
+ html/scripts/links12.txt
+ 1.1 03/01/27 16:10:42 stenn@whimsy.udel.edu +5 -0
+
+ html/msyslog.html
+ 1.1 03/01/27 16:10:42 stenn@whimsy.udel.edu +123 -0
+
+ html/scripts/links12.txt
+ 1.0 03/01/27 16:10:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/scripts/links12.txt
+
+ html/msyslog.html
+ 1.0 03/01/27 16:10:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/msyslog.html
+
+ util/ntp-keygen.c
+ 1.22 03/01/27 16:10:41 stenn@whimsy.udel.edu +203 -159
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.145 03/01/27 16:10:41 stenn@whimsy.udel.edu +21 -28
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.74 03/01/27 16:10:41 stenn@whimsy.udel.edu +12 -12
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_crypto.c
+ 1.75 03/01/27 16:10:40 stenn@whimsy.udel.edu +83 -56
+ Cleanup from Dave Mills.
+
+ include/ntp.h
+ 1.79.1.3 03/01/27 16:10:40 stenn@whimsy.udel.edu +1 -0
+ Cleanup from Dave Mills.
+
+ html/accopt.html
+ 1.18 03/01/27 16:10:40 stenn@whimsy.udel.edu +12 -20
+ Cleanup from Dave Mills.
+
+ChangeSet
+ 1.957.1.18 03/01/23 22:43:48 stenn@whimsy.udel.edu +3 -0
+ MJD and flags cleanup from Dave Mills.
+
+ ntpd/ntp_util.c
+ 1.26 03/01/23 22:43:45 stenn@whimsy.udel.edu +5 -5
+ MJD and flags cleanup from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.144 03/01/23 22:43:45 stenn@whimsy.udel.edu +20 -13
+ MJD and flags cleanup from Dave Mills.
+
+ include/ntp.h
+ 1.79.1.2 03/01/23 22:43:44 stenn@whimsy.udel.edu +22 -16
+ MJD and flags cleanup from Dave Mills.
+
+ChangeSet
+ 1.977 03/01/23 22:11:56 mayer@tecotoo.myibg.com +3 -0
+ strerror.c was renamed to isc_strerror.c to prevent conflicts with the standard strerror.c.
+
+ ports/winnt/libisc/isc_strerror.c
+ 1.1 03/01/23 22:11:33 mayer@tecotoo.myibg.com +440 -0
+
+ ports/winnt/libisc/isc_strerror.c
+ 1.0 03/01/23 22:11:33 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/libisc/isc_strerror.c
+
+ libisc/isc_strerror.c
+ 1.1 03/01/23 22:11:31 mayer@tecotoo.myibg.com +72 -0
+
+ libisc/isc_strerror.c
+ 1.0 03/01/23 22:11:31 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/isc_strerror.c
+
+ libntp/Makefile.am
+ 1.26 03/01/23 22:11:28 mayer@tecotoo.myibg.com +1 -1
+ strerror.c was renamed to isc_strerror.c to prevent conflicts with the standard strerror.c.
+
+ChangeSet
+ 1.976 03/01/23 00:12:48 mayer@tecotoo.myibg.com +3 -0
+ Fixes to make file
+
+ BitKeeper/etc/ignore
+ 1.31 03/01/23 00:12:29 mayer@tecotoo.myibg.com +1 -0
+ Added {include/isc/Makefile.am.$$$} to the ignore list
+
+ libntp/Makefile.am
+ 1.25 03/01/23 00:12:26 mayer@tecotoo.myibg.com +0 -4
+ Removed commented out lines which were causing problems.
+
+ include/isc/Makefile.am
+ 1.2 03/01/23 00:12:23 mayer@tecotoo.myibg.com +1 -2
+ Removed $(NULL) entry
+
+ChangeSet
+ 1.971.1.1 03/01/22 23:33:11 mayer@tecotoo.myibg.com +2 -0
+ Fix the thread retrieving the time to the same processor for consistency.
+
+ BitKeeper/etc/ignore
+ 1.30 03/01/22 23:32:53 mayer@tecotoo.myibg.com +1 -0
+ Added ports/winnt/ntpd/nt_clockstuff.c.bak to the ignore list
+
+ ports/winnt/ntpd/nt_clockstuff.c
+ 1.11 03/01/22 23:32:50 mayer@tecotoo.myibg.com +13 -0
+ Make sure that the time is only retrieved from the same processor by tying the thread retrieving
+ the code to the first processor. This only affects multiprocessors
+
+ChangeSet
+ 1.974 03/01/22 04:28:16 stenn@pogo.udel.edu +1 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+
+ configure.in
+ 1.290 03/01/22 04:28:11 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.973 03/01/22 04:26:18 stenn@pogo.udel.edu +4 -0
+ ISC_PLATFORM progress
+
+ libntp/Makefile.am
+ 1.24 03/01/22 04:25:31 stenn@pogo.udel.edu +1 -1
+ libntp now needs include/isc
+
+ include/Makefile.am
+ 1.15 03/01/22 04:24:40 stenn@pogo.udel.edu +2 -1
+ Handle include/isc/
+
+ configure.in
+ 1.289 03/01/22 04:24:18 stenn@pogo.udel.edu +37 -0
+ First pass at ISC_PLATFORM* variables
+
+ include/isc/Makefile.am
+ 1.1 03/01/22 04:23:04 stenn@pogo.udel.edu +35 -0
+
+ include/isc/Makefile.am
+ 1.0 03/01/22 04:23:04 stenn@pogo.udel.edu +0 -0
+ BitKeeper file /pogo/users/stenn/ntp-dev-io/include/isc/Makefile.am
+
+ChangeSet
+ 1.957.1.17 03/01/22 02:04:17 stenn@whimsy.udel.edu +1 -0
+ ntp-4.1.73
+
+ configure.in
+ 1.285.1.3 03/01/22 02:03:58 stenn@whimsy.udel.edu +1 -1
+ ntp-4.1.73
+
+ChangeSet
+ 1.972 03/01/21 21:34:52 stenn@pogo.udel.edu +2 -0
+ Merge pogo.udel.edu:/pogo/users/stenn/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev-io
+
+ ntpd/refclock_palisade.c
+ 1.15 03/01/21 21:34:43 stenn@pogo.udel.edu +0 -1
+ Auto merged
+
+ configure.in
+ 1.288 03/01/21 21:34:43 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.957.1.16 03/01/21 17:23:27 stenn@whimsy.udel.edu +57 -0
+ Cleanup from Dave Mills.
+
+ html/keygen.html
+ 1.1 03/01/21 17:23:20 stenn@whimsy.udel.edu +203 -0
+
+ html/icons/mail2.gif
+ 1.1 03/01/21 17:23:20 stenn@whimsy.udel.edu +8 -0
+
+ html/icons/home.gif
+ 1.1 03/01/21 17:23:20 stenn@whimsy.udel.edu +23 -0
+
+ html/drivers/icons/mail2.gif
+ 1.1 03/01/21 17:23:20 stenn@whimsy.udel.edu +8 -0
+
+ html/drivers/icons/home.gif
+ 1.1 03/01/21 17:23:20 stenn@whimsy.udel.edu +23 -0
+
+ html/keygen.html
+ 1.0 03/01/21 17:23:20 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/keygen.html
+
+ html/icons/mail2.gif
+ 1.0 03/01/21 17:23:20 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/icons/mail2.gif
+
+ html/icons/home.gif
+ 1.0 03/01/21 17:23:20 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/icons/home.gif
+
+ html/drivers/icons/mail2.gif
+ 1.0 03/01/21 17:23:20 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/drivers/icons/mail2.gif
+
+ html/drivers/icons/home.gif
+ 1.0 03/01/21 17:23:20 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/drivers/icons/home.gif
+
+ html/drivers/oncore-shmem.html
+ 1.10 03/01/21 17:23:19 stenn@whimsy.udel.edu +12 -8
+ Cleanup from Dave Mills.
+
+ html/drivers/driver9.html
+ 1.12 03/01/21 17:23:19 stenn@whimsy.udel.edu +6 -6
+ Cleanup from Dave Mills.
+
+ html/drivers/driver8.html
+ 1.11 03/01/21 17:23:19 stenn@whimsy.udel.edu +12 -12
+ Cleanup from Dave Mills.
+
+ html/drivers/driver7.html
+ 1.19 03/01/21 17:23:19 stenn@whimsy.udel.edu +5 -5
+ Cleanup from Dave Mills.
+
+ html/drivers/driver6.html
+ 1.14 03/01/21 17:23:19 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills.
+
+ html/drivers/driver5.html
+ 1.10 03/01/21 17:23:19 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver44.html
+ 1.8 03/01/21 17:23:19 stenn@whimsy.udel.edu +9 -9
+ Cleanup from Dave Mills.
+
+ html/drivers/driver43.html
+ 1.7 03/01/21 17:23:19 stenn@whimsy.udel.edu +5 -5
+ Cleanup from Dave Mills.
+
+ html/drivers/driver42.html
+ 1.10 03/01/21 17:23:19 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver40.html
+ 1.9 03/01/21 17:23:18 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/drivers/driver4.html
+ 1.10 03/01/21 17:23:18 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/drivers/driver39.html
+ 1.10 03/01/21 17:23:18 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver38.html
+ 1.10 03/01/21 17:23:18 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver37.html
+ 1.10 03/01/21 17:23:18 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/drivers/driver36.html
+ 1.17 03/01/21 17:23:18 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills.
+
+ html/drivers/driver35.html
+ 1.12 03/01/21 17:23:18 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/drivers/driver34.html
+ 1.9 03/01/21 17:23:18 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/drivers/driver33.html
+ 1.10 03/01/21 17:23:18 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/drivers/driver32.html
+ 1.10 03/01/21 17:23:18 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/drivers/driver30.html
+ 1.15 03/01/21 17:23:17 stenn@whimsy.udel.edu +32 -32
+ Cleanup from Dave Mills.
+
+ html/drivers/driver3.html
+ 1.9 03/01/21 17:23:17 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver29.html
+ 1.11 03/01/21 17:23:17 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver28.html
+ 1.9 03/01/21 17:23:17 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver27.html
+ 1.10 03/01/21 17:23:17 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver26.html
+ 1.8 03/01/21 17:23:17 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/drivers/driver24.html
+ 1.8 03/01/21 17:23:17 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/drivers/driver23.html
+ 1.11 03/01/21 17:23:17 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver22.html
+ 1.13 03/01/21 17:23:17 stenn@whimsy.udel.edu +5 -5
+ Cleanup from Dave Mills.
+
+ html/drivers/driver20.html
+ 1.11 03/01/21 17:23:17 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/release.html
+ 1.27 03/01/21 17:23:16 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver2.html
+ 1.10 03/01/21 17:23:16 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver19.html
+ 1.9 03/01/21 17:23:16 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver18.html
+ 1.10 03/01/21 17:23:16 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver16.html
+ 1.9 03/01/21 17:23:16 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver12.html
+ 1.10 03/01/21 17:23:16 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills.
+
+ html/drivers/driver11.html
+ 1.10 03/01/21 17:23:16 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/drivers/driver10.html
+ 1.10 03/01/21 17:23:16 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills.
+
+ html/drivers/driver1.html
+ 1.11 03/01/21 17:23:16 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills.
+
+ html/refclock.html
+ 1.27 03/01/21 17:23:15 stenn@whimsy.udel.edu +41 -41
+ Cleanup from Dave Mills.
+
+ html/quick.html
+ 1.14 03/01/21 17:23:15 stenn@whimsy.udel.edu +4 -5
+ Cleanup from Dave Mills.
+
+ html/prefer.html
+ 1.13 03/01/21 17:23:15 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/pps.html
+ 1.17 03/01/21 17:23:15 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills.
+
+ html/ntpd.html
+ 1.27 03/01/21 17:23:15 stenn@whimsy.udel.edu +69 -39
+ Cleanup from Dave Mills.
+
+ html/miscopt.html
+ 1.25 03/01/21 17:23:15 stenn@whimsy.udel.edu +5 -8
+ Cleanup from Dave Mills.
+
+ html/ldisc.html
+ 1.11 03/01/21 17:23:14 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/index.html
+ 1.24 03/01/21 17:23:14 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills.
+
+ html/extern.html
+ 1.12 03/01/21 17:23:14 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/debug.html
+ 1.18 03/01/21 17:23:14 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/build.html
+ 1.17 03/01/21 17:23:14 stenn@whimsy.udel.edu +17 -17
+ Cleanup from Dave Mills.
+
+ html/authopt.html
+ 1.26 03/01/21 17:23:14 stenn@whimsy.udel.edu +7 -9
+ Cleanup from Dave Mills.
+
+ html/assoc.html
+ 1.19 03/01/21 17:23:13 stenn@whimsy.udel.edu +7 -7
+ Cleanup from Dave Mills.
+
+ html/accopt.html
+ 1.17 03/01/21 17:23:13 stenn@whimsy.udel.edu +5 -5
+ Cleanup from Dave Mills.
+
+ html/drivers/oncore-shmem.html
+ 1.9 03/01/21 01:25:31 stenn@whimsy.udel.edu +0 -0
+ Rename: html/oncore-shmem.html -> html/drivers/oncore-shmem.html
+
+ html/drivers/driver9.html
+ 1.11 03/01/21 01:21:20 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver9.html -> html/drivers/driver9.html
+
+ html/drivers/driver8.html
+ 1.10 03/01/21 01:21:19 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver8.html -> html/drivers/driver8.html
+
+ html/drivers/driver7.html
+ 1.18 03/01/21 01:21:19 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver7.html -> html/drivers/driver7.html
+
+ html/drivers/driver6.html
+ 1.13 03/01/21 01:21:19 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver6.html -> html/drivers/driver6.html
+
+ html/drivers/driver5.html
+ 1.9 03/01/21 01:21:19 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver5.html -> html/drivers/driver5.html
+
+ html/drivers/driver44.html
+ 1.7 03/01/21 01:21:19 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver44.html -> html/drivers/driver44.html
+
+ html/drivers/driver43.html
+ 1.6 03/01/21 01:21:19 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver43.html -> html/drivers/driver43.html
+
+ html/drivers/driver42.html
+ 1.9 03/01/21 01:21:18 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver42.html -> html/drivers/driver42.html
+
+ html/drivers/driver40.html
+ 1.8 03/01/21 01:21:18 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver40.html -> html/drivers/driver40.html
+
+ html/drivers/driver4.html
+ 1.9 03/01/21 01:21:18 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver4.html -> html/drivers/driver4.html
+
+ html/drivers/driver39.html
+ 1.9 03/01/21 01:21:18 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver39.html -> html/drivers/driver39.html
+
+ html/drivers/driver38.html
+ 1.9 03/01/21 01:21:18 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver38.html -> html/drivers/driver38.html
+
+ html/drivers/driver37.html
+ 1.9 03/01/21 01:21:18 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver37.html -> html/drivers/driver37.html
+
+ html/drivers/driver36.html
+ 1.16 03/01/21 01:21:17 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver36.html -> html/drivers/driver36.html
+
+ html/drivers/driver35.html
+ 1.11 03/01/21 01:21:17 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver35.html -> html/drivers/driver35.html
+
+ html/drivers/driver34.html
+ 1.8 03/01/21 01:21:17 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver34.html -> html/drivers/driver34.html
+
+ html/drivers/driver33.html
+ 1.9 03/01/21 01:21:17 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver33.html -> html/drivers/driver33.html
+
+ html/drivers/driver32.html
+ 1.9 03/01/21 01:21:17 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver32.html -> html/drivers/driver32.html
+
+ html/drivers/driver30.html
+ 1.14 03/01/21 01:21:17 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver30.html -> html/drivers/driver30.html
+
+ html/drivers/driver3.html
+ 1.8 03/01/21 01:21:16 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver3.html -> html/drivers/driver3.html
+
+ html/drivers/driver29.html
+ 1.10 03/01/21 01:21:16 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver29.html -> html/drivers/driver29.html
+
+ html/drivers/driver28.html
+ 1.8 03/01/21 01:21:16 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver28.html -> html/drivers/driver28.html
+
+ html/drivers/driver27.html
+ 1.9 03/01/21 01:21:16 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver27.html -> html/drivers/driver27.html
+
+ html/drivers/driver26.html
+ 1.7 03/01/21 01:21:16 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver26.html -> html/drivers/driver26.html
+
+ html/drivers/driver24.html
+ 1.7 03/01/21 01:21:16 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver24.html -> html/drivers/driver24.html
+
+ html/drivers/driver23.html
+ 1.10 03/01/21 01:21:15 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver23.html -> html/drivers/driver23.html
+
+ html/drivers/driver22.html
+ 1.12 03/01/21 01:21:15 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver22.html -> html/drivers/driver22.html
+
+ html/drivers/driver20.html
+ 1.10 03/01/21 01:21:15 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver20.html -> html/drivers/driver20.html
+
+ html/drivers/driver2.html
+ 1.9 03/01/21 01:21:15 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver2.html -> html/drivers/driver2.html
+
+ html/drivers/driver19.html
+ 1.8 03/01/21 01:21:15 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver19.html -> html/drivers/driver19.html
+
+ html/drivers/driver18.html
+ 1.9 03/01/21 01:21:15 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver18.html -> html/drivers/driver18.html
+
+ html/drivers/driver16.html
+ 1.8 03/01/21 01:21:14 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver16.html -> html/drivers/driver16.html
+
+ html/drivers/driver12.html
+ 1.9 03/01/21 01:21:14 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver12.html -> html/drivers/driver12.html
+
+ html/drivers/driver11.html
+ 1.9 03/01/21 01:21:14 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver11.html -> html/drivers/driver11.html
+
+ html/drivers/driver10.html
+ 1.9 03/01/21 01:21:14 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver10.html -> html/drivers/driver10.html
+
+ html/drivers/driver1.html
+ 1.10 03/01/21 01:21:14 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver1.html -> html/drivers/driver1.html
+
+ChangeSet
+ 1.957.1.15 03/01/20 22:26:15 stenn@whimsy.udel.edu +1 -0
+ cryptostats cleanup from Dave Mills.
+
+ ntpd/ntp_util.c
+ 1.25 03/01/20 22:26:12 stenn@whimsy.udel.edu +8 -0
+ cryptostats cleanup from Dave Mills.
+
+ChangeSet
+ 1.957.1.14 03/01/20 02:19:34 stenn@whimsy.udel.edu +7 -0
+ Merge
+
+ util/ntptime.c
+ 1.16 03/01/20 02:18:57 stenn@whimsy.udel.edu +0 -1
+ Merge cleanup.
+
+ ntpd/refclock_hopfser.c
+ 1.8 03/01/20 02:17:53 stenn@whimsy.udel.edu +0 -7
+ Use the same sync fix in -stable and -dev.
+
+ ntpd/ntp_config.c
+ 1.82 03/01/20 02:15:59 stenn@whimsy.udel.edu +0 -1
+ Use the same fix for '*' in -stable and -dev.
+ C
+
+ libntp/md5c.c
+ 1.5 03/01/20 02:14:42 stenn@whimsy.udel.edu +0 -9
+ Use the same fix for rename of "index" in -stable and -dev.
+
+ ntpd/refclock_palisade.c
+ 1.13.1.1 03/01/20 02:06:08 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/refclock_hopfpci.c
+ 1.8 03/01/20 02:06:08 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.285.1.2 03/01/20 02:06:07 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.957.1.13 03/01/20 01:58:19 stenn@whimsy.udel.edu +2 -0
+ Fixes from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.143 03/01/20 01:56:17 stenn@whimsy.udel.edu +39 -37
+ Fixes from Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.73 03/01/20 01:56:17 stenn@whimsy.udel.edu +11 -5
+ Fixes from Dave Mills.
+
+ChangeSet
+ 1.971 03/01/19 00:32:43 mayer@tecotoo.myibg.com +1 -0
+ Add missing include file.
+
+ include/isc/print.h
+ 1.1 03/01/19 00:32:18 mayer@tecotoo.myibg.com +69 -0
+
+ include/isc/print.h
+ 1.0 03/01/19 00:32:17 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/print.h
+
+ChangeSet
+ 1.970 03/01/18 23:34:25 mayer@tecotoo.myibg.com +2 -0
+ Added strerror.c file to list.
+
+ libisc/strerror.c
+ 1.1 03/01/18 23:33:54 mayer@tecotoo.myibg.com +72 -0
+
+ libisc/strerror.c
+ 1.0 03/01/18 23:33:54 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/strerror.c
+
+ libntp/Makefile.am
+ 1.23 03/01/18 23:33:51 mayer@tecotoo.myibg.com +2 -1
+ Add strerror.c to isc list.
+
+ChangeSet
+ 1.969 03/01/18 23:13:32 mayer@tecotoo.myibg.com +1 -0
+ Make this file a stub. We probably don't need IPv6 definitions on Unix.
+
+ include/isc/ipv6.h
+ 1.2 03/01/18 23:13:10 mayer@tecotoo.myibg.com +5 -0
+ Make this file a stub. We probably don't need IPv6 definitions on Unix.
+
+ChangeSet
+ 1.968 03/01/18 11:41:12 mayer@tecotoo.myibg.com +1 -0
+ Remove unnecessary include file.
+
+ libisc/interfaceiter.c
+ 1.2 03/01/18 11:40:44 mayer@tecotoo.myibg.com +0 -1
+ Remove unnecessary include file.
+
+ChangeSet
+ 1.967 03/01/18 11:10:18 mayer@tecotoo.myibg.com +2 -0
+ Added libisc routines into build of libntp library
+
+ BitKeeper/etc/ignore
+ 1.29 03/01/18 11:09:55 mayer@tecotoo.myibg.com +1 -0
+ Added {libntp/Makefile.am.$$$} to the ignore list
+
+ libntp/Makefile.am
+ 1.22 03/01/18 11:09:52 mayer@tecotoo.myibg.com +3 -1
+ Added libisc routines into build of libntp library.
+
+ChangeSet
+ 1.966 03/01/17 23:14:19 mayer@tecotoo.myibg.com +1 -0
+ reset for set_useaddr().
+
+ ntpd/ntp_io.c
+ 1.60 03/01/17 23:13:50 mayer@tecotoo.myibg.com +37 -16
+ Recheckin to fix all the things that BitKeeper unfixed.
+
+ChangeSet
+ 1.965 03/01/17 22:39:28 mayer@tecotoo.myibg.com +2 -0
+ Bitkeeper is stupid
+
+ ntpd/ntp_io.c
+ 1.59 03/01/17 22:39:05 mayer@tecotoo.myibg.com +16 -38
+ Ignore. Bitkeeper is stupid
+
+ configure.in
+ 1.287 03/01/17 22:39:03 mayer@tecotoo.myibg.com +0 -0
+ No change
+
+ChangeSet
+ 1.964 03/01/17 20:56:06 mayer@tecotoo.myibg.com +1 -0
+ Fix for prototype functions and change BOOL to isc_boolean_t
+
+ ntpd/ntp_io.c
+ 1.58 03/01/17 20:55:35 mayer@tecotoo.myibg.com +9 -9
+ Fix the prototype functions (do we really need this style?) and change BOOL which
+ SunOS apparently doesn't understand. Use ISC's isc_boolean_t instead.
+
+ChangeSet
+ 1.683.4.136 03/01/18 02:48:55 matthias.andree@gmx.de +1 -0
+ Merge bk://ntp.bkbits.net/ntp-stable
+ into gmx.de:/home/emma/bk-3rdparty/ntp-stable
+
+ configure.in
+ 1.219.3.40 03/01/18 02:48:54 matthias.andree@gmx.de +0 -0
+ Auto merged
+
+ChangeSet
+ 1.957.1.12 03/01/17 18:16:25 stenn@whimsy.udel.edu +6 -0
+ Apply the linux broadcast fix to both IP stacks.
+
+ ntpd/ntp_io.c
+ 1.53.1.2 03/01/17 18:16:22 stenn@whimsy.udel.edu +4 -2
+ The linux broadcast fix needs to be used for both IPv4 and IPv6.
+ Probably.
+
+ ntpd/refclock_neoclock4x.c
+ 1.3 03/01/17 18:07:41 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.285.1.1 03/01/17 18:07:40 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ acinclude.m4
+ 1.11 03/01/17 18:07:39 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.19 03/01/17 18:07:38 stenn@whimsy.udel.edu +1 -0
+ 'Auto converge'
+
+ BitKeeper/etc/logging_ok
+ 1.18 03/01/17 18:07:38 stenn@whimsy.udel.edu +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.16 03/01/17 18:07:37 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.17 03/01/17 18:07:36 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.15 03/01/17 18:07:31 stenn@whimsy.udel.edu +1 -2
+ auto-union
+
+ChangeSet
+ 1.683.4.135 03/01/17 17:42:19 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-stable-linux
+
+ configure.in
+ 1.219.3.39 03/01/17 17:42:17 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.963 03/01/17 01:38:23 mayer@tecotoo.myibg.com +2 -0
+ Merge bk://www.ntp.org/home/bk/ntp-dev
+ into tecotoo.myibg.com:H:/ntpbk/ntp-dev
+
+ include/ntp.h
+ 1.81 03/01/17 01:38:02 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ configure.in
+ 1.286 03/01/17 01:37:59 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ChangeSet
+ 1.962 03/01/17 01:34:09 mayer@tecotoo.myibg.com +2 -0
+ Miscellaneous bug fixes for ntp_io.c support
+
+ ntpd/ntp_io.c
+ 1.57 03/01/17 01:33:48 mayer@tecotoo.myibg.com +7 -5
+ Define functions, add parentheses, fix missing semi-colon.
+
+ include/isc/net.h
+ 1.2 03/01/17 01:33:45 mayer@tecotoo.myibg.com +2 -0
+ Don't define structure for now
+
+ChangeSet
+ 1.961 03/01/15 00:09:39 stenn@pogo.udel.edu +2 -0
+ Handle generated file include/isc/platform.h
+
+ configure.in
+ 1.284.1.1 03/01/15 00:08:43 stenn@pogo.udel.edu +1 -0
+
+ ntpd/Makefile.am
+ 1.34 03/01/15 00:07:36 stenn@pogo.udel.edu +1 -1
+
+ChangeSet
+ 1.957.1.11 03/01/14 16:24:42 stenn@whimsy.udel.edu +2 -0
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.142 03/01/14 16:24:38 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.72 03/01/14 16:24:38 stenn@whimsy.udel.edu +9 -10
+ Cleanup from Dave Mills.
+
+ChangeSet
+ 1.683.12.10 03/01/11 02:46:28 matthias.andree@gmx.de +1 -0
+ Get types in printf format really right this time.
+
+ parseutil/dcfd.c
+ 1.11 03/01/11 02:46:27 matthias.andree@gmx.de +2 -2
+ Get types in printf format really right this time.
+
+ChangeSet
+ 1.683.12.9 03/01/11 02:45:54 matthias.andree@gmx.de +1 -0
+ Fix NULL -> '\0'.
+
+ ntpd/refclock_palisade.c
+ 1.9.2.2 03/01/11 02:45:53 matthias.andree@gmx.de +1 -1
+ Fix NULL -> '\0'.
+
+ChangeSet
+ 1.683.12.8 03/01/11 02:40:53 matthias.andree@gmx.de +1 -0
+ Use %ld to print "long" variables rather than %d.
+
+ parseutil/dcfd.c
+ 1.10 03/01/11 02:40:51 matthias.andree@gmx.de +2 -2
+ Use %ld to print "long" variables rather than %d.
+
+ChangeSet
+ 1.683.12.7 03/01/11 02:39:21 matthias.andree@gmx.de +1 -0
+ Fix compiler warnings that were possible bugs.
+
+ util/ntptime.c
+ 1.14.1.2 03/01/11 02:39:08 matthias.andree@gmx.de +4 -4
+ Add some volatile keywords to avoid variable clobbering by
+ siglongjmp().
+
+ Cast ntv.tai to long and use %ld when printing TAI offset.
+
+ChangeSet
+ 1.683.12.6 03/01/11 01:47:11 matthias.andree@gmx.de +1 -0
+ Fix SUNWspro compiler warning about signedness in assigning a
+ string constant.
+
+ ntpd/ntp_config.c
+ 1.50.4.1 03/01/11 01:47:10 matthias.andree@gmx.de +1 -1
+ Fix SUNWspro compiler warning about signedness in assigning a
+ string constant.
+
+ChangeSet
+ 1.683.12.5 03/01/11 01:42:41 matthias.andree@gmx.de +1 -0
+ Fix compiler warnings about sync(2) getting shadowed.
+
+ ntpd/refclock_hopfser.c
+ 1.3.2.1 03/01/11 01:42:40 matthias.andree@gmx.de +7 -7
+ Rename sync to synch to avoid shadowing the global sync(2) function.
+ Fixes compiler warnings.
+
+ChangeSet
+ 1.683.12.4 03/01/11 01:41:55 matthias.andree@gmx.de +1 -0
+ Fix "implicit declaration" warning for ioctl on non-WINNT systems.
+
+ ntpd/refclock_hopfpci.c
+ 1.3.1.1 03/01/11 01:41:54 matthias.andree@gmx.de +2 -1
+ Add #include <sys/ioctl.h> unless SYS_WINNT is defined.
+
+ChangeSet
+ 1.683.12.3 03/01/11 01:40:52 matthias.andree@gmx.de +1 -0
+ Rename "index" to "idx" to avoid compiler warnings about shadowed
+ definitions.
+
+ libntp/md5c.c
+ 1.2.1.1 03/01/11 01:40:51 matthias.andree@gmx.de +9 -9
+ Rename "index" to "idx" to avoid compiler warnings about a global
+ getting shadowed. (index(3) is the BSD variant of strchr(3)).
+
+ChangeSet
+ 1.683.12.2 03/01/11 01:38:19 matthias.andree@gmx.de +2 -0
+ Fix compiler warning about rawtime getting clobbered by longjmp()
+ or vfork().
+
+ util/ntptime.c
+ 1.14.1.1 03/01/11 01:38:18 matthias.andree@gmx.de +1 -1
+ Make rawtime a volatile int, to fix a compiler warning about
+ longjmp()/vfork() clobbering this variable.
+
+ configure.in
+ 1.219.6.2 03/01/11 01:38:18 matthias.andree@gmx.de +1 -0
+ Add AC_C_VOLATILE for volatile.
+
+ChangeSet
+ 1.683.12.1 03/01/11 01:09:48 matthias.andree@gmx.de +1 -0
+ Fix autoconf warnings about AC_AIX/AC_MINIX.
+
+ configure.in
+ 1.219.6.1 03/01/11 01:09:43 matthias.andree@gmx.de +4 -2
+ Move AC_AIX and AC_MINIX way up to avoid autoconf warnings and
+ AIX astonishment, just in case.
+
+ChangeSet
+ 1.683.10.2 03/01/10 17:16:47 claas@nixfix.(none) +1 -0
+ refclock_neoclock4x.c:
+ Driver update to version 1.12
+
+ ntpd/refclock_neoclock4x.c
+ 1.1.1.2 03/01/10 17:16:26 claas@nixfix.(none) +72 -36
+ Driver update to version 1.12
+
+ChangeSet
+ 1.683.4.134 03/01/09 18:05:24 stenn@whimsy.udel.edu +2 -0
+ Move the AH_TEMPLATE for ULONG_CONST to its macro definition.
+
+ configure.in
+ 1.219.3.38 03/01/09 18:05:12 stenn@whimsy.udel.edu +0 -1
+ Move the AH_TEMPLATE for ULONG_CONST to the ULONG_CONST macro definition.
+
+ acinclude.m4
+ 1.3.1.7 03/01/09 18:05:12 stenn@whimsy.udel.edu +2 -1
+ Move the AH_TEMPLATE for ULONG_CONST here, where it belongs.
+
+ChangeSet
+ 1.957.1.10 03/01/08 20:38:12 stenn@whimsy.udel.edu +3 -0
+ Cleanup and improvements from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.141 03/01/08 20:38:08 stenn@whimsy.udel.edu +7 -6
+ Cleanup and improvements from Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.71 03/01/08 20:38:07 stenn@whimsy.udel.edu +16 -23
+ Cleanup and improvements from Dave Mills.
+
+ include/ntp.h
+ 1.79.1.1 03/01/08 20:38:07 stenn@whimsy.udel.edu +1 -1
+ Cleanup and improvements from Dave Mills.
+
+ChangeSet
+ 1.957.1.9 03/01/08 20:30:34 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ include/ntp_machine.h
+ 1.16 03/01/08 20:30:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.11.1 03/01/08 20:27:30 stenn@whimsy.udel.edu +1 -0
+ WINNT vsnprintf fix from Terje Mathisen <terje.mathisen@hda.hydro.com>
+
+ include/ntp_machine.h
+ 1.7.2.1 03/01/08 20:27:26 stenn@whimsy.udel.edu +1 -0
+ WINNT vsnprintf fix from Terje Mathisen <terje.mathisen@hda.hydro.com>
+
+ChangeSet
+ 1.683.10.1 03/01/08 14:02:34 claas@nixfix.(none) +3 -0
+ refclock_neoclock4x.c:
+ driver update to version 1.11. See source for more
+ information ChangeLog.
+ configure.in:
+ enable NeoClock4X receiver by default
+
+ BitKeeper/etc/logging_ok
+ 1.1.1.7 03/01/08 14:02:34 claas@nixfix.(none) +4 -3
+ Logging to logging@openlogging.org accepted
+
+ ntpd/refclock_neoclock4x.c
+ 1.1.1.1 03/01/08 13:57:36 claas@nixfix.(none) +237 -87
+ driver update to version 1.11. See source for more
+ information ChangeLog.
+
+ configure.in
+ 1.219.5.1 03/01/08 13:56:57 claas@nixfix.(none) +1 -1
+ enable NeoClock4X receiver by default
+
+ChangeSet
+ 1.683.4.132 03/01/06 22:55:24 matthias.andree@gmx.de +1 -0
+ Fix Linux multicast client mode.
+
+ ntpd/ntp_io.c
+ 1.20.3.2 03/01/06 22:55:22 matthias.andree@gmx.de +2 -0
+ Set reuseaddr on all sockets before opening the multicast listening socket,
+ and reset reuseaddr to 0 after opening the socket.
+ Fixes Linux multicast client mode.
+
+ChangeSet
+ 1.957.1.8 03/01/05 00:48:50 stenn@whimsy.udel.edu +6 -0
+ Merge
+
+ configure.in
+ 1.285 03/01/05 00:48:13 stenn@whimsy.udel.edu +0 -1
+ Handle VERSION differences between -stable and -dev.
+
+ BitKeeper/deleted/.del-acconfig.h~3aed0663
+ 1.31 03/01/05 00:46:52 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ README
+ 1.19 03/01/05 00:46:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.35 03/01/05 00:46:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.16 03/01/05 00:46:49 stenn@whimsy.udel.edu +1 -0
+ 'Auto converge'
+
+ BitKeeper/deleted/.del-acconfig.h~3aed0663
+ 1.30 03/01/05 00:46:50 stenn@whimsy.udel.edu +0 -0
+ Merge rename: acconfig.h -> BitKeeper/deleted/.del-acconfig.h~3aed0663
+
+ BitKeeper/etc/logging_ok
+ 1.15 03/01/05 00:46:49 stenn@whimsy.udel.edu +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.14 03/01/05 00:46:49 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.14 03/01/05 00:46:48 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.13 03/01/05 00:46:44 stenn@whimsy.udel.edu +1 -1
+ auto-union
+
+ChangeSet
+ 1.683.4.131 03/01/05 06:10:42 matthias.andree@gmx.de +2 -0
+ Fix Linux' broadcastclient mode.
+ Patch by Allen Mcintosh.
+
+ ntpd/ntp_io.c
+ 1.20.3.1 03/01/05 06:10:40 matthias.andree@gmx.de +34 -15
+ Move code to change sockets' SO_REUSEADDR into set_reuseaddr, and use
+ that to fix Linux' broadcastclient mode.
+ Patch by Allen Mcintosh
+
+ configure.in
+ 1.219.3.37 03/01/05 06:10:40 matthias.andree@gmx.de +0 -3
+ Change: Linux also needs broadcast sockets.
+ Patch by Allen Mcintosh
+
+ChangeSet
+ 1.960 03/01/04 22:27:45 mayer@tecotoo.myibg.com +2 -0
+ Merge fixes
+
+ ntpd/ntp_io.c
+ 1.56 03/01/04 22:27:32 mayer@tecotoo.myibg.com +4 -3
+ merge fixes
+
+ include/ntp.h
+ 1.80 03/01/04 22:27:31 mayer@tecotoo.myibg.com +0 -0
+ Merge fixes
+
+ChangeSet
+ 1.959 03/01/04 21:02:02 mayer@tecotoo.myibg.com +58 -0
+ Added Interface Iteration support for the ntp_io.c code. This includes adding a lot of
+ header files and some c files. Bug fixes to support IPv6 properly. Fixes to include order
+ to dsp files.
+
+ BitKeeper/etc/ignore
+ 1.28 03/01/04 21:01:18 mayer@tecotoo.myibg.com +2 -0
+ Added libntp/net.c.bak {ntpd/Copy of ntp_io.csave} to the ignore list
+
+ ports/winnt/libisc/once.c
+ 1.1 03/01/04 21:01:15 mayer@tecotoo.myibg.com +51 -0
+
+ ports/winnt/libisc/once.c
+ 1.0 03/01/04 21:01:15 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/libisc/once.c
+
+ ports/winnt/libisc/net.c
+ 1.1 03/01/04 21:01:14 mayer@tecotoo.myibg.com +123 -0
+
+ ports/winnt/libisc/net.c
+ 1.0 03/01/04 21:01:13 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/libisc/net.c
+
+ ports/winnt/libisc/interfaceiter.c
+ 1.1 03/01/04 21:01:12 mayer@tecotoo.myibg.com +400 -0
+
+ ports/winnt/libisc/interfaceiter.c
+ 1.0 03/01/04 21:01:12 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/libisc/interfaceiter.c
+
+ ports/winnt/include/isc/strerror.h
+ 1.1 03/01/04 21:01:11 mayer@tecotoo.myibg.com +42 -0
+
+ ports/winnt/include/isc/strerror.h
+ 1.0 03/01/04 21:01:11 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/include/isc/strerror.h
+
+ ports/winnt/include/isc/platform.h
+ 1.1 03/01/04 21:01:09 mayer@tecotoo.myibg.com +92 -0
+
+ ports/winnt/include/isc/platform.h
+ 1.0 03/01/04 21:01:09 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/include/isc/platform.h
+
+ ports/winnt/include/isc/once.h
+ 1.1 03/01/04 21:01:08 mayer@tecotoo.myibg.com +43 -0
+
+ ports/winnt/include/isc/once.h
+ 1.0 03/01/04 21:01:08 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/include/isc/once.h
+
+ ports/winnt/include/isc/offset.h
+ 1.1 03/01/04 21:01:06 mayer@tecotoo.myibg.com +45 -0
+
+ ports/winnt/include/isc/offset.h
+ 1.0 03/01/04 21:01:06 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/include/isc/offset.h
+
+ ports/winnt/include/isc/net.h
+ 1.1 03/01/04 21:01:05 mayer@tecotoo.myibg.com +270 -0
+
+ ports/winnt/include/isc/net.h
+ 1.0 03/01/04 21:01:05 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/include/isc/net.h
+
+ ports/winnt/include/isc/mutex.h
+ 1.1 03/01/04 21:01:03 mayer@tecotoo.myibg.com +51 -0
+
+ ports/winnt/include/isc/mutex.h
+ 1.0 03/01/04 21:01:03 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/include/isc/mutex.h
+
+ ports/winnt/include/isc/ipv6.h
+ 1.1 03/01/04 21:01:02 mayer@tecotoo.myibg.com +111 -0
+
+ ports/winnt/include/isc/ipv6.h
+ 1.0 03/01/04 21:01:02 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/include/isc/ipv6.h
+
+ ports/winnt/include/isc/int.h
+ 1.1 03/01/04 21:01:01 mayer@tecotoo.myibg.com +56 -0
+
+ ports/winnt/include/isc/int.h
+ 1.0 03/01/04 21:01:00 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/include/isc/int.h
+
+ libntp/net.c.bak
+ 1.1 03/01/04 21:00:59 mayer@tecotoo.myibg.com +153 -0
+
+ libntp/net.c.bak
+ 1.0 03/01/04 21:00:59 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libntp/net.c.bak
+
+ libisc/net.c
+ 1.1 03/01/04 21:00:57 mayer@tecotoo.myibg.com +127 -0
+
+ libisc/net.c
+ 1.0 03/01/04 21:00:57 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/net.c
+
+ libisc/msgcat.c
+ 1.1 03/01/04 21:00:55 mayer@tecotoo.myibg.com +129 -0
+
+ libisc/msgcat.c
+ 1.0 03/01/04 21:00:55 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/msgcat.c
+
+ libisc/mem.c
+ 1.1 03/01/04 21:00:53 mayer@tecotoo.myibg.com +42 -0
+
+ libisc/mem.c
+ 1.0 03/01/04 21:00:53 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/mem.c
+
+ libisc/lib.c
+ 1.1 03/01/04 21:00:52 mayer@tecotoo.myibg.com +77 -0
+
+ libisc/lib.c
+ 1.0 03/01/04 21:00:52 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/lib.c
+
+ libisc/interfaceiter.c
+ 1.1 03/01/04 21:00:50 mayer@tecotoo.myibg.com +160 -0
+
+ libisc/interfaceiter.c
+ 1.0 03/01/04 21:00:50 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/interfaceiter.c
+
+ libisc/ifiter_sysctl.c
+ 1.1 03/01/04 21:00:49 mayer@tecotoo.myibg.com +294 -0
+
+ libisc/ifiter_sysctl.c
+ 1.0 03/01/04 21:00:48 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/ifiter_sysctl.c
+
+ libisc/ifiter_ioctl.c
+ 1.1 03/01/04 21:00:47 mayer@tecotoo.myibg.com +771 -0
+
+ libisc/ifiter_ioctl.c
+ 1.0 03/01/04 21:00:47 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/ifiter_ioctl.c
+
+ libisc/error.c
+ 1.1 03/01/04 21:00:45 mayer@tecotoo.myibg.com +101 -0
+
+ libisc/error.c
+ 1.0 03/01/04 21:00:45 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/error.c
+
+ libisc/assertions.c
+ 1.1 03/01/04 21:00:44 mayer@tecotoo.myibg.com +93 -0
+
+ libisc/assertions.c
+ 1.0 03/01/04 21:00:44 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/libisc/assertions.c
+
+ include/isc/util.h
+ 1.1 03/01/04 21:00:42 mayer@tecotoo.myibg.com +225 -0
+
+ include/isc/util.h
+ 1.0 03/01/04 21:00:42 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/util.h
+
+ include/isc/types.h
+ 1.1 03/01/04 21:00:40 mayer@tecotoo.myibg.com +102 -0
+
+ include/isc/types.h
+ 1.0 03/01/04 21:00:40 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/types.h
+
+ include/isc/string.h
+ 1.1 03/01/04 21:00:38 mayer@tecotoo.myibg.com +56 -0
+
+ include/isc/string.h
+ 1.0 03/01/04 21:00:38 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/string.h
+
+ include/isc/strerror.h
+ 1.1 03/01/04 21:00:37 mayer@tecotoo.myibg.com +42 -0
+
+ include/isc/strerror.h
+ 1.0 03/01/04 21:00:37 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/strerror.h
+
+ include/isc/sockaddr.h
+ 1.1 03/01/04 21:00:35 mayer@tecotoo.myibg.com +196 -0
+
+ include/isc/sockaddr.h
+ 1.0 03/01/04 21:00:35 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/sockaddr.h
+
+ include/isc/result.h
+ 1.1 03/01/04 21:00:33 mayer@tecotoo.myibg.com +103 -0
+
+ include/isc/result.h
+ 1.0 03/01/04 21:00:33 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/result.h
+
+ include/isc/platform.h.in
+ 1.1 03/01/04 21:00:31 mayer@tecotoo.myibg.com +220 -0
+
+ include/isc/platform.h.in
+ 1.0 03/01/04 21:00:31 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/platform.h.in
+
+ include/isc/once.h
+ 1.1 03/01/04 21:00:29 mayer@tecotoo.myibg.com +32 -0
+
+ include/isc/once.h
+ 1.0 03/01/04 21:00:29 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/once.h
+
+ include/isc/offset.h
+ 1.1 03/01/04 21:00:28 mayer@tecotoo.myibg.com +44 -0
+
+ include/isc/offset.h
+ 1.0 03/01/04 21:00:28 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/offset.h
+
+ include/isc/netaddr.h
+ 1.1 03/01/04 21:00:26 mayer@tecotoo.myibg.com +136 -0
+
+ include/isc/netaddr.h
+ 1.0 03/01/04 21:00:26 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/netaddr.h
+
+ include/isc/net.h
+ 1.1 03/01/04 21:00:24 mayer@tecotoo.myibg.com +282 -0
+
+ include/isc/net.h
+ 1.0 03/01/04 21:00:24 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/net.h
+
+ include/isc/mutex.h
+ 1.1 03/01/04 21:00:23 mayer@tecotoo.myibg.com +39 -0
+
+ include/isc/mutex.h
+ 1.0 03/01/04 21:00:22 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/mutex.h
+
+ include/isc/msgs.h
+ 1.1 03/01/04 21:00:21 mayer@tecotoo.myibg.com +181 -0
+
+ include/isc/msgs.h
+ 1.0 03/01/04 21:00:21 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/msgs.h
+
+ include/isc/msgcat.h
+ 1.1 03/01/04 21:00:19 mayer@tecotoo.myibg.com +132 -0
+
+ include/isc/msgcat.h
+ 1.0 03/01/04 21:00:19 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/msgcat.h
+
+ include/isc/mem.h
+ 1.1 03/01/04 21:00:18 mayer@tecotoo.myibg.com +31 -0
+
+ include/isc/mem.h
+ 1.0 03/01/04 21:00:18 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/mem.h
+
+ include/isc/magic.h
+ 1.1 03/01/04 21:00:16 mayer@tecotoo.myibg.com +40 -0
+
+ include/isc/magic.h
+ 1.0 03/01/04 21:00:16 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/magic.h
+
+ include/isc/list.h
+ 1.1 03/01/04 21:00:14 mayer@tecotoo.myibg.com +180 -0
+
+ include/isc/list.h
+ 1.0 03/01/04 21:00:14 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/list.h
+
+ include/isc/lib.h
+ 1.1 03/01/04 21:00:13 mayer@tecotoo.myibg.com +39 -0
+
+ include/isc/lib.h
+ 1.0 03/01/04 21:00:13 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/lib.h
+
+ include/isc/lang.h
+ 1.1 03/01/04 21:00:11 mayer@tecotoo.myibg.com +31 -0
+
+ include/isc/lang.h
+ 1.0 03/01/04 21:00:11 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/lang.h
+
+ include/isc/ipv6.h
+ 1.1 03/01/04 21:00:09 mayer@tecotoo.myibg.com +148 -0
+
+ include/isc/ipv6.h
+ 1.0 03/01/04 21:00:09 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/ipv6.h
+
+ include/isc/interfaceiter.h
+ 1.1 03/01/04 21:00:08 mayer@tecotoo.myibg.com +137 -0
+
+ include/isc/interfaceiter.h
+ 1.0 03/01/04 21:00:08 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/interfaceiter.h
+
+ include/isc/int.h
+ 1.1 03/01/04 21:00:06 mayer@tecotoo.myibg.com +53 -0
+
+ include/isc/int.h
+ 1.0 03/01/04 21:00:06 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/int.h
+
+ include/isc/formatcheck.h
+ 1.1 03/01/04 21:00:05 mayer@tecotoo.myibg.com +34 -0
+
+ include/isc/formatcheck.h
+ 1.0 03/01/04 21:00:04 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/formatcheck.h
+
+ include/isc/error.h
+ 1.1 03/01/04 21:00:03 mayer@tecotoo.myibg.com +55 -0
+
+ include/isc/error.h
+ 1.0 03/01/04 21:00:03 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/error.h
+
+ include/isc/boolean.h
+ 1.1 03/01/04 21:00:01 mayer@tecotoo.myibg.com +29 -0
+
+ include/isc/boolean.h
+ 1.0 03/01/04 21:00:01 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/boolean.h
+
+ include/isc/assertions.h
+ 1.1 03/01/04 21:00:00 mayer@tecotoo.myibg.com +120 -0
+
+ include/isc/assertions.h
+ 1.0 03/01/04 21:00:00 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/assertions.h
+
+ include/isc/app.h
+ 1.1 03/01/04 20:59:58 mayer@tecotoo.myibg.com +212 -0
+
+ include/isc/app.h
+ 1.0 03/01/04 20:59:57 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/isc/app.h
+
+ ports/winnt/ntptrace/ntptrace.dsp
+ 1.8 03/01/04 20:59:56 mayer@tecotoo.myibg.com +2 -2
+ Fix the include order
+
+ ports/winnt/ntpq/ntpq.dsp
+ 1.10 03/01/04 20:59:55 mayer@tecotoo.myibg.com +2 -2
+ Fix the include order
+
+ ports/winnt/ntpdc/ntpdc.dsp
+ 1.10 03/01/04 20:59:54 mayer@tecotoo.myibg.com +2 -2
+ Fix the include order
+
+ ports/winnt/ntpdate/ntpdate.dsp
+ 1.8 03/01/04 20:59:52 mayer@tecotoo.myibg.com +2 -2
+ Fix the include order
+
+ ports/winnt/ntpd/ntpd.dsp
+ 1.13 03/01/04 20:59:51 mayer@tecotoo.myibg.com +2 -11
+ Updated to support the ISC files
+
+ ports/winnt/libntp/libntp.dsp
+ 1.10 03/01/04 20:59:49 mayer@tecotoo.myibg.com +34 -2
+ Updated to support the ISC files and fix the include file order
+
+ ntpd/refclock_palisade.c
+ 1.14 03/01/04 20:59:48 mayer@tecotoo.myibg.com +1 -1
+ Reference should be to \0 and not NULL which is a pointer type.
+
+ ntpd/ntp_io.c
+ 1.55 03/01/04 20:59:45 mayer@tecotoo.myibg.com +410 -633
+ Rewrite to properly support interfaces. Numerous bug fixes to properly deal with IPv6.
+
+ include/ntp.h
+ 1.78.1.1 03/01/04 20:59:42 mayer@tecotoo.myibg.com +7 -5
+ Increase the name size of the interface and update the interface flags
+
+ChangeSet
+ 1.683.4.130 03/01/05 02:30:47 matthias.andree@gmx.de +1 -0
+ Fix "make distcheck" for newer automake installations.
+
+ Newer automakes create the distdirs read-only,
+ so Makefile.am's "dist-hook" target was unable to run unix2dos
+ in $(distdir)/ports/winnt and choked "make distcheck".
+
+ Makefile.am
+ 1.12.1.18 03/01/05 02:30:47 matthias.andree@gmx.de +1 -0
+ Fix "make distcheck" for newer automake installations.
+
+ Newer automakes create the distdirs read-only,
+ so Makefile.am's "dist-hook" target was unable to run unix2dos
+ in $(distdir)/ports/winnt and choked "make distcheck".
+
+ChangeSet
+ 1.683.4.129 03/01/05 02:28:26 matthias.andree@gmx.de +5 -0
+ Fix autoheader warnings by removing acconfig.h and placing an
+ AH_TEMPLATE line into configure.in instead.
+
+ BitKeeper/etc/logging_ok
+ 1.1.1.6 03/01/05 02:28:25 matthias.andree@gmx.de +1 -0
+ Logging to logging@openlogging.org accepted
+
+ configure.in
+ 1.219.3.36 03/01/05 02:28:24 matthias.andree@gmx.de +1 -0
+ Add AH_TEMPLATE that supersedes acconfig.h.
+
+ README
+ 1.14.1.5 03/01/05 02:28:24 matthias.andree@gmx.de +0 -3
+ Remove information for acconfig.h.
+
+ Makefile.am
+ 1.12.1.17 03/01/05 02:28:24 matthias.andree@gmx.de +1 -2
+ Remove acconfig.h.
+
+ BitKeeper/deleted/.del-acconfig.h~3aed0663
+ 1.23.3.7 03/01/05 02:25:43 matthias.andree@gmx.de +0 -0
+ Delete: acconfig.h
+
+ChangeSet
+ 1.957.1.7 03/01/04 18:36:58 stenn@whimsy.udel.edu +3 -0
+ Cleanup from Dave
+
+ ntpd/ntpsim.c
+ 1.8 03/01/04 18:34:54 stenn@whimsy.udel.edu +11 -4
+
+ ntpd/ntp_loopfilter.c
+ 1.70 03/01/04 18:34:53 stenn@whimsy.udel.edu +22 -12
+
+ libntp/systime.c
+ 1.23 03/01/04 18:34:53 stenn@whimsy.udel.edu +7 -3
+
+ChangeSet
+ 1.683.4.128 03/01/02 23:01:23 stenn@whimsy.udel.edu +1 -0
+ 4.1.1c-rc1
+
+ configure.in
+ 1.219.3.35 03/01/02 23:01:20 stenn@whimsy.udel.edu +1 -1
+ 4.1.1c-rc1
+
+ChangeSet
+ 1.957.1.6 03/01/02 15:42:27 stenn@whimsy.udel.edu +9 -0
+ Cleanup from Dave Mills.
+
+ ntpd/ntpsim.c
+ 1.7 03/01/02 15:42:23 stenn@whimsy.udel.edu +27 -10
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_util.c
+ 1.24 03/01/02 15:42:23 stenn@whimsy.udel.edu +41 -53
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.140 03/01/02 15:42:22 stenn@whimsy.udel.edu +0 -2
+ Cleanup from Dave Mills.
+
+ libntp/systime.c
+ 1.22 03/01/02 15:42:22 stenn@whimsy.udel.edu +49 -39
+ Cleanup from Dave Mills.
+
+ html/release.html
+ 1.26 03/01/02 15:42:22 stenn@whimsy.udel.edu +28 -52
+ Cleanup from Dave Mills.
+
+ html/patches.html
+ 1.14 03/01/02 15:42:22 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/ntpdsim.html
+ 1.2 03/01/02 15:42:22 stenn@whimsy.udel.edu +16 -11
+ Cleanup from Dave Mills.
+
+ html/index.html
+ 1.23 03/01/02 15:42:22 stenn@whimsy.udel.edu +10 -10
+ Cleanup from Dave Mills.
+
+ html/debug.html
+ 1.17 03/01/02 15:42:21 stenn@whimsy.udel.edu +14 -10
+ Cleanup from Dave Mills.
+
+ChangeSet
+ 1.957.1.5 02/12/30 20:56:45 stenn@whimsy.udel.edu +18 -0
+ Simulator and slew cleanup from Dave Mills.
+
+ html/ntpdsim.html
+ 1.1 02/12/30 20:56:40 stenn@whimsy.udel.edu +67 -0
+
+ ntpd/ntpsim.c
+ 1.6 02/12/30 20:56:40 stenn@whimsy.udel.edu +251 -198
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_util.c
+ 1.23 02/12/30 20:56:40 stenn@whimsy.udel.edu +1 -0
+ Cleanup from Dave Mills.
+
+ html/ntpdsim.html
+ 1.0 02/12/30 20:56:40 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/ntpdsim.html
+
+ ntpd/ntp_proto.c
+ 1.139 02/12/30 20:56:39 stenn@whimsy.udel.edu +9 -7
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.69 02/12/30 20:56:39 stenn@whimsy.udel.edu +44 -62
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_config.c
+ 1.81 02/12/30 20:56:39 stenn@whimsy.udel.edu +0 -5
+ Cleanup from Dave Mills.
+
+ ntpd/cmd_args.c
+ 1.17 02/12/30 20:56:39 stenn@whimsy.udel.edu +21 -28
+ Cleanup from Dave Mills.
+
+ libntp/systime.c
+ 1.21 02/12/30 20:56:38 stenn@whimsy.udel.edu +125 -188
+ Cleanup from Dave Mills.
+
+ include/ntpsim.h
+ 1.5 02/12/30 20:56:38 stenn@whimsy.udel.edu +46 -52
+ Cleanup from Dave Mills.
+
+ include/ntpd.h
+ 1.53 02/12/30 20:56:38 stenn@whimsy.udel.edu +1 -3
+ Cleanup from Dave Mills.
+
+ include/ntp_config.h
+ 1.24 02/12/30 20:56:38 stenn@whimsy.udel.edu +2 -3
+ Cleanup from Dave Mills.
+
+ html/ntpq.html
+ 1.19 02/12/30 20:56:38 stenn@whimsy.udel.edu +3 -4
+ Cleanup from Dave Mills.
+
+ html/ntpdc.html
+ 1.16 02/12/30 20:56:38 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills.
+
+ html/ntpdate.html
+ 1.15 02/12/30 20:56:38 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/ntpd.html
+ 1.26 02/12/30 20:56:38 stenn@whimsy.udel.edu +3 -4
+ Cleanup from Dave Mills.
+
+ html/miscopt.html
+ 1.24 02/12/30 20:56:37 stenn@whimsy.udel.edu +4 -8
+ Cleanup from Dave Mills.
+
+ html/index.html
+ 1.22 02/12/30 20:56:37 stenn@whimsy.udel.edu +2 -1
+ Cleanup from Dave Mills.
+
+ BitKeeper/deleted/.del-ipv6.html~39bb7fae3b663414
+ 1.2 02/12/30 20:51:24 stenn@whimsy.udel.edu +0 -0
+ Delete: html/ipv6.html
+
+ChangeSet
+ 1.957.1.4 02/12/27 22:52:00 stenn@whimsy.udel.edu +2 -0
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_util.c
+ 1.22 02/12/27 22:51:57 stenn@whimsy.udel.edu +55 -110
+ record_*() cleanup from Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.68 02/12/27 22:51:57 stenn@whimsy.udel.edu +24 -48
+ PLL/FLL parameter/adjustment cleanup from Dave Mills.
+
+ChangeSet
+ 1.957.1.3 02/12/27 09:27:16 jhay@angel.cids.org.za +1 -0
+ Prefer an IPv4 loopback address, if one is available. It is only used
+ for the peer->dstadr of local reference clocks, so only affects the
+ bilboards.
+
+ Get rid of some #ifdefs and make it more clear where the magic value 2
+ come from. Fix one place that was missed previously when the IPv6 stuff
+ was #ifdefed.
+
+ ntpd/ntp_io.c
+ 1.53.1.1 02/12/27 09:27:15 jhay@angel.cids.org.za +15 -18
+ Prefer an IPv4 loopback address, if one is available. It is only used
+ for the peer->dstadr of local reference clocks, so only affects the
+ bilboards.
+
+ Get rid of some #ifdefs and make it more clear where the magic value 2
+ come from. Fix one place that was missed previously when the IPv6 stuff
+ was #ifdefed.
+
+ChangeSet
+ 1.957.1.2 02/12/23 22:42:49 stenn@whimsy.udel.edu +1 -0
+ 4.1.72c
+
+ configure.in
+ 1.284 02/12/23 22:42:46 stenn@whimsy.udel.edu +1 -1
+ 4.1.72c
+
+ChangeSet
+ 1.957.1.1 02/12/23 22:22:12 stenn@whimsy.udel.edu +7 -0
+ Lose the original SNTP manpage.
+
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_refclock.c
+ 1.49 02/12/23 22:22:08 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.138 02/12/23 22:22:07 stenn@whimsy.udel.edu +15 -11
+ Cleanup from Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.67 02/12/23 22:22:07 stenn@whimsy.udel.edu +6 -4
+ Cleanup from Dave Mills.
+
+ libntp/msyslog.c
+ 1.15 02/12/23 22:22:07 stenn@whimsy.udel.edu +4 -0
+ Cleanup from Dave Mills.
+
+ include/ntp.h
+ 1.79 02/12/23 22:22:07 stenn@whimsy.udel.edu +0 -1
+ Cleanup from Dave Mills.
+
+ sntp/Makefile.am
+ 1.3 02/12/23 22:06:21 stenn@whimsy.udel.edu +0 -2
+ Lose the original man page; Dave wrote an HTML page for sntp.
+
+ BitKeeper/deleted/.del-sntp.1~da4d5277190b3155
+ 1.2 02/12/23 21:25:53 stenn@whimsy.udel.edu +0 -0
+ Delete: sntp/sntp.1
+
+ChangeSet
+ 1.958 02/12/22 21:17:51 mayer@tecotoo.myibg.com +1 -0
+ Merge
+
+ ntpd/ntp_io.c
+ 1.54 02/12/22 21:17:26 mayer@tecotoo.myibg.com +0 -5
+ Merge
+
+ChangeSet
+ 1.953.1.1 02/12/22 20:58:26 mayer@tecotoo.myibg.com +2 -0
+ IPV6 fixes and close_socket
+
+ BitKeeper/etc/ignore
+ 1.27 02/12/22 20:58:01 mayer@tecotoo.myibg.com +3 -0
+ Added cmd_args.diff ntp_io.diff ntpd/ntp_io.csave to the ignore list
+
+ ntpd/ntp_io.c
+ 1.51.1.1 02/12/22 20:57:55 mayer@tecotoo.myibg.com +18 -12
+ IPv6 interface fixes and close_socket changed to closesocket
+
+ChangeSet
+ 1.957 02/12/21 20:44:43 jhay@angel.cids.org.za +3 -0
+ Cleanup some warnings that crept in.
+
+ ntpq/ntpq.c
+ 1.31 02/12/21 20:44:42 jhay@angel.cids.org.za +1 -2
+ Align a comment and remove an extra "int ai_fam_templ" that slipped in
+ somewhere during a merge.
+
+ ntpd/ntp_request.c
+ 1.42 02/12/21 20:44:42 jhay@angel.cids.org.za +1 -1
+ srcadr is already a pointer, so don't add a '&' in front of it when using it
+ as an argument for stoa().
+
+ ntpd/ntp_io.c
+ 1.53 02/12/21 20:44:42 jhay@angel.cids.org.za +1 -1
+ Danny Mayer <mayer@gis.net> found another close_socket() that should be a
+ closesocket().
+
+ChangeSet
+ 1.956 02/12/21 17:53:49 jhay@angel.cids.org.za +1 -0
+ Invert the meaning of -L. The default is now to listen on all addresses on all
+ interfaces. When using -L on the commandline, virtual interfaces are ignored.
+
+ ntpd/cmd_args.c
+ 1.16 02/12/21 17:53:48 jhay@angel.cids.org.za +2 -2
+ Invert the meaning of -L. The default is now to listen on all addresses on all
+ interfaces. When using -L on the commandline, virtual interfaces are ignored.
+
+ChangeSet
+ 1.955 02/12/19 13:20:53 stenn@whimsy.udel.edu +1 -0
+ Fixes from John Hay.
+
+ ntpd/ntp_io.c
+ 1.52 02/12/19 13:20:47 stenn@whimsy.udel.edu +5 -5
+ Fixes from John Hay.
+
+ChangeSet
+ 1.954 02/12/14 17:06:36 stenn@pogo.udel.edu +4 -0
+ Merge pogo.udel.edu:/pogo/users/mayer/ntp-dev
+ into pogo.udel.edu:/pogo/users/stenn/ntp-dev
+
+ BitKeeper/etc/logging_ok
+ 1.13 02/12/14 17:06:27 stenn@pogo.udel.edu +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpd/ntp_proto.c
+ 1.137 02/12/14 17:05:59 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.52 02/12/14 17:05:58 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.78 02/12/14 17:05:58 stenn@pogo.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.945.1.32 02/12/14 15:24:21 stenn@whimsy.udel.edu +5 -0
+ Cleanup and new stuff from Dave Mills.
+
+ util/ntp-keygen.c
+ 1.21 02/12/14 15:22:07 stenn@whimsy.udel.edu +137 -122
+ Changes from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.134.1.2 02/12/14 15:22:07 stenn@whimsy.udel.edu +42 -56
+ Dave Mills added peer_unfit().
+
+ ntpd/ntp_crypto.c
+ 1.74 02/12/14 15:22:06 stenn@whimsy.udel.edu +116 -111
+ Added crypto_ident(). From Dave Mills.
+
+ include/ntpd.h
+ 1.48.1.2 02/12/14 15:22:06 stenn@whimsy.udel.edu +1 -0
+ Added crypto_ident(). From Dave Mills.
+
+ include/ntp.h
+ 1.75.1.1 02/12/14 15:22:06 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ChangeSet
+ 1.945.1.31 02/12/14 12:37:57 stenn@whimsy.udel.edu +56 -0
+ Documentation cleanup from Dave Mills.
+
+ html/scripts/style.css
+ 1.1 02/12/14 12:37:47 stenn@whimsy.udel.edu +64 -0
+
+ html/scripts/links9.txt
+ 1.1 02/12/14 12:37:47 stenn@whimsy.udel.edu +7 -0
+
+ html/scripts/style.css
+ 1.0 02/12/14 12:37:47 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/scripts/style.css
+
+ html/scripts/links9.txt
+ 1.0 02/12/14 12:37:47 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/scripts/links9.txt
+
+ html/scripts/links8.txt
+ 1.1 02/12/14 12:37:46 stenn@whimsy.udel.edu +6 -0
+
+ html/scripts/links7.txt
+ 1.1 02/12/14 12:37:46 stenn@whimsy.udel.edu +5 -0
+
+ html/scripts/links11.txt
+ 1.1 02/12/14 12:37:46 stenn@whimsy.udel.edu +5 -0
+
+ html/scripts/links10.txt
+ 1.1 02/12/14 12:37:46 stenn@whimsy.udel.edu +6 -0
+
+ html/scripts/header.txt
+ 1.1 02/12/14 12:37:46 stenn@whimsy.udel.edu +1 -0
+
+ html/scripts/footer.txt
+ 1.1 02/12/14 12:37:46 stenn@whimsy.udel.edu +8 -0
+
+ html/tickadj.html
+ 1.13 02/12/14 12:37:46 stenn@whimsy.udel.edu +1 -0
+ Documentation cleanup from Dave Mills.
+
+ html/scripts/links8.txt
+ 1.0 02/12/14 12:37:46 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/scripts/links8.txt
+
+ html/scripts/links7.txt
+ 1.0 02/12/14 12:37:46 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/scripts/links7.txt
+
+ html/scripts/links11.txt
+ 1.0 02/12/14 12:37:46 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/scripts/links11.txt
+
+ html/scripts/links10.txt
+ 1.0 02/12/14 12:37:46 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/scripts/links10.txt
+
+ html/scripts/header.txt
+ 1.0 02/12/14 12:37:46 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/scripts/header.txt
+
+ html/scripts/footer.txt
+ 1.0 02/12/14 12:37:46 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/scripts/footer.txt
+
+ html/sntp.html
+ 1.2 02/12/14 12:37:45 stenn@whimsy.udel.edu +1 -0
+ Documentation cleanup from Dave Mills.
+
+ html/release.html
+ 1.25 02/12/14 12:37:45 stenn@whimsy.udel.edu +4 -4
+ Documentation cleanup from Dave Mills.
+
+ html/refclock.html
+ 1.26 02/12/14 12:37:45 stenn@whimsy.udel.edu +4 -5
+ Documentation cleanup from Dave Mills.
+
+ html/rdebug.html
+ 1.12 02/12/14 12:37:45 stenn@whimsy.udel.edu +5 -8
+ Documentation cleanup from Dave Mills.
+
+ html/quick.html
+ 1.13 02/12/14 12:37:45 stenn@whimsy.udel.edu +3 -2
+ Documentation cleanup from Dave Mills.
+
+ html/prefer.html
+ 1.12 02/12/14 12:37:45 stenn@whimsy.udel.edu +7 -9
+ Documentation cleanup from Dave Mills.
+
+ html/pps.html
+ 1.16 02/12/14 12:37:45 stenn@whimsy.udel.edu +4 -5
+ Documentation cleanup from Dave Mills.
+
+ html/porting.html
+ 1.11 02/12/14 12:37:45 stenn@whimsy.udel.edu +4 -2
+ Documentation cleanup from Dave Mills.
+
+ html/patches.html
+ 1.13 02/12/14 12:37:44 stenn@whimsy.udel.edu +4 -3
+ Documentation cleanup from Dave Mills.
+
+ html/ntptrace.html
+ 1.12 02/12/14 12:37:44 stenn@whimsy.udel.edu +4 -3
+ Documentation cleanup from Dave Mills.
+
+ html/ntptime.html
+ 1.14 02/12/14 12:37:44 stenn@whimsy.udel.edu +4 -3
+ Documentation cleanup from Dave Mills.
+
+ html/ntpq.html
+ 1.18 02/12/14 12:37:44 stenn@whimsy.udel.edu +4 -3
+ Documentation cleanup from Dave Mills.
+
+ html/ntpdc.html
+ 1.15 02/12/14 12:37:44 stenn@whimsy.udel.edu +4 -3
+ Documentation cleanup from Dave Mills.
+
+ html/ntpdate.html
+ 1.14 02/12/14 12:37:44 stenn@whimsy.udel.edu +4 -3
+ Documentation cleanup from Dave Mills.
+
+ html/ntpd.html
+ 1.25 02/12/14 12:37:44 stenn@whimsy.udel.edu +19 -17
+ Documentation cleanup from Dave Mills.
+
+ html/notes.html
+ 1.15 02/12/14 12:37:43 stenn@whimsy.udel.edu +4 -1
+ Documentation cleanup from Dave Mills.
+
+ html/monopt.html
+ 1.16 02/12/14 12:37:43 stenn@whimsy.udel.edu +4 -5
+ Documentation cleanup from Dave Mills.
+
+ html/miscopt.html
+ 1.23 02/12/14 12:37:43 stenn@whimsy.udel.edu +4 -5
+ Documentation cleanup from Dave Mills.
+
+ html/measure.html
+ 1.10 02/12/14 12:37:43 stenn@whimsy.udel.edu +1 -0
+ Documentation cleanup from Dave Mills.
+
+ html/manyopt.html
+ 1.8 02/12/14 12:37:43 stenn@whimsy.udel.edu +2 -1
+ Documentation cleanup from Dave Mills.
+
+ html/ldisc.html
+ 1.10 02/12/14 12:37:43 stenn@whimsy.udel.edu +2 -5
+ Documentation cleanup from Dave Mills.
+
+ html/kern.html
+ 1.13 02/12/14 12:37:43 stenn@whimsy.udel.edu +5 -6
+ Documentation cleanup from Dave Mills.
+
+ html/index.html
+ 1.21 02/12/14 12:37:42 stenn@whimsy.udel.edu +4 -5
+ Documentation cleanup from Dave Mills.
+
+ html/howto.html
+ 1.14 02/12/14 12:37:42 stenn@whimsy.udel.edu +6 -8
+ Documentation cleanup from Dave Mills.
+
+ html/hints.html
+ 1.12 02/12/14 12:37:42 stenn@whimsy.udel.edu +3 -2
+ Documentation cleanup from Dave Mills.
+
+ html/genkeys.html
+ 1.17 02/12/14 12:37:42 stenn@whimsy.udel.edu +102 -28
+ Documentation cleanup from Dave Mills.
+
+ html/extern.html
+ 1.11 02/12/14 12:37:42 stenn@whimsy.udel.edu +1 -0
+ Documentation cleanup from Dave Mills.
+
+ html/driver7.html
+ 1.17 02/12/14 12:37:42 stenn@whimsy.udel.edu +2 -5
+ Documentation cleanup from Dave Mills.
+
+ html/driver6.html
+ 1.12 02/12/14 12:37:42 stenn@whimsy.udel.edu +3 -5
+ Documentation cleanup from Dave Mills.
+
+ html/driver36.html
+ 1.15 02/12/14 12:37:41 stenn@whimsy.udel.edu +0 -3
+ Documentation cleanup from Dave Mills.
+
+ html/debug.html
+ 1.16 02/12/14 12:37:41 stenn@whimsy.udel.edu +4 -3
+ Documentation cleanup from Dave Mills.
+
+ html/copyright.html
+ 1.25 02/12/14 12:37:41 stenn@whimsy.udel.edu +3 -1
+ Documentation cleanup from Dave Mills.
+
+ html/confopt.html
+ 1.25 02/12/14 12:37:41 stenn@whimsy.udel.edu +3 -2
+ Documentation cleanup from Dave Mills.
+
+ html/config.html
+ 1.15 02/12/14 12:37:41 stenn@whimsy.udel.edu +24 -24
+ Documentation cleanup from Dave Mills.
+
+ html/clockopt.html
+ 1.15 02/12/14 12:37:41 stenn@whimsy.udel.edu +4 -5
+ Documentation cleanup from Dave Mills.
+
+ html/build.html
+ 1.16 02/12/14 12:37:41 stenn@whimsy.udel.edu +4 -5
+ Documentation cleanup from Dave Mills.
+
+ html/authopt.html
+ 1.25 02/12/14 12:37:40 stenn@whimsy.udel.edu +5 -4
+ Documentation cleanup from Dave Mills.
+
+ html/audio.html
+ 1.14 02/12/14 12:37:40 stenn@whimsy.udel.edu +7 -8
+ Documentation cleanup from Dave Mills.
+
+ html/assoc.html
+ 1.18 02/12/14 12:37:40 stenn@whimsy.udel.edu +7 -8
+ Documentation cleanup from Dave Mills.
+
+ html/accopt.html
+ 1.16 02/12/14 12:37:40 stenn@whimsy.udel.edu +4 -5
+ Documentation cleanup from Dave Mills.
+
+ BitKeeper/deleted/.del-qth.html~2c795ab6
+ 1.7 02/12/14 12:14:38 stenn@whimsy.udel.edu +0 -0
+ Delete: html/qth.html
+
+ BitKeeper/deleted/.del-sunrise1.psd~bb69d707b7e88
+ 1.2 02/12/14 12:14:18 stenn@whimsy.udel.edu +0 -0
+ Delete: html/pic/sunrise1.psd
+
+ BitKeeper/deleted/.del-leap.html~c77c42fd
+ 1.5 02/12/14 12:13:12 stenn@whimsy.udel.edu +0 -0
+ Delete: html/leap.html
+
+ BitKeeper/deleted/.del-kernpps.html~3aed0663
+ 1.10 02/12/14 12:12:54 stenn@whimsy.udel.edu +0 -0
+ Delete: html/kernpps.html
+
+ BitKeeper/deleted/.del-gadget.html~3aed0663
+ 1.10 02/12/14 12:12:01 stenn@whimsy.udel.edu +0 -0
+ Delete: html/gadget.html
+
+ BitKeeper/deleted/.del-exec.html~3aed0663
+ 1.11 02/12/14 12:11:38 stenn@whimsy.udel.edu +0 -0
+ Delete: html/exec.html
+
+ BitKeeper/deleted/.del-biblio.html~3aed0663
+ 1.8 02/12/14 12:09:37 stenn@whimsy.udel.edu +0 -0
+ Delete: html/biblio.html
+
+ChangeSet
+ 1.952 02/12/06 21:36:18 mayer@tecotoo.myibg.com +2 -0
+ Fix Typos
+
+ BitKeeper/etc/ignore
+ 1.26 02/12/06 21:35:47 mayer@tecotoo.myibg.com +1 -0
+ Added ntpd/ntp_io.cold to the ignore list
+
+ ntpd/ntp_io.c
+ 1.51 02/12/06 21:35:42 mayer@tecotoo.myibg.com +3 -3
+ Fix typos
+
+ChangeSet
+ 1.945.1.30 02/12/04 21:51:28 stenn@whimsy.udel.edu +2 -0
+ Lose ntp-genkeys.
+
+ util/Makefile.am
+ 1.20 02/12/04 21:51:25 stenn@whimsy.udel.edu +1 -4
+ Lose ntp-genkeys.
+
+ BitKeeper/deleted/.del-ntp-genkeys.c~5de683d0
+ 1.76 02/12/04 21:48:12 stenn@whimsy.udel.edu +0 -0
+ Delete: util/ntp-genkeys.c
+
+ChangeSet
+ 1.951 02/12/03 01:08:26 mayer@tecotoo.myibg.com +1 -0
+ Remove win32 debugging code
+
+ ntpd/ntp_io.c
+ 1.50 02/12/03 01:08:04 mayer@tecotoo.myibg.com +1 -2
+ Remove win32 debugging code
+
+ChangeSet
+ 1.950 02/12/03 00:28:00 mayer@tecotoo.myibg.com +8 -0
+ Merge
+
+ ntpd/refclock_palisade.c
+ 1.13 02/12/03 00:27:38 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpd/ntp_request.c
+ 1.41 02/12/03 00:27:37 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpd/ntp_proto.c
+ 1.136 02/12/03 00:27:36 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpd/ntp_control.c
+ 1.59 02/12/03 00:27:35 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpd/ntp_config.c
+ 1.80 02/12/03 00:27:34 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ include/ntp_config.h
+ 1.23 02/12/03 00:27:32 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.12 02/12/03 00:23:14 mayer@tecotoo.myibg.com +0 -0
+ auto-union
+
+ BitKeeper/etc/logging_ok
+ 1.12 02/12/03 00:23:10 mayer@tecotoo.myibg.com +0 -0
+ auto-union
+
+ChangeSet
+ 1.949 02/12/03 00:20:22 mayer@tecotoo.myibg.com +1 -0
+ Fixes to ntp_io.c for missing semicolons.
+
+ ntpd/ntp_io.c
+ 1.49 02/12/03 00:19:58 mayer@tecotoo.myibg.com +3 -3
+ Fix missing semicolons. Change -1 to INVALID_SOCKET.
+
+ChangeSet
+ 1.945.1.29 02/11/29 18:54:14 stenn@whimsy.udel.edu +1 -0
+ CLK_TYPE() fix for the Praecis CDMA patch from Mark Santcroos.
+
+ ntpd/refclock_palisade.c
+ 1.11.1.3 02/11/29 18:54:10 stenn@whimsy.udel.edu +1 -2
+ CLK_TYPE() fix for the Praecis CDMA patch from Mark Santcroos.
+
+ChangeSet
+ 1.945.1.28 02/11/27 23:47:53 stenn@whimsy.udel.edu +1 -0
+ howland is working again.
+
+ br-flock
+ 1.4 02/11/27 23:47:50 stenn@whimsy.udel.edu +1 -2
+ howland is working again.
+
+ChangeSet
+ 1.945.1.27 02/11/27 23:41:56 stenn@whimsy.udel.edu +2 -0
+ ntp-dev Praecis updates. Needs a fix for CLK_TYPE().
+
+ ntpd/refclock_palisade.c
+ 1.11.1.2 02/11/27 23:41:53 stenn@whimsy.udel.edu +2 -1
+ CLK_TYPE() had a bug - disable it for now.
+
+ html/driver29.html
+ 1.9 02/11/27 23:41:52 stenn@whimsy.udel.edu +5 -0
+ Doc updates for Praecis CDMA in the Trimble Palisade driver.
+
+ChangeSet
+ 1.945.1.26 02/11/27 23:27:40 stenn@whimsy.udel.edu +2 -0
+ Praecis merge.
+
+ html/driver29.html
+ 1.8 02/11/27 23:27:38 stenn@whimsy.udel.edu +0 -13
+ Don't use ntp-stable's doc patch.
+
+ ntpd/refclock_palisade.c
+ 1.11.1.1 02/11/27 23:21:13 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver29.html
+ 1.2.1.3 02/11/27 23:21:13 stenn@whimsy.udel.edu +0 -0
+ Merge rename: html/driver29.htm -> html/driver29.html
+
+ChangeSet
+ 1.683.4.127 02/11/27 23:09:43 stenn@whimsy.udel.edu +3 -0
+ Praecis CDMA mods for the Trimble Palisade driver.
+ From: Mark Santcroos <marks@ripe.net>
+
+ ntpd/refclock_palisade.h
+ 1.7 02/11/27 23:09:39 stenn@whimsy.udel.edu +1 -0
+ Praecis CDMA mods for the Trimble Palisade driver.
+ From: Mark Santcroos <marks@ripe.net>
+
+ ntpd/refclock_palisade.c
+ 1.9.2.1 02/11/27 23:09:39 stenn@whimsy.udel.edu +63 -0
+ Praecis CDMA mods for the Trimble Palisade driver.
+ From: Mark Santcroos <marks@ripe.net>
+
+ html/driver29.htm
+ 1.2.1.2 02/11/27 23:09:39 stenn@whimsy.udel.edu +13 -0
+ Praecis CDMA mods for the Trimble Palisade driver.
+ From: Mark Santcroos <marks@ripe.net>
+
+ChangeSet
+ 1.945.1.25 02/11/27 00:10:51 stenn@whimsy.udel.edu +2 -0
+ Clean up from recent merges from ntp-stable.
+
+ ntpd/ntp_request.c
+ 1.38.1.2 02/11/27 00:10:46 stenn@whimsy.udel.edu +1 -1
+ ntp-dev's srcadr's can be IPv6.
+
+ configure.in
+ 1.283 02/11/27 00:10:46 stenn@whimsy.udel.edu +1 -0
+ Missed scripts/ntptrace in that merge...
+
+ChangeSet
+ 1.945.1.24 02/11/26 23:51:00 stenn@whimsy.udel.edu +1 -0
+ I hope I didn't mess this up... resolve the comflicting lines between
+ configure.in in ntp-stable and ntp-dev regarding the scripts/ stuff.
+
+ configure.in
+ 1.282 02/11/26 23:50:57 stenn@whimsy.udel.edu +14 -1
+ I hope I didn't mess this up... resolve the comflicting lines between
+ configure.in in ntp-stable and ntp-dev regarding the scripts/ stuff.
+
+ChangeSet
+ 1.683.4.126 02/11/26 23:32:44 stenn@whimsy.udel.edu +1 -0
+ Try a better way to get the stuff in scripts/ to be executable.
+
+ configure.in
+ 1.219.3.34 02/11/26 23:32:40 stenn@whimsy.udel.edu +9 -11
+ Try a better way to get the stuff in scripts/ to be executable.
+
+ChangeSet
+ 1.945.1.23 02/11/26 23:06:09 stenn@whimsy.udel.edu +5 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_request.c
+ 1.38.1.1 02/11/26 23:06:07 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.281 02/11/26 23:06:06 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ NEWS
+ 1.40 02/11/26 23:06:05 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.10.1.3 02/11/26 23:06:04 stenn@whimsy.udel.edu +1 -0
+ 'Auto converge'
+
+ BitKeeper/etc/logging_ok
+ 1.10.1.2 02/11/26 23:06:04 stenn@whimsy.udel.edu +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.8.1.4 02/11/26 23:06:04 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.10.1.1 02/11/26 23:06:03 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.8.1.3 02/11/26 23:05:57 stenn@whimsy.udel.edu +1 -1
+ auto-union
+
+ChangeSet
+ 1.683.4.125 02/11/26 23:00:30 stenn@whimsy.udel.edu +1 -0
+ Added the note about the unicos port.
+
+ NEWS
+ 1.31.1.9 02/11/26 23:00:28 stenn@whimsy.udel.edu +1 -0
+ Added the note about the unicos port.
+
+ChangeSet
+ 1.683.9.4 02/11/26 22:43:12 stenn@whimsy.udel.edu +1 -0
+ Log the IP of bad mode 7 packets.
+ From: Scott Hazen Mueller <scott@zorch.sf-bay.org>
+
+ ntpd/ntp_request.c
+ 1.23.3.1 02/11/26 22:43:09 stenn@whimsy.udel.edu +1 -1
+ Log the IP of bad mode 7 packets.
+ From: Scott Hazen Mueller <scott@zorch.sf-bay.org>
+
+ChangeSet
+ 1.945.1.22 02/11/25 23:01:11 stenn@whimsy.udel.edu +12 -0
+ MV crypto updates from Dave Mills.
+
+ html/pic/radio2.jpg
+ 1.1 02/11/25 23:01:06 stenn@whimsy.udel.edu +379 -0
+
+ util/ntp-keygen.c
+ 1.20 02/11/25 23:01:06 stenn@whimsy.udel.edu +518 -364
+ MV crypto updates from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.134.1.1 02/11/25 23:01:06 stenn@whimsy.udel.edu +19 -9
+ MV crypto updates from Dave Mills.
+
+ ntpd/ntp_crypto.c
+ 1.73 02/11/25 23:01:06 stenn@whimsy.udel.edu +474 -113
+ MV crypto updates from Dave Mills.
+
+ html/pic/radio2.jpg
+ 1.0 02/11/25 23:01:06 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/pic/radio2.jpg
+
+ ntpd/ntp_control.c
+ 1.55.1.2 02/11/25 23:01:05 stenn@whimsy.udel.edu +8 -0
+ MV crypto updates from Dave Mills.
+
+ ntpd/ntp_config.c
+ 1.77.1.1 02/11/25 23:01:05 stenn@whimsy.udel.edu +6 -6
+ MV crypto updates from Dave Mills.
+
+ include/ntp_crypto.h
+ 1.31 02/11/25 23:01:05 stenn@whimsy.udel.edu +5 -3
+ MV crypto updates from Dave Mills.
+
+ include/ntp_control.h
+ 1.22 02/11/25 23:01:05 stenn@whimsy.udel.edu +2 -1
+ MV crypto updates from Dave Mills.
+
+ include/ntp_config.h
+ 1.21.1.1 02/11/25 23:01:05 stenn@whimsy.udel.edu +2 -2
+ MV crypto updates from Dave Mills.
+
+ html/genkeys.html
+ 1.16 02/11/25 23:01:04 stenn@whimsy.udel.edu +16 -10
+ Updates from Dave Mills.
+
+ html/authopt.html
+ 1.24 02/11/25 23:01:04 stenn@whimsy.udel.edu +19 -20
+ A new MV identity scheme has been added to Autokey. This one allows
+ operators to sell broadcast authentication keys that can be activated
+ and deactivated by the broadcaster without changing client keys.
+
+ From: Dave Mills.
+
+ html/audio.html
+ 1.13 02/11/25 23:01:04 stenn@whimsy.udel.edu +1 -1
+ Updates froem Dave Mills.
+
+ChangeSet
+ 1.948 02/11/24 23:31:33 mayer@tecotoo.myibg.com +13 -0
+ Merge
+
+ ntpq/ntpq_ops.c
+ 1.16 02/11/24 23:31:13 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpq/ntpq.c
+ 1.30 02/11/24 23:31:13 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpdc/ntpdc.c
+ 1.22 02/11/24 23:31:12 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpdate/ntpdate.c
+ 1.40 02/11/24 23:31:11 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpd/ntpd.c
+ 1.43 02/11/24 23:31:10 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpd/ntp_util.c
+ 1.21 02/11/24 23:31:10 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpd/ntp_peer.c
+ 1.53 02/11/24 23:31:09 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpd/ntp_io.c
+ 1.48 02/11/24 23:31:08 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpd/ntp_control.c
+ 1.58 02/11/24 23:31:07 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ntpd/cmd_args.c
+ 1.15 02/11/24 23:31:06 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ libntp/ntp_rfc2553.c
+ 1.11 02/11/24 23:31:06 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ libntp/a_md5encrypt.c
+ 1.11 02/11/24 23:31:05 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ include/ntpd.h
+ 1.51 02/11/24 23:31:05 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ChangeSet
+ 1.947 02/11/24 23:20:38 mayer@tecotoo.myibg.com +45 -0
+ Add support for SOCKET type to support Win32. Fix casting issues. Update
+ Macros. Fix if statements to not also assign. Miscellaneous fixes.
+
+ BitKeeper/etc/ignore
+ 1.25 02/11/24 23:19:38 mayer@tecotoo.myibg.com +3 -0
+ Added builderrors.txt ports/winnt/libntp/messages.aps ports/winnt/ntpd/stderr to the ignore list
+
+ ports/winnt/libntp/syslog.c
+ 1.1 02/11/24 23:19:34 mayer@tecotoo.myibg.com +193 -0
+
+ ports/winnt/libntp/syslog.c
+ 1.0 02/11/24 23:19:34 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/libntp/syslog.c
+
+ ports/winnt/libntp/strerror.c
+ 1.1 02/11/24 23:19:33 mayer@tecotoo.myibg.com +440 -0
+
+ ports/winnt/libntp/strerror.c
+ 1.0 02/11/24 23:19:33 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/libntp/strerror.c
+
+ ports/winnt/libntp/interfaceiter.c
+ 1.1 02/11/24 23:19:31 mayer@tecotoo.myibg.com +380 -0
+
+ ports/winnt/libntp/interfaceiter.c
+ 1.0 02/11/24 23:19:31 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/ports/winnt/libntp/interfaceiter.c
+
+ include/interfaceiter.h
+ 1.1 02/11/24 23:19:29 mayer@tecotoo.myibg.com +134 -0
+
+ include/interfaceiter.h
+ 1.0 02/11/24 23:19:29 mayer@tecotoo.myibg.com +0 -0
+ BitKeeper file H:/ntpbk/ntp-dev/include/interfaceiter.h
+
+ ports/winnt/ntpq/ntpq.dsp
+ 1.9 02/11/24 23:19:27 mayer@tecotoo.myibg.com +2 -2
+ Update build file.
+
+ ports/winnt/ntpdc/ntpdc.dsp
+ 1.9 02/11/24 23:19:26 mayer@tecotoo.myibg.com +2 -2
+ Update build file.
+
+ ports/winnt/ntpd/ntpd.dsp
+ 1.12 02/11/24 23:19:24 mayer@tecotoo.myibg.com +9 -0
+ Update build file.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c
+ 1.8 02/11/24 23:19:23 mayer@tecotoo.myibg.com +1 -1
+ Fix for sockaddr_storage structure.
+
+ ports/winnt/libntp/libntp.dsp
+ 1.9 02/11/24 23:19:21 mayer@tecotoo.myibg.com +17 -1
+ Updates for different includes and links.
+
+ ports/winnt/include/syslog.h
+ 1.4 02/11/24 23:19:19 mayer@tecotoo.myibg.com +81 -17
+ Replace old Win32 syslog.h with one from Win32 BIND 9.
+
+ ports/winnt/include/ntp_iocompletionport.h
+ 1.6 02/11/24 23:19:18 mayer@tecotoo.myibg.com +1 -1
+ Fix function call for sockaddr_storage
+
+ ports/winnt/include/config.h
+ 1.16 02/11/24 23:19:16 mayer@tecotoo.myibg.com +1 -0
+ Add HAVE_SOCKADDR_IN6 macro.
+
+ ntpq/ntpq_ops.c
+ 1.14.1.1 02/11/24 23:19:15 mayer@tecotoo.myibg.com +2 -2
+ Fix casting issues.
+
+ ntpq/ntpq.c
+ 1.29 02/11/24 23:19:13 mayer@tecotoo.myibg.com +29 -37
+ Use SOCKET for Win32 support. Code cleanup. Fix casting issues.
+
+ ntpdc/ntpdc_ops.c
+ 1.22 02/11/24 23:19:10 mayer@tecotoo.myibg.com +9 -2
+ Fix casting issues. Properly initialize cres structure.
+
+ ntpdc/ntpdc.c
+ 1.21 02/11/24 23:19:09 mayer@tecotoo.myibg.com +6 -5
+ showhostnames was already declared extern so cannot also declare static..
+ Use SOCKET to support Win32. Fix casting issues.
+
+ ntpdate/ntpdate.c
+ 1.39 02/11/24 23:19:07 mayer@tecotoo.myibg.com +7 -4
+ Use SOCKET to support Win32. Fix casting issues.
+
+ ntpd/refclock_nmea.c
+ 1.20 02/11/24 23:19:04 mayer@tecotoo.myibg.com +5 -4
+ Fix assignment issues within if statement. Fix casting issues.
+
+ ntpd/refclock_hopfser.c
+ 1.7 02/11/24 23:19:01 mayer@tecotoo.myibg.com +1 -1
+ Fix casting issues.
+
+ ntpd/refclock_hopfpci.c
+ 1.7 02/11/24 23:18:58 mayer@tecotoo.myibg.com +2 -2
+ Use SOCKET to support Win32. Fix casting issues.
+
+ ntpd/refclock_dumbclock.c
+ 1.8 02/11/24 23:18:55 mayer@tecotoo.myibg.com +6 -5
+ Fix to not make assignments with if statements. Fix casting issues.
+
+ ntpd/ntpd.c
+ 1.42 02/11/24 23:18:51 mayer@tecotoo.myibg.com +16 -4
+ Remove unused moredebug/lessdebug functions for Win32. Remove assignments
+ from if statements. Use SOCKET for Win32 support.
+
+ ntpd/ntp_request.c
+ 1.40 02/11/24 23:18:47 mayer@tecotoo.myibg.com +2 -2
+ Fix casting issues.
+
+ ntpd/ntp_refclock.c
+ 1.48 02/11/24 23:18:44 mayer@tecotoo.myibg.com +12 -8
+ Don't do assignments within if statements. Fix casting issues
+
+ ntpd/ntp_proto.c
+ 1.135 02/11/24 23:18:40 mayer@tecotoo.myibg.com +10 -10
+ Fix casting issues. leap_consensus order wrong. peer needed to be assigned
+ before orring with peer->leap.
+
+ ntpd/ntp_peer.c
+ 1.52 02/11/24 23:18:36 mayer@tecotoo.myibg.com +5 -5
+ Fix casting issues
+
+ ntpd/ntp_io.c
+ 1.47 02/11/24 23:18:33 mayer@tecotoo.myibg.com +152 -40
+ Fix to use SOCKET for Win32 support. Fix casting issues. Fixes to properly implement
+ IPv6 and to support platforms that don't have IPv6 stacks. Make sure the close_socket
+ function gets used. General code cleanup to reduce Macro mess. Fix setsockopt
+ problem with setting IP_MULTICAST_TTL on Win32.
+
+ ntpd/ntp_intres.c
+ 1.27 02/11/24 23:18:29 mayer@tecotoo.myibg.com +0 -4
+ Use SOCKET for Win32 support.
+
+ ntpd/ntp_filegen.c
+ 1.7 02/11/24 23:18:26 mayer@tecotoo.myibg.com +3 -3
+ Fix casting issues
+
+ ntpd/ntp_control.c
+ 1.57 02/11/24 23:18:23 mayer@tecotoo.myibg.com +3 -2
+ Fix casting issues and don't assign within if statement.
+
+ ntpd/ntp_config.c
+ 1.79 02/11/24 23:18:19 mayer@tecotoo.myibg.com +12 -12
+ Fixes to not define or compile unused function catchchild. Fix casting issues.
+ Don't use if statement at same time as an assignment for the Win32 specific
+ CreateThread calls.
+
+ ntpd/cmd_args.c
+ 1.13.1.1 02/11/24 23:18:15 mayer@tecotoo.myibg.com +7 -2
+ Add support for directing log output to stderr or stdout so that all output can go to
+ the same place. Fix of casting issue.
+
+ libntp/systime.c
+ 1.20 02/11/24 23:18:12 mayer@tecotoo.myibg.com +1 -1
+ Function call needed a NULL instead of a structure cast of 0.
+
+ libntp/socktohost.c
+ 1.4 02/11/24 23:18:09 mayer@tecotoo.myibg.com +1 -1
+ Replace NULL with 0. Argument was supposed to be an unsigned int.
+
+ libntp/ntp_rfc2553.c
+ 1.9.1.1 02/11/24 23:18:06 mayer@tecotoo.myibg.com +2 -3
+ Fixes to support Win32. Remove old-style gai_strerror call definition.
+
+ libntp/msyslog.c
+ 1.14 02/11/24 23:18:03 mayer@tecotoo.myibg.com +14 -46
+ Replace Win32 specific code with calls to Win32 syslog and strerror developed for BIND 9.
+ path separator defined to be different on Unix and Win32.
+
+ include/recvbuff.h
+ 1.7 02/11/24 23:18:00 mayer@tecotoo.myibg.com +0 -4
+ Use SOCKET instead of int for Win32 support
+
+ include/ntpd.h
+ 1.50 02/11/24 23:17:58 mayer@tecotoo.myibg.com +3 -6
+ SOCKET defined instead of int to support Win32
+
+ include/ntp_rfc2553.h
+ 1.7 02/11/24 23:17:56 mayer@tecotoo.myibg.com +11 -0
+ Add Win32 support for IPv6
+
+ include/ntp_request.h
+ 1.19 02/11/24 23:17:54 mayer@tecotoo.myibg.com +1 -1
+ Fix casting issue
+
+ include/ntp_refclock.h
+ 1.15 02/11/24 23:17:51 mayer@tecotoo.myibg.com +0 -4
+ Replace int with SOCKET
+
+ include/ntp_machine.h
+ 1.15 02/11/24 23:17:49 mayer@tecotoo.myibg.com +15 -1
+ Add SOCKET type to support Win32
+ Fixes for some Win32 defines
+
+ include/ntp_config.h
+ 1.22 02/11/24 23:17:47 mayer@tecotoo.myibg.com +1 -0
+ Add directory location for Win32 for NTP_KEYSDIR
+
+ include/ntp.h
+ 1.77 02/11/24 23:17:44 mayer@tecotoo.myibg.com +4 -6
+ Add SOCKET type to support Win32
+
+ChangeSet
+ 1.945.1.21 02/11/22 23:13:59 stenn@whimsy.udel.edu +1 -0
+ Reorder some lines to be compatible with autoconf-2.56.
+
+ configure.in
+ 1.280 02/11/22 23:13:01 stenn@whimsy.udel.edu +27 -8
+ Reorder some lines to be compatible with autoconf-2.56.
+
+ChangeSet
+ 1.945.1.20 02/11/21 05:15:31 stenn@whimsy.udel.edu +1 -0
+ ntp-dev uses stoa(), not ntoa().
+
+ ntpd/ntp_peer.c
+ 1.50.1.1 02/11/21 05:15:29 stenn@whimsy.udel.edu +2 -3
+ ntp-dev uses stoa(), not ntoa().
+
+ChangeSet
+ 1.683.9.3 02/11/21 05:02:34 stenn@whimsy.udel.edu +1 -0
+ Fix a NULL pointer dereference in ntp_peer.c::newpeer()
+ From: Poul-Henning Kamp <phk@freebsd.org>
+
+ ntpd/ntp_peer.c
+ 1.29.3.1 02/11/21 05:02:30 stenn@whimsy.udel.edu +2 -1
+ Fix a NULL pointer dereference in ntp_peer.c::newpeer()
+ From: Poul-Henning Kamp <phk@freebsd.org>
+
+ChangeSet
+ 1.945.1.19 02/11/16 17:31:55 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_control.c
+ 1.55.1.1 02/11/16 17:31:52 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.9.2 02/11/16 17:28:53 stenn@whimsy.udel.edu +1 -0
+ PEER_EVENT bugfix.
+ From: Luis Batanero <luisba@roa.es>
+
+ ntpd/ntp_control.c
+ 1.37.3.7 02/11/16 17:28:50 stenn@whimsy.udel.edu +2 -1
+ PEER_EVENT bugfix.
+ From: Luis Batanero <luisba@roa.es>
+
+ChangeSet
+ 1.945.1.18 02/11/16 01:12:46 stenn@whimsy.udel.edu +2 -0
+ Cleanup from Dave.
+
+ ntpd/refclock_irig.c
+ 1.18 02/11/16 01:12:43 stenn@whimsy.udel.edu +5 -3
+ fudgetime2 is a frequency vernier for broken codec sample frequency.
+ Fix MAXFREQ.
+
+ From Dave Mills.
+
+ html/ntpd.html
+ 1.24 02/11/16 01:12:43 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ChangeSet
+ 1.945.1.17 02/11/14 18:20:48 jhay@angel.cids.org.za +3 -0
+ First try getaddrinfo() with the AI_NUMERICHOST hint and try again as
+ before if it fails. This works around the "problem" on Solaris that
+ return the "IPv4-mapped IPv6 address" if you give it an IPv4 address.
+
+ ntpq/ntpq.c
+ 1.27.1.3 02/11/14 18:20:47 jhay@angel.cids.org.za +20 -9
+ First try getaddrinfo() with the AI_NUMERICHOST hint and try again as
+ before if it fails. This works around the "problem" on Solaris that
+ return the "IPv4-mapped IPv6 address" if you give it an IPv4 address.
+
+ ntpdc/ntpdc.c
+ 1.19.1.2 02/11/14 18:20:47 jhay@angel.cids.org.za +21 -10
+ First try getaddrinfo() with the AI_NUMERICHOST hint and try again as
+ before if it fails. This works around the "problem" on Solaris that
+ return the "IPv4-mapped IPv6 address" if you give it an IPv4 address.
+
+ libntp/ntp_rfc2553.c
+ 1.10 02/11/14 18:20:47 jhay@angel.cids.org.za +66 -36
+ Teach our getaddrinfo() about the AI_NUMERICHOST hint.
+ Reshufle the code a bit to handle the different cases better.
+ Fix some memory leaks in error cases.
+
+ChangeSet
+ 1.945.1.16 02/11/12 19:01:24 jhay@angel.cids.org.za +2 -0
+ Don't exit on a failed lookup. Send the error message to stderr and
+ not stdout.
+
+ ntpq/ntpq.c
+ 1.27.1.2 02/11/12 19:01:23 jhay@angel.cids.org.za +2 -2
+ Don't exit on a failed lookup. Send the error message to stderr and
+ not stdout.
+
+ ntpdc/ntpdc.c
+ 1.19.1.1 02/11/12 19:01:23 jhay@angel.cids.org.za +2 -2
+ Don't exit on a failed lookup. Send the error message to stderr and
+ not stdout.
+
+ChangeSet
+ 1.945.1.15 02/11/06 01:04:08 stenn@whimsy.udel.edu +1 -0
+ Don't install the snmp man page - we have Dave's html page now.
+
+ sntp/Makefile.am
+ 1.2 02/11/06 01:04:02 stenn@whimsy.udel.edu +2 -2
+ Don't install the snmp man page - we have Dave's html page now.
+
+ChangeSet
+ 1.945.1.14 02/11/05 18:35:51 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev-clockctl
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ html/config.html
+ 1.14 02/11/05 18:35:49 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.945.2.1 02/11/05 18:24:15 stenn@whimsy.udel.edu +9 -0
+ clockctl changes from Emmanuel Dreyfus <manu@netbsd.org>.
+
+ html/hints/netbsd
+ 1.1 02/11/05 18:23:50 stenn@whimsy.udel.edu +37 -0
+
+ ntpd/ntpd.c
+ 1.38.1.3 02/11/05 18:23:50 stenn@whimsy.udel.edu +75 -0
+ clockctl changes from Emmanuel Dreyfus <manu@netbsd.org>.
+
+ ntpd/cmd_args.c
+ 1.14 02/11/05 18:23:50 stenn@whimsy.udel.edu +29 -0
+ clockctl changes from Emmanuel Dreyfus <manu@netbsd.org>.
+
+ html/hints/netbsd
+ 1.0 02/11/05 18:23:50 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev-clockctl/html/hints/netbsd
+
+ libntp/md5c.c
+ 1.4 02/11/05 18:23:49 stenn@whimsy.udel.edu +3 -3
+ clockctl changes from Emmanuel Dreyfus <manu@netbsd.org>.
+
+ libntp/a_md5encrypt.c
+ 1.8.1.4 02/11/05 18:23:49 stenn@whimsy.udel.edu +3 -3
+ clockctl changes from Emmanuel Dreyfus <manu@netbsd.org>.
+
+ include/ntpd.h
+ 1.48.1.1 02/11/05 18:23:49 stenn@whimsy.udel.edu +5 -0
+ clockctl changes from Emmanuel Dreyfus <manu@netbsd.org>.
+
+ include/md5.h
+ 1.3 02/11/05 18:23:49 stenn@whimsy.udel.edu +4 -4
+ clockctl changes from Emmanuel Dreyfus <manu@netbsd.org>.
+
+ html/config.html
+ 1.12.1.1 02/11/05 18:23:49 stenn@whimsy.udel.edu +2 -1
+ clockctl changes from Emmanuel Dreyfus <manu@netbsd.org>.
+
+ configure.in
+ 1.279 02/11/05 18:23:49 stenn@whimsy.udel.edu +20 -0
+ clockctl changes from Emmanuel Dreyfus <manu@netbsd.org>.
+
+ChangeSet
+ 1.945.1.13 02/11/05 17:21:27 stenn@whimsy.udel.edu +44 -0
+ Documentation cleanup from Dave Mills.
+
+ html/sntp.html
+ 1.1 02/11/05 17:21:14 stenn@whimsy.udel.edu +52 -0
+
+ html/tickadj.html
+ 1.12 02/11/05 17:21:14 stenn@whimsy.udel.edu +1 -2
+ Documentation cleanup from Dave Mills.
+
+ html/sntp.html
+ 1.0 02/11/05 17:21:14 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/sntp.html
+
+ html/release.html
+ 1.24 02/11/05 17:21:13 stenn@whimsy.udel.edu +2 -2
+ Documentation cleanup from Dave Mills.
+
+ html/refclock.html
+ 1.25 02/11/05 17:21:13 stenn@whimsy.udel.edu +2 -2
+ Documentation cleanup from Dave Mills.
+
+ html/rdebug.html
+ 1.11 02/11/05 17:21:13 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/quick.html
+ 1.12 02/11/05 17:21:13 stenn@whimsy.udel.edu +2 -2
+ Documentation cleanup from Dave Mills.
+
+ html/prefer.html
+ 1.11 02/11/05 17:21:13 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/pps.html
+ 1.15 02/11/05 17:21:13 stenn@whimsy.udel.edu +14 -6
+ Documentation cleanup from Dave Mills.
+
+ html/porting.html
+ 1.10 02/11/05 17:21:12 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/patches.html
+ 1.12 02/11/05 17:21:12 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/ntptrace.html
+ 1.11 02/11/05 17:21:12 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/ntptime.html
+ 1.13 02/11/05 17:21:12 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/ntpq.html
+ 1.17 02/11/05 17:21:12 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/ntpdc.html
+ 1.14 02/11/05 17:21:12 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/ntpdate.html
+ 1.13 02/11/05 17:21:12 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/ntpd.html
+ 1.23 02/11/05 17:21:11 stenn@whimsy.udel.edu +2 -2
+ Documentation cleanup from Dave Mills.
+
+ html/notes.html
+ 1.14 02/11/05 17:21:11 stenn@whimsy.udel.edu +3 -4
+ Documentation cleanup from Dave Mills.
+
+ html/monopt.html
+ 1.15 02/11/05 17:21:11 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/miscopt.html
+ 1.22 02/11/05 17:21:11 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/manyopt.html
+ 1.7 02/11/05 17:21:11 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/ldisc.html
+ 1.9 02/11/05 17:21:11 stenn@whimsy.udel.edu +4 -25
+ Documentation cleanup from Dave Mills.
+
+ html/kern.html
+ 1.12 02/11/05 17:21:10 stenn@whimsy.udel.edu +8 -12
+ Documentation cleanup from Dave Mills.
+
+ html/index.html
+ 1.20 02/11/05 17:21:10 stenn@whimsy.udel.edu +50 -54
+ Documentation cleanup from Dave Mills.
+
+ html/howto.html
+ 1.13 02/11/05 17:21:10 stenn@whimsy.udel.edu +2 -2
+ Documentation cleanup from Dave Mills.
+
+ html/hints/winnt.html
+ 1.11 02/11/05 17:21:10 stenn@whimsy.udel.edu +192 -332
+ Documentation cleanup from Dave Mills.
+
+ html/hints/sco.html
+ 1.5 02/11/05 17:21:10 stenn@whimsy.udel.edu +2 -0
+ Documentation cleanup from Dave Mills.
+
+ html/hints.html
+ 1.11 02/11/05 17:21:10 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/genkeys.html
+ 1.15 02/11/05 17:21:10 stenn@whimsy.udel.edu +29 -24
+ Documentation cleanup from Dave Mills.
+
+ html/driver9.html
+ 1.10 02/11/05 17:21:09 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/driver8.html
+ 1.9 02/11/05 17:21:09 stenn@whimsy.udel.edu +15 -15
+ Documentation cleanup from Dave Mills.
+
+ html/driver7.html
+ 1.16 02/11/05 17:21:09 stenn@whimsy.udel.edu +4 -4
+ Documentation cleanup from Dave Mills.
+
+ html/driver40.html
+ 1.7 02/11/05 17:21:09 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/driver37.html
+ 1.8 02/11/05 17:21:09 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/driver36.html
+ 1.14 02/11/05 17:21:09 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/driver27.html
+ 1.8 02/11/05 17:21:09 stenn@whimsy.udel.edu +2 -2
+ Documentation cleanup from Dave Mills.
+
+ html/driver23.html
+ 1.9 02/11/05 17:21:08 stenn@whimsy.udel.edu +3 -3
+ Documentation cleanup from Dave Mills.
+
+ html/debug.html
+ 1.15 02/11/05 17:21:08 stenn@whimsy.udel.edu +2 -2
+ Documentation cleanup from Dave Mills.
+
+ html/confopt.html
+ 1.24 02/11/05 17:21:08 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/config.html
+ 1.13 02/11/05 17:21:08 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/clockopt.html
+ 1.14 02/11/05 17:21:08 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/build.html
+ 1.15 02/11/05 17:21:08 stenn@whimsy.udel.edu +2 -2
+ Documentation cleanup from Dave Mills.
+
+ html/authopt.html
+ 1.23 02/11/05 17:21:07 stenn@whimsy.udel.edu +29 -22
+ Documentation cleanup from Dave Mills.
+
+ html/assoc.html
+ 1.17 02/11/05 17:21:07 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ html/accopt.html
+ 1.15 02/11/05 17:21:07 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup from Dave Mills.
+
+ChangeSet
+ 1.945.1.12 02/11/05 16:55:16 stenn@whimsy.udel.edu +1 -0
+ NONBLOCK_BROKEN is for sunos, not solaris. From John Hay.
+
+ sntp/configure.ac
+ 1.5 02/11/05 16:55:10 stenn@whimsy.udel.edu +1 -1
+ NONBLOCK_BROKEN is for sunos, not solaris. From John Hay.
+
+ChangeSet
+ 1.945.1.11 02/11/05 12:22:05 jhay@angel.cids.org.za +2 -0
+ Do not dns lookup the refid. It is not meaningful anymore.
+
+ ntpq/ntpq_ops.c
+ 1.15 02/11/05 12:22:04 jhay@angel.cids.org.za +5 -1
+ Do not dns lookup the refid. It is not meaningful anymore.
+
+ ntpq/ntpq.c
+ 1.27.1.1 02/11/05 12:22:04 jhay@angel.cids.org.za +8 -3
+ Do not dns lookup the refid. It is not meaningful anymore.
+
+ChangeSet
+ 1.945.1.10 02/11/05 12:07:46 jhay@angel.cids.org.za +1 -0
+ Only use known parts of sockaddr_storage for sock_hash().
+ Do a whitespace cleanup of sock_hash() while I'm here.
+
+ ntpd/ntp_util.c
+ 1.19.1.1 02/11/05 12:07:44 jhay@angel.cids.org.za +38 -13
+ Only use known parts of sockaddr_storage for sock_hash().
+ Do a whitespace cleanup of sock_hash() while I'm here.
+
+ChangeSet
+ 1.945.1.9 02/11/04 19:35:10 jhay@angel.cids.org.za +1 -0
+ Check the error code if socket fails. Don't die if it is one of EPROTONOSUPPORT,
+ EAFNOSUPPORT or EPFNOSUPPORT. This makes it work on Linux without IPv6 in the
+ kernel.
+
+ ntpdate/ntpdate.c
+ 1.37.1.1 02/11/04 19:35:09 jhay@angel.cids.org.za +3 -0
+ Check the error code if socket fails. Don't die if it is one of EPROTONOSUPPORT,
+ EAFNOSUPPORT or EPFNOSUPPORT. This makes it work on Linux without IPv6 in the
+ kernel.
+
+ChangeSet
+ 1.945.1.8 02/11/03 14:56:11 stenn@whimsy.udel.edu +1 -0
+ mu goes from double to long. From Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.66 02/11/03 14:56:08 stenn@whimsy.udel.edu +11 -6
+ mu goes from double to long. From Dave Mills.
+
+ChangeSet
+ 1.945.1.7 02/11/01 04:45:36 stenn@whimsy.udel.edu +1 -0
+ ONCORE Bugfix from Reg Clemens, from a report by John Hay.
+
+ ntpd/refclock_oncore.c
+ 1.44 02/11/01 04:45:34 stenn@whimsy.udel.edu +4 -7
+ Bugfix from Reg Clemens, from a report by John Hay.
+
+ChangeSet
+ 1.945.1.6 02/10/31 03:07:35 stenn@whimsy.udel.edu +1 -0
+ ONCORE improvements from Reg Clemens.
+
+ ntpd/refclock_oncore.c
+ 1.43 02/10/31 03:07:32 stenn@whimsy.udel.edu +116 -35
+ Reg Clemens says...
+ the changes here are:
+ (a) reformat some message calls (messages stay the same).
+ (b) add code to allow SETTING mask angle (angle in sky below
+ which satellites will be ignored).
+ (c) add code to print more information about possible antenna
+ problems.
+
+ChangeSet
+ 1.945.1.5 02/10/31 01:58:34 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ html/pic/driver43_2.jpg
+ 1.3 02/10/31 01:58:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/pic/driver43_1.gif
+ 1.3 02/10/31 01:58:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.9.1 02/10/31 01:56:09 stenn@whimsy.udel.edu +2 -0
+ Some of the picture files were in the wrong web subdir.
+ Reported by John Hay.
+
+ html/pic/driver43_2.jpg
+ 1.1.1.1 02/10/31 01:51:53 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver43_2.jpg -> html/pic/driver43_2.jpg
+
+ html/pic/driver43_1.gif
+ 1.1.1.1 02/10/31 01:51:52 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver43_1.gif -> html/pic/driver43_1.gif
+
+ChangeSet
+ 1.683.4.122 02/10/29 14:23:52 ginsbach@clunk.us.cray.com +3 -0
+ Changes to support Cray's new operating system UNICOS/mp. Configure fixes
+ for IRIX.
+
+ BitKeeper/etc/logging_ok
+ 1.1.1.5 02/10/29 14:23:49 ginsbach@clunk.us.cray.com +1 -0
+ Logging to logging@openlogging.org accepted
+
+ util/timetrim.c
+ 1.4 02/10/29 14:08:15 ginsbach@clunk.us.cray.com +20 -1
+ Add UNICOS/mp support
+
+ configure.in
+ 1.219.3.33 02/10/29 14:07:11 ginsbach@clunk.us.cray.com +42 -4
+ Fix for IRIX64 (LP64 IRIX)
+ Fix IRIX defaults that don't apply to IRIX 6.5
+ Add UNICOS/mp support
+
+ChangeSet
+ 1.945.1.4 02/10/29 08:01:39 jhay@angel.cids.org.za +1 -0
+ Fix a debug printf to also show usefull data in the IPv6 case.
+
+ ntpd/ntp_io.c
+ 1.45.1.1 02/10/29 08:01:38 jhay@angel.cids.org.za +1 -1
+ Fix a debug printf to also show usefull data in the IPv6 case.
+
+ChangeSet
+ 1.945.1.3 02/10/29 07:50:42 jhay@angel.cids.org.za +1 -0
+ Add #define OPENSSL_NO_MD5 to make openssl-0.9.7-beta3 compile.
+
+ libntp/a_md5encrypt.c
+ 1.8.1.3 02/10/29 07:50:40 jhay@angel.cids.org.za +1 -0
+ Add #define OPENSSL_NO_MD5 to make openssl-0.9.7-beta3 compile.
+
+ChangeSet
+ 1.945.1.2 02/10/28 23:52:45 stenn@whimsy.udel.edu +1 -0
+ Enable the IRIG sawtooth code for Solaris-2.8 and 2.9 for now.
+
+ configure.in
+ 1.278 02/10/28 23:52:42 stenn@whimsy.udel.edu +17 -0
+ Enable the IRIG sawtooth code for Solaris-2.8 and 2.9 for now.
+
+ChangeSet
+ 1.945.1.1 02/10/28 22:18:19 stenn@whimsy.udel.edu +2 -0
+ Sawtooth and ntp-keygen changes from Dave Mills.
+
+ util/ntp-keygen.c
+ 1.19 02/10/28 22:18:15 stenn@whimsy.udel.edu +53 -29
+ Broadcast crypto changes/cleanup. Dave says the stuff needs serious
+ work before it can be used, but we don't use it yet and his current
+ code should still be useful once the spec is useful.
+
+ ntpd/refclock_irig.c
+ 1.17 02/10/28 22:18:15 stenn@whimsy.udel.edu +15 -20
+ Sawtooth filter cleanup for Solaris 5.8 and beyond, from Dave Mills.
+
+ChangeSet
+ 1.946 02/10/26 15:09:20 mayer@tecotoo.myibg.com +26 -0
+ Merge Conflicts
+
+ ports/winnt/include/config.h
+ 1.15 02/10/26 15:08:45 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ ntpq/ntpq.c
+ 1.28 02/10/26 15:08:43 mayer@tecotoo.myibg.com +0 -1
+ Merge Conflicts
+
+ ntpdc/ntpdc.c
+ 1.20 02/10/26 15:08:41 mayer@tecotoo.myibg.com +0 -5
+ Merge Conflicts
+
+ ntpdate/ntpdate.c
+ 1.38 02/10/26 15:08:40 mayer@tecotoo.myibg.com +0 -7
+ Merge Conflicts
+
+ ntpd/refclock_hopfser.c
+ 1.6 02/10/26 15:08:38 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ ntpd/ntpd.c
+ 1.41 02/10/26 15:08:36 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ ntpd/ntp_util.c
+ 1.20 02/10/26 15:08:34 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ ntpd/ntp_request.c
+ 1.39 02/10/26 15:08:33 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ ntpd/ntp_refclock.c
+ 1.47 02/10/26 15:08:31 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ ntpd/ntp_peer.c
+ 1.51 02/10/26 15:08:29 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ ntpd/ntp_io.c
+ 1.46 02/10/26 15:08:27 mayer@tecotoo.myibg.com +0 -74
+ Merge Conflicts
+
+ ntpd/ntp_intres.c
+ 1.26 02/10/26 15:08:25 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ ntpd/ntp_control.c
+ 1.56 02/10/26 15:08:23 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ ntpd/ntp_config.c
+ 1.78 02/10/26 15:08:21 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ libntp/msyslog.c
+ 1.13 02/10/26 15:08:19 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ libntp/a_md5encrypt.c
+ 1.10 02/10/26 15:08:16 mayer@tecotoo.myibg.com +2 -0
+ Merge Conflicts
+
+ include/recvbuff.h
+ 1.6 02/10/26 15:08:15 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ include/ntpd.h
+ 1.49 02/10/26 15:08:14 mayer@tecotoo.myibg.com +0 -1
+ Merge Conflicts
+
+ include/ntp_stdlib.h
+ 1.18 02/10/26 15:08:12 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ include/ntp_refclock.h
+ 1.14 02/10/26 15:08:11 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ include/ntp_machine.h
+ 1.14 02/10/26 15:08:09 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ include/ntp_fp.h
+ 1.7 02/10/26 15:08:08 mayer@tecotoo.myibg.com +0 -0
+ Merge Conflicts
+
+ include/ntp.h
+ 1.76 02/10/26 15:08:06 mayer@tecotoo.myibg.com +0 -3
+ Merge Conflicts
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.11 02/10/26 14:37:32 mayer@tecotoo.myibg.com +0 -0
+ auto-union
+
+ BitKeeper/etc/logging_ok
+ 1.11 02/10/26 14:37:30 mayer@tecotoo.myibg.com +1 -1
+ auto-union
+
+ BitKeeper/etc/ignore
+ 1.24 02/10/26 14:37:27 mayer@tecotoo.myibg.com +11 -11
+ auto-union
+
+ChangeSet
+ 1.945 02/10/25 22:06:11 stenn@whimsy.udel.edu +3 -0
+ version number merge cleanup
+
+ configure.in
+ 1.277 02/10/25 22:06:08 stenn@whimsy.udel.edu +0 -1
+ ntp-dev uses ntp-dev version numbers...
+
+ NEWS
+ 1.39 02/10/25 22:03:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.34 02/10/25 22:03:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.121 02/10/25 21:58:47 stenn@whimsy.udel.edu +3 -0
+ Nits for 4.1.1b
+
+ configure.in
+ 1.219.3.32 02/10/25 21:58:43 stenn@whimsy.udel.edu +1 -1
+ 4.1.1b
+
+ NEWS
+ 1.31.1.8 02/10/25 21:58:43 stenn@whimsy.udel.edu +1 -0
+ Updated.
+
+ Makefile.am
+ 1.12.1.16 02/10/25 21:58:43 stenn@whimsy.udel.edu +1 -1
+ Make sure the .ds? files are writable before we convert them from
+ Unix to DOS EOLs.
+
+ChangeSet
+ 1.944 02/10/25 20:16:47 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_loopfilter.c
+ 1.65 02/10/25 20:16:45 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.120 02/10/25 20:12:59 stenn@whimsy.udel.edu +1 -0
+ Clock state machine bugfix from Dave Mills.
+
+ ntpd/ntp_loopfilter.c
+ 1.53.1.5 02/10/25 20:12:56 stenn@whimsy.udel.edu +1 -1
+ Guys,
+
+ I stumbled over a bug in the clock state machine that has been there
+ for the longest time. The bug is exposed in certain cases when first
+ starting up with a very poor initial frequency in ntp.drift together
+ with a moderate time offset greater than 128 ms. The state machine
+ oscillates between S_FREQ and S_TSET without ever setting the offset
+ to zero and allowing an accurate frequency determination.
+
+ This bug probably explains a number of reports on the newsgroup about
+ failure to converge with very broken clock oscillators. I tested the
+ most broken configuration I can, initial ntp.drift 500 PPM and minpoll
+ at 1024 s. It all works like a pinball machine, but it does take a
+ couple of hours for the bumps and grinds to settle down. However,
+ without the state machine the discipline could take a week to converge
+ at 9 cents a call every 15 minutes.
+
+ChangeSet
+ 1.943 02/10/24 00:37:50 stenn@whimsy.udel.edu +1 -0
+ Fixes for Solaris le interface from John Hay.
+
+ ntpd/ntp_io.c
+ 1.45 02/10/24 00:37:47 stenn@whimsy.udel.edu +4 -1
+ Fixes for Solaris le interface from John Hay.
+
+ChangeSet
+ 1.942 02/10/23 23:30:41 stenn@whimsy.udel.edu +3 -0
+ Changes from Dave Mills. Sawtooth filter for audio IRIG, mainly.
+
+ ntpd/refclock_irig.c
+ 1.16 02/10/23 23:30:38 stenn@whimsy.udel.edu +72 -8
+ Sawtooth filter for audio IRIG.
+ Work around a problem in recent Sun kernels.
+
+ ntpd/ntp_request.c
+ 1.38 02/10/23 23:30:38 stenn@whimsy.udel.edu +1 -1
+ Typo fix.
+
+ ntpd/ntp_proto.c
+ 1.134 02/10/23 23:30:38 stenn@whimsy.udel.edu +1 -1
+ a < b/2 ==> 2*a < b
+
+ChangeSet
+ 1.941 02/10/22 01:08:49 stenn@whimsy.udel.edu +1 -0
+ BACKWARD INCOMPATIBLE CHANGE!
+
+ Make the code agree with the docs.
+
+ To have ntpd run at high priority, use '-N'.
+
+ It used to require '-N high'.
+
+ ntpd/cmd_args.c
+ 1.13 02/10/22 01:08:46 stenn@whimsy.udel.edu +2 -2
+ BACKWARD INCOMPATIBLE CHANGE!
+
+ Make the code agree with the docs.
+
+ To have ntpd run at high priority, use '-N'.
+
+ It used to require '-N high'.
+
+ChangeSet
+ 1.706.2.79 02/10/21 22:51:03 mayer@tecotoo.myibg.com +19 -0
+ Changes required to support Windows Sockets and include files
+
+ ports/winnt/ntpq/ntpq.dsp
+ 1.8 02/10/21 22:05:41 mayer@tecotoo.myibg.com +2 -2
+ Required project changes
+
+ ports/winnt/ntpdc/ntpdc.dsp
+ 1.8 02/10/21 22:05:39 mayer@tecotoo.myibg.com +2 -2
+ Required porject changes
+
+ ports/winnt/ntpd/win32_io.c
+ 1.6 02/10/21 22:05:38 mayer@tecotoo.myibg.com +2 -2
+ functions require a return value
+
+ ports/winnt/ntpd/hopf_PCI_io.c
+ 1.4 02/10/21 22:05:36 mayer@tecotoo.myibg.com +1 -0
+ Windows specific inclusion
+
+ ports/winnt/libntp/libntp.dsp
+ 1.8 02/10/21 22:05:34 mayer@tecotoo.myibg.com +0 -8
+ Project file changes
+
+ ports/winnt/include/sys/time.h
+ 1.4 02/10/21 22:05:33 mayer@tecotoo.myibg.com +2 -0
+ Windows specific include
+
+ ports/winnt/include/config.h
+ 1.14 02/10/21 22:05:29 mayer@tecotoo.myibg.com +7 -4
+ NT specific code to prevent inclusion of winsock.h
+
+ ntpq/ntpq.c
+ 1.19.1.3 02/10/21 22:05:06 mayer@tecotoo.myibg.com +4 -0
+ Change int to SOCKET
+
+ ntpdc/ntpdc.c
+ 1.11.1.3 02/10/21 22:05:04 mayer@tecotoo.myibg.com +4 -0
+ Change int to SOCKET
+
+ ntpdate/ntpdate.c
+ 1.23.1.6 02/10/21 22:05:02 mayer@tecotoo.myibg.com +5 -0
+ Change int to SOCKET
+
+ ntpd/ntpd.c
+ 1.40 02/10/21 22:04:59 mayer@tecotoo.myibg.com +1 -1
+ Change int to SOCKET
+
+ ntpd/ntp_io.c
+ 1.21.1.6 02/10/21 22:04:56 mayer@tecotoo.myibg.com +18 -16
+ Change int to SOCKET
+
+ ntpd/ntp_intres.c
+ 1.17.1.4 02/10/21 22:04:53 mayer@tecotoo.myibg.com +4 -1
+ Change int to SOCKET
+
+ include/recvbuff.h
+ 1.1.2.1 02/10/21 22:04:50 mayer@tecotoo.myibg.com +5 -1
+ Change int to SOCKET
+
+ include/ntpd.h
+ 1.31.1.7 02/10/21 22:04:49 mayer@tecotoo.myibg.com +3 -1
+ Change int to SOCKET for NT
+ Add INVALID_SOCKET macro
+
+ include/ntp_refclock.h
+ 1.9.1.4 02/10/21 22:04:47 mayer@tecotoo.myibg.com +4 -0
+ Change int to SOCKET for NT
+
+ include/ntp_machine.h
+ 1.13 02/10/21 22:04:45 mayer@tecotoo.myibg.com +1 -1
+ Remove unnecessary comment
+
+ include/ntp.h
+ 1.50.3.1 02/10/21 22:04:43 mayer@tecotoo.myibg.com +5 -0
+ Change int to SOCKET
+
+ BitKeeper/etc/ignore
+ 1.14.2.1 02/10/21 22:04:39 mayer@tecotoo.myibg.com +11 -0
+ Added NT specific files to ignore
+
+ChangeSet
+ 1.940 02/10/20 00:19:35 stenn@whimsy.udel.edu +1 -0
+ Another giant whack of changes from Dave Mills.
+
+ util/ntp-keygen.c
+ 1.18 02/10/20 00:19:32 stenn@whimsy.udel.edu +108 -263
+ Another giant whack of changes from Dave Mills.
+
+ChangeSet
+ 1.939 02/10/19 23:14:36 stenn@whimsy.udel.edu +1 -0
+ Correctness assertion fix in the clock selection algorithm.
+
+ ntpd/ntp_proto.c
+ 1.133 02/10/19 23:14:31 stenn@whimsy.udel.edu +53 -19
+ Fix, as I understand it, a 14-year-old bug in the clock selection
+ algorithm code in the correctness assertions. Dave Mills sez:
+
+ The only thing folks might notice is that, as originally intended,
+ if a clique containing more than half of the candidates does not
+ exist, the Byzantines lose the war and formally correct
+ synchronization is not possible. This only happens if the correctness
+ intervals do not overlap and no clique claims a majority. In
+ principle, it would be possible to mitigate using other information,
+ such as distance, but that would seriously complicate the routine.
+
+ChangeSet
+ 1.938 02/10/19 21:51:37 stenn@whimsy.udel.edu +5 -0
+ IPv6 patches from John Hay.
+
+ sntp/socket.c
+ 1.2 02/10/19 21:51:33 stenn@whimsy.udel.edu +152 -11
+ IPv6 patches from John Hay.
+
+ sntp/main.c
+ 1.2 02/10/19 21:51:33 stenn@whimsy.udel.edu +9 -3
+ IPv6 patches from John Hay.
+
+ sntp/internet.h
+ 1.2 02/10/19 21:51:33 stenn@whimsy.udel.edu +9 -1
+ IPv6 patches from John Hay.
+
+ sntp/internet.c
+ 1.2 02/10/19 21:51:33 stenn@whimsy.udel.edu +97 -0
+ IPv6 patches from John Hay.
+
+ sntp/header.h
+ 1.2 02/10/19 21:51:33 stenn@whimsy.udel.edu +3 -0
+ IPv6 patches from John Hay.
+
+ChangeSet
+ 1.937 02/10/19 21:44:04 stenn@whimsy.udel.edu +1 -0
+ Provide recommended -D stuff for linux and solaris.
+
+ sntp/configure.ac
+ 1.4 02/10/19 21:43:59 stenn@whimsy.udel.edu +10 -0
+ Provide recommended -D stuff for linux and solaris.
+
+ChangeSet
+ 1.936 02/10/16 03:27:04 stenn@whimsy.udel.edu +1 -0
+ Build sntp on the flock.
+
+ flock-build
+ 1.25 02/10/16 03:27:00 stenn@whimsy.udel.edu +5 -4
+ Build sntp on the flock.
+
+ChangeSet
+ 1.935 02/10/13 21:47:47 stenn@whimsy.udel.edu +9 -0
+ More crypto stuff from Dave Mills.
+
+ Add some doc files that got lost in the recent upgrade.
+
+ html/pic/sunrise1.psd
+ 1.1 02/10/13 21:47:43 stenn@whimsy.udel.edu +8917 -0
+
+ html/pic/sunrise1.jpg
+ 1.1 02/10/13 21:47:43 stenn@whimsy.udel.edu +522 -0
+
+ html/pic/sunrise1.psd
+ 1.0 02/10/13 21:47:43 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/pic/sunrise1.psd
+
+ html/pic/sunrise1.jpg
+ 1.0 02/10/13 21:47:43 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/pic/sunrise1.jpg
+
+ html/pic/butterfly.gif
+ 1.1 02/10/13 21:47:42 stenn@whimsy.udel.edu +46 -0
+
+ html/pic/alautun4b.gif
+ 1.1 02/10/13 21:47:42 stenn@whimsy.udel.edu +14 -0
+
+ html/ipv6.html
+ 1.1 02/10/13 21:47:42 stenn@whimsy.udel.edu +9 -0
+
+ util/ntp-keygen.c
+ 1.17 02/10/13 21:47:42 stenn@whimsy.udel.edu +225 -157
+ More crypto stuff from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.132 02/10/13 21:47:42 stenn@whimsy.udel.edu +3 -4
+ More crypto stuff from Dave Mills.
+
+ html/pic/butterfly.gif
+ 1.0 02/10/13 21:47:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/pic/butterfly.gif
+
+ html/pic/alautun4b.gif
+ 1.0 02/10/13 21:47:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/pic/alautun4b.gif
+
+ html/ipv6.html
+ 1.0 02/10/13 21:47:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/ipv6.html
+
+ ntpd/ntp_crypto.c
+ 1.72 02/10/13 21:47:41 stenn@whimsy.udel.edu +76 -27
+ More crypto stuff from Dave Mills.
+
+ include/ntp.h
+ 1.75 02/10/13 21:47:41 stenn@whimsy.udel.edu +2 -1
+ More crypto stuff from Dave Mills.
+
+ChangeSet
+ 1.934 02/10/13 21:34:13 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ Makefile.am
+ 1.33 02/10/13 21:34:10 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.119 02/10/13 21:30:22 stenn@whimsy.udel.edu +1 -0
+ Make sure the winnt .ds[wp] files in the tarball have DOS EOLs.
+
+ Makefile.am
+ 1.12.1.15 02/10/13 21:30:19 stenn@whimsy.udel.edu +2 -0
+ Make sure the winnt .ds[wp] files in the tarball have DOS EOLs.
+
+ChangeSet
+ 1.933 02/10/12 00:16:04 stenn@whimsy.udel.edu +1 -0
+ Fix a typo that caused us to miss building util/ .
+
+ Makefile.am
+ 1.32 02/10/12 00:15:58 stenn@whimsy.udel.edu +1 -1
+ Typo.
+
+ChangeSet
+ 1.932 02/10/11 03:27:35 stenn@whimsy.udel.edu +1 -0
+ Portability fixes.
+
+ sntp/unix.c
+ 1.2 02/10/11 03:27:32 stenn@whimsy.udel.edu +12 -4
+ Improve portability to ancient machines.
+
+ Begin to make function definitions match the format required
+ by ansi2knr.
+
+ChangeSet
+ 1.683.4.118 02/10/10 02:49:18 stenn@whimsy.udel.edu +1 -0
+ Stop a buffer overflow.
+ From: Kris Kennaway <kris@obsecurity.org>
+
+ libntp/msyslog.c
+ 1.11.1.1 02/10/10 02:49:15 stenn@whimsy.udel.edu +1 -1
+ Stop a buffer overflow.
+ From: Kris Kennaway <kris@obsecurity.org>
+
+ChangeSet
+ 1.930 02/10/08 22:33:32 stenn@whimsy.udel.edu +1 -0
+ If we say --with-sntp then compile it.
+
+ Makefile.am
+ 1.31 02/10/08 22:33:29 stenn@whimsy.udel.edu +1 -0
+ If we say --with-sntp then compile it.
+
+ChangeSet
+ 1.929 02/10/08 20:27:10 stenn@whimsy.udel.edu +1 -0
+ sntp autoconf improvements.
+
+ sntp/configure.ac
+ 1.3 02/10/08 20:27:06 stenn@whimsy.udel.edu +6 -1
+ Feature test for libraries for sqrt and the network routines.
+
+ChangeSet
+ 1.928 02/10/08 02:58:53 stenn@whimsy.udel.edu +3 -0
+ COPYRIGHT rule fixes, sntp configure cleanup.
+
+ sntp/configure.ac
+ 1.2 02/10/08 02:58:50 stenn@whimsy.udel.edu +2 -2
+ Be backward-compatible with AC_INIT and AM_INIT_AUTOMAKE.
+
+ configure.in
+ 1.276 02/10/08 02:58:49 stenn@whimsy.udel.edu +23 -1
+ ElectricFence was not using AC_HELP_STRING().
+
+ Added --with-sntp flag (defaults to "no" for now).
+
+ If we want SNTP, run configure there.
+
+ Makefile.am
+ 1.30 02/10/08 02:58:49 stenn@whimsy.udel.edu +2 -2
+ The COPYRIGHT file rules needed htm -> html changes.
+
+ChangeSet
+ 1.927 02/10/08 01:16:57 stenn@whimsy.udel.edu +83 -0
+ Reconcile with Dave's new html stuff.
+
+ html/release.html
+ 1.23 02/10/08 01:16:51 stenn@whimsy.udel.edu +11 -11
+ Cleanup from Dave Mills.
+
+ html/refclock.html
+ 1.24 02/10/08 01:16:51 stenn@whimsy.udel.edu +81 -66
+ Cleanup from Dave Mills.
+
+ html/rdebug.html
+ 1.10 02/10/08 01:16:51 stenn@whimsy.udel.edu +9 -3
+ Cleanup from Dave Mills.
+
+ html/quick.html
+ 1.11 02/10/08 01:16:51 stenn@whimsy.udel.edu +5 -5
+ Cleanup from Dave Mills.
+
+ html/prefer.html
+ 1.10 02/10/08 01:16:50 stenn@whimsy.udel.edu +36 -33
+ Cleanup from Dave Mills.
+
+ html/pps.html
+ 1.14 02/10/08 01:16:50 stenn@whimsy.udel.edu +11 -6
+ Cleanup from Dave Mills.
+
+ html/porting.html
+ 1.9 02/10/08 01:16:50 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/patches.html
+ 1.11 02/10/08 01:16:50 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/parsenew.html
+ 1.7 02/10/08 01:16:50 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/parsedata.html
+ 1.10 02/10/08 01:16:50 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/ntptrace.html
+ 1.10 02/10/08 01:16:50 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/ntptime.html
+ 1.12 02/10/08 01:16:50 stenn@whimsy.udel.edu +3 -3
+ Cleanup from Dave Mills.
+
+ html/ntpq.html
+ 1.16 02/10/08 01:16:50 stenn@whimsy.udel.edu +8 -8
+ Cleanup from Dave Mills.
+
+ html/ntpdc.html
+ 1.13 02/10/08 01:16:49 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/ntpdate.html
+ 1.12 02/10/08 01:16:49 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/ntpd.html
+ 1.22 02/10/08 01:16:49 stenn@whimsy.udel.edu +41 -24
+ Cleanup from Dave Mills.
+
+ html/notes.html
+ 1.13 02/10/08 01:16:49 stenn@whimsy.udel.edu +14 -14
+ Cleanup from Dave Mills.
+
+ html/monopt.html
+ 1.14 02/10/08 01:16:49 stenn@whimsy.udel.edu +7 -12
+ Cleanup from Dave Mills.
+
+ html/miscopt.html
+ 1.21 02/10/08 01:16:48 stenn@whimsy.udel.edu +9 -5
+ Cleanup from Dave Mills.
+
+ html/measure.html
+ 1.9 02/10/08 01:16:48 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/manyopt.html
+ 1.6 02/10/08 01:16:48 stenn@whimsy.udel.edu +14 -7
+ Cleanup from Dave Mills.
+
+ html/ldisc.html
+ 1.8 02/10/08 01:16:48 stenn@whimsy.udel.edu +7 -2
+ Cleanup from Dave Mills.
+
+ html/kernpps.html
+ 1.9 02/10/08 01:16:48 stenn@whimsy.udel.edu +9 -4
+ Cleanup from Dave Mills.
+
+ html/kern.html
+ 1.11 02/10/08 01:16:48 stenn@whimsy.udel.edu +14 -12
+ Cleanup from Dave Mills.
+
+ html/index.html
+ 1.19 02/10/08 01:16:48 stenn@whimsy.udel.edu +69 -51
+ Cleanup from Dave Mills.
+
+ html/howto.html
+ 1.12 02/10/08 01:16:48 stenn@whimsy.udel.edu +22 -12
+ Cleanup from Dave Mills.
+
+ html/hints/vxworks.html
+ 1.5 02/10/08 01:16:47 stenn@whimsy.udel.edu +79 -151
+ Cleanup from Dave Mills.
+
+ html/hints/solaris.html
+ 1.6 02/10/08 01:16:47 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/hints.html
+ 1.10 02/10/08 01:16:47 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/genkeys.html
+ 1.14 02/10/08 01:16:47 stenn@whimsy.udel.edu +36 -19
+ Cleanup from Dave Mills.
+
+ html/gadget.html
+ 1.9 02/10/08 01:16:47 stenn@whimsy.udel.edu +17 -9
+ Cleanup from Dave Mills.
+
+ html/extern.html
+ 1.10 02/10/08 01:16:47 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/driver9.html
+ 1.9 02/10/08 01:16:47 stenn@whimsy.udel.edu +55 -127
+ Cleanup from Dave Mills.
+
+ html/driver8.html
+ 1.8 02/10/08 01:16:46 stenn@whimsy.udel.edu +9 -7
+ Cleanup from Dave Mills.
+
+ html/driver7.html
+ 1.15 02/10/08 01:16:46 stenn@whimsy.udel.edu +6 -4
+ Cleanup from Dave Mills.
+
+ html/driver6.html
+ 1.11 02/10/08 01:16:46 stenn@whimsy.udel.edu +9 -7
+ Cleanup from Dave Mills.
+
+ html/driver5.html
+ 1.8 02/10/08 01:16:46 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/driver44.html
+ 1.6 02/10/08 01:16:46 stenn@whimsy.udel.edu +89 -124
+ Cleanup from Dave Mills.
+
+ html/driver43.html
+ 1.5 02/10/08 01:16:46 stenn@whimsy.udel.edu +7 -4
+ Cleanup from Dave Mills.
+
+ html/driver42.html
+ 1.8 02/10/08 01:16:46 stenn@whimsy.udel.edu +26 -29
+ Cleanup from Dave Mills.
+
+ html/driver40.html
+ 1.6 02/10/08 01:16:46 stenn@whimsy.udel.edu +3 -7
+ Cleanup from Dave Mills.
+
+ html/driver4.html
+ 1.8 02/10/08 01:16:45 stenn@whimsy.udel.edu +62 -124
+ Cleanup from Dave Mills.
+
+ html/driver39.html
+ 1.8 02/10/08 01:16:45 stenn@whimsy.udel.edu +113 -160
+ Cleanup from Dave Mills.
+
+ html/driver38.html
+ 1.8 02/10/08 01:16:45 stenn@whimsy.udel.edu +135 -189
+ Cleanup from Dave Mills.
+
+ html/driver37.html
+ 1.7 02/10/08 01:16:45 stenn@whimsy.udel.edu +47 -73
+ Cleanup from Dave Mills.
+
+ html/driver36.html
+ 1.13 02/10/08 01:16:45 stenn@whimsy.udel.edu +7 -5
+ Cleanup from Dave Mills.
+
+ html/driver35.html
+ 1.10 02/10/08 01:16:45 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/driver34.html
+ 1.7 02/10/08 01:16:45 stenn@whimsy.udel.edu +44 -53
+ Cleanup from Dave Mills.
+
+ html/driver33.html
+ 1.8 02/10/08 01:16:45 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/driver32.html
+ 1.8 02/10/08 01:16:45 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/driver30.html
+ 1.13 02/10/08 01:16:44 stenn@whimsy.udel.edu +38 -39
+ Cleanup from Dave Mills.
+
+ html/driver3.html
+ 1.7 02/10/08 01:16:44 stenn@whimsy.udel.edu +3 -1
+ Cleanup from Dave Mills.
+
+ html/driver29.html
+ 1.7 02/10/08 01:16:44 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/driver28.html
+ 1.7 02/10/08 01:16:44 stenn@whimsy.udel.edu +3 -1
+ Cleanup from Dave Mills.
+
+ html/driver27.html
+ 1.7 02/10/08 01:16:44 stenn@whimsy.udel.edu +3 -1
+ Cleanup from Dave Mills.
+
+ html/driver26.html
+ 1.6 02/10/08 01:16:44 stenn@whimsy.udel.edu +2 -0
+ Cleanup from Dave Mills.
+
+ html/driver24.html
+ 1.6 02/10/08 01:16:44 stenn@whimsy.udel.edu +2 -0
+ Cleanup from Dave Mills.
+
+ html/driver23.html
+ 1.8 02/10/08 01:16:44 stenn@whimsy.udel.edu +3 -1
+ Cleanup from Dave Mills.
+
+ html/driver22.html
+ 1.11 02/10/08 01:16:43 stenn@whimsy.udel.edu +4 -4
+ Cleanup from Dave Mills.
+
+ html/driver20.html
+ 1.9 02/10/08 01:16:43 stenn@whimsy.udel.edu +2 -3
+ Cleanup from Dave Mills.
+
+ html/driver2.html
+ 1.8 02/10/08 01:16:43 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/driver19.html
+ 1.7 02/10/08 01:16:43 stenn@whimsy.udel.edu +3 -1
+ Cleanup from Dave Mills.
+
+ html/driver18.html
+ 1.8 02/10/08 01:16:43 stenn@whimsy.udel.edu +3 -1
+ Cleanup from Dave Mills.
+
+ html/driver16.html
+ 1.7 02/10/08 01:16:43 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/driver12.html
+ 1.8 02/10/08 01:16:43 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/driver11.html
+ 1.8 02/10/08 01:16:43 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave Mills.
+
+ html/driver10.html
+ 1.8 02/10/08 01:16:43 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/driver1.html
+ 1.9 02/10/08 01:16:43 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave Mills.
+
+ html/debug.html
+ 1.14 02/10/08 01:16:42 stenn@whimsy.udel.edu +14 -14
+ Cleanup from Dave Mills.
+
+ html/copyright.html
+ 1.24 02/10/08 01:16:42 stenn@whimsy.udel.edu +51 -51
+ Cleanup from Dave Mills.
+
+ html/confopt.html
+ 1.23 02/10/08 01:16:42 stenn@whimsy.udel.edu +30 -22
+ Cleanup from Dave Mills.
+
+ html/config.html
+ 1.12 02/10/08 01:16:42 stenn@whimsy.udel.edu +24 -9
+ Cleanup from Dave Mills.
+
+ html/clockopt.html
+ 1.13 02/10/08 01:16:42 stenn@whimsy.udel.edu +21 -14
+ Cleanup from Dave Mills.
+
+ html/build.html
+ 1.14 02/10/08 01:16:42 stenn@whimsy.udel.edu +35 -23
+ Cleanup from Dave Mills.
+
+ html/authopt.html
+ 1.22 02/10/08 01:16:41 stenn@whimsy.udel.edu +40 -25
+ Cleanup from Dave Mills.
+
+ html/audio.html
+ 1.12 02/10/08 01:16:41 stenn@whimsy.udel.edu +13 -10
+ Cleanup from Dave Mills.
+
+ html/assoc.html
+ 1.16 02/10/08 01:16:41 stenn@whimsy.udel.edu +26 -12
+ Cleanup from Dave Mills.
+
+ html/accopt.html
+ 1.14 02/10/08 01:16:41 stenn@whimsy.udel.edu +18 -8
+ Cleanup from Dave Mills.
+
+ BitKeeper/deleted/.del-radio2.jpg~b1ba4335
+ 1.2 02/10/08 01:11:14 stenn@whimsy.udel.edu +0 -0
+ Delete: html/pic/radio2.jpg
+
+ BitKeeper/deleted/.del-home.gif~33271372
+ 1.2 02/10/08 01:11:13 stenn@whimsy.udel.edu +0 -0
+ Delete: html/pic/home.gif
+
+ BitKeeper/deleted/.del-flatheads.gif~33271372
+ 1.2 02/10/08 01:11:13 stenn@whimsy.udel.edu +0 -0
+ Delete: html/pic/flatheads.gif
+
+ BitKeeper/deleted/.del-alice15.gif~33271372
+ 1.2 02/10/08 01:11:13 stenn@whimsy.udel.edu +0 -0
+ Delete: html/pic/alice15.gif
+
+ BitKeeper/deleted/.del-alice12.gif~33271372
+ 1.2 02/10/08 01:11:13 stenn@whimsy.udel.edu +0 -0
+ Delete: html/pic/alice12.gif
+
+ChangeSet
+ 1.926 02/10/08 00:58:20 stenn@whimsy.udel.edu +87 -0
+ Documentation rename, from Dave Mills.
+
+ html/hints/vxworks.html
+ 1.4 02/10/08 00:54:53 stenn@whimsy.udel.edu +0 -0
+ Rename: html/hints/vxworks.htm -> html/hints/vxworks.html
+
+ BitKeeper/deleted/.del-vxworks.html~3e480692
+ 1.4 02/10/08 00:54:44 stenn@whimsy.udel.edu +0 -0
+ Delete: html/hints/vxworks.html
+
+ html/hints/winnt.html
+ 1.10 02/10/08 00:53:57 stenn@whimsy.udel.edu +0 -0
+ Rename: html/hints/winnt.htm -> html/hints/winnt.html
+
+ html/hints/sco.html
+ 1.4 02/10/08 00:53:57 stenn@whimsy.udel.edu +0 -0
+ Rename: html/hints/sco.htm -> html/hints/sco.html
+
+ html/tickadj.html
+ 1.11 02/10/08 00:53:39 stenn@whimsy.udel.edu +0 -0
+ Rename: html/tickadj.htm -> html/tickadj.html
+
+ html/release.html
+ 1.22 02/10/08 00:53:39 stenn@whimsy.udel.edu +0 -0
+ Rename: html/release.htm -> html/release.html
+
+ html/refclock.html
+ 1.23 02/10/08 00:53:39 stenn@whimsy.udel.edu +0 -0
+ Rename: html/refclock.htm -> html/refclock.html
+
+ html/rdebug.html
+ 1.9 02/10/08 00:53:39 stenn@whimsy.udel.edu +0 -0
+ Rename: html/rdebug.htm -> html/rdebug.html
+
+ html/quick.html
+ 1.10 02/10/08 00:53:38 stenn@whimsy.udel.edu +0 -0
+ Rename: html/quick.htm -> html/quick.html
+
+ html/qth.html
+ 1.6 02/10/08 00:53:38 stenn@whimsy.udel.edu +0 -0
+ Rename: html/qth.htm -> html/qth.html
+
+ html/prefer.html
+ 1.9 02/10/08 00:53:38 stenn@whimsy.udel.edu +0 -0
+ Rename: html/prefer.htm -> html/prefer.html
+
+ html/pps.html
+ 1.13 02/10/08 00:53:38 stenn@whimsy.udel.edu +0 -0
+ Rename: html/pps.htm -> html/pps.html
+
+ html/porting.html
+ 1.8 02/10/08 00:53:37 stenn@whimsy.udel.edu +0 -0
+ Rename: html/porting.htm -> html/porting.html
+
+ html/patches.html
+ 1.10 02/10/08 00:53:37 stenn@whimsy.udel.edu +0 -0
+ Rename: html/patches.htm -> html/patches.html
+
+ html/parsenew.html
+ 1.6 02/10/08 00:53:37 stenn@whimsy.udel.edu +0 -0
+ Rename: html/parsenew.htm -> html/parsenew.html
+
+ html/parsedata.html
+ 1.9 02/10/08 00:53:37 stenn@whimsy.udel.edu +0 -0
+ Rename: html/parsedata.htm -> html/parsedata.html
+
+ html/oncore-shmem.html
+ 1.8 02/10/08 00:53:37 stenn@whimsy.udel.edu +0 -0
+ Rename: html/oncore-shmem.htm -> html/oncore-shmem.html
+
+ html/ntptrace.html
+ 1.9 02/10/08 00:53:36 stenn@whimsy.udel.edu +0 -0
+ Rename: html/ntptrace.htm -> html/ntptrace.html
+
+ html/ntptime.html
+ 1.11 02/10/08 00:53:36 stenn@whimsy.udel.edu +0 -0
+ Rename: html/ntptime.htm -> html/ntptime.html
+
+ html/ntpq.html
+ 1.15 02/10/08 00:53:36 stenn@whimsy.udel.edu +0 -0
+ Rename: html/ntpq.htm -> html/ntpq.html
+
+ html/ntpdc.html
+ 1.12 02/10/08 00:53:36 stenn@whimsy.udel.edu +0 -0
+ Rename: html/ntpdc.htm -> html/ntpdc.html
+
+ html/ntpdate.html
+ 1.11 02/10/08 00:53:35 stenn@whimsy.udel.edu +0 -0
+ Rename: html/ntpdate.htm -> html/ntpdate.html
+
+ html/ntpd.html
+ 1.21 02/10/08 00:53:35 stenn@whimsy.udel.edu +0 -0
+ Rename: html/ntpd.htm -> html/ntpd.html
+
+ html/notes.html
+ 1.12 02/10/08 00:53:35 stenn@whimsy.udel.edu +0 -0
+ Rename: html/notes.htm -> html/notes.html
+
+ html/mx4200data.html
+ 1.9 02/10/08 00:53:35 stenn@whimsy.udel.edu +0 -0
+ Rename: html/mx4200data.htm -> html/mx4200data.html
+
+ html/monopt.html
+ 1.13 02/10/08 00:53:34 stenn@whimsy.udel.edu +0 -0
+ Rename: html/monopt.htm -> html/monopt.html
+
+ html/miscopt.html
+ 1.20 02/10/08 00:53:34 stenn@whimsy.udel.edu +0 -0
+ Rename: html/miscopt.htm -> html/miscopt.html
+
+ html/measure.html
+ 1.8 02/10/08 00:53:34 stenn@whimsy.udel.edu +0 -0
+ Rename: html/measure.htm -> html/measure.html
+
+ html/manyopt.html
+ 1.5 02/10/08 00:53:34 stenn@whimsy.udel.edu +0 -0
+ Rename: html/manyopt.htm -> html/manyopt.html
+
+ html/leap.html
+ 1.4 02/10/08 00:53:33 stenn@whimsy.udel.edu +0 -0
+ Rename: html/leap.htm -> html/leap.html
+
+ html/ldisc.html
+ 1.7 02/10/08 00:53:33 stenn@whimsy.udel.edu +0 -0
+ Rename: html/ldisc.htm -> html/ldisc.html
+
+ html/kernpps.html
+ 1.8 02/10/08 00:53:33 stenn@whimsy.udel.edu +0 -0
+ Rename: html/kernpps.htm -> html/kernpps.html
+
+ html/kern.html
+ 1.10 02/10/08 00:53:33 stenn@whimsy.udel.edu +0 -0
+ Rename: html/kern.htm -> html/kern.html
+
+ html/index.html
+ 1.18 02/10/08 00:53:33 stenn@whimsy.udel.edu +0 -0
+ Rename: html/index.htm -> html/index.html
+
+ html/howto.html
+ 1.11 02/10/08 00:53:32 stenn@whimsy.udel.edu +0 -0
+ Rename: html/howto.htm -> html/howto.html
+
+ html/hints.html
+ 1.9 02/10/08 00:53:32 stenn@whimsy.udel.edu +0 -0
+ Rename: html/hints.htm -> html/hints.html
+
+ html/genkeys.html
+ 1.13 02/10/08 00:53:32 stenn@whimsy.udel.edu +0 -0
+ Rename: html/genkeys.htm -> html/genkeys.html
+
+ html/gadget.html
+ 1.8 02/10/08 00:53:32 stenn@whimsy.udel.edu +0 -0
+ Rename: html/gadget.htm -> html/gadget.html
+
+ html/extern.html
+ 1.9 02/10/08 00:53:31 stenn@whimsy.udel.edu +0 -0
+ Rename: html/extern.htm -> html/extern.html
+
+ html/exec.html
+ 1.10 02/10/08 00:53:31 stenn@whimsy.udel.edu +0 -0
+ Rename: html/exec.htm -> html/exec.html
+
+ html/driver9.html
+ 1.8 02/10/08 00:53:31 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver9.htm -> html/driver9.html
+
+ html/driver8.html
+ 1.7 02/10/08 00:53:31 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver8.htm -> html/driver8.html
+
+ html/driver7.html
+ 1.14 02/10/08 00:53:30 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver7.htm -> html/driver7.html
+
+ html/driver6.html
+ 1.10 02/10/08 00:53:30 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver6.htm -> html/driver6.html
+
+ html/driver5.html
+ 1.7 02/10/08 00:53:30 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver5.htm -> html/driver5.html
+
+ html/driver44.html
+ 1.5 02/10/08 00:53:30 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver44.htm -> html/driver44.html
+
+ html/driver43.html
+ 1.4 02/10/08 00:53:29 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver43.htm -> html/driver43.html
+
+ html/driver42.html
+ 1.7 02/10/08 00:53:29 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver42.htm -> html/driver42.html
+
+ html/driver40.html
+ 1.5 02/10/08 00:53:29 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver40.htm -> html/driver40.html
+
+ html/driver4.html
+ 1.7 02/10/08 00:53:29 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver4.htm -> html/driver4.html
+
+ html/driver39.html
+ 1.7 02/10/08 00:53:29 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver39.htm -> html/driver39.html
+
+ html/driver38.html
+ 1.7 02/10/08 00:53:28 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver38.htm -> html/driver38.html
+
+ html/driver37.html
+ 1.6 02/10/08 00:53:28 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver37.htm -> html/driver37.html
+
+ html/driver36.html
+ 1.12 02/10/08 00:53:28 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver36.htm -> html/driver36.html
+
+ html/driver35.html
+ 1.9 02/10/08 00:53:28 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver35.htm -> html/driver35.html
+
+ html/driver34.html
+ 1.6 02/10/08 00:53:28 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver34.htm -> html/driver34.html
+
+ html/driver33.html
+ 1.7 02/10/08 00:53:27 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver33.htm -> html/driver33.html
+
+ html/driver32.html
+ 1.7 02/10/08 00:53:27 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver32.htm -> html/driver32.html
+
+ html/driver30.html
+ 1.12 02/10/08 00:53:27 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver30.htm -> html/driver30.html
+
+ html/driver3.html
+ 1.6 02/10/08 00:53:27 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver3.htm -> html/driver3.html
+
+ html/driver29.html
+ 1.6 02/10/08 00:53:27 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver29.htm -> html/driver29.html
+
+ html/driver28.html
+ 1.6 02/10/08 00:53:26 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver28.htm -> html/driver28.html
+
+ html/driver27.html
+ 1.6 02/10/08 00:53:26 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver27.htm -> html/driver27.html
+
+ html/driver26.html
+ 1.5 02/10/08 00:53:26 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver26.htm -> html/driver26.html
+
+ html/driver24.html
+ 1.5 02/10/08 00:53:26 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver24.htm -> html/driver24.html
+
+ html/driver23.html
+ 1.7 02/10/08 00:53:26 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver23.htm -> html/driver23.html
+
+ html/driver22.html
+ 1.10 02/10/08 00:53:25 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver22.htm -> html/driver22.html
+
+ html/driver20.html
+ 1.8 02/10/08 00:53:25 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver20.htm -> html/driver20.html
+
+ html/driver2.html
+ 1.7 02/10/08 00:53:25 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver2.htm -> html/driver2.html
+
+ html/driver19.html
+ 1.6 02/10/08 00:53:25 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver19.htm -> html/driver19.html
+
+ html/driver18.html
+ 1.7 02/10/08 00:53:25 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver18.htm -> html/driver18.html
+
+ html/driver16.html
+ 1.6 02/10/08 00:53:24 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver16.htm -> html/driver16.html
+
+ html/driver12.html
+ 1.7 02/10/08 00:53:24 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver12.htm -> html/driver12.html
+
+ html/driver11.html
+ 1.7 02/10/08 00:53:24 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver11.htm -> html/driver11.html
+
+ html/driver10.html
+ 1.7 02/10/08 00:53:24 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver10.htm -> html/driver10.html
+
+ html/driver1.html
+ 1.8 02/10/08 00:53:24 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver1.htm -> html/driver1.html
+
+ html/debug.html
+ 1.13 02/10/08 00:53:23 stenn@whimsy.udel.edu +0 -0
+ Rename: html/debug.htm -> html/debug.html
+
+ html/copyright.html
+ 1.23 02/10/08 00:53:23 stenn@whimsy.udel.edu +0 -0
+ Rename: html/copyright.htm -> html/copyright.html
+
+ html/confopt.html
+ 1.22 02/10/08 00:53:23 stenn@whimsy.udel.edu +0 -0
+ Rename: html/confopt.htm -> html/confopt.html
+
+ html/config.html
+ 1.11 02/10/08 00:53:23 stenn@whimsy.udel.edu +0 -0
+ Rename: html/config.htm -> html/config.html
+
+ html/clockopt.html
+ 1.12 02/10/08 00:53:23 stenn@whimsy.udel.edu +0 -0
+ Rename: html/clockopt.htm -> html/clockopt.html
+
+ html/build.html
+ 1.13 02/10/08 00:53:22 stenn@whimsy.udel.edu +0 -0
+ Rename: html/build.htm -> html/build.html
+
+ html/biblio.html
+ 1.7 02/10/08 00:53:22 stenn@whimsy.udel.edu +0 -0
+ Rename: html/biblio.htm -> html/biblio.html
+
+ html/authopt.html
+ 1.21 02/10/08 00:53:22 stenn@whimsy.udel.edu +0 -0
+ Rename: html/authopt.htm -> html/authopt.html
+
+ html/audio.html
+ 1.11 02/10/08 00:53:22 stenn@whimsy.udel.edu +0 -0
+ Rename: html/audio.htm -> html/audio.html
+
+ html/assoc.html
+ 1.15 02/10/08 00:53:21 stenn@whimsy.udel.edu +0 -0
+ Rename: html/assoc.htm -> html/assoc.html
+
+ html/accopt.html
+ 1.13 02/10/08 00:53:21 stenn@whimsy.udel.edu +0 -0
+ Rename: html/accopt.htm -> html/accopt.html
+
+ChangeSet
+ 1.925 02/10/08 00:46:43 stenn@whimsy.udel.edu +2 -0
+ More stuff from Dave Mills.
+
+ util/ntp-keygen.c
+ 1.16 02/10/08 00:46:39 stenn@whimsy.udel.edu +120 -71
+ More new stuff from Dave Mills.
+
+ ntpd/ntp_peer.c
+ 1.50 02/10/08 00:46:39 stenn@whimsy.udel.edu +1 -1
+ Account for removed associations a bit better.
+ From Dave Mills.
+
+ChangeSet
+ 1.924 02/10/05 10:33:45 jhay@angel.cids.org.za +1 -0
+ Merge angel.cids.org.za:/home/ntp/ntp-dev-clean
+ into angel.cids.org.za:/home/ntp/ntp-dev
+
+ ntpd/ntp_io.c
+ 1.44 02/10/05 10:33:44 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ChangeSet
+ 1.922.1.2 02/10/05 03:40:05 stenn@whimsy.udel.edu +17 -0
+ SNTP import from Nick Maclaren.
+
+ ntp-keygen stuff from Dave Mills.
+
+ sntp/unix.c
+ 1.1 02/10/05 03:40:01 stenn@whimsy.udel.edu +85 -0
+
+ sntp/timing.c
+ 1.1 02/10/05 03:40:01 stenn@whimsy.udel.edu +110 -0
+
+ sntp/unix.c
+ 1.0 02/10/05 03:40:01 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/unix.c
+
+ sntp/timing.c
+ 1.0 02/10/05 03:40:01 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/timing.c
+
+ sntp/socket.c
+ 1.1 02/10/05 03:40:00 stenn@whimsy.udel.edu +254 -0
+
+ sntp/sntp.1
+ 1.1 02/10/05 03:40:00 stenn@whimsy.udel.edu +325 -0
+
+ sntp/main.c
+ 1.1 02/10/05 03:40:00 stenn@whimsy.udel.edu +1783 -0
+
+ sntp/kludges.h
+ 1.1 02/10/05 03:40:00 stenn@whimsy.udel.edu +62 -0
+
+ sntp/socket.c
+ 1.0 02/10/05 03:40:00 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/socket.c
+
+ sntp/sntp.1
+ 1.0 02/10/05 03:40:00 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/sntp.1
+
+ sntp/main.c
+ 1.0 02/10/05 03:40:00 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/main.c
+
+ sntp/kludges.h
+ 1.0 02/10/05 03:40:00 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/kludges.h
+
+ sntp/internet.h
+ 1.1 02/10/05 03:39:59 stenn@whimsy.udel.edu +39 -0
+
+ sntp/internet.c
+ 1.1 02/10/05 03:39:59 stenn@whimsy.udel.edu +124 -0
+
+ sntp/header.h
+ 1.1 02/10/05 03:39:59 stenn@whimsy.udel.edu +86 -0
+
+ sntp/configure.ac
+ 1.1 02/10/05 03:39:59 stenn@whimsy.udel.edu +28 -0
+
+ sntp/RFC2030.TXT
+ 1.1 02/10/05 03:39:59 stenn@whimsy.udel.edu +1011 -0
+
+ sntp/README
+ 1.1 02/10/05 03:39:59 stenn@whimsy.udel.edu +535 -0
+
+ sntp/internet.h
+ 1.0 02/10/05 03:39:59 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/internet.h
+
+ sntp/internet.c
+ 1.0 02/10/05 03:39:59 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/internet.c
+
+ sntp/header.h
+ 1.0 02/10/05 03:39:59 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/header.h
+
+ sntp/configure.ac
+ 1.0 02/10/05 03:39:59 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/configure.ac
+
+ sntp/RFC2030.TXT
+ 1.0 02/10/05 03:39:59 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/RFC2030.TXT
+
+ sntp/README
+ 1.0 02/10/05 03:39:59 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/README
+
+ sntp/Mf
+ 1.1 02/10/05 03:39:58 stenn@whimsy.udel.edu +141 -0
+
+ sntp/Makefile.am
+ 1.1 02/10/05 03:39:58 stenn@whimsy.udel.edu +40 -0
+
+ sntp/Copyright
+ 1.1 02/10/05 03:39:58 stenn@whimsy.udel.edu +80 -0
+
+ util/ntp-keygen.c
+ 1.15 02/10/05 03:39:58 stenn@whimsy.udel.edu +459 -24
+ New stuff from Dave Mills.
+
+ sntp/Mf
+ 1.0 02/10/05 03:39:58 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/Mf
+
+ sntp/Makefile.am
+ 1.0 02/10/05 03:39:58 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/Makefile.am
+
+ sntp/Copyright
+ 1.0 02/10/05 03:39:58 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/sntp/Copyright
+
+ ntpd/ntp_io.c
+ 1.42.1.1 02/10/05 03:39:58 stenn@whimsy.udel.edu +44 -21
+ Stupid comment cleanup. This code really needs to be rewritten.
+
+ChangeSet
+ 1.922.1.1 02/10/03 22:16:12 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.275 02/10/03 22:15:36 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ChangeSet
+ 1.683.4.117 02/10/03 22:06:53 stenn@whimsy.udel.edu +1 -0
+ Don't build RIPENCC refclock by default.
+
+ configure.in
+ 1.219.3.31 02/10/03 22:06:29 stenn@whimsy.udel.edu +1 -1
+ Don't build RIPENCC refclock by default.
+
+ChangeSet
+ 1.923 02/10/03 16:13:02 jhay@angel.cids.org.za +1 -0
+ If the socket() call inside open_socket() fails, don't exit if errno is either
+ of EPROTONOSUPPORT, EAFNOSUPPORT or EPFNOSUPPORT.
+
+ ntpd/ntp_io.c
+ 1.43 02/10/03 16:13:01 jhay@angel.cids.org.za +3 -0
+ If the socket() call inside open_socket() fails, don't exit if errno is either
+ of EPROTONOSUPPORT, EAFNOSUPPORT or EPFNOSUPPORT.
+
+ChangeSet
+ 1.922 02/10/03 03:51:43 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ include/l_stdlib.h
+ 1.11 02/10/03 03:51:41 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.116 02/10/03 03:40:37 stenn@whimsy.udel.edu +3 -0
+ Quiet GCC warnings. From Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ parseutil/dcfd.c
+ 1.9 02/10/03 03:40:33 stenn@whimsy.udel.edu +5 -3
+ Prevent warnings.
+
+ include/ntp_syscall.h
+ 1.6 02/10/03 03:40:33 stenn@whimsy.udel.edu +2 -0
+ Prevent warnings.
+
+ include/l_stdlib.h
+ 1.8.1.1 02/10/03 03:40:33 stenn@whimsy.udel.edu +1 -1
+ Prevent warnings.
+
+ChangeSet
+ 1.921 02/09/22 08:35:14 jhay@angel.cids.org.za +4 -0
+ Remove unused USE_STREAMS_DEVICE_FOR_IFCONFIG and SUN_3_3_STINKS and a piece
+ of code in a #if 0.
+
+ include/ntp_machine.h still have some docs about USE_STREAMS_DEVICE_FOR_IFCONFIG.
+
+ ntpd/ntp_io.c
+ 1.42 02/09/22 08:35:13 jhay@angel.cids.org.za +0 -62
+ Remove unused USE_STREAMS_DEVICE_FOR_IFCONFIG and SUN_3_3_STINKS and a piece
+ of code in a #if 0.
+
+ include/ntp_if.h
+ 1.4 02/09/22 08:35:13 jhay@angel.cids.org.za +0 -21
+ Remove unused USE_STREAMS_DEVICE_FOR_IFCONFIG.
+
+ configure.in
+ 1.274 02/09/22 08:35:13 jhay@angel.cids.org.za +0 -4
+ Remove unused USE_STREAMS_DEVICE_FOR_IFCONFIG.
+
+ TODO
+ 1.7 02/09/22 08:35:13 jhay@angel.cids.org.za +0 -4
+ Remove SUN_3_3_STINKS.
+
+ChangeSet
+ 1.920 02/09/22 07:58:55 jhay@angel.cids.org.za +1 -0
+ Add support for SIOCGLIFCONF which is used on Solaris 8+. On Solaris 8+ the
+ SIOCGIFCONF ioctl does not return IPv6 info.
+
+ ntpd/ntp_io.c
+ 1.41 02/09/22 07:52:22 jhay@angel.cids.org.za +123 -81
+ Add support for SIOCGLIFCONF which is used on Solaris 8+. On Solaris 8+ the
+ SIOCGIFCONF ioctl does not return IPv6 info.
+
+ChangeSet
+ 1.919 02/09/21 13:22:00 jhay@angel.cids.org.za +1 -0
+ Put pps_enable = 1 back, so that ntpd knows that there is a hardpps() capable
+ driver. Otherwise it will never enable the kernel hardpps() stuff.
+
+ ntpd/refclock_oncore.c
+ 1.42 02/09/21 13:21:59 jhay@angel.cids.org.za +1 -0
+ Put pps_enable = 1 back, so that ntpd knows that there is a hardpps() capable
+ driver. Otherwise it will never enable the kernel hardpps() stuff.
+
+ChangeSet
+ 1.918 02/09/18 02:45:42 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpdate/ntpdate.c
+ 1.37 02/09/18 02:45:39 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.115 02/09/18 02:43:10 stenn@whimsy.udel.edu +1 -0
+ Improved patch from Matthias.
+
+ ntpdate/ntpdate.c
+ 1.23.2.2 02/09/18 02:43:07 stenn@whimsy.udel.edu +1 -2
+ Improved patch from Matthias.
+
+ChangeSet
+ 1.917 02/09/18 02:33:17 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpdate/ntpdate.c
+ 1.36 02/09/18 02:33:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.114 02/09/18 02:30:06 stenn@whimsy.udel.edu +1 -0
+ absoffset can be "too negative". Reported by Brian Utterback,
+ with fix from Mattias Lang.
+
+ ntpdate/ntpdate.c
+ 1.23.2.1 02/09/18 02:30:03 stenn@whimsy.udel.edu +2 -1
+ absoffset can be "too negative". Reported by Brian Utterback,
+ with fix from Mattias Lang.
+
+ChangeSet
+ 1.916 02/09/18 02:08:36 stenn@whimsy.udel.edu +85 -0
+ More doc cleanup from Dave Mills.
+
+ html/tickadj.htm
+ 1.10 02/09/18 02:08:31 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/release.htm
+ 1.21 02/09/18 02:08:31 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/refclock.htm
+ 1.22 02/09/18 02:08:30 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/rdebug.htm
+ 1.8 02/09/18 02:08:30 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/quick.htm
+ 1.9 02/09/18 02:08:30 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/prefer.htm
+ 1.8 02/09/18 02:08:30 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/pps.htm
+ 1.12 02/09/18 02:08:30 stenn@whimsy.udel.edu +2 -3
+ More doc cleanup from Dave Mills.
+
+ html/porting.htm
+ 1.7 02/09/18 02:08:30 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/patches.htm
+ 1.9 02/09/18 02:08:30 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/parsenew.htm
+ 1.5 02/09/18 02:08:30 stenn@whimsy.udel.edu +46 -38
+ More doc cleanup from Dave Mills.
+
+ html/parsedata.htm
+ 1.8 02/09/18 02:08:30 stenn@whimsy.udel.edu +71 -72
+ More doc cleanup from Dave Mills.
+
+ html/oncore-shmem.htm
+ 1.7 02/09/18 02:08:29 stenn@whimsy.udel.edu +1 -0
+ More doc cleanup from Dave Mills.
+
+ html/ntptrace.htm
+ 1.8 02/09/18 02:08:29 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/ntptime.htm
+ 1.10 02/09/18 02:08:29 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/ntpq.htm
+ 1.14 02/09/18 02:08:29 stenn@whimsy.udel.edu +2 -4
+ More doc cleanup from Dave Mills.
+
+ html/ntpdc.htm
+ 1.11 02/09/18 02:08:29 stenn@whimsy.udel.edu +2 -4
+ More doc cleanup from Dave Mills.
+
+ html/ntpdate.htm
+ 1.10 02/09/18 02:08:29 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/ntpd.htm
+ 1.20 02/09/18 02:08:28 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/notes.htm
+ 1.11 02/09/18 02:08:28 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/mx4200data.htm
+ 1.8 02/09/18 02:08:28 stenn@whimsy.udel.edu +2 -0
+ More doc cleanup from Dave Mills.
+
+ html/monopt.htm
+ 1.12 02/09/18 02:08:28 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/miscopt.htm
+ 1.19 02/09/18 02:08:28 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/measure.htm
+ 1.7 02/09/18 02:08:28 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/manyopt.htm
+ 1.4 02/09/18 02:08:28 stenn@whimsy.udel.edu +2 -3
+ More doc cleanup from Dave Mills.
+
+ html/ldisc.htm
+ 1.6 02/09/18 02:08:27 stenn@whimsy.udel.edu +37 -41
+ More doc cleanup from Dave Mills.
+
+ html/kernpps.htm
+ 1.7 02/09/18 02:08:27 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/kern.htm
+ 1.9 02/09/18 02:08:27 stenn@whimsy.udel.edu +2 -5
+ More doc cleanup from Dave Mills.
+
+ html/index.htm
+ 1.17 02/09/18 02:08:27 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/howto.htm
+ 1.10 02/09/18 02:08:27 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/hints/winnt.htm
+ 1.9 02/09/18 02:08:27 stenn@whimsy.udel.edu +19 -18
+ More doc cleanup from Dave Mills.
+
+ html/hints/vxworks.htm
+ 1.3 02/09/18 02:08:27 stenn@whimsy.udel.edu +10 -9
+ More doc cleanup from Dave Mills.
+
+ html/hints/vxworks.html
+ 1.3 02/09/18 02:08:27 stenn@whimsy.udel.edu +2 -1
+ More doc cleanup from Dave Mills.
+
+ html/hints/solaris.html
+ 1.5 02/09/18 02:08:26 stenn@whimsy.udel.edu +2 -1
+ More doc cleanup from Dave Mills.
+
+ html/hints/solaris-dosynctodr.html
+ 1.3 02/09/18 02:08:26 stenn@whimsy.udel.edu +2 -1
+ More doc cleanup from Dave Mills.
+
+ html/hints/sco.htm
+ 1.3 02/09/18 02:08:26 stenn@whimsy.udel.edu +2 -1
+ More doc cleanup from Dave Mills.
+
+ html/hints.htm
+ 1.8 02/09/18 02:08:26 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/genkeys.htm
+ 1.12 02/09/18 02:08:26 stenn@whimsy.udel.edu +4 -4
+ More doc cleanup from Dave Mills.
+
+ html/gadget.htm
+ 1.7 02/09/18 02:08:26 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/extern.htm
+ 1.8 02/09/18 02:08:25 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/driver9.htm
+ 1.7 02/09/18 02:08:25 stenn@whimsy.udel.edu +18 -17
+ More doc cleanup from Dave Mills.
+
+ html/driver8.htm
+ 1.6 02/09/18 02:08:25 stenn@whimsy.udel.edu +132 -351
+ More doc cleanup from Dave Mills.
+
+ html/driver7.htm
+ 1.13 02/09/18 02:08:25 stenn@whimsy.udel.edu +4 -4
+ More doc cleanup from Dave Mills.
+
+ html/driver6.htm
+ 1.9 02/09/18 02:08:25 stenn@whimsy.udel.edu +3 -3
+ More doc cleanup from Dave Mills.
+
+ html/driver5.htm
+ 1.6 02/09/18 02:08:25 stenn@whimsy.udel.edu +4 -3
+ More doc cleanup from Dave Mills.
+
+ html/driver44.htm
+ 1.4 02/09/18 02:08:25 stenn@whimsy.udel.edu +21 -20
+ More doc cleanup from Dave Mills.
+
+ html/driver43.htm
+ 1.3 02/09/18 02:08:25 stenn@whimsy.udel.edu +36 -84
+ More doc cleanup from Dave Mills.
+
+ html/driver42.htm
+ 1.6 02/09/18 02:08:24 stenn@whimsy.udel.edu +2 -1
+ More doc cleanup from Dave Mills.
+
+ html/driver40.htm
+ 1.4 02/09/18 02:08:24 stenn@whimsy.udel.edu +99 -172
+ More doc cleanup from Dave Mills.
+
+ html/driver4.htm
+ 1.6 02/09/18 02:08:24 stenn@whimsy.udel.edu +18 -17
+ More doc cleanup from Dave Mills.
+
+ html/driver39.htm
+ 1.6 02/09/18 02:08:24 stenn@whimsy.udel.edu +6 -5
+ More doc cleanup from Dave Mills.
+
+ html/driver38.htm
+ 1.6 02/09/18 02:08:24 stenn@whimsy.udel.edu +8 -7
+ More doc cleanup from Dave Mills.
+
+ html/driver37.htm
+ 1.5 02/09/18 02:08:24 stenn@whimsy.udel.edu +18 -17
+ More doc cleanup from Dave Mills.
+
+ html/driver36.htm
+ 1.11 02/09/18 02:08:24 stenn@whimsy.udel.edu +246 -882
+ More doc cleanup from Dave Mills.
+
+ html/driver35.htm
+ 1.8 02/09/18 02:08:24 stenn@whimsy.udel.edu +43 -76
+ More doc cleanup from Dave Mills.
+
+ html/driver34.htm
+ 1.5 02/09/18 02:08:24 stenn@whimsy.udel.edu +2 -1
+ More doc cleanup from Dave Mills.
+
+ html/driver33.htm
+ 1.6 02/09/18 02:08:24 stenn@whimsy.udel.edu +26 -29
+ More doc cleanup from Dave Mills.
+
+ html/driver32.htm
+ 1.6 02/09/18 02:08:24 stenn@whimsy.udel.edu +26 -30
+ More doc cleanup from Dave Mills.
+
+ html/driver30.htm
+ 1.11 02/09/18 02:08:23 stenn@whimsy.udel.edu +81 -186
+ More doc cleanup from Dave Mills.
+
+ html/driver3.htm
+ 1.5 02/09/18 02:08:23 stenn@whimsy.udel.edu +54 -111
+ More doc cleanup from Dave Mills.
+
+ html/driver29.htm
+ 1.5 02/09/18 02:08:23 stenn@whimsy.udel.edu +788 -1250
+ More doc cleanup from Dave Mills.
+
+ html/driver28.htm
+ 1.5 02/09/18 02:08:23 stenn@whimsy.udel.edu +53 -112
+ More doc cleanup from Dave Mills.
+
+ html/driver27.htm
+ 1.5 02/09/18 02:08:23 stenn@whimsy.udel.edu +193 -594
+ More doc cleanup from Dave Mills.
+
+ html/driver26.htm
+ 1.4 02/09/18 02:08:23 stenn@whimsy.udel.edu +46 -107
+ More doc cleanup from Dave Mills.
+
+ html/driver24.htm
+ 1.4 02/09/18 02:08:23 stenn@whimsy.udel.edu +42 -83
+ More doc cleanup from Dave Mills.
+
+ html/driver23.htm
+ 1.6 02/09/18 02:08:23 stenn@whimsy.udel.edu +100 -176
+ More doc cleanup from Dave Mills.
+
+ html/driver22.htm
+ 1.9 02/09/18 02:08:23 stenn@whimsy.udel.edu +53 -155
+ More doc cleanup from Dave Mills.
+
+ html/driver20.htm
+ 1.7 02/09/18 02:08:22 stenn@whimsy.udel.edu +72 -136
+ More doc cleanup from Dave Mills.
+
+ html/driver2.htm
+ 1.6 02/09/18 02:08:22 stenn@whimsy.udel.edu +10 -10
+ More doc cleanup from Dave Mills.
+
+ html/driver19.htm
+ 1.5 02/09/18 02:08:22 stenn@whimsy.udel.edu +52 -119
+ More doc cleanup from Dave Mills.
+
+ html/driver18.htm
+ 1.6 02/09/18 02:08:22 stenn@whimsy.udel.edu +11 -11
+ More doc cleanup from Dave Mills.
+
+ html/driver16.htm
+ 1.5 02/09/18 02:08:22 stenn@whimsy.udel.edu +7 -7
+ More doc cleanup from Dave Mills.
+
+ html/driver12.htm
+ 1.6 02/09/18 02:08:22 stenn@whimsy.udel.edu +8 -8
+ More doc cleanup from Dave Mills.
+
+ html/driver11.htm
+ 1.6 02/09/18 02:08:22 stenn@whimsy.udel.edu +8 -8
+ More doc cleanup from Dave Mills.
+
+ html/driver10.htm
+ 1.6 02/09/18 02:08:22 stenn@whimsy.udel.edu +8 -8
+ More doc cleanup from Dave Mills.
+
+ html/driver1.htm
+ 1.7 02/09/18 02:08:22 stenn@whimsy.udel.edu +7 -9
+ More doc cleanup from Dave Mills.
+
+ html/debug.htm
+ 1.12 02/09/18 02:08:21 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/copyright.htm
+ 1.22 02/09/18 02:08:21 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/confopt.htm
+ 1.21 02/09/18 02:08:21 stenn@whimsy.udel.edu +2 -3
+ More doc cleanup from Dave Mills.
+
+ html/config.htm
+ 1.10 02/09/18 02:08:21 stenn@whimsy.udel.edu +3 -3
+ More doc cleanup from Dave Mills.
+
+ html/clockopt.htm
+ 1.11 02/09/18 02:08:21 stenn@whimsy.udel.edu +2 -4
+ More doc cleanup from Dave Mills.
+
+ html/build.htm
+ 1.12 02/09/18 02:08:21 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ html/authopt.htm
+ 1.20 02/09/18 02:08:21 stenn@whimsy.udel.edu +2 -3
+ More doc cleanup from Dave Mills.
+
+ html/audio.htm
+ 1.10 02/09/18 02:08:20 stenn@whimsy.udel.edu +3 -3
+ More doc cleanup from Dave Mills.
+
+ html/assoc.htm
+ 1.14 02/09/18 02:08:20 stenn@whimsy.udel.edu +3 -3
+ More doc cleanup from Dave Mills.
+
+ html/accopt.htm
+ 1.12 02/09/18 02:08:20 stenn@whimsy.udel.edu +2 -2
+ More doc cleanup from Dave Mills.
+
+ChangeSet
+ 1.915 02/09/16 00:16:09 stenn@whimsy.udel.edu +21 -0
+ Documentation cleanup form Dave Mills.
+
+ html/oncore-shmem.htm
+ 1.6 02/09/16 00:16:06 stenn@whimsy.udel.edu +79 -183
+ Documentation cleanup form Dave Mills.
+
+ html/tickadj.htm
+ 1.9 02/09/16 00:16:05 stenn@whimsy.udel.edu +39 -95
+ Documentation cleanup form Dave Mills.
+
+ html/refclock.htm
+ 1.21 02/09/16 00:16:05 stenn@whimsy.udel.edu +85 -253
+ Documentation cleanup form Dave Mills.
+
+ html/rdebug.htm
+ 1.7 02/09/16 00:16:05 stenn@whimsy.udel.edu +23 -22
+ Documentation cleanup form Dave Mills.
+
+ html/quick.htm
+ 1.8 02/09/16 00:16:05 stenn@whimsy.udel.edu +27 -97
+ Documentation cleanup form Dave Mills.
+
+ html/prefer.htm
+ 1.7 02/09/16 00:16:05 stenn@whimsy.udel.edu +67 -90
+ Documentation cleanup form Dave Mills.
+
+ html/porting.htm
+ 1.6 02/09/16 00:16:05 stenn@whimsy.udel.edu +35 -81
+ Documentation cleanup form Dave Mills.
+
+ html/patches.htm
+ 1.8 02/09/16 00:16:05 stenn@whimsy.udel.edu +32 -39
+ Documentation cleanup form Dave Mills.
+
+ html/parsenew.htm
+ 1.4 02/09/16 00:16:05 stenn@whimsy.udel.edu +51 -101
+ Documentation cleanup form Dave Mills.
+
+ html/parsedata.htm
+ 1.7 02/09/16 00:16:05 stenn@whimsy.udel.edu +99 -169
+ Documentation cleanup form Dave Mills.
+
+ html/ntptrace.htm
+ 1.7 02/09/16 00:16:05 stenn@whimsy.udel.edu +40 -84
+ Documentation cleanup form Dave Mills.
+
+ html/ntptime.htm
+ 1.9 02/09/16 00:16:04 stenn@whimsy.udel.edu +43 -77
+ Documentation cleanup form Dave Mills.
+
+ html/ntpq.htm
+ 1.13 02/09/16 00:16:04 stenn@whimsy.udel.edu +259 -763
+ Documentation cleanup form Dave Mills.
+
+ html/ntpdc.htm
+ 1.10 02/09/16 00:16:04 stenn@whimsy.udel.edu +154 -524
+ Documentation cleanup form Dave Mills.
+
+ html/ntpdate.htm
+ 1.9 02/09/16 00:16:04 stenn@whimsy.udel.edu +65 -198
+ Documentation cleanup form Dave Mills.
+
+ html/ntpd.htm
+ 1.19 02/09/16 00:16:04 stenn@whimsy.udel.edu +115 -470
+ Documentation cleanup form Dave Mills.
+
+ html/notes.htm
+ 1.10 02/09/16 00:16:04 stenn@whimsy.udel.edu +149 -1185
+ Documentation cleanup form Dave Mills.
+
+ html/mx4200data.htm
+ 1.7 02/09/16 00:16:03 stenn@whimsy.udel.edu +1069 -441
+ Documentation cleanup form Dave Mills.
+
+ html/driver7.htm
+ 1.12 02/09/16 00:16:03 stenn@whimsy.udel.edu +213 -634
+ Documentation cleanup form Dave Mills.
+
+ html/driver6.htm
+ 1.8 02/09/16 00:16:03 stenn@whimsy.udel.edu +79 -274
+ Documentation cleanup form Dave Mills.
+
+ html/driver5.htm
+ 1.5 02/09/16 00:16:03 stenn@whimsy.udel.edu +68 -156
+ Documentation cleanup form Dave Mills.
+
+ html/oncore-shmem.htm
+ 1.5 02/09/15 21:16:08 stenn@whimsy.udel.edu +0 -0
+ Rename: html/Oncore-SHMEM.htm -> html/oncore-shmem.htm
+
+ChangeSet
+ 1.914 02/09/12 01:30:07 stenn@whimsy.udel.edu +6 -0
+ HTML updates from Dave.
+
+ html/monopt.htm
+ 1.11 02/09/12 01:30:03 stenn@whimsy.udel.edu +104 -305
+ HTML updates from Dave.
+
+ html/miscopt.htm
+ 1.18 02/09/12 01:30:03 stenn@whimsy.udel.edu +89 -298
+ HTML updates from Dave.
+
+ html/measure.htm
+ 1.6 02/09/12 01:30:02 stenn@whimsy.udel.edu +17 -13
+ HTML updates from Dave.
+
+ html/manyopt.htm
+ 1.3 02/09/12 01:30:02 stenn@whimsy.udel.edu +59 -291
+ HTML updates from Dave.
+
+ html/debug.htm
+ 1.11 02/09/12 01:30:02 stenn@whimsy.udel.edu +7 -7
+ HTML updates from Dave.
+
+ html/assoc.htm
+ 1.13 02/09/12 01:30:02 stenn@whimsy.udel.edu +10 -10
+ HTML updates from Dave.
+
+ChangeSet
+ 1.913 02/09/09 19:07:03 stenn@whimsy.udel.edu +42 -0
+ Crypto changes and documentation cleanup from Dave Mills.
+
+ util/ntp-keygen.c
+ 1.14 02/09/09 19:06:57 stenn@whimsy.udel.edu +35 -17
+ Crypto changes from Dave Mills.
+
+ ntpd/ntp_crypto.c
+ 1.71 02/09/09 19:06:57 stenn@whimsy.udel.edu +18 -9
+ Crypto changes from Dave Mills.
+
+ ntpd/ntp_config.c
+ 1.77 02/09/09 19:06:56 stenn@whimsy.udel.edu +5 -0
+ Crypto changes from Dave Mills.
+
+ include/ntp_crypto.h
+ 1.30 02/09/09 19:06:56 stenn@whimsy.udel.edu +2 -0
+ Crypto changes from Dave Mills.
+
+ include/ntp_config.h
+ 1.21 02/09/09 19:06:56 stenn@whimsy.udel.edu +1 -0
+ Crypto changes from Dave Mills.
+
+ html/tickadj.htm
+ 1.8 02/09/09 19:06:56 stenn@whimsy.udel.edu +1 -2
+ Documentation cleanup from Dave Mills
+
+ html/release.htm
+ 1.20 02/09/09 19:06:56 stenn@whimsy.udel.edu +78 -361
+ Documentation cleanup from Dave Mills
+
+ html/refclock.htm
+ 1.20 02/09/09 19:06:56 stenn@whimsy.udel.edu +4 -2
+ Documentation cleanup from Dave Mills
+
+ html/pps.htm
+ 1.11 02/09/09 19:06:56 stenn@whimsy.udel.edu +26 -103
+ Documentation cleanup from Dave Mills
+
+ html/patches.htm
+ 1.7 02/09/09 19:06:56 stenn@whimsy.udel.edu +2 -2
+ Documentation cleanup from Dave Mills
+
+ html/notes.htm
+ 1.9 02/09/09 19:06:55 stenn@whimsy.udel.edu +10 -60
+ Documentation cleanup from Dave Mills
+
+ html/ldisc.htm
+ 1.5 02/09/09 19:06:55 stenn@whimsy.udel.edu +61 -81
+ Documentation cleanup from Dave Mills
+
+ html/kernpps.htm
+ 1.6 02/09/09 19:06:55 stenn@whimsy.udel.edu +22 -21
+ Documentation cleanup from Dave Mills
+
+ html/kern.htm
+ 1.8 02/09/09 19:06:55 stenn@whimsy.udel.edu +35 -118
+ Documentation cleanup from Dave Mills
+
+ html/index.htm
+ 1.16 02/09/09 19:06:55 stenn@whimsy.udel.edu +82 -305
+ Documentation cleanup from Dave Mills
+
+ html/howto.htm
+ 1.9 02/09/09 19:06:55 stenn@whimsy.udel.edu +85 -383
+ Documentation cleanup from Dave Mills
+
+ html/hints.htm
+ 1.7 02/09/09 19:06:55 stenn@whimsy.udel.edu +18 -28
+ Documentation cleanup from Dave Mills
+
+ html/genkeys.htm
+ 1.11 02/09/09 19:06:54 stenn@whimsy.udel.edu +98 -506
+ Documentation cleanup from Dave Mills
+
+ html/gadget.htm
+ 1.6 02/09/09 19:06:54 stenn@whimsy.udel.edu +40 -45
+ Documentation cleanup from Dave Mills
+
+ html/extern.htm
+ 1.7 02/09/09 19:06:54 stenn@whimsy.udel.edu +24 -105
+ Documentation cleanup from Dave Mills
+
+ html/driver44.htm
+ 1.3 02/09/09 19:06:54 stenn@whimsy.udel.edu +9 -14
+ Documentation cleanup from Dave Mills
+
+ html/driver30.htm
+ 1.10 02/09/09 19:06:54 stenn@whimsy.udel.edu +12 -10
+ Documentation cleanup from Dave Mills
+
+ html/driver2.htm
+ 1.5 02/09/09 19:06:54 stenn@whimsy.udel.edu +59 -129
+ Documentation cleanup from Dave Mills
+
+ html/driver18.htm
+ 1.5 02/09/09 19:06:54 stenn@whimsy.udel.edu +72 -222
+ Documentation cleanup from Dave Mills
+
+ html/driver16.htm
+ 1.4 02/09/09 19:06:54 stenn@whimsy.udel.edu +26 -38
+ Documentation cleanup from Dave Mills
+
+ html/driver12.htm
+ 1.5 02/09/09 19:06:54 stenn@whimsy.udel.edu +46 -95
+ Documentation cleanup from Dave Mills
+
+ html/driver11.htm
+ 1.5 02/09/09 19:06:54 stenn@whimsy.udel.edu +66 -129
+ Documentation cleanup from Dave Mills
+
+ html/driver10.htm
+ 1.5 02/09/09 19:06:54 stenn@whimsy.udel.edu +50 -111
+ Documentation cleanup from Dave Mills
+
+ html/driver1.htm
+ 1.6 02/09/09 19:06:53 stenn@whimsy.udel.edu +52 -154
+ Documentation cleanup from Dave Mills
+
+ html/debug.htm
+ 1.10 02/09/09 19:06:53 stenn@whimsy.udel.edu +119 -593
+ Documentation cleanup from Dave Mills
+
+ html/copyright.htm
+ 1.21 02/09/09 19:06:53 stenn@whimsy.udel.edu +72 -126
+ Documentation cleanup from Dave Mills
+
+ html/confopt.htm
+ 1.20 02/09/09 19:06:53 stenn@whimsy.udel.edu +73 -270
+ Documentation cleanup from Dave Mills
+
+ html/config.htm
+ 1.9 02/09/09 19:06:53 stenn@whimsy.udel.edu +53 -100
+ Documentation cleanup from Dave Mills
+
+ html/clockopt.htm
+ 1.10 02/09/09 19:06:53 stenn@whimsy.udel.edu +60 -216
+ Documentation cleanup from Dave Mills
+
+ html/build.htm
+ 1.11 02/09/09 19:06:52 stenn@whimsy.udel.edu +69 -239
+ Documentation cleanup from Dave Mills
+
+ html/authopt.htm
+ 1.19 02/09/09 19:06:52 stenn@whimsy.udel.edu +132 -567
+ Documentation cleanup from Dave Mills
+
+ html/audio.htm
+ 1.9 02/09/09 19:06:52 stenn@whimsy.udel.edu +50 -224
+ Documentation cleanup from Dave Mills
+
+ html/assoc.htm
+ 1.12 02/09/09 19:06:52 stenn@whimsy.udel.edu +42 -244
+ Documentation cleanup from Dave Mills
+
+ html/accopt.htm
+ 1.11 02/09/09 19:06:52 stenn@whimsy.udel.edu +62 -224
+ Documentation cleanup from Dave Mills
+
+ BitKeeper/deleted/.del-htmlprimer.htm~3e480692
+ 1.4 02/09/09 18:49:17 stenn@whimsy.udel.edu +0 -0
+ Delete: html/htmlprimer.htm
+
+ html/pic/driver43_2.jpg
+ 1.2 02/09/09 00:07:50 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver43_2.jpg -> html/pic/driver43_2.jpg
+
+ html/pic/driver43_1.gif
+ 1.2 02/09/09 00:07:50 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver43_1.gif -> html/pic/driver43_1.gif
+
+ChangeSet
+ 1.912 02/09/07 15:38:04 jhay@angel.cids.org.za +1 -0
+ Do not do ioctl(SIOCGNETMASK) on IPv6 addresses, based on the patch sent by
+ Hideaki Imaizumi <hiddy@ISI.EDU>.
+
+ Also change a continue back to an exit, like it was before the IPv6 days.
+
+ ntpd/ntp_io.c
+ 1.40 02/09/07 15:38:03 jhay@angel.cids.org.za +15 -16
+ Do not do ioctl(SIOCGNETMASK) on IPv6 addresses, based on the patch sent by
+ Hideaki Imaizumi <hiddy@ISI.EDU>.
+
+ Also change a continue back to an exit, like it was before the IPv6 days.
+
+ChangeSet
+ 1.911 02/09/07 15:24:13 jhay@angel.cids.org.za +1 -0
+ Do this in a more obvious way. The result is that the bytes are now swapped
+ compared to the previous way.
+
+ libntp/a_md5encrypt.c
+ 1.8.1.2 02/09/07 15:24:12 jhay@angel.cids.org.za +1 -7
+ Do this in a more obvious way. The result is that the bytes are now swapped
+ compared to the previous way.
+
+ChangeSet
+ 1.910 02/09/02 19:02:53 stenn@whimsy.udel.edu +1 -0
+ Typo fix from Reg Clemens, reported by John Hay.
+
+ ntpd/refclock_oncore.c
+ 1.41 02/09/02 19:02:50 stenn@whimsy.udel.edu +1 -1
+ Typo fix from Reg Clemens, reported by John Hay.
+
+ChangeSet
+ 1.909 02/08/28 23:38:39 stenn@whimsy.udel.edu +1 -0
+ ntp_rfc2553.h is a noinst_HEADER.
+ Reported by Dave Mills.
+
+ include/Makefile.am
+ 1.14 02/08/28 23:38:35 stenn@whimsy.udel.edu +1 -0
+ ntp_rfc2553.h is a noinst_HEADER.
+ Reported by Dave Mills.
+
+ChangeSet
+ 1.908 02/08/28 06:32:58 stenn@whimsy.udel.edu +1 -0
+ Improve the instructions for adding a new clock, as far as
+ configure.in is concerned.
+
+ html/howto.htm
+ 1.8 02/08/28 06:32:55 stenn@whimsy.udel.edu +4 -26
+ Improve the instructions for adding a new clock, as far as
+ configure.in is concerned.
+
+ChangeSet
+ 1.907 02/08/28 04:06:17 stenn@whimsy.udel.edu +5 -0
+ Documentation updates from Dave Mills.
+
+ html/ntpq.htm
+ 1.12 02/08/28 04:06:13 stenn@whimsy.udel.edu +19 -1
+ Documentation updates from Dave Mills.
+
+ html/ntpdc.htm
+ 1.9 02/08/28 04:06:13 stenn@whimsy.udel.edu +15 -0
+ Documentation updates from Dave Mills.
+
+ html/ntpdate.htm
+ 1.8 02/08/28 04:06:13 stenn@whimsy.udel.edu +15 -0
+ Documentation updates from Dave Mills.
+
+ html/ntpd.htm
+ 1.18 02/08/28 04:06:13 stenn@whimsy.udel.edu +15 -2
+ Documentation updates from Dave Mills.
+
+ html/confopt.htm
+ 1.19 02/08/28 04:06:13 stenn@whimsy.udel.edu +8 -5
+ Documentation updates from Dave Mills.
+
+ChangeSet
+ 1.906 02/08/28 03:50:09 stenn@whimsy.udel.edu +1 -0
+ Update the backroom flock build list.
+
+ br-flock
+ 1.3 02/08/28 03:50:06 stenn@whimsy.udel.edu +2 -1
+ Update the backroom flock build list.
+
+ChangeSet
+ 1.905 02/08/28 03:39:33 stenn@whimsy.udel.edu +5 -0
+ Cleanup and fixes from Reg Clemens.
+
+ ntpd/refclock_ripencc.c
+ 1.3 02/08/28 03:39:29 stenn@whimsy.udel.edu +1 -3
+ Lose pps_assert and pps_hardpps.
+
+ ntpd/refclock_oncore.c
+ 1.40 02/08/28 03:39:29 stenn@whimsy.udel.edu +154 -96
+ Lose pps_assert and pps_hardpps.
+ Fix the size of a memset().
+ Support for M12+.
+
+ ntpd/refclock_atom.c
+ 1.41 02/08/28 03:39:29 stenn@whimsy.udel.edu +2 -4
+ Remove pps_assert and pps_hardpps.
+
+ ntpd/ntp_config.c
+ 1.76 02/08/28 03:39:29 stenn@whimsy.udel.edu +0 -45
+ Lose PPS stuff and pps_assert/pps_hardpps.
+ From Reg Clemens.
+
+ html/driver30.htm
+ 1.9 02/08/28 03:39:29 stenn@whimsy.udel.edu +9 -11
+ Cleanup from Reg Clemens.
+
+ChangeSet
+ 1.904 02/08/25 02:47:21 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ acinclude.m4
+ 1.10 02/08/25 02:47:19 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ acinclude.m4
+ 1.9 02/08/25 02:47:18 stenn@whimsy.udel.edu +0 -0
+ Merge rename: BitKeeper/deleted/.del-acinclude.m4~457f12ef -> acinclude.m4
+
+ BitKeeper/etc/ignore
+ 1.23 02/08/25 02:47:12 stenn@whimsy.udel.edu +0 -0
+ auto-union
+
+ChangeSet
+ 1.683.4.113 02/08/25 02:45:14 stenn@whimsy.udel.edu +2 -0
+ Wrong toast...
+
+ BitKeeper/etc/ignore
+ 1.1.2.17 02/08/25 02:45:11 stenn@whimsy.udel.edu +0 -1
+ Wrong toast...
+
+ acinclude.m4
+ 1.3.1.6 02/08/25 02:41:22 stenn@whimsy.udel.edu +0 -0
+ Rename: BitKeeper/deleted/.del-acinclude.m4~457f12ef -> acinclude.m4
+
+ChangeSet
+ 1.903 02/08/25 02:34:21 stenn@whimsy.udel.edu +10 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ BitKeeper/deleted/.del-mkinstalldirs~3aed0663
+ 1.9 02/08/25 02:34:18 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-missing~3aed0663
+ 1.9 02/08/25 02:34:18 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-install-sh~3e480692
+ 1.7 02/08/25 02:34:18 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-depcomp~4c5f0744
+ 1.8 02/08/25 02:34:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-config.sub~3aed0663
+ 1.13 02/08/25 02:34:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-config.guess~3aed0663
+ 1.13 02/08/25 02:34:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-acinclude.m4~457f12ef
+ 1.8 02/08/25 02:34:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-acinclude.m4~457f12ef
+ 1.7 02/08/25 02:34:14 stenn@whimsy.udel.edu +0 -0
+ Merge rename: acinclude.m4 -> BitKeeper/deleted/.del-acinclude.m4~457f12ef
+
+ BitKeeper/etc/gone
+ 1.4 02/08/25 02:34:10 stenn@whimsy.udel.edu +6 -0
+ 'Auto converge'
+
+ BitKeeper/etc/gone
+ 1.3 02/08/25 02:34:10 stenn@whimsy.udel.edu +0 -0
+ Rename: BitKeeper/deleted/.del-gone~2d146fa833ebf630 -> BitKeeper/etc/gone
+
+ BitKeeper/deleted/.del-gone~49d73223570d08a2
+ 1.2 02/08/25 02:34:09 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/etc/gone
+
+ BitKeeper/deleted/.del-gone~2d146fa833ebf630
+ 1.2 02/08/25 02:34:09 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/ignore
+ 1.22 02/08/25 02:34:07 stenn@whimsy.udel.edu +4 -10
+ auto-union
+
+ChangeSet
+ 1.683.4.112 02/08/25 02:15:43 stenn@whimsy.udel.edu +2 -0
+ Lose more auto* generated files.
+
+ BitKeeper/etc/ignore
+ 1.1.2.16 02/08/25 02:13:45 stenn@whimsy.udel.edu +1 -0
+ added acinclude.m4
+
+ BitKeeper/deleted/.del-acinclude.m4~457f12ef
+ 1.3.1.5 02/08/25 02:13:41 stenn@whimsy.udel.edu +0 -0
+ Delete: acinclude.m4
+
+ChangeSet
+ 1.683.4.111 02/08/25 02:06:54 stenn@whimsy.udel.edu +1 -0
+ Lose some auto* generated files.
+
+ BitKeeper/etc/gone
+ 1.1 02/08/25 02:04:22 stenn@whimsy.udel.edu +6 -0
+
+ BitKeeper/etc/gone
+ 1.0 02/08/25 02:04:22 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/etc/gone
+
+ChangeSet
+ 1.683.4.110 02/08/25 01:52:06 stenn@whimsy.udel.edu +9 -0
+ Lose (and ignore) auto* generated files.
+
+ BitKeeper/etc/ignore
+ 1.1.2.15 02/08/25 01:42:42 stenn@whimsy.udel.edu +1 -0
+ added mkinstalldirs
+
+ BitKeeper/etc/ignore
+ 1.1.2.14 02/08/25 01:42:41 stenn@whimsy.udel.edu +1 -0
+ added missing
+
+ BitKeeper/etc/ignore
+ 1.1.2.13 02/08/25 01:42:41 stenn@whimsy.udel.edu +1 -0
+ added install-sh
+
+ BitKeeper/etc/ignore
+ 1.1.2.12 02/08/25 01:42:41 stenn@whimsy.udel.edu +1 -0
+ added depcomp
+
+ BitKeeper/deleted/.del-mkinstalldirs~3aed0663
+ 1.7.1.1 02/08/25 01:42:42 stenn@whimsy.udel.edu +0 -0
+ Delete: mkinstalldirs
+
+ BitKeeper/etc/ignore
+ 1.1.2.11 02/08/25 01:42:40 stenn@whimsy.udel.edu +1 -0
+ added config.sub
+
+ BitKeeper/deleted/.del-missing~3aed0663
+ 1.7.1.1 02/08/25 01:42:41 stenn@whimsy.udel.edu +0 -0
+ Delete: missing
+
+ BitKeeper/deleted/.del-install-sh~3e480692
+ 1.5.1.1 02/08/25 01:42:41 stenn@whimsy.udel.edu +0 -0
+ Delete: install-sh
+
+ BitKeeper/etc/ignore
+ 1.1.2.10 02/08/25 01:42:40 stenn@whimsy.udel.edu +1 -0
+ added config.guess
+
+ BitKeeper/deleted/.del-depcomp~4c5f0744
+ 1.6.1.1 02/08/25 01:42:40 stenn@whimsy.udel.edu +0 -0
+ Delete: depcomp
+
+ BitKeeper/deleted/.del-config.sub~3aed0663
+ 1.10.1.1 02/08/25 01:42:40 stenn@whimsy.udel.edu +0 -0
+ Delete: config.sub
+
+ BitKeeper/deleted/.del-config.guess~3aed0663
+ 1.10.1.1 02/08/25 01:42:40 stenn@whimsy.udel.edu +0 -0
+ Delete: config.guess
+
+ BitKeeper/etc/ignore
+ 1.1.2.9 02/08/25 01:28:26 stenn@whimsy.udel.edu +2 -0
+ added ansi2knr.1 ansi2knr.c
+
+ BitKeeper/deleted/.del-ansi2knr.c~3aed0663
+ 1.4 02/08/25 01:27:22 stenn@whimsy.udel.edu +0 -0
+ Delete: util/ansi2knr.c
+
+ BitKeeper/deleted/.del-ansi2knr.1~3e480692
+ 1.3 02/08/25 01:27:22 stenn@whimsy.udel.edu +0 -0
+ Delete: util/ansi2knr.1
+
+ChangeSet
+ 1.902 02/08/22 19:53:45 jhay@angel.cids.org.za +1 -0
+ Add the files just removed to the ignore list, so that bk isn't surprised when
+ they appear after a autoreconf run.
+
+ BitKeeper/etc/ignore
+ 1.21 02/08/22 19:53:45 jhay@angel.cids.org.za +6 -0
+ Add the files just removed to the ignore list, so that bk isn't surprised when
+ they appear after a autoreconf run.
+
+ChangeSet
+ 1.901 02/08/22 19:43:01 jhay@angel.cids.org.za +6 -0
+ Remove files created by autoreconf.
+
+ BitKeeper/deleted/.del-mkinstalldirs~3aed0663
+ 1.8 02/08/22 19:41:14 jhay@angel.cids.org.za +0 -0
+ Delete: mkinstalldirs
+
+ BitKeeper/deleted/.del-missing~3aed0663
+ 1.8 02/08/22 19:41:14 jhay@angel.cids.org.za +0 -0
+ Delete: missing
+
+ BitKeeper/deleted/.del-install-sh~3e480692
+ 1.6 02/08/22 19:41:14 jhay@angel.cids.org.za +0 -0
+ Delete: install-sh
+
+ BitKeeper/deleted/.del-depcomp~4c5f0744
+ 1.7 02/08/22 19:41:14 jhay@angel.cids.org.za +0 -0
+ Delete: depcomp
+
+ BitKeeper/deleted/.del-config.sub~3aed0663
+ 1.12 02/08/22 19:41:14 jhay@angel.cids.org.za +0 -0
+ Delete: config.sub
+
+ BitKeeper/deleted/.del-config.guess~3aed0663
+ 1.12 02/08/22 19:41:14 jhay@angel.cids.org.za +0 -0
+ Delete: config.guess
+
+ChangeSet
+ 1.900 02/08/18 23:33:44 stenn@whimsy.udel.edu +2 -0
+ Patch from Rainer Orth:
+
+ Provide u_int64_t if missing (IRIX 6.5.12 defines u_int8_t,
+ but lacks u_int64_t).
+
+ include/ntp_rfc2553.h
+ 1.6 02/08/18 23:33:41 stenn@whimsy.udel.edu +4 -1
+ Use the new u_unt64_t test.
+
+ configure.in
+ 1.273 02/08/18 23:33:41 stenn@whimsy.udel.edu +10 -0
+ Separate the u_int64_t test.
+
+ChangeSet
+ 1.899 02/08/18 23:22:31 stenn@whimsy.udel.edu +1 -0
+ Dave hacked some changes to the keyID code dealing with the MAC,
+ apparently dealing with #ifdef OPENSSL.
+
+ ntpd/ntp_proto.c
+ 1.131 02/08/18 23:22:27 stenn@whimsy.udel.edu +9 -9
+ Dave hacked some changes to the keyID code dealing with the MAC,
+ apparently dealing with #ifdef OPENSSL.
+
+ChangeSet
+ 1.898 02/08/15 03:10:36 stenn@whimsy.udel.edu +1 -0
+ More documentation updates.
+
+ html/driver42.htm
+ 1.5 02/08/15 03:10:33 stenn@whimsy.udel.edu +30 -40
+ Somebody reformatted this...
+
+ChangeSet
+ 1.897 02/08/15 02:33:39 stenn@whimsy.udel.edu +14 -0
+ HTML updates from Dave Mills.
+
+ html/release.htm
+ 1.19 02/08/15 02:33:35 stenn@whimsy.udel.edu +119 -84
+ Upates from Dave Mills
+
+ html/refclock.htm
+ 1.19 02/08/15 02:33:35 stenn@whimsy.udel.edu +242 -189
+ Upates from Dave Mills
+
+ html/ntpq.htm
+ 1.11 02/08/15 02:33:35 stenn@whimsy.udel.edu +181 -164
+ Upates from Dave Mills
+
+ html/ntpd.htm
+ 1.17 02/08/15 02:33:35 stenn@whimsy.udel.edu +7 -5
+ Upates from Dave Mills
+
+ html/miscopt.htm
+ 1.17 02/08/15 02:33:34 stenn@whimsy.udel.edu +6 -0
+ Upates from Dave Mills
+
+ html/index.htm
+ 1.15 02/08/15 02:33:34 stenn@whimsy.udel.edu +12 -3
+ Upates from Dave Mills
+
+ html/genkeys.htm
+ 1.10 02/08/15 02:33:34 stenn@whimsy.udel.edu +384 -152
+ Upates from Dave Mills
+
+ html/driver44.htm
+ 1.2 02/08/15 02:33:34 stenn@whimsy.udel.edu +2 -2
+ Upates from Dave Mills
+
+ html/debug.htm
+ 1.9 02/08/15 02:33:34 stenn@whimsy.udel.edu +159 -51
+ Upates from Dave Mills
+
+ html/copyright.htm
+ 1.20 02/08/15 02:33:34 stenn@whimsy.udel.edu +5 -1
+ Upates from Dave Mills
+
+ html/confopt.htm
+ 1.18 02/08/15 02:33:34 stenn@whimsy.udel.edu +32 -15
+ Upates from Dave Mills
+
+ html/config.htm
+ 1.8 02/08/15 02:33:34 stenn@whimsy.udel.edu +63 -52
+ Upates from Dave Mills
+
+ html/authopt.htm
+ 1.18 02/08/15 02:33:33 stenn@whimsy.udel.edu +253 -201
+ Upates from Dave Mills
+
+ html/accopt.htm
+ 1.10 02/08/15 02:33:33 stenn@whimsy.udel.edu +53 -36
+ Upates from Dave Mills
+
+ChangeSet
+ 1.896 02/08/13 20:03:41 jhay@angel.cids.org.za +3 -0
+ Fix compilation on Slackware 8.1 with the help of Andrew Hood
+ <mithrandir@alwaysonline.net.au>
+
+ ntpq/ntpq.c
+ 1.27 02/08/13 20:03:40 jhay@angel.cids.org.za +8 -2
+ Fix compilation on Slackware 8.1 with the help of Andrew Hood
+ <mithrandir@alwaysonline.net.au>
+
+ ntpdc/ntpdc.c
+ 1.19 02/08/13 20:03:40 jhay@angel.cids.org.za +8 -2
+ Fix compilation on Slackware 8.1 with the help of Andrew Hood
+ <mithrandir@alwaysonline.net.au>
+
+ include/ntp_rfc2553.h
+ 1.5 02/08/13 20:03:40 jhay@angel.cids.org.za +1 -1
+ Fix compilation on Slackware 8.1 with the help of Andrew Hood
+ <mithrandir@alwaysonline.net.au>
+
+ChangeSet
+ 1.895 02/08/07 10:08:32 jhay@angel.cids.org.za +2 -0
+ Fix the breakage caused by my warning reduction.
+
+ ntpd/ntp_io.c
+ 1.39 02/08/07 10:08:31 jhay@angel.cids.org.za +0 -2
+ Remove haddr6 totally in io_multicast_add(). It does not seem to be needed. This
+ will unbreak the build on solaris 8.
+
+ include/l_stdlib.h
+ 1.10 02/08/07 10:08:31 jhay@angel.cids.org.za +0 -2
+ Remove #include <stdio.h> again. It breaks libparse. I'll fix the missing prototypes
+ for printf and friends another way.
+
+ChangeSet
+ 1.894 02/08/06 21:03:46 jhay@angel.cids.org.za +21 -0
+ Reduce compiler warnings.
+
+ util/ntptime.c
+ 1.15 02/08/06 21:03:45 jhay@angel.cids.org.za +1 -1
+ Reduce compiler warnings.
+
+ util/ntp-keygen.c
+ 1.13 02/08/06 21:03:45 jhay@angel.cids.org.za +2 -1
+ Reduce compiler warnings.
+
+ ntpq/ntpq.c
+ 1.26 02/08/06 21:03:45 jhay@angel.cids.org.za +2 -2
+ Reduce compiler warnings.
+
+ ntpdc/ntpdc.c
+ 1.18 02/08/06 21:03:45 jhay@angel.cids.org.za +2 -2
+ Reduce compiler warnings.
+
+ ntpd/refclock_msfees.c
+ 1.9 02/08/06 21:03:44 jhay@angel.cids.org.za +1 -1
+ Reduce compiler warnings.
+
+ ntpd/refclock_hopfser.c
+ 1.4.1.1 02/08/06 21:03:44 jhay@angel.cids.org.za +7 -7
+ Reduce compiler warnings.
+
+ ntpd/refclock_hopfpci.c
+ 1.6 02/08/06 21:03:44 jhay@angel.cids.org.za +1 -1
+ Reduce compiler warnings.
+
+ ntpd/ntp_proto.c
+ 1.130 02/08/06 21:03:44 jhay@angel.cids.org.za +2 -0
+ Reduce compiler warnings.
+
+ ntpd/ntp_io.c
+ 1.38 02/08/06 21:03:44 jhay@angel.cids.org.za +1 -1
+ Reduce compiler warnings.
+
+ ntpd/ntp_crypto.c
+ 1.70 02/08/06 21:03:44 jhay@angel.cids.org.za +0 -2
+ Reduce compiler warnings.
+
+ ntpd/ntp_config.c
+ 1.75 02/08/06 21:03:44 jhay@angel.cids.org.za +1 -1
+ Reduce compiler warnings.
+
+ libntp/strerror.c
+ 1.4 02/08/06 21:03:44 jhay@angel.cids.org.za +2 -0
+ Reduce compiler warnings.
+
+ libntp/snprintf.c
+ 1.7 02/08/06 21:03:44 jhay@angel.cids.org.za +2 -0
+ Reduce compiler warnings.
+
+ libntp/ntp_rfc2553.c
+ 1.9 02/08/06 21:03:44 jhay@angel.cids.org.za +2 -1
+ Reduce compiler warnings.
+
+ libntp/memmove.c
+ 1.3 02/08/06 21:03:44 jhay@angel.cids.org.za +6 -2
+ Reduce compiler warnings.
+
+ libntp/md5c.c
+ 1.3 02/08/06 21:03:44 jhay@angel.cids.org.za +9 -9
+ Reduce compiler warnings.
+
+ libntp/icom.c
+ 1.8 02/08/06 21:03:44 jhay@angel.cids.org.za +1 -0
+ Reduce compiler warnings.
+
+ libntp/audio.c
+ 1.17 02/08/06 21:03:44 jhay@angel.cids.org.za +6 -6
+ Reduce compiler warnings.
+
+ kernel/sys/parsestreams.h
+ 1.4 02/08/06 21:03:44 jhay@angel.cids.org.za +2 -0
+ Reduce compiler warnings.
+
+ include/ntp_rfc2553.h
+ 1.4 02/08/06 21:03:44 jhay@angel.cids.org.za +0 -1
+ Reduce compiler warnings.
+
+ include/l_stdlib.h
+ 1.9 02/08/06 21:03:44 jhay@angel.cids.org.za +2 -0
+ Reduce compiler warnings.
+
+ChangeSet
+ 1.893 02/08/06 04:15:38 stenn@whimsy.udel.edu +4 -0
+ Calldelay, from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.129 02/08/06 04:15:33 stenn@whimsy.udel.edu +27 -10
+ calldelay, from Dave Mills.
+
+ ntpd/ntp_config.c
+ 1.74 02/08/06 04:15:32 stenn@whimsy.udel.edu +13 -0
+ Implement calldelay, from Dave Mills.
+
+ include/ntp_config.h
+ 1.20 02/08/06 04:15:32 stenn@whimsy.udel.edu +2 -1
+ CONFIG_CDELAY from Dave Mills.
+
+ include/ntp.h
+ 1.74 02/08/06 04:15:32 stenn@whimsy.udel.edu +2 -3
+ PROTO_CALLDELAY from Dave Mills.
+
+ChangeSet
+ 1.892 02/08/04 23:05:58 stenn@whimsy.udel.edu +1 -0
+ Attempt to compensate for Microsoft's protocol violations.
+ From: Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.128 02/08/04 23:05:55 stenn@whimsy.udel.edu +4 -3
+ Attempt to compensate for Microsoft's protocol violations.
+ From: Dave Mills.
+
+ChangeSet
+ 1.891 02/08/04 06:55:16 jhay@angel.cids.org.za +2 -0
+ Get rid of some warnings.
+
+ ntpq/ntpq.c
+ 1.25 02/08/04 06:55:13 jhay@angel.cids.org.za +1 -1
+ Comment out the rest of the #endif line to make the compiler a little happier.
+
+ ntpdc/ntpdc.c
+ 1.17 02/08/04 06:55:12 jhay@angel.cids.org.za +3 -3
+ Get rid of a warning I caused in my previous commit.
+
+ChangeSet
+ 1.890 02/08/03 19:50:25 jhay@angel.cids.org.za +4 -0
+ Add address family selection to ntpdc and ntpq. The -4|-6 overrides can be used
+ on the commandline, the host command and all the places in ntpdc that use dns
+ names or addresses in their arguments.
+
+ ntpq/ntpq_ops.c
+ 1.14 02/08/03 19:50:25 jhay@angel.cids.org.za +6 -6
+ Add address family selection to ntpdc and ntpq. The -4|-6 overrides can be used
+ on the commandline, the host command and all the places in ntpdc that use dns
+ names or addresses in their arguments.
+
+ ntpq/ntpq.c
+ 1.24 02/08/03 19:50:24 jhay@angel.cids.org.za +43 -14
+ Add address family selection to ntpdc and ntpq. The -4|-6 overrides can be used
+ on the commandline, the host command and all the places in ntpdc that use dns
+ names or addresses in their arguments.
+
+ ntpdc/ntpdc_ops.c
+ 1.21 02/08/03 19:50:24 jhay@angel.cids.org.za +4 -4
+ Add address family selection to ntpdc and ntpq. The -4|-6 overrides can be used
+ on the commandline, the host command and all the places in ntpdc that use dns
+ names or addresses in their arguments.
+
+ ntpdc/ntpdc.c
+ 1.16 02/08/03 19:50:24 jhay@angel.cids.org.za +81 -26
+ Add address family selection to ntpdc and ntpq. The -4|-6 overrides can be used
+ on the commandline, the host command and all the places in ntpdc that use dns
+ names or addresses in their arguments.
+
+ChangeSet
+ 1.889 02/08/01 06:11:17 jhay@angel.cids.org.za +1 -0
+ Add address family override on the commandline. Use -4/-6 like most other
+ programs that do it. Note that it overrides it for all the servers on the
+ commandline.
+
+ ntpdate/ntpdate.c
+ 1.35 02/08/01 06:11:16 jhay@angel.cids.org.za +12 -5
+ Add address family override on the commandline. Use -4/-6 like most other
+ programs that do it. Note that it overrides it for all the servers on the
+ commandline.
+
+ChangeSet
+ 1.888 02/07/31 21:33:33 jhay@angel.cids.org.za +1 -0
+ Remove stop_timer() and so make multiple servers work again. I really don't
+ know why this piece of code came with the original IPv6 port. Ntpdate did not
+ need it before and is broken with it.
+
+ ntpdate/ntpdate.c
+ 1.34 02/07/31 21:33:32 jhay@angel.cids.org.za +1 -20
+ Remove stop_timer() and so make multiple servers work again. I really don't
+ know why this piece of code came with the original IPv6 port. Ntpdate did not
+ need it before and is broken with it.
+
+ChangeSet
+ 1.887 02/07/30 17:08:59 stenn@whimsy.udel.edu +1 -0
+ Disable the RIPE NCC clock by default until the sprintf() problem
+ is fixed.
+
+ configure.in
+ 1.272 02/07/30 17:08:55 stenn@whimsy.udel.edu +1 -1
+ Disable the RIPE NCC clock by default until the sprintf() problem
+ is fixed.
+
+ChangeSet
+ 1.886 02/07/30 12:44:12 jhay@angel.cids.org.za +1 -0
+ Add an extra argument, complain, to matchkey() so that the caller can tell it
+ if it should be quiet or verbose about missing keywords. This should quiet
+ down syslog after the addition of the -4 / -6 address specifier.
+
+ ntpd/ntp_config.c
+ 1.73 02/07/30 12:44:02 jhay@angel.cids.org.za +27 -24
+ Add an extra argument, complain, to matchkey() so that the caller can tell it
+ if it should be quiet or verbose about missing keywords. This should quiet
+ down syslog after the addition of the -4 / -6 address specifier.
+
+ChangeSet
+ 1.885 02/07/30 02:40:03 stenn@whimsy.udel.edu +2 -0
+ Lose the ntp-dev-ipv6 info, IPv6 is now part of ntp-dev.
+
+ README.bk
+ 1.13 02/07/30 02:39:57 stenn@whimsy.udel.edu +0 -11
+ Lose the ntp-dev-ipv6 info, IPv6 is now part of ntp-dev.
+
+ BitKeeper/deleted/.del-INSTALLv6.txt~afab5ba5572d4686
+ 1.2 02/07/30 02:37:19 stenn@whimsy.udel.edu +0 -0
+ Delete: INSTALLv6.txt
+
+ChangeSet
+ 1.884 02/07/29 11:20:21 jhay@angel.cids.org.za +7 -0
+ Second try at getting the refid stuff right for ipv6. Add an addr_refid field
+ to the interface structure and hash each interface address on startup. This is
+ then used to compare the incoming refid's against. The hash function,
+ addr2refid() use md5 on the ipv6 addresses and use the ipv4 addresses just as
+ it is. Add sys_peer_refid which is the hash value of the ip address of sys_peer
+ and gets recalculated in clock_select() when sys_peer change. This way the
+ behaviour for the ipv4 case stay the same as previous implementations.
+
+ ntpd/refclock_atom.c
+ 1.40 02/07/29 11:20:19 jhay@angel.cids.org.za +1 -1
+ Second try at getting the refid stuff right for ipv6. Add an addr_refid field
+ to the interface structure and hash each interface address on startup. This is
+ then used to compare the incoming refid's against. The hash function,
+ addr2refid() use md5 on the ipv6 addresses and use the ipv4 addresses just as
+ it is. Add sys_peer_refid which is the hash value of the ip address of sys_peer
+ and gets recalculated in clock_select() when sys_peer change. This way the
+ behaviour for the ipv4 case stay the same as previous implementations.
+
+ ntpd/ntp_proto.c
+ 1.127 02/07/29 11:20:19 jhay@angel.cids.org.za +11 -13
+ Second try at getting the refid stuff right for ipv6. Add an addr_refid field
+ to the interface structure and hash each interface address on startup. This is
+ then used to compare the incoming refid's against. The hash function,
+ addr2refid() use md5 on the ipv6 addresses and use the ipv4 addresses just as
+ it is. Add sys_peer_refid which is the hash value of the ip address of sys_peer
+ and gets recalculated in clock_select() when sys_peer change. This way the
+ behaviour for the ipv4 case stay the same as previous implementations.
+
+ ntpd/ntp_io.c
+ 1.37 02/07/29 11:20:19 jhay@angel.cids.org.za +7 -43
+ Second try at getting the refid stuff right for ipv6. Add an addr_refid field
+ to the interface structure and hash each interface address on startup. This is
+ then used to compare the incoming refid's against. The hash function,
+ addr2refid() use md5 on the ipv6 addresses and use the ipv4 addresses just as
+ it is. Add sys_peer_refid which is the hash value of the ip address of sys_peer
+ and gets recalculated in clock_select() when sys_peer change. This way the
+ behaviour for the ipv4 case stay the same as previous implementations.
+
+ libntp/a_md5encrypt.c
+ 1.8.1.1 02/07/29 11:20:19 jhay@angel.cids.org.za +34 -0
+ Second try at getting the refid stuff right for ipv6. Add an addr_refid field
+ to the interface structure and hash each interface address on startup. This is
+ then used to compare the incoming refid's against. The hash function,
+ addr2refid() use md5 on the ipv6 addresses and use the ipv4 addresses just as
+ it is. Add sys_peer_refid which is the hash value of the ip address of sys_peer
+ and gets recalculated in clock_select() when sys_peer change. This way the
+ behaviour for the ipv4 case stay the same as previous implementations.
+
+ include/ntpd.h
+ 1.48 02/07/29 11:20:19 jhay@angel.cids.org.za +0 -1
+ Second try at getting the refid stuff right for ipv6. Add an addr_refid field
+ to the interface structure and hash each interface address on startup. This is
+ then used to compare the incoming refid's against. The hash function,
+ addr2refid() use md5 on the ipv6 addresses and use the ipv4 addresses just as
+ it is. Add sys_peer_refid which is the hash value of the ip address of sys_peer
+ and gets recalculated in clock_select() when sys_peer change. This way the
+ behaviour for the ipv4 case stay the same as previous implementations.
+
+ include/ntp_stdlib.h
+ 1.17 02/07/29 11:20:19 jhay@angel.cids.org.za +1 -0
+ Second try at getting the refid stuff right for ipv6. Add an addr_refid field
+ to the interface structure and hash each interface address on startup. This is
+ then used to compare the incoming refid's against. The hash function,
+ addr2refid() use md5 on the ipv6 addresses and use the ipv4 addresses just as
+ it is. Add sys_peer_refid which is the hash value of the ip address of sys_peer
+ and gets recalculated in clock_select() when sys_peer change. This way the
+ behaviour for the ipv4 case stay the same as previous implementations.
+
+ include/ntp.h
+ 1.73 02/07/29 11:20:19 jhay@angel.cids.org.za +1 -0
+ Second try at getting the refid stuff right for ipv6. Add an addr_refid field
+ to the interface structure and hash each interface address on startup. This is
+ then used to compare the incoming refid's against. The hash function,
+ addr2refid() use md5 on the ipv6 addresses and use the ipv4 addresses just as
+ it is. Add sys_peer_refid which is the hash value of the ip address of sys_peer
+ and gets recalculated in clock_select() when sys_peer change. This way the
+ behaviour for the ipv4 case stay the same as previous implementations.
+
+ChangeSet
+ 1.883 02/07/29 08:11:14 jhay@angel.cids.org.za +2 -0
+ Make it possible to force the dns to resolve names to IPv4 or IPv6. This is done
+ by adding an optional -4 or -6 keyword before all the places where a dns name can
+ be used, for example, these are valid:
+
+ server -4 some.domain ...
+ server -6 some.domain ...
+ server some.domain ...
+
+ ntpd/ntp_config.c
+ 1.72 02/07/29 08:11:13 jhay@angel.cids.org.za +103 -20
+ Make it possible to force the dns to resolve names to IPv4 or IPv6. This is done
+ by adding an optional -4 or -6 keyword before all the places where a dns name can
+ be used, for example, these are valid:
+
+ server -4 some.domain ...
+ server -6 some.domain ...
+ server some.domain ...
+
+ include/ntp_config.h
+ 1.19 02/07/29 08:11:13 jhay@angel.cids.org.za +6 -0
+ Make it possible to force the dns to resolve names to IPv4 or IPv6. This is done
+ by adding an optional -4 or -6 keyword before all the places where a dns name can
+ be used, for example, these are valid:
+
+ server -4 some.domain ...
+ server -6 some.domain ...
+ server some.domain ...
+
+ChangeSet
+ 1.882 02/07/29 07:58:13 jhay@angel.cids.org.za +1 -0
+ Older implementations of IPv6 used IPV6_BINDV6ONLY instead of IPV6_V6ONLY. Support
+ them too.
+
+ ntpd/ntp_io.c
+ 1.36 02/07/29 07:58:12 jhay@angel.cids.org.za +10 -0
+ Older implementations of IPv6 used IPV6_BINDV6ONLY instead of IPV6_V6ONLY. Support
+ them too.
+
+ChangeSet
+ 1.881 02/07/27 01:12:41 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.271 02/07/27 01:12:38 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.62 02/07/27 00:59:05 stenn@whimsy.udel.edu +1 -0
+ Merge cleanup.
+
+ configure.in
+ 1.226.1.55 02/07/27 00:59:03 stenn@whimsy.udel.edu +1 -2
+ Merge cleanup.
+
+ChangeSet
+ 1.683.4.109 02/07/27 00:52:48 stenn@whimsy.udel.edu +1 -0
+ Typo, reported by BOUWSMA Beery.
+
+ configure.in
+ 1.219.3.30 02/07/27 00:52:44 stenn@whimsy.udel.edu +2 -2
+ Typo, reported by BOUWSMA Beery.
+
+ChangeSet
+ 1.878.1.1 02/07/26 20:57:23 stenn@whimsy.udel.edu +2 -0
+ Changes from Dave Mills (near as I can tell).
+
+ ntpd/ntp_proto.c
+ 1.126 02/07/26 20:57:20 stenn@whimsy.udel.edu +1 -1
+ Lose a burst check.
+
+ ntpd/ntp_control.c
+ 1.55 02/07/26 20:57:19 stenn@whimsy.udel.edu +1 -1
+ recval.tstamp needs to be "put" in network order.
+
+ChangeSet
+ 1.879 02/07/26 19:57:44 jhay@angel.cids.org.za +1 -0
+ Catch a srcadr that should be a dstadr, thanks to BOUWSMA Beery.
+
+ ntpq/ntpq_ops.c
+ 1.13 02/07/26 19:57:43 jhay@angel.cids.org.za +1 -1
+ Catch a srcadr that should be a dstadr, thanks to BOUWSMA Beery.
+
+ChangeSet
+ 1.878 02/07/24 00:59:37 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.270 02/07/24 00:59:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.61 02/07/24 00:44:47 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.226.1.54 02/07/24 00:44:45 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ChangeSet
+ 1.683.4.108 02/07/24 00:38:12 stenn@whimsy.udel.edu +1 -0
+ Make sure the readline headers exist before checking for the library.
+
+ configure.in
+ 1.219.3.29 02/07/24 00:38:07 stenn@whimsy.udel.edu +14 -9
+ Make sure the readline headers exist before checking for the library.
+
+ChangeSet
+ 1.877 02/07/22 21:11:44 jhay@angel.cids.org.za +1 -0
+ Cleanup debug printf.
+
+ libntp/ntp_rfc2553.c
+ 1.8 02/07/22 21:11:43 jhay@angel.cids.org.za +1 -2
+ Cleanup debug printf.
+
+ChangeSet
+ 1.876 02/07/22 18:45:54 jhay@angel.cids.org.za +2 -0
+ Some fixes to make ntpdate work on SunOS4.
+
+ ntpdate/ntpdate.c
+ 1.33 02/07/22 18:45:53 jhay@angel.cids.org.za +1 -1
+ Use SOCKLEN() rather than ai_addrlen, it is safer on older machines.
+
+ libntp/ntp_rfc2553.c
+ 1.7 02/07/22 18:45:53 jhay@angel.cids.org.za +3 -4
+ Found a little bug, use INADDR_ANY and not LOCALHOST. Also fill in a few more fields
+ that SunOS4 needs to make ntpdate work.
+
+ChangeSet
+ 1.875 02/07/21 16:14:22 jhay@angel.cids.org.za +1 -0
+ Fill in a few more needed fields in the ipv4_aton() case. This makes getnetnum()
+ happy, says SunOS4.
+
+ libntp/ntp_rfc2553.c
+ 1.6 02/07/21 16:14:21 jhay@angel.cids.org.za +3 -0
+ Fill in a few more needed fields in the ipv4_aton() case. This makes getnetnum()
+ happy, says SunOS4.
+
+ChangeSet
+ 1.874 02/07/19 22:42:28 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.269 02/07/19 22:42:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.60 02/07/19 22:39:20 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.226.1.53 02/07/19 22:39:18 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.107 02/07/19 22:35:24 stenn@whimsy.udel.edu +1 -0
+ Disable the NeoCLock by default for now - the driver assumes sprintf()
+ returns an int...
+
+ configure.in
+ 1.219.3.28 02/07/19 22:35:18 stenn@whimsy.udel.edu +2 -2
+ Disable the NeoCLock by default for now - the driver assumes sprintf()
+ returns an int...
+
+ChangeSet
+ 1.873 02/07/19 16:49:39 stenn@whimsy.udel.edu +1 -0
+ Tabify, and replace the REFCLOC_MAX that got lost.
+
+ include/ntp.h
+ 1.72 02/07/19 16:49:34 stenn@whimsy.udel.edu +15 -14
+ Tabify, and replace the REFCLOC_MAX that got lost.
+
+ChangeSet
+ 1.872 02/07/19 16:25:46 stenn@whimsy.udel.edu +4 -0
+ Merge cleanup.
+
+ include/ntp.h
+ 1.71 02/07/19 16:25:41 stenn@whimsy.udel.edu +0 -1
+ Merge cleanup
+
+ ntpd/ntp_control.c
+ 1.54 02/07/19 16:15:43 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.268 02/07/19 16:15:42 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.10 02/07/19 16:15:35 stenn@whimsy.udel.edu +0 -0
+ auto-union
+
+ChangeSet
+ 1.706.10.59 02/07/19 16:02:19 stenn@whimsy.udel.edu +1 -0
+ Merge cleanup (neoclock)
+
+ configure.in
+ 1.226.1.52 02/07/19 16:02:15 stenn@whimsy.udel.edu +0 -10
+ Merge cleanup.
+
+ChangeSet
+ 1.683.4.106 02/07/19 14:06:56 stenn@whimsy.udel.edu +1 -0
+ Alphabetize the neoclock test.
+
+ configure.in
+ 1.219.3.27 02/07/19 14:06:51 stenn@whimsy.udel.edu +10 -10
+ Alphabetize the neoclock test.
+
+ChangeSet
+ 1.706.10.58 02/07/19 13:44:43 stenn@whimsy.udel.edu +1 -0
+ neoclock msec/nsec conversion attempt.
+
+ ntpd/refclock_neoclock4x.c
+ 1.2 02/07/19 13:44:37 stenn@whimsy.udel.edu +4 -4
+ msec -> nsec conversion attempt.
+
+ChangeSet
+ 1.706.10.57 02/07/19 13:16:01 stenn@whimsy.udel.edu +9 -0
+ Merge cleanup.
+
+ libntp/clocktypes.c
+ 1.15 02/07/19 13:15:54 stenn@whimsy.udel.edu +2 -2
+ Merge cleanup (I hope).
+
+ configure.in
+ 1.226.1.51 02/07/19 13:15:54 stenn@whimsy.udel.edu +10 -10
+ Put the NeoCLock4X check in alphabetic sequence.
+
+ ntpd/refclock_conf.c
+ 1.21 02/07/19 12:34:40 stenn@whimsy.udel.edu +8 -9
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.39.2.6 02/07/19 12:34:39 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/Makefile.am
+ 1.33 02/07/19 12:34:39 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.50.1.19 02/07/19 12:34:38 stenn@whimsy.udel.edu +2 -3
+ Auto merged
+
+ html/refclock.htm
+ 1.18 02/07/19 12:34:38 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.3.3.3 02/07/19 12:34:33 stenn@whimsy.udel.edu +1 -0
+ 'Auto converge'
+
+ BitKeeper/etc/logging_ok
+ 1.3.3.2 02/07/19 12:34:33 stenn@whimsy.udel.edu +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.8.1.2 02/07/19 12:34:33 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.3.3.1 02/07/19 12:34:32 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.8.1.1 02/07/19 12:34:30 stenn@whimsy.udel.edu +1 -1
+ auto-union
+
+ChangeSet
+ 1.871 02/07/19 16:05:58 jhay@angel.cids.org.za +1 -0
+ If gethostbyname() fails, try to decode the string as a ipv4 number. This should
+ make SunOS 4 happy.
+
+ libntp/ntp_rfc2553.c
+ 1.5 02/07/19 16:05:57 jhay@angel.cids.org.za +84 -5
+ If gethostbyname() fails, try to decode the string as a ipv4 number. This should
+ make SunOS 4 happy.
+
+ChangeSet
+ 1.683.4.105 02/07/18 17:44:35 claas@webfix.linum.ein +11 -0
+ Many files:
+ support for new refclock driver NeoClock4X
+ neoclock4x.gif, driver44.htm, refclock_neoclock4x.c:
+ support for new refclock driver NeoClock4X
+
+ BitKeeper/etc/logging_ok
+ 1.1.1.4 02/07/18 17:44:35 claas@webfix.linum.ein +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpd/refclock_conf.c
+ 1.13.1.6 02/07/18 17:42:39 claas@webfix.linum.ein +8 -1
+ new reflock driver NeoClock4X
+
+ ntpd/ntp_control.c
+ 1.37.3.6 02/07/18 17:42:29 claas@webfix.linum.ein +1 -0
+ new reflock driver NeoClock4X
+
+ ntpd/Makefile.am
+ 1.18.2.8 02/07/18 17:42:17 claas@webfix.linum.ein +1 -1
+ new reflock driver NeoClock4X
+
+ libntp/clocktypes.c
+ 1.7.1.6 02/07/18 17:42:04 claas@webfix.linum.ein +2 -0
+ new reflock driver NeoClock4X
+
+ include/ntp.h
+ 1.47.3.6 02/07/18 17:41:48 claas@webfix.linum.ein +2 -1
+ new reflock driver NeoClock4X
+
+ configure.in
+ 1.219.3.26 02/07/18 17:41:32 claas@webfix.linum.ein +9 -0
+ new reflock driver NeoClock4X
+
+ html/refclock.htm
+ 1.13.1.3 02/07/18 17:40:50 claas@webfix.linum.ein +189 -241
+ new reflock driver NeoClock4X
+
+ html/pic/neoclock4x.gif
+ 1.1 02/07/18 17:39:43 claas@webfix.linum.ein +334 -0
+
+ html/pic/neoclock4x.gif
+ 1.0 02/07/18 17:39:43 claas@webfix.linum.ein +0 -0
+ BitKeeper file /usr/src/ntp-stable/html/pic/neoclock4x.gif
+
+ html/driver44.htm
+ 1.1 02/07/18 17:39:24 claas@webfix.linum.ein +131 -0
+
+ html/driver44.htm
+ 1.0 02/07/18 17:39:24 claas@webfix.linum.ein +0 -0
+ BitKeeper file /usr/src/ntp-stable/html/driver44.htm
+
+ ntpd/refclock_neoclock4x.c
+ 1.1 02/07/18 17:38:39 claas@webfix.linum.ein +864 -0
+
+ ntpd/refclock_neoclock4x.c
+ 1.0 02/07/18 17:38:39 claas@webfix.linum.ein +0 -0
+ BitKeeper file /usr/src/ntp-stable/ntpd/refclock_neoclock4x.c
+
+ChangeSet
+ 1.870 02/07/17 13:56:51 jhay@angel.cids.org.za +2 -0
+ Some (older) implementations do not like the AI_ADDRCONFIG flag. If getaddrinfo()
+ fails because of EAI_BADFLAGS, retry it without that flag.
+
+ ntpq/ntpq.c
+ 1.23 02/07/17 13:56:51 jhay@angel.cids.org.za +5 -0
+ Some (older) implementations do not like the AI_ADDRCONFIG flag. If getaddrinfo()
+ fails because of EAI_BADFLAGS, retry it without that flag.
+
+ ntpdc/ntpdc.c
+ 1.15 02/07/17 13:56:50 jhay@angel.cids.org.za +5 -0
+ Some (older) implementations do not like the AI_ADDRCONFIG flag. If getaddrinfo()
+ fails because of EAI_BADFLAGS, retry it without that flag.
+
+ChangeSet
+ 1.869 02/07/16 17:28:11 jhay@angel.cids.org.za +4 -0
+ IPv6 code cleanup.
+
+ ntpdc/ntpdc_ops.c
+ 1.20 02/07/16 17:28:08 jhay@angel.cids.org.za +2 -0
+ Clear the address and mask structures before use in reslist.
+
+ ntpd/ntp_restrict.c
+ 1.13 02/07/16 17:28:08 jhay@angel.cids.org.za +2 -2
+ Add a ntohs() to the IPv6 port.
+
+ libntp/socktohost.c
+ 1.3 02/07/16 17:28:08 jhay@angel.cids.org.za +1 -1
+ Use the real buffer length.
+
+ libntp/socktoa.c
+ 1.3 02/07/16 17:28:08 jhay@angel.cids.org.za +5 -3
+ Wrap long lines.
+
+ChangeSet
+ 1.868 02/07/16 02:32:20 stenn@whimsy.udel.edu +1 -0
+ Fixes from John Hay.
+
+ ntpdc/ntpdc_ops.c
+ 1.19 02/07/16 02:32:15 stenn@whimsy.udel.edu +8 -1
+ Fixes from John Hay.
+
+ChangeSet
+ 1.867 02/07/16 01:48:32 stenn@whimsy.udel.edu +3 -0
+ Reconcile the merge.
+
+ ntpd/ntp_proto.c
+ 1.125 02/07/16 01:48:27 stenn@whimsy.udel.edu +1 -2
+ Reconcile the merge.
+
+ ntpd/ntp_crypto.c
+ 1.69 02/07/16 01:40:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/ignore
+ 1.20 02/07/16 01:40:07 stenn@whimsy.udel.edu +0 -6
+ auto-union
+
+ChangeSet
+ 1.706.10.56 02/07/16 01:36:45 stenn@whimsy.udel.edu +2 -0
+ Changes from Dave.
+
+ ntpd/ntp_proto.c
+ 1.99.1.22 02/07/16 01:36:39 stenn@whimsy.udel.edu +13 -4
+ Changes from Dave.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.18 02/07/16 01:36:39 stenn@whimsy.udel.edu +15 -3
+ Changes from Dave.
+
+ChangeSet
+ 1.706.10.55 02/07/16 01:27:19 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ BitKeeper/etc/ignore
+ 1.14.1.5 02/07/16 01:27:11 stenn@whimsy.udel.edu +6 -6
+ auto-union
+
+ChangeSet
+ 1.683.4.104 02/07/16 01:23:45 stenn@whimsy.udel.edu +1 -0
+ Ignore autom4te.cache .
+
+ BitKeeper/etc/ignore
+ 1.1.2.8 02/07/16 01:23:39 stenn@whimsy.udel.edu +1 -0
+ Ignore autom4te.cache .
+
+ChangeSet
+ 1.866 02/07/16 01:03:36 stenn@whimsy.udel.edu +1 -0
+ My bad - it wasn't a 2po. Sigh.
+
+ ntpd/ntp_restrict.c
+ 1.12 02/07/16 01:03:30 stenn@whimsy.udel.edu +5 -4
+ My bad - it wasn't a 2po. Sigh.
+
+ChangeSet
+ 1.865 02/07/15 22:26:23 stenn@whimsy.udel.edu +2 -0
+ Cleanup from John Hay (ntpsim).
+
+ ntpd/ntpsim.c
+ 1.5 02/07/15 22:26:17 stenn@whimsy.udel.edu +4 -4
+ Cleanup from John Hay (ntpsim).
+
+ include/ntpsim.h
+ 1.4 02/07/15 22:26:17 stenn@whimsy.udel.edu +2 -1
+ Cleanup from John Hay (ntpsim).
+
+ChangeSet
+ 1.864 02/07/15 22:12:38 stenn@whimsy.udel.edu +1 -0
+ Fix a 2po.
+
+ ntpd/ntp_restrict.c
+ 1.11 02/07/15 22:12:32 stenn@whimsy.udel.edu +0 -1
+ Fix a 2po.
+
+ChangeSet
+ 1.863 02/07/15 22:01:29 stenn@whimsy.udel.edu +5 -0
+ Cleanup from John Hay.
+
+ ntpd/ntp_restrict.c
+ 1.10 02/07/15 22:01:23 stenn@whimsy.udel.edu +341 -324
+ Cleanup from John Hay.
+
+ ntpd/ntp_request.c
+ 1.37 02/07/15 22:01:23 stenn@whimsy.udel.edu +2 -2
+ Cleanup from John Hay.
+
+ ntpd/ntp_io.c
+ 1.35 02/07/15 22:01:23 stenn@whimsy.udel.edu +3 -3
+ Cleanup from John Hay.
+
+ ntpd/ntp_config.c
+ 1.71 02/07/15 22:01:22 stenn@whimsy.udel.edu +5 -3
+ Cleanup from John Hay.
+
+ include/ntp.h
+ 1.70 02/07/15 22:01:22 stenn@whimsy.udel.edu +33 -22
+ Cleanup from John Hay.
+
+ChangeSet
+ 1.862 02/07/15 02:55:21 stenn@whimsy.udel.edu +1 -0
+ Cleanup from John Hay.
+
+ libntp/decodenetnum.c
+ 1.5 02/07/15 02:55:15 stenn@whimsy.udel.edu +1 -1
+ Cleanup from John Hay.
+
+ChangeSet
+ 1.861 02/07/15 02:46:25 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ include/ntpd.h
+ 1.47 02/07/15 02:46:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.54 02/07/15 02:42:55 stenn@whimsy.udel.edu +2 -0
+ Cleanup from John Hay.
+
+ include/ntpd.h
+ 1.31.2.6 02/07/15 02:42:49 stenn@whimsy.udel.edu +0 -1
+ Cleanup from John Hay.
+
+ include/ntp_machine.h
+ 1.11.1.1 02/07/15 02:42:49 stenn@whimsy.udel.edu +4 -0
+ Cleanup from John Hay.
+
+ChangeSet
+ 1.860 02/07/15 02:05:11 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.267 02/07/15 02:05:08 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.53 02/07/15 01:38:07 stenn@whimsy.udel.edu +1 -0
+ I messed up the previous merge - it's now ntp-keygen.
+
+ configure.in
+ 1.226.1.50 02/07/15 01:38:00 stenn@whimsy.udel.edu +2 -2
+ I messed up the previous merge - it's now ntp-keygen.
+
+ChangeSet
+ 1.706.10.52 02/07/15 01:04:18 stenn@whimsy.udel.edu +3 -0
+ Merge
+
+ configure.in
+ 1.226.1.49 02/07/15 01:04:07 stenn@whimsy.udel.edu +7 -13
+ Merge clenup.
+
+ acconfig.h
+ 1.29 02/07/15 00:49:48 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ ports/winnt/include/config.h
+ 1.12.1.1 02/07/15 00:48:55 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.103 02/07/15 00:14:51 harlan@dog.pfcs.com +3 -0
+ Autoheader template conversion.
+
+ ports/winnt/include/config.h
+ 1.9.2.1 02/07/15 00:14:47 harlan@dog.pfcs.com +0 -1
+ Lose an obsolete variable.
+
+ configure.in
+ 1.219.3.25 02/07/15 00:14:46 harlan@dog.pfcs.com +200 -200
+ Convert to autoheader templates.
+
+ acconfig.h
+ 1.23.3.6 02/07/15 00:14:46 harlan@dog.pfcs.com +0 -484
+ Convert to autoheader templates.
+
+ChangeSet
+ 1.859 02/07/13 15:13:42 stenn@whimsy.udel.edu +2 -0
+ Merge cleanup from John Hay.
+
+ ntpd/ntp_proto.c
+ 1.124 02/07/13 15:13:31 stenn@whimsy.udel.edu +6 -14
+ Merge cleanup from John Hay.
+
+ include/ntp.h
+ 1.69 02/07/13 15:13:31 stenn@whimsy.udel.edu +11 -0
+ Merge cleanup from John Hay.
+
+ChangeSet
+ 1.858 02/07/12 21:37:25 stenn@whimsy.udel.edu +4 -0
+ Merge Dave's changes into ipV6.
+
+ ntpd/ntp_proto.c
+ 1.123 02/07/12 21:37:20 stenn@whimsy.udel.edu +5 -5
+ I hope I merged this right...
+
+ ntpd/ntp_peer.c
+ 1.49 02/07/12 21:19:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_crypto.c
+ 1.68 02/07/12 21:19:24 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.68 02/07/12 21:19:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.51 02/07/12 21:15:10 stenn@whimsy.udel.edu +6 -0
+ Cleanup and changes from Dave.
+
+ ntpd/ntp_proto.c
+ 1.99.1.21 02/07/12 21:15:00 stenn@whimsy.udel.edu +180 -206
+ Cleanup and changes from Dave.
+
+ ntpd/ntp_peer.c
+ 1.32.2.7 02/07/12 21:15:00 stenn@whimsy.udel.edu +13 -10
+ Cleanup and changes from Dave.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.17 02/07/12 21:14:59 stenn@whimsy.udel.edu +39 -46
+ Cleanup from Dave.
+
+ libntp/statestr.c
+ 1.8 02/07/12 21:14:59 stenn@whimsy.udel.edu +2 -2
+ Crypto flag cleanup.
+
+ include/ntp_crypto.h
+ 1.29 02/07/12 21:14:59 stenn@whimsy.udel.edu +4 -3
+ Added CRYPTO_FLAG_MASK.
+
+ include/ntp.h
+ 1.50.1.18 02/07/12 21:14:59 stenn@whimsy.udel.edu +1 -1
+ Moved unreachable count and changed it from a u_char to a u_int.
+
+ChangeSet
+ 1.683.4.102 02/07/11 20:46:19 stenn@whimsy.udel.edu +1 -0
+ Reserve refclock 44 for Claas Hilbrecht.
+
+ README.refclocks
+ 1.2 02/07/11 20:46:09 stenn@whimsy.udel.edu +1 -0
+ Reserve refclock 44 for Claas Hilbrecht.
+
+ChangeSet
+ 1.856 02/07/11 20:09:17 stenn@whimsy.udel.edu +5 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_refclock.c
+ 1.46 02/07/11 20:09:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_proto.c
+ 1.122 02/07/11 20:09:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.48 02/07/11 20:09:13 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_crypto.c
+ 1.67 02/07/11 20:09:13 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.46 02/07/11 20:09:12 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.49 02/07/11 20:04:02 stenn@whimsy.udel.edu +5 -0
+ peer_clear() changes from Dave Mills.
+
+ ntpd/ntp_refclock.c
+ 1.40.2.1 02/07/11 20:03:50 stenn@whimsy.udel.edu +1 -1
+ peer_clear() changes.
+
+ ntpd/ntp_proto.c
+ 1.99.1.20 02/07/11 20:03:50 stenn@whimsy.udel.edu +12 -28
+ peer_clear() changes.
+
+ ntpd/ntp_peer.c
+ 1.32.2.6 02/07/11 20:03:50 stenn@whimsy.udel.edu +12 -5
+ peer_clear() now uses a 2nd arg ("why").
+
+ ntpd/ntp_crypto.c
+ 1.48.1.16 02/07/11 20:03:49 stenn@whimsy.udel.edu +3 -4
+ Comment cleanup.
+ Lose keysdir again.
+
+ include/ntpd.h
+ 1.31.2.5 02/07/11 20:03:49 stenn@whimsy.udel.edu +1 -1
+ peer-clear() now takes 2 args.
+
+ChangeSet
+ 1.855 02/07/11 19:44:20 stenn@whimsy.udel.edu +4 -0
+ John Hay's refid changes.
+
+ ntpd/refclock_atom.c
+ 1.39 02/07/11 19:44:09 stenn@whimsy.udel.edu +1 -1
+ John Hay's refid changes.
+
+ ntpd/ntp_proto.c
+ 1.121 02/07/11 19:44:09 stenn@whimsy.udel.edu +14 -12
+ John Hay's refid changes.
+
+ ntpd/ntp_io.c
+ 1.34 02/07/11 19:44:08 stenn@whimsy.udel.edu +43 -0
+ John Hay's refid changes.
+
+ include/ntpd.h
+ 1.45 02/07/11 19:44:08 stenn@whimsy.udel.edu +1 -1
+ John Hay's refid changes.
+
+ChangeSet
+ 1.854 02/07/11 15:04:44 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ Makefile.am
+ 1.29 02/07/11 15:04:42 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.48 02/07/11 15:01:19 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ Makefile.am
+ 1.16.1.12 02/07/11 15:01:18 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ChangeSet
+ 1.683.4.101 02/07/11 14:56:18 stenn@whimsy.udel.edu +2 -0
+ README.refclocks.
+
+ README.refclocks
+ 1.1 02/07/11 14:56:08 stenn@whimsy.udel.edu +49 -0
+
+ README.refclocks
+ 1.0 02/07/11 14:56:08 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/README.refclocks
+
+ Makefile.am
+ 1.12.1.14 02/07/11 14:56:08 stenn@whimsy.udel.edu +1 -0
+ Added README.refclocks.
+
+ChangeSet
+ 1.853 02/07/11 12:51:53 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_proto.c
+ 1.120 02/07/11 12:51:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.47 02/07/11 12:51:50 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.47 02/07/11 12:47:13 stenn@whimsy.udel.edu +2 -0
+ Cleanup and fixes from Dave.
+
+ ntpd/ntp_proto.c
+ 1.99.1.19 02/07/11 12:47:01 stenn@whimsy.udel.edu +6 -3
+ Bugfixes from Dave.
+
+ ntpd/ntp_peer.c
+ 1.32.2.5 02/07/11 12:47:01 stenn@whimsy.udel.edu +4 -1
+ Peer cleanup from Dave.
+
+ChangeSet
+ 1.706.10.46 02/07/10 15:39:51 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_jjy.c
+ 1.10 02/07/10 15:39:50 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.100 02/07/10 15:36:34 stenn@whimsy.udel.edu +1 -0
+ Bug report and initial patch from Norikatsu Shigemura <nork@freebsd.org>.
+ Actual (more portable) patch from Akinori MUSHA <knu@idaemons.org>.
+
+
+ ntpd/refclock_jjy.c
+ 1.2.2.2 02/07/10 15:36:24 stenn@whimsy.udel.edu +1 -1
+ Bug report and initial patch from Norikatsu Shigemura <nork@freebsd.org>.
+ Actual (more portable) patch from Akinori MUSHA <knu@idaemons.org>.
+
+
+ChangeSet
+ 1.851 02/07/10 13:16:35 stenn@whimsy.udel.edu +2 -0
+ Fixes from John Hay.
+
+ ntpd/ntp_refclock.c
+ 1.45 02/07/10 13:16:24 stenn@whimsy.udel.edu +1 -8
+ Fixes from John Hay.
+
+ libntp/decodenetnum.c
+ 1.4 02/07/10 13:16:24 stenn@whimsy.udel.edu +1 -1
+ Fixes from John Hay.
+
+ChangeSet
+ 1.850 02/07/10 00:48:28 stenn@whimsy.udel.edu +1 -0
+ Cleanup from John Hay.
+
+ ntpd/ntp_crypto.c
+ 1.66 02/07/10 00:48:21 stenn@whimsy.udel.edu +15 -8
+ Cleanup from John Hay.
+
+ChangeSet
+ 1.849 02/07/09 22:20:32 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ ntpd/ntp_config.c
+ 1.70 02/07/09 22:20:31 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ChangeSet
+ 1.706.10.45 02/07/09 22:06:17 stenn@whimsy.udel.edu +1 -0
+ Cleanup from Dave.
+
+ ntpd/ntp_config.c
+ 1.52.3.4 02/07/09 22:06:06 stenn@whimsy.udel.edu +0 -19
+ Cleanup from Dave.
+
+ChangeSet
+ 1.848 02/07/09 19:13:34 stenn@whimsy.udel.edu +3 -0
+ Cleanup from John Hay.
+
+ ntpd/ntp_proto.c
+ 1.119 02/07/09 19:13:25 stenn@whimsy.udel.edu +11 -3
+ Cleanup from John Hay.
+
+ ntpd/ntp_crypto.c
+ 1.65 02/07/09 19:13:25 stenn@whimsy.udel.edu +0 -17
+ Cleanup from John Hay.
+
+ ntpd/ntp_config.c
+ 1.69 02/07/09 19:13:25 stenn@whimsy.udel.edu +0 -6
+ Cleanup from John Hay.
+
+ChangeSet
+ 1.847 02/07/08 21:47:34 stenn@whimsy.udel.edu +1 -0
+ Dave fixed a typo.
+
+ ntpd/ntp_crypto.c
+ 1.64 02/07/08 21:47:23 stenn@whimsy.udel.edu +1 -1
+ Dave fixed a typo.
+
+ChangeSet
+ 1.846 02/07/08 19:59:06 stenn@whimsy.udel.edu +11 -0
+ Attempt to resolve recent changes from Dave.
+
+ ntpd/ntp_request.c
+ 1.36 02/07/08 19:58:54 stenn@whimsy.udel.edu +0 -2
+ Attempt to resolve recent changes from Dave.
+
+ ntpd/ntp_proto.c
+ 1.118 02/07/08 19:58:54 stenn@whimsy.udel.edu +1 -3
+ Attempt to resolve recent changes from Dave.
+
+ ntpd/ntp_crypto.c
+ 1.63 02/07/08 19:58:53 stenn@whimsy.udel.edu +17 -1
+ Attempt to resolve recent changes from Dave.
+
+ libntp/netof.c
+ 1.6 02/07/08 19:58:53 stenn@whimsy.udel.edu +12 -11
+ Attempt to resolve recent changes from Dave.
+
+ ntpdc/ntpdc_ops.c
+ 1.18 02/07/08 19:42:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_restrict.c
+ 1.9 02/07/08 19:42:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.46 02/07/08 19:42:50 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.68 02/07/08 19:42:49 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.44 02/07/08 19:42:48 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_request.h
+ 1.18 02/07/08 19:42:48 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.67 02/07/08 19:42:48 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.44 02/07/08 19:38:20 stenn@whimsy.udel.edu +17 -0
+ Cleanup from Dave.
+
+ util/ntp-keygen.c
+ 1.12 02/07/08 19:38:13 stenn@whimsy.udel.edu +17 -18
+ Cleanup from Dave.
+
+ ntpdc/ntpdc_ops.c
+ 1.12.1.3 02/07/08 19:38:13 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave.
+
+ ntpd/ntpsim.c
+ 1.4 02/07/08 19:38:13 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave.
+
+ ntpd/ntpd.c
+ 1.38.1.2 02/07/08 19:38:13 stenn@whimsy.udel.edu +0 -4
+ Cleanup from Dave.
+
+ ntpd/ntp_timer.c
+ 1.22 02/07/08 19:38:13 stenn@whimsy.udel.edu +1 -4
+ Cleanup from Dave.
+
+ ntpd/ntp_restrict.c
+ 1.3.1.2 02/07/08 19:38:13 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave.
+
+ ntpd/ntp_request.c
+ 1.24.2.1 02/07/08 19:38:12 stenn@whimsy.udel.edu +6 -5
+ Cleanup from Dave.
+
+ ntpd/ntp_proto.c
+ 1.99.1.18 02/07/08 19:38:12 stenn@whimsy.udel.edu +241 -211
+ Cleanup from Dave.
+
+ ntpd/ntp_peer.c
+ 1.32.2.4 02/07/08 19:38:12 stenn@whimsy.udel.edu +3 -2
+ Cleanup from Dave.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.15 02/07/08 19:38:11 stenn@whimsy.udel.edu +18 -28
+ Cleanup from Dave.
+
+ ntpd/ntp_config.c
+ 1.52.3.3 02/07/08 19:38:11 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave.
+
+ libntp/netof.c
+ 1.1.1.2 02/07/08 19:38:11 stenn@whimsy.udel.edu +5 -2
+ Cleanup from Dave.
+
+ libntp/authkeys.c
+ 1.10 02/07/08 19:38:11 stenn@whimsy.udel.edu +1 -0
+ Cleanup from Dave.
+
+ include/ntpd.h
+ 1.31.2.4 02/07/08 19:38:11 stenn@whimsy.udel.edu +8 -10
+ Cleanup from Dave.
+
+ include/ntp_request.h
+ 1.10.1.4 02/07/08 19:38:11 stenn@whimsy.udel.edu +0 -4
+ Cleanup from Dave.
+
+ include/ntp_crypto.h
+ 1.28 02/07/08 19:38:11 stenn@whimsy.udel.edu +62 -3
+ Cleanup from Dave.
+
+ include/ntp.h
+ 1.50.1.17 02/07/08 19:38:10 stenn@whimsy.udel.edu +45 -92
+ Cleanup from Dave.
+
+ChangeSet
+ 1.845 02/07/04 02:43:41 stenn@whimsy.udel.edu +3 -0
+ Cleanup from John Hay.
+
+ ntpd/ntp_proto.c
+ 1.117 02/07/04 02:43:36 stenn@whimsy.udel.edu +18 -3
+ Cleanup from John Hay.
+
+ ntpd/ntp_crypto.c
+ 1.62 02/07/04 02:43:36 stenn@whimsy.udel.edu +9 -3
+ Cleanup from John Hay.
+
+ include/ntpd.h
+ 1.43 02/07/04 02:43:36 stenn@whimsy.udel.edu +1 -1
+ Cleanup from John Hay.
+
+ChangeSet
+ 1.844 02/07/02 03:30:40 stenn@whimsy.udel.edu +5 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_proto.c
+ 1.116 02/07/02 03:30:37 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.45 02/07/02 03:30:37 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_crypto.c
+ 1.61 02/07/02 03:30:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.67 02/07/02 03:30:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.66 02/07/02 03:30:35 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.43 02/07/02 03:21:03 stenn@whimsy.udel.edu +6 -0
+ Crypto cleanup from Dave.
+ keysdir fixes from John Hay.
+
+ ntpd/ntp_proto.c
+ 1.99.1.17 02/07/02 03:20:59 stenn@whimsy.udel.edu +202 -267
+ Cleanup from Dave.
+
+ ntpd/ntp_peer.c
+ 1.32.2.3 02/07/02 03:20:59 stenn@whimsy.udel.edu +5 -1
+ Cleanup from Dave.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.14 02/07/02 03:20:58 stenn@whimsy.udel.edu +6 -7
+ Keysdir fixes from John Hay.
+ Cleanup from Dave.
+
+ ntpd/ntp_config.c
+ 1.52.3.2 02/07/02 03:20:58 stenn@whimsy.udel.edu +1 -1
+ keysdir fixes from John Hay.
+
+ include/ntp_crypto.h
+ 1.27 02/07/02 03:20:58 stenn@whimsy.udel.edu +1 -0
+ keysdir fixes from John Hay.
+
+ include/ntp.h
+ 1.50.1.16 02/07/02 03:20:58 stenn@whimsy.udel.edu +0 -7
+ Cleanup from Dave.
+
+ChangeSet
+ 1.843 02/06/30 02:39:58 stenn@whimsy.udel.edu +8 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpdc/ntpdc_ops.c
+ 1.17 02/06/30 02:39:56 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_proto.c
+ 1.115 02/06/30 02:39:56 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_crypto.c
+ 1.60 02/06/30 02:39:55 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.53 02/06/30 02:39:54 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_control.h
+ 1.21 02/06/30 02:39:54 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.65 02/06/30 02:39:54 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.266 02/06/30 02:39:53 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/ignore
+ 1.19 02/06/30 02:39:45 stenn@whimsy.udel.edu +1 -1
+ auto-union
+
+ChangeSet
+ 1.706.10.42 02/06/30 02:37:12 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.226.1.48 02/06/30 02:37:10 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.99 02/06/30 02:34:52 stenn@whimsy.udel.edu +1 -0
+ Default the RIPE NCC refclock to off for now - it uses the return
+ value of sprintf.
+
+ configure.in
+ 1.219.3.24 02/06/30 02:34:49 stenn@whimsy.udel.edu +3 -2
+ Default the RIPE NCC refclock to off for now - it uses the return
+ value of sprintf.
+
+ChangeSet
+ 1.706.10.41 02/06/30 02:29:14 stenn@whimsy.udel.edu +7 -0
+ Cleanup from Dave.
+
+ ntpd/ntp_proto.c
+ 1.99.1.16 02/06/30 02:29:10 stenn@whimsy.udel.edu +32 -28
+ Cleanup from Dave.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.13 02/06/30 02:29:10 stenn@whimsy.udel.edu +2 -0
+ Cleanup from Dave.
+
+ BitKeeper/etc/ignore
+ 1.14.1.4 02/06/30 02:29:10 stenn@whimsy.udel.edu +1 -0
+ Added compile to the ignore list
+
+ ntpd/ntp_control.c
+ 1.39.2.5 02/06/30 02:29:09 stenn@whimsy.udel.edu +5 -13
+ Cleanup from Dave.
+
+ include/ntp_crypto.h
+ 1.26 02/06/30 02:29:09 stenn@whimsy.udel.edu +2 -2
+ Cleanup from Dave.
+
+ include/ntp_control.h
+ 1.15.1.5 02/06/30 02:29:09 stenn@whimsy.udel.edu +4 -5
+ Cleanup from Dave.
+
+ include/ntp.h
+ 1.50.1.15 02/06/30 02:29:09 stenn@whimsy.udel.edu +6 -0
+ KOD codes from Dave.
+
+ChangeSet
+ 1.706.10.40 02/06/29 03:54:20 stenn@whimsy.udel.edu +6 -0
+ Fix the check_y2k linking.
+ Cleanup from Dave.
+
+ ntpdc/ntpdc_ops.c
+ 1.12.1.2 02/06/29 03:54:17 stenn@whimsy.udel.edu +1 -0
+ Cleanup from Dave.
+
+ ntpd/ntp_proto.c
+ 1.99.1.15 02/06/29 03:54:17 stenn@whimsy.udel.edu +44 -23
+ Cleanup from Dave.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.12 02/06/29 03:54:16 stenn@whimsy.udel.edu +57 -50
+ Cleanup from Dave.
+
+ ntpd/ntp_control.c
+ 1.39.2.4 02/06/29 03:54:16 stenn@whimsy.udel.edu +1 -1
+ Cleanup from Dave.
+
+ ntpd/Makefile.am
+ 1.32 02/06/29 03:54:16 stenn@whimsy.udel.edu +3 -2
+ Fix the check_y2k linking.
+
+ include/ntp.h
+ 1.50.1.14 02/06/29 03:54:16 stenn@whimsy.udel.edu +2 -1
+ Cleanup from Dave.
+
+ChangeSet
+ 1.842 02/06/29 02:53:48 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.265 02/06/29 02:53:45 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.39 02/06/29 02:51:06 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.226.1.47 02/06/29 02:51:04 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.98 02/06/28 19:11:23 stenn@whimsy.udel.edu +1 -0
+ Only build the RIPE NCC driver if we have the PPSAPI.
+
+ configure.in
+ 1.219.3.23 02/06/28 19:11:20 stenn@whimsy.udel.edu +7 -2
+ Only build the RIPE NCC driver if we have the PPSAPI.
+
+ChangeSet
+ 1.706.10.38 02/06/28 02:32:32 stenn@whimsy.udel.edu +1 -0
+ ntp-4.2 uses nsec, not msec.
+
+ ntpd/refclock_ripencc.c
+ 1.2 02/06/28 02:32:29 stenn@whimsy.udel.edu +2 -2
+ ntp-4.2 uses nsec, not msec.
+
+ChangeSet
+ 1.840 02/06/28 02:16:01 stenn@whimsy.udel.edu +5 -0
+ ipV6 merge cleanup.
+
+ ntpd/ntp_control.c
+ 1.52 02/06/28 02:15:58 stenn@whimsy.udel.edu +2 -3
+ merge cleanup
+
+ include/ntp.h
+ 1.64 02/06/28 02:15:58 stenn@whimsy.udel.edu +0 -1
+ Merge cleanup.
+
+ ntpd/ntp_proto.c
+ 1.114 02/06/28 02:11:05 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_crypto.c
+ 1.59 02/06/28 02:11:04 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.264 02/06/28 02:11:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.37 02/06/28 02:07:47 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ html/driver42.htm
+ 1.4 02/06/28 02:07:45 stenn@whimsy.udel.edu +0 -40
+ Auto merged
+
+ChangeSet
+ 1.683.4.97 02/06/28 02:05:22 stenn@whimsy.udel.edu +1 -0
+ MFC the version from ntp-dev.
+
+ html/driver42.htm
+ 1.1.1.3 02/06/28 02:05:19 stenn@whimsy.udel.edu +40 -38
+ MFC the version from ntp-dev.
+
+ChangeSet
+ 1.683.4.96 02/06/28 01:59:12 stenn@whimsy.udel.edu +1 -0
+ Typo.
+
+ html/driver42.htm
+ 1.1.1.2 02/06/28 01:56:56 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver.htm -> html/driver42.htm
+
+ChangeSet
+ 1.683.4.95 02/06/28 01:50:11 stenn@whimsy.udel.edu +2 -0
+ rename .htm files for consistency.
+
+ html/driver43.htm
+ 1.2 02/06/28 01:47:33 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver43.html -> html/driver43.htm
+
+ html/driver.htm
+ 1.1.1.1 02/06/28 01:46:32 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver42.html -> html/driver.htm
+
+ChangeSet
+ 1.706.10.36 02/06/28 01:42:08 stenn@whimsy.udel.edu +6 -0
+ merge cleanup
+
+ libntp/clocktypes.c
+ 1.14 02/06/28 01:42:06 stenn@whimsy.udel.edu +3 -3
+ merge cleanup
+
+ ntpd/refclock_conf.c
+ 1.20 02/06/28 01:39:08 stenn@whimsy.udel.edu +8 -9
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.39.2.3 02/06/28 01:39:08 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/Makefile.am
+ 1.31 02/06/28 01:39:07 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.50.1.13 02/06/28 01:39:07 stenn@whimsy.udel.edu +2 -3
+ Auto merged
+
+ configure.in
+ 1.226.1.46 02/06/28 01:39:06 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.35 02/06/28 01:35:26 stenn@whimsy.udel.edu +3 -0
+ Cleanup from Dave.
+
+ ntpd/ntp_proto.c
+ 1.99.1.14 02/06/28 01:35:23 stenn@whimsy.udel.edu +64 -48
+ Cleanup from Dave.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.11 02/06/28 01:35:22 stenn@whimsy.udel.edu +1 -13
+ Cleanup from Dave.
+
+ ntpd/ntp_control.c
+ 1.39.2.2 02/06/28 01:35:22 stenn@whimsy.udel.edu +10 -9
+ Cleanup from Dave.
+
+ChangeSet
+ 1.683.4.94 02/06/28 01:25:19 stenn@whimsy.udel.edu +10 -0
+ Added RIPE NCC trimble driver
+ From: Mark Santcroos <marks@ripe.net>
+
+ ntpd/refclock_ripencc.c
+ 1.1 02/06/28 01:25:15 stenn@whimsy.udel.edu +4872 -0
+
+ html/driver43_2.jpg
+ 1.1 02/06/28 01:25:15 stenn@whimsy.udel.edu +148 -0
+
+ html/driver43_1.gif
+ 1.1 02/06/28 01:25:15 stenn@whimsy.udel.edu +864 -0
+
+ html/driver43.html
+ 1.1 02/06/28 01:25:15 stenn@whimsy.udel.edu +109 -0
+
+ ntpd/refclock_ripencc.c
+ 1.0 02/06/28 01:25:15 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/ntpd/refclock_ripencc.c
+
+ ntpd/refclock_conf.c
+ 1.13.1.5 02/06/28 01:25:15 stenn@whimsy.udel.edu +8 -1
+ Added RIPE NCC trimble driver
+ From: Mark Santcroos <marks@ripe.net>
+
+ ntpd/ntp_control.c
+ 1.37.3.5 02/06/28 01:25:15 stenn@whimsy.udel.edu +1 -0
+ Added RIPE NCC trimble driver
+ From: Mark Santcroos <marks@ripe.net>
+
+ ntpd/Makefile.am
+ 1.18.2.7 02/06/28 01:25:15 stenn@whimsy.udel.edu +1 -1
+ Added RIPE NCC trimble driver
+ From: Mark Santcroos <marks@ripe.net>
+
+ libntp/clocktypes.c
+ 1.7.1.5 02/06/28 01:25:15 stenn@whimsy.udel.edu +2 -0
+ Added RIPE NCC trimble driver
+ From: Mark Santcroos <marks@ripe.net>
+
+ html/driver43_2.jpg
+ 1.0 02/06/28 01:25:15 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/html/driver43_2.jpg
+
+ html/driver43_1.gif
+ 1.0 02/06/28 01:25:15 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/html/driver43_1.gif
+
+ html/driver43.html
+ 1.0 02/06/28 01:25:15 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/html/driver43.html
+
+ include/ntp.h
+ 1.47.3.5 02/06/28 01:25:14 stenn@whimsy.udel.edu +2 -1
+ Added RIPE NCC trimble driver
+ From: Mark Santcroos <marks@ripe.net>
+
+ configure.in
+ 1.219.3.22 02/06/28 01:25:14 stenn@whimsy.udel.edu +10 -0
+ Added RIPE NCC trimble driver
+ From: Mark Santcroos <marks@ripe.net>
+
+ChangeSet
+ 1.839 02/06/28 00:10:34 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.263 02/06/28 00:10:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.34 02/06/28 00:04:58 stenn@whimsy.udel.edu +2 -0
+ BUild ntp-keygen iff we have the crypto stuff.
+
+ util/Makefile.am
+ 1.19 02/06/28 00:04:55 stenn@whimsy.udel.edu +3 -3
+ BUild ntp-keygen iff we have the crypto stuff.
+
+ configure.in
+ 1.226.1.45 02/06/28 00:04:55 stenn@whimsy.udel.edu +2 -1
+ BUild ntp-keygen iff we have the crypto stuff.
+
+ChangeSet
+ 1.838 02/06/27 19:32:04 stenn@whimsy.udel.edu +3 -0
+ ipV6 merge resolution
+
+ ntpd/ntp_proto.c
+ 1.113 02/06/27 19:32:02 stenn@whimsy.udel.edu +1 -1
+ ipV6 merge resolution
+
+ ntpd/ntp_crypto.c
+ 1.58 02/06/27 19:28:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.42 02/06/27 19:28:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.33 02/06/27 19:25:13 stenn@whimsy.udel.edu +3 -0
+ Crypto cleanup from Dave.
+
+ ntpd/ntp_proto.c
+ 1.99.1.13 02/06/27 19:25:10 stenn@whimsy.udel.edu +108 -78
+ Crypto cleanup from Dave.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.10 02/06/27 19:25:09 stenn@whimsy.udel.edu +169 -163
+ Crypto cleanup from Dave.
+
+ include/ntpd.h
+ 1.31.2.3 02/06/27 19:25:09 stenn@whimsy.udel.edu +1 -2
+ Crypto cleanup from Dave.
+
+ChangeSet
+ 1.706.10.32 02/06/27 04:40:17 stenn@whimsy.udel.edu +1 -0
+ LIBPARSE cleanup re libntpd.a convenience library.
+
+ ntpd/Makefile.am
+ 1.30 02/06/27 04:40:14 stenn@whimsy.udel.edu +3 -2
+ LIBPARSE cleanup re libntpd.a convenience library.
+
+ChangeSet
+ 1.837 02/06/26 03:26:51 stenn@whimsy.udel.edu +9 -0
+ I hope I did this right... Deal with the ipV6 merge.
+
+ ntpd/ntp_proto.c
+ 1.112 02/06/26 03:26:48 stenn@whimsy.udel.edu +0 -3
+ I hope I did this right... Deal with the ipV6 merge.
+
+ util/ntp-genkeys.c
+ 1.75 02/06/26 03:22:46 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.44 02/06/26 03:22:46 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_crypto.c
+ 1.57 02/06/26 03:22:45 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.51 02/06/26 03:22:45 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.66 02/06/26 03:22:44 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/recvbuff.h
+ 1.5 02/06/26 03:22:44 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.41 02/06/26 03:22:43 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.63 02/06/26 03:22:43 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.31 02/06/26 03:18:13 stenn@whimsy.udel.edu +15 -0
+ Crypto cleanup (and a few others) from Dave.
+ Deprecate ntp-genkeys and update the all-new ntp-keygen.
+
+ util/ntp-keygen.c
+ 1.11 02/06/26 03:18:09 stenn@whimsy.udel.edu +961 -381
+ Massive changes from Dave.
+
+ util/ntp-genkeys.c
+ 1.73.1.1 02/06/26 03:18:09 stenn@whimsy.udel.edu +1 -2
+ keysdir cleanup from Dave.
+
+ util/Makefile.am
+ 1.18 02/06/26 03:18:09 stenn@whimsy.udel.edu +4 -8
+ Deprecate ntp-genkeys, install ntp-keygen.
+
+ ntpd/refclock_irig.c
+ 1.15 02/06/26 03:18:09 stenn@whimsy.udel.edu +21 -23
+ Cleanup from Dave.
+
+ ntpd/ntp_proto.c
+ 1.99.1.12 02/06/26 03:18:08 stenn@whimsy.udel.edu +294 -126
+ Crypto cleanup from Dave
+
+ ntpd/ntp_peer.c
+ 1.32.2.2 02/06/26 03:18:08 stenn@whimsy.udel.edu +2 -2
+ Crypto cleanup from Dave
+
+ ntpd/ntp_crypto.c
+ 1.48.1.9 02/06/26 03:18:08 stenn@whimsy.udel.edu +1362 -312
+ Crypto cleanup from Dave
+
+ ntpd/ntp_control.c
+ 1.39.2.1 02/06/26 03:18:08 stenn@whimsy.udel.edu +2 -2
+ Crypto cleanup from Dave
+
+ ntpd/ntp_config.c
+ 1.52.3.1 02/06/26 03:18:07 stenn@whimsy.udel.edu +34 -43
+ Crypto cleanup from Dave
+
+ libntp/statestr.c
+ 1.7 02/06/26 03:18:07 stenn@whimsy.udel.edu +2 -1
+ Crypto cleanup from Dave
+
+ include/recvbuff.h
+ 1.1.1.2 02/06/26 03:18:07 stenn@whimsy.udel.edu +4 -4
+ Crypto cleanup from Dave
+
+ include/ntpd.h
+ 1.31.2.2 02/06/26 03:18:07 stenn@whimsy.udel.edu +2 -1
+ Crypto cleanup from Dave
+
+ include/ntp_crypto.h
+ 1.25 02/06/26 03:18:07 stenn@whimsy.udel.edu +23 -13
+ Crypto cleanup from Dave
+
+ include/ntp_config.h
+ 1.18 02/06/26 03:18:07 stenn@whimsy.udel.edu +6 -7
+ Crypto cleanup from Dave
+
+ include/ntp.h
+ 1.50.1.12 02/06/26 03:18:07 stenn@whimsy.udel.edu +8 -2
+ Crypto cleanup from Dave
+
+ util/ntp-keygen.c
+ 1.10 02/06/26 03:01:12 stenn@whimsy.udel.edu +0 -0
+ Rename: util/genkeys.c -> util/ntp-keygen.c
+
+ChangeSet
+ 1.836 02/06/25 04:17:28 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ README.bk
+ 1.12 02/06/25 04:17:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.30 02/06/25 04:15:14 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ README.bk
+ 1.7.1.4 02/06/25 04:15:12 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.93 02/06/25 04:12:29 stenn@whimsy.udel.edu +1 -0
+ Update auto* tool verison requirements.
+
+ README.bk
+ 1.1.1.14 02/06/25 04:12:27 stenn@whimsy.udel.edu +2 -2
+ Update auto* tool verison requirements.
+
+ChangeSet
+ 1.706.10.29 02/06/25 01:24:52 stenn@whimsy.udel.edu +1 -0
+ libntpd needs to come before libparse.
+
+ ntpd/Makefile.am
+ 1.29 02/06/25 01:24:48 stenn@whimsy.udel.edu +1 -1
+ libntpd needs to come before libparse.
+
+ChangeSet
+ 1.834 02/06/10 03:56:27 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.262 02/06/10 03:56:24 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.28 02/06/10 03:49:57 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.226.1.44 02/06/10 03:49:54 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-strstr.c
+ 1.3 02/06/10 03:49:53 stenn@whimsy.udel.edu +0 -0
+ Delete: libntp/strstr.c
+
+ChangeSet
+ 1.683.4.92 02/06/10 03:46:37 stenn@whimsy.udel.edu +2 -0
+ Bit-o-cleanup.
+
+ libntp/strstr.c
+ 1.1 02/06/10 03:46:35 stenn@whimsy.udel.edu +52 -0
+
+ libntp/strstr.c
+ 1.0 02/06/10 03:46:35 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/libntp/strstr.c
+
+ configure.in
+ 1.219.3.21 02/06/10 03:46:35 stenn@whimsy.udel.edu +1 -1
+
+
+ChangeSet
+ 1.833 02/06/04 02:59:49 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.261 02/06/04 02:59:47 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.27 02/06/04 02:53:04 stenn@whimsy.udel.edu +1 -0
+ Recover from the big merge.
+
+ configure.in
+ 1.226.1.43 02/06/04 02:53:01 stenn@whimsy.udel.edu +0 -39
+ Recover from the big merge.
+
+ChangeSet
+ 1.706.10.26 02/06/04 02:45:36 stenn@whimsy.udel.edu +1 -0
+ Don't ask...
+
+ configure.in
+ 1.226.1.42 02/06/04 02:45:33 stenn@whimsy.udel.edu +35 -332
+ Don't ask...
+
+ChangeSet
+ 1.683.4.91 02/06/04 01:58:40 stenn@whimsy.udel.edu +1 -0
+ Upgrade configure.in to the same technology used in ntp-dev.
+ Do the cross-compile stuff better.
+ Order some of the refclocks better.
+ Brought in some stuff from ntp-dev that we don't need, but it
+ will make future merges easier.
+
+ configure.in
+ 1.219.3.20 02/06/04 01:58:37 stenn@whimsy.udel.edu +350 -268
+ Upgrade configure.in to the same technology used in ntp-dev.
+ Do the cross-compile stuff better.
+ Order some of the refclocks better.
+ Brought in some stuff from ntp-dev that we don't need, but it
+ will make future merges easier.
+
+ChangeSet
+ 1.832 02/06/04 01:25:14 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.260 02/06/04 01:25:12 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.25 02/06/04 01:21:45 stenn@whimsy.udel.edu +1 -0
+ Use the new style AC_DEFINE for HAVE_LIBCURSES.
+ Reported by John Hay.
+
+ configure.in
+ 1.226.1.41 02/06/04 01:21:42 stenn@whimsy.udel.edu +1 -1
+ Use the new style AC_DEFINE for HAVE_LIBCURSES.
+ Reported by John Hay.
+
+ChangeSet
+ 1.831 02/05/30 02:56:59 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.259 02/05/30 02:56:56 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.24 02/05/30 02:40:10 stenn@whimsy.udel.edu +1 -0
+ Split the AC_CONFIG_FILES() targets into separate lines.
+
+ configure.in
+ 1.226.1.40 02/05/30 02:40:07 stenn@whimsy.udel.edu +29 -9
+ Split the AC_CONFIG_FILES() targets into separate lines.
+
+ChangeSet
+ 1.830 02/05/27 21:43:34 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ README.bk
+ 1.11 02/05/27 21:43:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.23 02/05/27 21:40:45 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ README.bk
+ 1.7.1.3 02/05/27 21:40:43 stenn@whimsy.udel.edu +2 -2
+ Auto merged
+
+ChangeSet
+ 1.683.4.90 02/05/27 21:38:29 stenn@whimsy.udel.edu +1 -0
+ Note that ntp.bk{server,bits}.net are being upgraded.
+
+ README.bk
+ 1.1.1.13 02/05/27 21:38:27 stenn@whimsy.udel.edu +10 -0
+ Note that ntp.bk{server,bits}.net are being upgraded.
+
+ChangeSet
+ 1.683.4.89 02/05/27 00:22:05 stenn@whimsy.udel.edu +1 -0
+ Renamed the email list for commit log messages from cvs-all to commitlogs.
+
+ BitKeeper/triggers/delta-changelog
+ 1.5 02/05/27 00:22:03 stenn@whimsy.udel.edu +1 -1
+ Renamed the email list for commit log messages from cvs-all to commitlogs.
+
+ChangeSet
+ 1.828 02/05/24 23:44:37 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.258 02/05/24 23:44:35 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.21 02/05/24 23:38:04 stenn@whimsy.udel.edu +1 -0
+ AUtomerge cleanup.
+
+ configure.in
+ 1.226.1.39 02/05/24 23:38:02 stenn@whimsy.udel.edu +1 -1
+ Clean up the automerge.
+
+ChangeSet
+ 1.683.4.88 02/05/24 23:17:59 stenn@whimsy.udel.edu +1 -0
+ AmigoOS changes, -lreadline improvements.
+
+ configure.in
+ 1.219.3.19 02/05/24 23:17:56 stenn@whimsy.udel.edu +12 -1
+ Add flags for amigaos from a request by Philippe Bourdin.
+
+ Improve the -lreadline checks.
+
+ChangeSet
+ 1.827 02/05/24 03:21:34 stenn@whimsy.udel.edu +3 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_crypto.c
+ 1.56 02/05/24 03:21:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.40 02/05/24 03:21:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.257 02/05/24 03:21:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.20 02/05/24 03:15:06 stenn@whimsy.udel.edu +3 -0
+ Changes from Dave Mills.
+
+ util/genkeys.c
+ 1.9 02/05/24 03:15:02 stenn@whimsy.udel.edu +274 -12
+ Many changes.
+
+ Harlan will not be porting these to ntp-genkeys.c .
+ Is there a volunteer to take over?
+
+ ntpd/ntp_crypto.c
+ 1.48.1.8 02/05/24 03:15:02 stenn@whimsy.udel.edu +3 -6
+ Header reorganization.
+
+ include/ntpd.h
+ 1.31.2.1 02/05/24 03:15:02 stenn@whimsy.udel.edu +1 -0
+ Declare timegm().
+
+ChangeSet
+ 1.706.10.19 02/05/24 03:01:03 stenn@whimsy.udel.edu +1 -0
+ autoconf cleanup.
+
+ configure.in
+ 1.226.1.38 02/05/24 03:00:58 stenn@whimsy.udel.edu +5 -43
+ I have heard we really need autoconf-2.52; believe it and take
+ advantage of its cross-compile-aware AC_CHECK_SIZEOF() macros.
+ Think about requiring 2.53 so we can use its c-c-a AC_BIG_ENDIAN
+ check.
+
+ChangeSet
+ 1.706.10.18 02/05/17 19:03:03 stenn@whimsy.udel.edu +1 -0
+ Tidy. Renamed from .html to .htm .
+
+ html/driver42.htm
+ 1.3 02/05/17 19:03:00 stenn@whimsy.udel.edu +40 -38
+ Tidy. Renamed from .html to .htm .
+
+ html/driver42.htm
+ 1.2 02/05/17 18:57:46 stenn@whimsy.udel.edu +0 -0
+ Rename: html/driver42.html -> html/driver42.htm
+
+ChangeSet
+ 1.706.10.17 02/05/09 02:14:18 stenn@whimsy.udel.edu +7 -0
+ Documentation improvements from Dave Mills.
+
+ html/monopt.htm
+ 1.10 02/05/09 02:14:15 stenn@whimsy.udel.edu +4 -4
+ Documentation improvements from Dave Mills.
+
+ html/manyopt.htm
+ 1.2 02/05/09 02:14:15 stenn@whimsy.udel.edu +48 -19
+ Documentation improvements from Dave Mills.
+
+ html/index.htm
+ 1.14 02/05/09 02:14:15 stenn@whimsy.udel.edu +3 -0
+ Documentation improvements from Dave Mills.
+
+ html/genkeys.htm
+ 1.9 02/05/09 02:14:14 stenn@whimsy.udel.edu +22 -30
+ Documentation improvements from Dave Mills.
+
+ html/exec.htm
+ 1.9 02/05/09 02:14:14 stenn@whimsy.udel.edu +2 -3
+ Documentation improvements from Dave Mills.
+
+ html/authopt.htm
+ 1.17 02/05/09 02:14:14 stenn@whimsy.udel.edu +111 -69
+ Documentation improvements from Dave Mills.
+
+ html/assoc.htm
+ 1.11 02/05/09 02:14:14 stenn@whimsy.udel.edu +35 -39
+ Documentation improvements from Dave Mills.
+
+ChangeSet
+ 1.825 02/05/04 03:11:51 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_crypto.c
+ 1.55 02/05/04 03:11:49 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.256 02/05/04 03:11:48 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.16 02/05/04 03:08:37 stenn@whimsy.udel.edu +3 -0
+ timegm() patch from John Hay <jhay@icomtek.csir.co.za>.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.7 02/05/04 03:08:34 stenn@whimsy.udel.edu +1 -1
+ Use timegm() to get the timestamp, not mktime().
+
+ libntp/mktime.c
+ 1.5 02/05/04 03:08:34 stenn@whimsy.udel.edu +35 -8
+ timegm() implementation.
+
+ configure.in
+ 1.226.1.37 02/05/04 03:08:34 stenn@whimsy.udel.edu +2 -1
+ Check for timegm().
+
+ We should now use AC_CHECK_FUNCS() instead of AC_REPLACE_FUNCS()
+ for mktime() and timegm().
+
+ChangeSet
+ 1.706.10.15 02/05/02 01:29:43 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_local.c
+ 1.11 02/05/02 01:29:42 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ChangeSet
+ 1.683.4.87 02/05/02 01:24:37 stenn@whimsy.udel.edu +1 -0
+ Patch from ntp-dev.
+
+ ntpd/refclock_local.c
+ 1.6.1.2 02/05/02 01:24:34 stenn@whimsy.udel.edu +1 -0
+ Patch from ntp-dev.
+
+ChangeSet
+ 1.823 02/04/30 23:50:17 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/cmd_args.c
+ 1.12 02/04/30 23:50:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.14 02/04/30 21:43:51 stenn@whimsy.udel.edu +4 -0
+ Simulator improvements from Harish Nair <hari@udel.edu>.
+
+ ntpd/ntpsim.c
+ 1.3 02/04/30 21:43:48 stenn@whimsy.udel.edu +29 -17
+ Use the new parameters.
+
+ ntpd/cmd_args.c
+ 1.7.1.3 02/04/30 21:43:48 stenn@whimsy.udel.edu +38 -10
+ New options.
+
+ include/ntpsim.h
+ 1.3 02/04/30 21:43:48 stenn@whimsy.udel.edu +7 -2
+ Add more parameters.
+
+ README.simulator
+ 1.2 02/04/30 21:43:48 stenn@whimsy.udel.edu +15 -28
+ Update the docs.
+
+ChangeSet
+ 1.706.10.13 02/04/30 21:32:55 stenn@whimsy.udel.edu +1 -0
+ Update the peer->stratum.
+ Bugfix from Dave Mills.
+
+ ntpd/refclock_local.c
+ 1.10 02/04/30 21:32:52 stenn@whimsy.udel.edu +1 -0
+ Update the peer->stratum.
+ Bugfix from Dave Mills.
+
+ChangeSet
+ 1.822 02/04/28 18:04:14 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.255 02/04/28 18:04:11 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.12 02/04/28 18:00:57 stenn@whimsy.udel.edu +3 -0
+ Bump version number.
+
+ configure.in
+ 1.226.1.36 02/04/28 18:00:54 stenn@whimsy.udel.edu +1 -1
+ Bump the version to 4.1.72b.
+
+ build
+ 1.20 02/04/28 18:00:54 stenn@whimsy.udel.edu +3 -0
+ If we detect the wrong build directory, show some debug info.
+
+ br-flock
+ 1.2 02/04/28 18:00:54 stenn@whimsy.udel.edu +1 -1
+ Add arlib and simulator to the default br-flock build.
+
+ChangeSet
+ 1.706.10.11 02/04/28 17:36:59 stenn@whimsy.udel.edu +1 -0
+ Include ntpsim.h in the distribution.
+ Reported by Harish Nair <hari@UDel.Edu>.
+
+ include/Makefile.am
+ 1.13 02/04/28 17:36:56 stenn@whimsy.udel.edu +1 -0
+ Include ntpsim.h in the distribution.
+ Reported by Harish Nair <hari@UDel.Edu>.
+
+ChangeSet
+ 1.821 02/04/25 17:41:12 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_proto.c
+ 1.111 02/04/25 17:41:09 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.10 02/04/25 17:37:10 stenn@whimsy.udel.edu +1 -0
+ Fix an evil typo found by Brian Utterback.
+
+ ntpd/ntp_proto.c
+ 1.99.1.11 02/04/25 17:37:07 stenn@whimsy.udel.edu +1 -1
+ Fix an evil typo found by Brian Utterback.
+
+ChangeSet
+ 1.706.10.9 02/04/24 02:50:08 stenn@whimsy.udel.edu +1 -0
+ pp->[mu]sec are gone now. Use ->nsec instead.
+ Reported by Danny Mayer.
+
+ ntpd/refclock_hopfpci.c
+ 1.5 02/04/24 02:50:03 stenn@whimsy.udel.edu +3 -4
+ pp->[mu]sec are gone now. Use ->nsec instead.
+
+ChangeSet
+ 1.819 02/04/24 02:00:28 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.254 02/04/24 02:00:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.8 02/04/24 01:58:11 stenn@whimsy.udel.edu +1 -0
+ Clean up the HOPF driver tests.
+
+ configure.in
+ 1.226.1.35 02/04/24 01:58:08 stenn@whimsy.udel.edu +11 -29
+ Clean up the HOPF driver tests.
+
+ChangeSet
+ 1.706.10.7 02/04/24 01:27:34 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.226.1.34 02/04/24 01:27:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.818 02/04/24 01:23:59 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.253 02/04/24 01:23:56 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.6 02/04/24 01:20:41 stenn@whimsy.udel.edu +1 -0
+ Crypto support message cleanup.
+
+ configure.in
+ 1.226.1.33 02/04/24 01:20:35 stenn@whimsy.udel.edu +1 -1
+ Crypto support message cleanup.
+
+ChangeSet
+ 1.683.4.86 02/04/24 00:55:13 stenn@whimsy.udel.edu +1 -0
+ The HOPF serial and PCI drivers were in the wrong place and
+ not being selected.
+
+ configure.in
+ 1.219.3.18 02/04/24 00:55:10 stenn@whimsy.udel.edu +18 -18
+ The HOPF serial and PCI drivers were in the wrong place and
+ not being selected.
+
+ChangeSet
+ 1.706.10.5 02/04/23 02:55:17 stenn@whimsy.udel.edu +2 -0
+ Fix the header problem with the simulator.
+
+ ntpd/ntpsim.c
+ 1.2 02/04/23 02:55:15 stenn@whimsy.udel.edu +1 -0
+ THis is where we need to #include "ntpd.h".
+
+ include/ntpsim.h
+ 1.2 02/04/23 02:55:14 stenn@whimsy.udel.edu +0 -1
+ Lose the include of ntpd.h .
+
+ChangeSet
+ 1.816 02/04/22 21:18:16 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/cmd_args.c
+ 1.11 02/04/22 21:18:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/Makefile.am
+ 1.21 02/04/22 21:18:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.4 02/04/22 21:15:21 stenn@whimsy.udel.edu +2 -0
+ Simulator option fixes.
+ libntpsim.a dependency cleanup.
+
+ ntpd/cmd_args.c
+ 1.7.1.2 02/04/22 21:15:18 stenn@whimsy.udel.edu +23 -2
+ ntp simulator option support.
+
+ libntp/Makefile.am
+ 1.12.1.7 02/04/22 21:15:18 stenn@whimsy.udel.edu +1 -0
+ libntpsim.a Makefile dependency cleanup.
+
+ChangeSet
+ 1.815 02/04/18 21:25:28 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.252 02/04/18 21:25:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.28 02/04/18 21:25:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.3 02/04/18 21:18:24 stenn@whimsy.udel.edu +2 -0
+ We still need to distribute ntptrace/ .
+
+ configure.in
+ 1.226.1.32 02/04/18 21:18:21 stenn@whimsy.udel.edu +1 -1
+ bump to '72a just so we can distingush the latest changes.
+
+ Makefile.am
+ 1.16.1.11 02/04/18 21:18:21 stenn@whimsy.udel.edu +2 -0
+ We still need to distribute the ntptrace subdir.
+
+ChangeSet
+ 1.814 02/04/18 03:16:31 stenn@whimsy.udel.edu +6 -0
+ IPV6 cleanup of the simulator patches.
+
+ ntpd/ntp_proto.c
+ 1.110 02/04/18 03:16:27 stenn@whimsy.udel.edu +1 -1
+ IPV6 cleanup of the simulator patches.
+
+ ntpd/ntp_io.c
+ 1.33 02/04/18 03:16:27 stenn@whimsy.udel.edu +1 -1
+ IPV6 cleanup of the simulator patches.
+
+ libntp/Makefile.am
+ 1.20 02/04/18 03:16:27 stenn@whimsy.udel.edu +3 -4
+ IPV6 cleanup of the simulator patches.
+
+ ntpd/ntp_peer.c
+ 1.43 02/04/18 03:08:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.62 02/04/18 03:08:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.251 02/04/18 03:08:13 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.2 02/04/18 03:05:43 stenn@whimsy.udel.edu +14 -0
+ Simulator auto* changes from Harlan.
+ Crypto changes from Dave.
+ Simulator code from Harish Nair <hari@udel.edu>.
+
+ ntpd/ntpsim.c
+ 1.1 02/04/18 03:05:39 stenn@whimsy.udel.edu +278 -0
+
+ libntp/systime_s.c
+ 1.1 02/04/18 03:05:39 stenn@whimsy.udel.edu +2 -0
+
+ include/ntpsim.h
+ 1.1 02/04/18 03:05:39 stenn@whimsy.udel.edu +94 -0
+
+ README.simulator
+ 1.1 02/04/18 03:05:39 stenn@whimsy.udel.edu +32 -0
+
+ ntpd/ntpsim.c
+ 1.0 02/04/18 03:05:39 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/ntpd/ntpsim.c
+
+ ntpd/ntpd.c
+ 1.38.1.1 02/04/18 03:05:39 stenn@whimsy.udel.edu +15 -1
+ Simulator changes.
+
+ libntp/systime_s.c
+ 1.0 02/04/18 03:05:39 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/libntp/systime_s.c
+
+ include/ntpsim.h
+ 1.0 02/04/18 03:05:39 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/include/ntpsim.h
+
+ README.simulator
+ 1.0 02/04/18 03:05:39 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/README.simulator
+
+ ntpd/ntp_proto.c
+ 1.99.1.10 02/04/18 03:05:38 stenn@whimsy.udel.edu +53 -44
+ More crypto cleanup from Dave.
+
+ ntpd/ntp_peer.c
+ 1.32.2.1 02/04/18 03:05:38 stenn@whimsy.udel.edu +4 -3
+ Looks like more crypto changes from Dave.
+
+ ntpd/ntp_io.c
+ 1.21.2.1 02/04/18 03:05:38 stenn@whimsy.udel.edu +8 -0
+ Simulator changes.
+
+ ntpd/Makefile.am
+ 1.28 02/04/18 03:05:38 stenn@whimsy.udel.edu +13 -7
+ Support for building ntpdsim, the simulator version of ntpd.
+
+ libntp/systime.c
+ 1.19 02/04/18 03:05:37 stenn@whimsy.udel.edu +208 -0
+ Simulator changes.
+
+ libntp/Makefile.am
+ 1.12.1.6 02/04/18 03:05:37 stenn@whimsy.udel.edu +5 -3
+ Also build libntpsim.a for the simulator stuff. I did this in a
+ really gross way...
+
+ include/ntp_unixtime.h
+ 1.4 02/04/18 03:05:37 stenn@whimsy.udel.edu +11 -0
+ simulator stuff.
+
+ include/ntp.h
+ 1.50.1.11 02/04/18 03:05:37 stenn@whimsy.udel.edu +2 -2
+ This might have been more crypto cleanup from Dave's previous fix.
+
+ configure.in
+ 1.226.1.31 02/04/18 03:05:37 stenn@whimsy.udel.edu +14 -0
+ auto* the ntp simulator stuff.
+
+ChangeSet
+ 1.813 02/04/18 02:18:31 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_crypto.c
+ 1.54 02/04/18 02:18:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.10.1 02/04/18 02:14:26 stenn@whimsy.udel.edu +1 -0
+ Crypto improvements from Dave.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.6 02/04/18 02:14:23 stenn@whimsy.udel.edu +9 -10
+ Crypto improvements from Dave.
+
+ChangeSet
+ 1.706.2.78 02/04/07 00:10:31 mayer@tecotoo.myibg.com +21 -0
+ Merge
+
+ libntp/a_md5encrypt.c
+ 1.9 02/04/07 00:10:09 mayer@tecotoo.myibg.com +0 -0
+ SCCS merged
+
+ ports/winnt/include/config.h
+ 1.13 02/04/06 23:01:37 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpq/ntpq.c
+ 1.19.1.2 02/04/06 23:01:33 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpdc/ntpdc.c
+ 1.11.1.2 02/04/06 23:01:28 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/refclock_palisade.c
+ 1.12 02/04/06 23:01:24 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/refclock_nmea.c
+ 1.19 02/04/06 23:01:19 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/refclock_hopfser.c
+ 1.5 02/04/06 23:01:15 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/refclock_dumbclock.c
+ 1.7 02/04/06 23:01:10 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/ntpd.c
+ 1.39 02/04/06 23:01:06 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/ntp_util.c
+ 1.15.1.3 02/04/06 23:01:02 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/ntp_request.c
+ 1.24.1.7 02/04/06 23:00:56 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/ntp_refclock.c
+ 1.40.1.5 02/04/06 23:00:50 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.32.1.8 02/04/06 23:00:45 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/ntp_io.c
+ 1.21.1.5 02/04/06 23:00:41 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.39.1.12 02/04/06 23:00:32 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.52.1.11 02/04/06 23:00:27 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.31.1.6 02/04/06 23:00:18 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ include/ntp_stdlib.h
+ 1.11.1.3 02/04/06 23:00:13 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ include/ntp_machine.h
+ 1.12 02/04/06 23:00:09 mayer@tecotoo.myibg.com +0 -0
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.3.2.7 02/04/06 22:59:17 mayer@tecotoo.myibg.com +1 -0
+ 'Auto converge'
+
+ BitKeeper/etc/logging_ok
+ 1.3.2.6 02/04/06 22:59:15 mayer@tecotoo.myibg.com +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.10 02/04/06 22:59:12 mayer@tecotoo.myibg.com +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.3.2.5 02/04/06 22:58:58 mayer@tecotoo.myibg.com +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.9 02/04/06 22:58:09 mayer@tecotoo.myibg.com +1 -1
+ auto-union
+
+ChangeSet
+ 1.812 02/04/05 02:32:57 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_crypto.c
+ 1.53 02/04/05 02:32:54 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.77 02/04/05 02:18:56 stenn@whimsy.udel.edu +1 -0
+ Dave made a lot of improvements and changes to ntp_crypto.c .
+
+ ntpd/ntp_crypto.c
+ 1.48.1.5 02/04/05 02:18:44 stenn@whimsy.udel.edu +27 -16
+ Dave made a lot of improvements and changes.
+
+ChangeSet
+ 1.811 02/04/03 03:17:08 harlan@dog.pfcs.com +2 -0
+ ipv6 cleanup.
+
+ util/ntp-genkeys.c
+ 1.74 02/04/03 03:16:50 harlan@dog.pfcs.com +9 -7
+ ipv6 changes.
+
+ ntpdate/Makefile.am
+ 1.10 02/04/03 03:16:49 harlan@dog.pfcs.com +3 -1
+ Disable ntptimeset for now.
+
+ChangeSet
+ 1.810 02/04/03 00:17:16 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_peer.c
+ 1.42 02/04/03 00:17:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.76 02/04/03 00:13:14 stenn@whimsy.udel.edu +1 -0
+ expire_all(): Call resetmanycast() before we leave.
+
+ ntpd/ntp_peer.c
+ 1.32.1.7 02/04/03 00:13:03 stenn@whimsy.udel.edu +1 -0
+ expire_all(): Call resetmanycast() before we leave.
+
+ChangeSet
+ 1.809 02/03/31 03:06:17 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ BitKeeper/etc/ignore
+ 1.18 02/03/31 03:06:09 stenn@whimsy.udel.edu +5 -5
+ auto-union
+
+ChangeSet
+ 1.706.2.75 02/03/31 03:03:10 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ BitKeeper/triggers/triggerd
+ 1.17 02/03/31 03:03:08 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ BitKeeper/triggers/trigger.mk
+ 1.9 02/03/31 03:03:08 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ChangeSet
+ 1.683.4.85 02/03/31 03:00:08 stenn@whimsy.udel.edu +2 -0
+ Trigger improvements/fixes.
+
+ BitKeeper/triggers/triggerd
+ 1.15.1.1 02/03/31 02:59:59 stenn@whimsy.udel.edu +1 -1
+ Typo fix.
+
+ BitKeeper/triggers/trigger.mk
+ 1.7.1.1 02/03/31 02:59:58 stenn@whimsy.udel.edu +1 -1
+ Lose the (apparently) bogus "triggerd: trigger.cfg" dependency.
+
+ChangeSet
+ 1.706.2.74 02/03/31 02:45:03 stenn@whimsy.udel.edu +4 -0
+ Trigger cleanup.
+
+ BitKeeper/triggers/triggerd
+ 1.16 02/03/31 02:44:54 stenn@whimsy.udel.edu +1 -1
+ Typo.
+
+ BitKeeper/triggers/trigger.mk
+ 1.8 02/03/31 02:44:54 stenn@whimsy.udel.edu +1 -1
+ Comment out the 'triggerd: trigger.cfg' dependency.
+
+ BitKeeper/triggers/00-list
+ 1.3 02/03/31 02:44:54 stenn@whimsy.udel.edu +6 -5
+ Order like the help page. Add the new pre-delta trigger.
+
+ BitKeeper/etc/ignore
+ 1.14.1.3 02/03/31 02:44:54 stenn@whimsy.udel.edu +5 -0
+ Added ChangeLog.new arlib/depcomp arlib/install-sh arlib/missing arlib/mkinstalldirs to the ignore list
+
+ChangeSet
+ 1.808 02/03/31 00:48:23 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.250 02/03/31 00:48:21 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.73 02/03/31 00:42:26 stenn@whimsy.udel.edu +1 -0
+ Generate the ntptrace script.
+
+ configure.in
+ 1.226.1.30 02/03/31 00:42:18 stenn@whimsy.udel.edu +3 -2
+ Generate the ntptrace script.
+
+ChangeSet
+ 1.807 02/03/31 00:12:26 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ Makefile.am
+ 1.27 02/03/31 00:12:24 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.72 02/03/31 00:06:43 stenn@whimsy.udel.edu +3 -0
+ Ntptrace: out with the old, in with the new...
+
+ scripts/ntptrace.in
+ 1.1 02/03/31 00:06:37 stenn@whimsy.udel.edu +60 -0
+
+ scripts/ntptrace.in
+ 1.0 02/03/31 00:06:37 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/scripts/ntptrace.in
+
+ scripts/Makefile.am
+ 1.10 02/03/31 00:06:37 stenn@whimsy.udel.edu +1 -1
+ Install the new ntptrace script
+
+ Makefile.am
+ 1.16.1.10 02/03/31 00:06:37 stenn@whimsy.udel.edu +0 -1
+ Stop doing anything in ntptrace/ by default.
+
+ChangeSet
+ 1.806 02/03/30 21:35:07 stenn@whimsy.udel.edu +1 -0
+ Merge resolution
+
+ ntpd/ntp_proto.c
+ 1.109 02/03/30 21:35:03 stenn@whimsy.udel.edu +1 -1
+ Merge resolution
+
+ChangeSet
+ 1.706.2.71 02/03/30 21:22:50 stenn@whimsy.udel.edu +1 -0
+ Local variable cleanup for OpenSSL.
+
+ ntpd/ntp_proto.c
+ 1.99.1.9 02/03/30 21:22:45 stenn@whimsy.udel.edu +3 -1
+ Local variable cleanup for OpenSSL.
+
+ChangeSet
+ 1.805 02/03/30 01:46:01 stenn@whimsy.udel.edu +8 -0
+ Merge resolution.
+
+ libntp/Makefile.am
+ 1.19 02/03/30 01:45:47 stenn@whimsy.udel.edu +2 -6
+ Merge resolution.
+
+ ntpd/ntp_proto.c
+ 1.108 02/03/30 01:36:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.41 02/03/30 01:36:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_crypto.c
+ 1.52 02/03/30 01:36:30 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.50 02/03/30 01:36:30 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.65 02/03/30 01:36:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.61 02/03/30 01:36:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.249 02/03/30 01:36:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.70 02/03/30 01:29:10 stenn@whimsy.udel.edu +2 -0
+ Merge resolution.
+
+ libntp/clocktypes.c
+ 1.13 02/03/30 01:29:02 stenn@whimsy.udel.edu +0 -3
+ Merge resolution.
+
+ include/ntp.h
+ 1.50.1.10 02/03/30 01:29:02 stenn@whimsy.udel.edu +1 -4
+ Merge resolution.
+
+ChangeSet
+ 1.683.4.84 02/03/30 01:12:34 stenn@whimsy.udel.edu +2 -0
+ clocktypes.c, ntp.h:
+ Add REFCLK_TT560.
+
+ libntp/clocktypes.c
+ 1.7.1.4 02/03/30 01:12:28 stenn@whimsy.udel.edu +3 -1
+ Add REFCLK_TT560.
+
+ include/ntp.h
+ 1.47.3.4 02/03/30 01:12:28 stenn@whimsy.udel.edu +3 -2
+ Add REFCLK_TT560.
+
+ChangeSet
+ 1.706.2.69 02/03/30 00:25:23 stenn@whimsy.udel.edu +7 -0
+ Merge cleanup.
+
+ configure.in
+ 1.226.1.29 02/03/30 00:25:18 stenn@whimsy.udel.edu +0 -11
+ Merge cleanup.
+
+ ntpd/refclock_zyfer.c
+ 1.4 02/03/30 00:12:53 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/refclock_conf.c
+ 1.19 02/03/30 00:12:53 stenn@whimsy.udel.edu +0 -8
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.39.1.11 02/03/30 00:12:53 stenn@whimsy.udel.edu +0 -2
+ Auto merged
+
+ ntpd/Makefile.am
+ 1.27 02/03/30 00:12:53 stenn@whimsy.udel.edu +0 -11
+ Auto merged
+
+ BitKeeper/deleted/.del-refclock_tt560.c
+ 1.2 02/03/30 00:12:52 stenn@whimsy.udel.edu +0 -0
+ Delete: ntpd/refclock_tt560.c
+
+ BitKeeper/deleted/.del-README.rsa~6f1a085f
+ 1.7 02/03/30 00:12:52 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-README.rsa~6f1a085f
+ 1.3.2.2 02/03/30 00:12:36 stenn@whimsy.udel.edu +0 -0
+ Merge rename: README.rsa -> BitKeeper/deleted/.del-README.rsa~6f1a085f
+
+ChangeSet
+ 1.683.4.83 02/03/29 23:38:30 harlan@dog.pfcs.com +1 -0
+ Typo fix.
+
+ ntpd/refclock_zyfer.c
+ 1.1.1.2 02/03/29 23:38:21 harlan@dog.pfcs.com +1 -1
+ Typo fix.
+
+ChangeSet
+ 1.706.9.2 02/03/29 23:24:37 stenn@whimsy.udel.edu +1 -0
+ ntp_config.h:
+ Add CONF_CRYPT_KEYS.
+
+ include/ntp_config.h
+ 1.17 02/03/29 23:24:26 stenn@whimsy.udel.edu +1 -0
+ Add CONF_CRYPT_KEYS.
+
+ChangeSet
+ 1.706.9.1 02/03/29 21:58:28 stenn@whimsy.udel.edu +7 -0
+ ntp_proto.c:
+ For burst, use NTP_BURST instead of NTP_SHIFT for peer->burst.
+ ntp_peer.c:
+ Improve statstr diagnostic message.
+ ntp_crypto.c:
+ Dave made a ton of changes and improvements.
+ ntp_control.c:
+ Add REFCLOCK_TT560 (Harlan)
+ Code cleanup (Dave)
+ ntp_config.c:
+ Added "keysdir" and CRYPTO_CONF_KEYS.
+ ntp.h:
+ Added NTP_BURST and FLAG_CLUST.
+ Changed the X509 version variable name.
+ Makefile.am:
+ Disable all installation for now. (Harlan)
+
+ ntpd/ntp_proto.c
+ 1.99.1.8 02/03/29 21:58:09 stenn@whimsy.udel.edu +11 -18
+ For burst, use NTP_BURST instead of NTP_SHIFT for peer->burst.
+
+ ntpd/ntp_peer.c
+ 1.32.1.6 02/03/29 21:58:08 stenn@whimsy.udel.edu +3 -1
+ Improve statstr diagnostic message.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.4 02/03/29 21:58:08 stenn@whimsy.udel.edu +159 -94
+ Dave made a ton of changes and improvements.
+
+ ntpd/ntp_control.c
+ 1.39.1.10 02/03/29 21:58:08 stenn@whimsy.udel.edu +4 -2
+ Add REFCLOCK_TT560 (Harlan)
+ Code cleanup (Dave)
+
+ ntpd/ntp_config.c
+ 1.52.1.10 02/03/29 21:58:07 stenn@whimsy.udel.edu +5 -0
+ Added "keysdir" and CRYPTO_CONF_KEYS.
+
+ include/ntp.h
+ 1.50.1.9 02/03/29 21:58:07 stenn@whimsy.udel.edu +3 -3
+ Added NTP_BURST and FLAG_CLUST.
+ Changed the X509 version variable name.
+
+ arlib/Makefile.am
+ 1.2 02/03/29 21:58:07 stenn@whimsy.udel.edu +8 -4
+ Disable all installation for now. (Harlan)
+
+ChangeSet
+ 1.683.4.82 02/03/28 19:06:16 stenn@whimsy.udel.edu +6 -0
+ Backport the TrueTime 560 IRIG driver so the clock numbers
+ don't change on the Zyfer.
+
+ ntpd/refclock_tt560.c
+ 1.1 02/03/28 19:06:14 stenn@whimsy.udel.edu +274 -0
+
+ ntpd/refclock_tt560.c
+ 1.0 02/03/28 19:06:14 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/ntpd/refclock_tt560.c
+
+ ntpd/refclock_conf.c
+ 1.13.1.4 02/03/28 19:06:14 stenn@whimsy.udel.edu +12 -5
+ C
+
+ ntpd/ntp_control.c
+ 1.37.3.4 02/03/28 19:06:14 stenn@whimsy.udel.edu +2 -1
+ Add the TT560 driver.
+
+ ntpd/Makefile.am
+ 1.18.2.6 02/03/28 19:06:14 stenn@whimsy.udel.edu +11 -11
+ Better order the source files. Include the TT560 driver.
+
+ configure.in
+ 1.219.3.17 02/03/28 19:06:14 stenn@whimsy.udel.edu +11 -1
+ Backport the TrueTime 560 IRIG driver so the clock numbers don't change
+ on the Zyfer.
+
+ README.rsa
+ 1.3.2.1 02/03/28 19:06:14 stenn@whimsy.udel.edu +2 -4
+ Cleanup.
+
+ChangeSet
+ 1.706.2.66 02/03/26 20:59:14 harlan@dog.pfcs.com +1 -0
+ Finish the integration of strstr.c
+
+ libntp/strstr.c
+ 1.2 02/03/26 20:59:05 harlan@dog.pfcs.com +7 -1
+ Finish the integration of strstr.c
+
+ChangeSet
+ 1.706.2.65 02/03/26 20:22:52 harlan@dog.pfcs.com +5 -0
+ ntp-stable -> ntp-dev integration wibbles.
+
+ libntp/Makefile.am
+ 1.12.1.5 02/03/26 20:22:42 harlan@dog.pfcs.com +5 -14
+ Integrate what used to go in LIBOBJS.
+
+ configure.in
+ 1.226.1.28 02/03/26 20:22:40 harlan@dog.pfcs.com +0 -2
+ ntp-dev doesn't use RSAREF.
+
+ ntpd/refclock_zyfer.c
+ 1.3 02/03/26 16:50:45 harlan@dog.pfcs.com +0 -10
+ Auto merged
+
+ ntpd/ntp_loopfilter.c
+ 1.64 02/03/26 16:50:44 harlan@dog.pfcs.com +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-Makefile.am~e832209e
+ 1.18 02/03/26 16:50:42 harlan@dog.pfcs.com +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-Makefile.am~e832209e
+ 1.14.2.2 02/03/26 16:50:38 harlan@dog.pfcs.com +0 -0
+ Merge rename: librsaref/Makefile.am -> BitKeeper/deleted/.del-Makefile.am~e832209e
+
+ChangeSet
+ 1.683.4.81 02/03/26 11:22:48 harlan@dog.pfcs.com +1 -0
+ Zyfer PPS fixes.
+
+ ntpd/refclock_zyfer.c
+ 1.1.1.1 02/03/26 11:22:47 harlan@dog.pfcs.com +10 -0
+ PPS fixes.
+
+ChangeSet
+ 1.683.4.80 02/03/26 03:57:29 harlan@dog.pfcs.com +7 -0
+ Auto* cleanup.
+
+ librsaref/Makefile.am
+ 1.14.2.1 02/03/26 03:57:28 harlan@dog.pfcs.com +4 -1
+ Lose RSASRCS from the library; it's now forbidden to do things this way.
+
+ libntp/strerror.c
+ 1.3 02/03/26 03:57:28 harlan@dog.pfcs.com +6 -0
+ Always compile the file, but only provide the guts if we need them.
+
+ libntp/strdup.c
+ 1.5 02/03/26 03:57:28 harlan@dog.pfcs.com +6 -0
+ Always compile the file, but only provide the guts if we need them.
+
+ libntp/snprintf.c
+ 1.6 02/03/26 03:57:27 harlan@dog.pfcs.com +4 -0
+ Always compile the file, but only provide the guts if we need them.
+
+ libntp/mktime.c
+ 1.4 02/03/26 03:57:27 harlan@dog.pfcs.com +5 -0
+ Always compile the file, but only provide the guts if we need them.
+
+ libntp/Makefile.am
+ 1.11.2.3 02/03/26 03:57:27 harlan@dog.pfcs.com +10 -13
+ Alphabetize libntp_a_SOURCES, and avoid the libntp/*.c automake problem
+ by always compiling the AC_REPLACE_FUNCS() items.
+
+ configure.in
+ 1.219.3.16 02/03/26 03:57:25 harlan@dog.pfcs.com +7 -5
+ auto* cleanup:
+ Cleanup the RSAREF source stuff, and the LIBOBJS cruft.
+ Quote the AC_CHECK_HEADERS(sys/timepps.h) [from John Hay]
+
+ChangeSet
+ 1.683.4.79 02/03/25 02:19:44 harlan@dog.pfcs.com +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-stable
+ into dog.pfcs.com:/a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-stable
+
+ configure.in
+ 1.219.3.15 02/03/25 02:19:41 harlan@dog.pfcs.com +0 -0
+ Auto merged
+
+ChangeSet
+ 1.804 02/03/25 00:11:25 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.248 02/03/25 00:11:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.64 02/03/25 00:05:26 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ configure.in
+ 1.226.1.27 02/03/25 00:05:24 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ChangeSet
+ 1.683.8.1 02/03/24 23:45:05 stenn@whimsy.udel.edu +1 -0
+ configure.in: Comment out the LIBOBJS hack for ANSI2KNR.
+ We needed it at one time, but 2.52 doesn't need it and 2.53 hates it.
+
+ configure.in
+ 1.219.4.2 02/03/24 23:45:03 stenn@whimsy.udel.edu +3 -2
+ configure.in: Comment out the LIBOBJS hack for ANSI2KNR.
+ We needed it at one time, but 2.52 doesn't need it and 2.53 hates it.
+
+ChangeSet
+ 1.683.7.3 02/03/24 19:25:36 mayer@tecotoo.myibg.com +8 -0
+ WINNT specific includes were included in wrong place.
+ Casting issue fixes.
+
+ ntpd/ntp_request.c
+ 1.23.2.6 02/03/24 19:25:13 mayer@tecotoo.myibg.com +1 -1
+ Fix casting issues
+
+ ntpd/ntp_refclock.c
+ 1.39.2.2 02/03/24 19:25:10 mayer@tecotoo.myibg.com +1 -1
+ Fix casting issues
+
+ ntpd/ntp_config.c
+ 1.50.3.5 02/03/24 19:25:06 mayer@tecotoo.myibg.com +3 -2
+ Fix assignment
+
+ libntp/dolfptoa.c
+ 1.4 02/03/24 19:25:03 mayer@tecotoo.myibg.com +1 -1
+ Fix casting issues
+
+ libntp/dofptoa.c
+ 1.4 02/03/24 19:25:00 mayer@tecotoo.myibg.com +1 -1
+ Fix casting issues
+
+ libntp/caljulian.c
+ 1.4 02/03/24 19:24:57 mayer@tecotoo.myibg.com +1 -1
+ Fix casting issues
+
+ libntp/binio.c
+ 1.3 02/03/24 19:24:54 mayer@tecotoo.myibg.com +12 -12
+ Fix casting issues
+
+ include/ntp_machine.h
+ 1.7.1.4 02/03/24 19:24:50 mayer@tecotoo.myibg.com +5 -4
+ WINNT specific includes were included in the wrong place
+ conditionally define register as empty since registers should not
+ be used here.
+
+ChangeSet
+ 1.683.7.2 02/03/23 21:11:39 mayer@tecotoo.myibg.com +39 -0
+ This is a miscellaneous set of fixes necessary to build on WINNT. Some of the
+ fixes are errors in the non-WINNT specific areas related to type mismatches and
+ casting issues.
+
+ BitKeeper/etc/logging_ok
+ 1.1.2.1 02/03/23 21:10:57 mayer@tecotoo.myibg.com +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ports/winnt/ntptrace/ntptrace.dsp
+ 1.7 02/03/23 21:10:37 mayer@tecotoo.myibg.com +3 -3
+ Fix the WINT build command lines
+
+ ports/winnt/ntpq/ntpq.dsp
+ 1.7 02/03/23 21:10:35 mayer@tecotoo.myibg.com +3 -3
+ Fix the WINT build command lines
+
+ ports/winnt/ntpdc/ntpdc.dsp
+ 1.7 02/03/23 21:10:34 mayer@tecotoo.myibg.com +3 -3
+ Fix the WINT build command lines
+
+ ports/winnt/ntpdate/ntpdate.dsp
+ 1.7 02/03/23 21:10:32 mayer@tecotoo.myibg.com +4 -4
+ Fix the WINT build command lines
+
+ ports/winnt/ntpd/ntp_iocompletionport.c
+ 1.7 02/03/23 21:10:30 mayer@tecotoo.myibg.com +4 -6
+ Fix completion port code to make the proper calls and return the proper error
+ codes.
+
+ ports/winnt/ntpd/hopf_PCI_io.c
+ 1.3 02/03/23 21:10:28 mayer@tecotoo.myibg.com +0 -4
+ Remove dead code
+
+ ports/winnt/libntp/mexit.c
+ 1.4 02/03/23 21:10:27 mayer@tecotoo.myibg.com +1 -1
+ Reorder includes.
+
+ ports/winnt/libntp/log.h
+ 1.4 02/03/23 21:10:25 mayer@tecotoo.myibg.com +1 -0
+ Add process.h include for WINNT
+
+ ports/winnt/libntp/libntp.dsp
+ 1.7 02/03/23 21:10:24 mayer@tecotoo.myibg.com +1 -1
+ Fixes for WINNT command line builds.
+
+ ports/winnt/instsrv/instsrv.c
+ 1.6 02/03/23 21:10:22 mayer@tecotoo.myibg.com +14 -14
+ Miscellaneous WINNT code fixes to build properly and to make the function call
+ to add the ntp events to the registry work with the calling arguments.
+
+ ports/winnt/instsrv/Instsrv.dsp
+ 1.5 02/03/23 21:10:20 mayer@tecotoo.myibg.com +4 -3
+ Fix the WINNT build options
+
+ ports/winnt/include/config.h
+ 1.9.1.2 02/03/23 21:10:18 mayer@tecotoo.myibg.com +23 -1
+ Add WINNT specific definitions for proper support
+
+ ports/winnt/include/clockstuff.h
+ 1.5 02/03/23 21:10:16 mayer@tecotoo.myibg.com +4 -1
+ Reorder includes
+ Add function calls to init_winnt_time and reset_winnt_time
+
+ ntpq/ntpq.c
+ 1.16.1.2 02/03/23 21:10:14 mayer@tecotoo.myibg.com +3 -3
+ Remove function abortcmd for WINNT.
+ fix cmdsort to be non-const.
+
+ ntpdc/ntpdc.c
+ 1.8.1.3 02/03/23 21:10:12 mayer@tecotoo.myibg.com +3 -2
+ Remove function abortcmd for WINNT.
+ fix cmdsort to be non-const.
+
+ ntpd/refclock_palisade.c
+ 1.9.1.2 02/03/23 21:10:10 mayer@tecotoo.myibg.com +5 -0
+ Fix WINNT to call closesocket instead of close
+
+ ntpd/refclock_nmea.c
+ 1.16.1.1 02/03/23 21:10:07 mayer@tecotoo.myibg.com +5 -0
+ Fix WINNT to call closesocket instead of close
+
+ ntpd/refclock_hopfser.c
+ 1.3.1.1 02/03/23 21:10:04 mayer@tecotoo.myibg.com +5 -0
+ Fix WINNT to call closesocket instead of close
+
+ ntpd/refclock_dumbclock.c
+ 1.5.1.1 02/03/23 21:10:02 mayer@tecotoo.myibg.com +5 -0
+ Fix WINNT to call closesocket instead of close.
+
+ ntpd/ntpd.c
+ 1.33.1.4 02/03/23 21:09:59 mayer@tecotoo.myibg.com +2 -1
+ Add missing include for WINNT.
+
+ ntpd/ntp_util.c
+ 1.14.2.2 02/03/23 21:09:56 mayer@tecotoo.myibg.com +1 -1
+ Fix WINNT specific function call.
+
+ ntpd/ntp_peer.c
+ 1.29.2.2 02/03/23 21:09:52 mayer@tecotoo.myibg.com +2 -2
+ Fixes for Type mismatches
+
+ ntpd/ntp_io.c
+ 1.20.2.4 02/03/23 21:09:49 mayer@tecotoo.myibg.com +6 -6
+ Fixes for Type mismatches
+
+ ntpd/ntp_control.c
+ 1.37.4.1 02/03/23 21:09:46 mayer@tecotoo.myibg.com +6 -6
+ Fix type conversion to include the or par of the condition
+
+ ntpd/ntp_config.c
+ 1.50.3.4 02/03/23 21:09:42 mayer@tecotoo.myibg.com +2 -2
+ Fix quotes since this is a single character and not a string.
+ Fix WINNT Function call GetTempPath to not return a length since the length is not
+ used and the code generates a warning message.
+
+ libntp/msyslog.c
+ 1.12 02/03/23 21:09:39 mayer@tecotoo.myibg.com +1 -1
+ Fixes for Type mismatches
+
+ libntp/mfptoms.c
+ 1.3 02/03/23 21:09:36 mayer@tecotoo.myibg.com +1 -1
+ Fixes for Type mismatches
+
+ libntp/mfptoa.c
+ 1.3 02/03/23 21:09:33 mayer@tecotoo.myibg.com +1 -1
+ Fixes for Type mismatches
+
+ libntp/log.c
+ 1.3 02/03/23 21:09:31 mayer@tecotoo.myibg.com +8 -4
+ Fixes for WINNT specific code. This probably should be in the port/winnt/libntp directory.
+
+ libntp/fptoms.c
+ 1.3 02/03/23 21:09:28 mayer@tecotoo.myibg.com +1 -1
+ Fixes for Type mismatches
+
+ libntp/fptoa.c
+ 1.3 02/03/23 21:09:25 mayer@tecotoo.myibg.com +1 -1
+ Fixes for Type mismatches
+
+ libntp/dolfptoa.c
+ 1.3 02/03/23 21:09:22 mayer@tecotoo.myibg.com +1 -1
+ Fixes for Type mismatches
+
+ libntp/dofptoa.c
+ 1.3 02/03/23 21:09:19 mayer@tecotoo.myibg.com +2 -2
+ Fixes for Type mismatches
+
+ libntp/a_md5encrypt.c
+ 1.5.1.2 02/03/23 21:09:16 mayer@tecotoo.myibg.com +2 -2
+ Reorder so that the config.h gets included before the ntp_machine.h file.
+
+ include/ntpd.h
+ 1.27.2.3 02/03/23 21:09:13 mayer@tecotoo.myibg.com +4 -4
+ Fixes for Type mismatches
+
+ include/ntp_stdlib.h
+ 1.10.2.2 02/03/23 21:09:11 mayer@tecotoo.myibg.com +2 -2
+ Fixes for type mismatches
+
+ include/ntp_machine.h
+ 1.7.1.3 02/03/23 21:09:09 mayer@tecotoo.myibg.com +19 -5
+ Fixes for WinNT support
+
+ include/ntp_fp.h
+ 1.2.1.2 02/03/23 21:09:06 mayer@tecotoo.myibg.com +4 -5
+ Fix type mismatches
+
+ChangeSet
+ 1.803 02/03/23 14:59:48 stenn@whimsy.udel.edu +8 -0
+ Merge resolution.
+
+ ntpd/ntp_config.c
+ 1.64 02/03/23 14:59:46 stenn@whimsy.udel.edu +5 -0
+ Merge resolution.
+
+ ntpd/ntp_proto.c
+ 1.107 02/03/23 14:51:02 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.40 02/03/23 14:51:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_crypto.c
+ 1.51 02/03/23 14:51:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.49 02/03/23 14:51:00 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.39 02/03/23 14:50:59 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_control.h
+ 1.20 02/03/23 14:50:59 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.60 02/03/23 14:50:59 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.63 02/03/23 01:12:33 harlan@dog.pfcs.com +1 -0
+ Merge stenn@whimsy.udel.edu:/backroom/ntp-dev
+ into dog.pfcs.com:/a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-dev
+
+ ntpd/ntp_config.c
+ 1.52.1.9 02/03/23 01:12:31 harlan@dog.pfcs.com +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.8.1 02/03/23 01:07:49 stenn@whimsy.udel.edu +13 -0
+ Integrate Dave's certificate changes.
+
+ util/genkeys.c
+ 1.8 02/03/23 01:07:48 stenn@whimsy.udel.edu +10 -73
+ Lose the DH stuff and the cert req's.
+
+ ntpd/ntp_timer.c
+ 1.21 02/03/23 01:07:48 stenn@whimsy.udel.edu +1 -1
+ interface updates.
+
+ ntpd/ntp_proto.c
+ 1.99.1.7 02/03/23 01:07:48 stenn@whimsy.udel.edu +87 -67
+ Many crypto/cert changes.
+
+ ntpd/ntp_peer.c
+ 1.32.1.5 02/03/23 01:07:47 stenn@whimsy.udel.edu +1 -1
+ Interface cleanup.
+
+ ntpd/ntp_crypto.c
+ 1.48.1.3 02/03/23 01:07:47 stenn@whimsy.udel.edu +1170 -648
+ Lots of changes and cleanup.
+
+ ntpd/ntp_control.c
+ 1.39.1.9 02/03/23 01:07:47 stenn@whimsy.udel.edu +26 -30
+ Various cleanup/changes.
+
+ ntpd/ntp_config.c
+ 1.52.2.1 02/03/23 01:07:46 stenn@whimsy.udel.edu +5 -4
+ Implement CONF_CRYPTO_TRUST.
+
+ libntp/statestr.c
+ 1.6 02/03/23 01:07:46 stenn@whimsy.udel.edu +7 -9
+ State message updates.
+
+ include/ntpd.h
+ 1.31.1.5 02/03/23 01:07:46 stenn@whimsy.udel.edu +4 -5
+ Various interface changes.
+
+ include/ntp_crypto.h
+ 1.24 02/03/23 01:07:46 stenn@whimsy.udel.edu +23 -30
+ Wiggle some flag bits.
+ Add some certificate stuff.
+
+ include/ntp_control.h
+ 1.15.1.4 02/03/23 01:07:46 stenn@whimsy.udel.edu +5 -6
+ Lose CP_CERTIF.
+
+ include/ntp_config.h
+ 1.16 02/03/23 01:07:46 stenn@whimsy.udel.edu +1 -0
+ New #define: CONF_CRYPTO_TRUST.
+
+ include/ntp.h
+ 1.50.1.8 02/03/23 01:07:46 stenn@whimsy.udel.edu +40 -6
+ Lose pkt from struct value.
+ Create struct exten, struct cert_info.
+ Clean up/update some of the other bits.
+
+ChangeSet
+ 1.706.2.62 02/03/23 00:10:36 harlan@dog.pfcs.com +2 -0
+ ntp-genkeys improvements.
+
+ util/ntp-genkeys.c
+ 1.73 02/03/23 00:10:34 harlan@dog.pfcs.com +14 -1
+ Have the peer_config() stub return nonzero so getconfig() doesn't squawk.
+ Set call_resolver to 0 so getconfig() doesn't try and call the resolver.
+ Add in the missing calls to unlink() before we create the symlinks.
+ Control generation of X509 certificate requests with a #define until we
+ figure out if we want them at all.
+
+ ntpd/ntp_config.c
+ 1.52.1.8 02/03/23 00:10:32 harlan@dog.pfcs.com +7 -4
+ Implement a "call_resolver" variable (default to "yes"), as while we want
+ to run the resolver by default, when we crack ntp.conf anywhere other than
+ in ntpd we don't want to call the resolver.
+
+ChangeSet
+ 1.683.4.78 02/03/22 22:05:41 harlan@dog.pfcs.com +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-stable
+ into dog.pfcs.com:/a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-stable
+
+ configure.in
+ 1.219.3.14 02/03/22 22:05:39 harlan@dog.pfcs.com +0 -0
+ Auto merged
+
+ChangeSet
+ 1.802 02/03/21 23:16:08 stenn@whimsy.udel.edu +2 -0
+ libntp's Makefile.am has some additional source modules.
+
+ libntp/Makefile.am
+ 1.18 02/03/21 23:16:08 stenn@whimsy.udel.edu +5 -5
+ Reorder the source modules.
+
+ configure.in
+ 1.247 02/03/21 23:03:17 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.61 02/03/21 22:50:18 harlan@dog.pfcs.com +4 -0
+ Provide strstr.c .
+ ntp-genkeys should be usable now.
+
+ libntp/strstr.c
+ 1.1 02/03/21 22:50:17 harlan@dog.pfcs.com +46 -0
+
+ libntp/strstr.c
+ 1.0 02/03/21 22:50:17 harlan@dog.pfcs.com +0 -0
+ BitKeeper file /a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-dev/libntp/strstr.c
+
+ util/ntp-genkeys.c
+ 1.72 02/03/21 22:50:16 harlan@dog.pfcs.com +93 -68
+ Allow for hostname substitution in the filenames in ntp.conf.
+ Implement the default filename stuff.
+ Update the filenames for each host.
+
+ libntp/Makefile.am
+ 1.12.1.4 02/03/21 22:50:15 harlan@dog.pfcs.com +11 -12
+ C
+
+ configure.in
+ 1.226.1.26 02/03/21 22:50:13 harlan@dog.pfcs.com +1 -1
+ Look for/provide strstr().
+
+ChangeSet
+ 1.706.2.60 02/03/18 01:18:31 harlan@dog.pfcs.com +1 -0
+ ntp-genkeys improvements.
+
+ util/ntp-genkeys.c
+ 1.71 02/03/18 01:18:29 harlan@dog.pfcs.com +5 -2
+ Fix bug in the case where we want to use the key specified in ntp.conf .
+
+ChangeSet
+ 1.706.2.59 02/03/18 00:53:41 harlan@dog.pfcs.com +1 -0
+ ntp-genkeys is mostly functional now. Mostly.
+
+ util/ntp-genkeys.c
+ 1.70 02/03/18 00:53:39 harlan@dog.pfcs.com +46 -19
+ Raise the bar for debug noise.
+ Implement the symlink code.
+
+ChangeSet
+ 1.706.2.58 02/03/17 22:50:20 harlan@dog.pfcs.com +1 -0
+ ntp-genkeys is real close now...
+
+ util/ntp-genkeys.c
+ 1.69 02/03/17 22:50:18 harlan@dog.pfcs.com +157 -41
+ Real close now...
+
+ChangeSet
+ 1.706.2.57 02/03/17 01:51:54 harlan@dog.pfcs.com +1 -0
+ ntp-genkeys cleanup and improvements.
+
+ util/ntp-genkeys.c
+ 1.68 02/03/17 01:51:52 harlan@dog.pfcs.com +16 -9
+ cleanup/improvements.
+
+ChangeSet
+ 1.706.2.56 02/03/16 23:19:29 harlan@dog.pfcs.com +1 -0
+ Added pps-api to EXTRA_PROGRAMS.
+
+ util/Makefile.am
+ 1.17 02/03/16 23:19:29 harlan@dog.pfcs.com +1 -1
+ Added pps-api to EXTRA_PROGRAMS.
+
+ChangeSet
+ 1.706.2.55 02/03/16 23:14:32 harlan@dog.pfcs.com +2 -0
+ More progress on ntp-genkeys.
+
+ Add in the pps-api.c test program from P-HK.
+
+ util/pps-api.c
+ 1.1 02/03/16 23:14:31 harlan@dog.pfcs.com +100 -0
+
+ util/pps-api.c
+ 1.0 02/03/16 23:14:31 harlan@dog.pfcs.com +0 -0
+ BitKeeper file /a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-dev/util/pps-api.c
+
+ util/ntp-genkeys.c
+ 1.67 02/03/16 23:14:30 harlan@dog.pfcs.com +278 -192
+ Much progress. Now generates what we say, but the symlinks still need
+ to be generated.
+
+ChangeSet
+ 1.798 02/03/12 19:19:07 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.246 02/03/12 19:19:06 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.54 02/03/12 19:15:19 stenn@whimsy.udel.edu +1 -0
+ Lose PUBKEY - it's really obsolete.
+
+ configure.in
+ 1.226.1.25 02/03/12 19:15:18 stenn@whimsy.udel.edu +0 -1
+ Lose PUBKEY - it's really obsolete.
+
+ChangeSet
+ 1.706.2.53 02/03/11 15:25:50 harlan@dog.pfcs.com +1 -0
+ Make ntp-genkeys compile in the absence of OPENSSL.
+
+ util/ntp-genkeys.c
+ 1.66 02/03/11 15:25:46 harlan@dog.pfcs.com +2 -0
+ If no OPENSSL then we can't parse openssl-specific keywords.
+
+ChangeSet
+ 1.706.2.52 02/03/09 21:17:03 harlan@dog.pfcs.com +1 -0
+ More ntp-genkeys work.
+
+ util/ntp-genkeys.c
+ 1.65 02/03/09 21:17:02 harlan@dog.pfcs.com +270 -67
+ More ntp-genkeys work.
+
+ChangeSet
+ 1.706.7.2 02/03/09 16:55:30 stenn@whimsy.udel.edu +1 -0
+ QNX cleanup.
+ From: Dmitry Alexeyev <D.Alexeyev@qnx.org.ru>
+
+ libntp/adjtime.c
+ 1.6 02/03/09 16:55:30 stenn@whimsy.udel.edu +0 -10
+ QNX cleanup.
+ From: Dmitry Alexeyev <D.Alexeyev@qnx.org.ru>
+
+ChangeSet
+ 1.706.2.50 02/03/09 04:17:28 harlan@dog.pfcs.com +1 -0
+ ntp-genkeys: Begin the cert bitmask stuff.
+
+ util/ntp-genkeys.c
+ 1.64 02/03/09 04:17:26 harlan@dog.pfcs.com +75 -38
+ Begin the cert bitmask stuff.
+
+ChangeSet
+ 1.706.7.1 02/03/08 15:20:53 stenn@whimsy.udel.edu +1 -0
+ Include arlib/'s copying permission statement.
+
+ arlib/COPYING
+ 1.2 02/03/08 15:20:52 stenn@whimsy.udel.edu +46 -0
+ Distribute the copying permission for arlib/.
+
+ChangeSet
+ 1.706.2.49 02/03/08 03:56:36 harlan@dog.pfcs.com +2 -0
+ Check in recent ntp-genkeys work.
+
+ util/ntp-genkeys.c
+ 1.63 02/03/08 03:56:34 harlan@dog.pfcs.com +354 -52
+ Check in tonights work on ntp-genkeys.
+
+ util/Makefile.am
+ 1.16 02/03/08 03:56:34 harlan@dog.pfcs.com +2 -2
+ ntp-genkeys needs the ntp.conf cracking stuff now.
+
+ChangeSet
+ 1.794 02/03/07 22:23:50 stenn@whimsy.udel.edu +2 -0
+ Merge resolution.
+
+ ntpdate/ntpdate.c
+ 1.32 02/03/07 22:23:49 stenn@whimsy.udel.edu +2 -2
+ Conflict resolution. Nothing spiffy.
+
+ configure.in
+ 1.245 02/03/07 22:15:07 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.48 02/03/07 22:04:02 stenn@whimsy.udel.edu +2 -0
+ Update config.guess and config.sub.
+
+ config.sub
+ 1.11 02/03/07 22:04:01 stenn@whimsy.udel.edu +154 -86
+ Freshen up.
+
+ config.guess
+ 1.11 02/03/07 22:04:01 stenn@whimsy.udel.edu +152 -128
+ Freshen up.
+
+ChangeSet
+ 1.706.2.47 02/03/07 21:41:02 harlan@dog.pfcs.com +5 -0
+ Take a stab at finishing the QNX patches sent in from Dmitry Alexeyev <D.Alexeyev@qnx.org.ru>
+
+ ntpdate/ntpdate.c
+ 1.23.1.5 02/03/07 21:41:00 harlan@dog.pfcs.com +4 -0
+ QNX patches, from Dmitry Alexeyev <D.Alexeyev@qnx.org.ru>
+
+ libntp/iosignal.c
+ 1.10 02/03/07 21:41:00 harlan@dog.pfcs.com +6 -0
+ QNX patches, from Dmitry Alexeyev <D.Alexeyev@qnx.org.ru>
+
+ libntp/adjtime.c
+ 1.5 02/03/07 21:40:59 harlan@dog.pfcs.com +11 -1
+ QNX patches, from Dmitry Alexeyev <D.Alexeyev@qnx.org.ru>
+
+ include/adjtime.h
+ 1.3 02/03/07 21:40:59 harlan@dog.pfcs.com +6 -0
+ QNX patches, from Dmitry Alexeyev <D.Alexeyev@qnx.org.ru>
+
+ configure.in
+ 1.226.1.24 02/03/07 21:40:57 harlan@dog.pfcs.com +5 -2
+ Take a stab at QNX patches (inspired by Dmitry's patch) and some cleanup.
+
+ChangeSet
+ 1.706.2.46 02/03/07 19:04:20 harlan@dog.pfcs.com +2 -0
+ Build both genkeys and ntp-genkeys while we're waiting for ntp-genkeys
+ to be finished.
+
+ util/ntp-genkeys.c
+ 1.62 02/03/07 19:04:18 harlan@dog.pfcs.com +506 -937
+ Initial cut at updated ntp-genkeys.
+
+ This still needs work before it's useful.
+
+ util/Makefile.am
+ 1.15 02/03/07 19:04:18 harlan@dog.pfcs.com +2 -2
+ Build both genkeys and ntp-genkeys while we're still making progress
+ on the official version of ntp-genkeys.
+
+ChangeSet
+ 1.792 02/03/07 18:44:07 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.244 02/03/07 18:44:06 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.26 02/03/07 18:44:06 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.45 02/03/07 18:38:58 harlan@dog.pfcs.com +1 -0
+ audio.c: Linux doesn't do AIOGFMT and snd_chan_param.
+
+ libntp/audio.c
+ 1.16 02/03/07 18:38:57 harlan@dog.pfcs.com +4 -0
+ audio.c: Linux doesn't do AIOGFMT and snd_chan_param.
+
+ChangeSet
+ 1.706.2.44 02/03/07 13:36:48 harlan@dog.pfcs.com +1 -0
+ Merge stenn@whimsy.udel.edu:/backroom/ntp-dev
+ into dog.pfcs.com:/a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-dev
+
+ configure.in
+ 1.226.1.23 02/03/07 13:36:46 harlan@dog.pfcs.com +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.6.1 02/03/07 13:34:34 harlan@dog.pfcs.com +1 -0
+ AC_CANONICAL_SYSTEM ($host/$target/$build) cleanup.
+
+ configure.in
+ 1.226.3.1 02/03/07 13:34:31 harlan@dog.pfcs.com +97 -97
+ AC_CANONICAL_SYSTEM ($host/$target/$build) cleanup.
+
+ChangeSet
+ 1.706.2.43 02/03/07 03:40:34 stenn@whimsy.udel.edu +1 -0
+ Control compilation of arlib/ via --with-arlib
+
+ configure.in
+ 1.226.1.22 02/03/07 03:40:33 stenn@whimsy.udel.edu +10 -2
+ Control compilation of arlib/ via --with-arlib
+
+ arlib/sample.c
+ 1.1 02/03/07 02:40:54 stenn@whimsy.udel.edu +143 -0
+
+ChangeSet
+ 1.706.2.42 02/03/07 02:40:54 stenn@whimsy.udel.edu +11 -0
+ arlib/ checkin.
+
+ arlib/sample.c
+ 1.0 02/03/07 02:40:54 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/sample.c
+
+ arlib/configure.in
+ 1.1 02/03/07 02:40:53 stenn@whimsy.udel.edu +57 -0
+
+ arlib/arplib.h
+ 1.1 02/03/07 02:40:53 stenn@whimsy.udel.edu +45 -0
+
+ arlib/arlib.h
+ 1.1 02/03/07 02:40:53 stenn@whimsy.udel.edu +29 -0
+
+ arlib/arlib.c
+ 1.1 02/03/07 02:40:53 stenn@whimsy.udel.edu +1056 -0
+
+ arlib/arlib.3
+ 1.1 02/03/07 02:40:53 stenn@whimsy.udel.edu +230 -0
+
+ arlib/UNSHAR.HDR
+ 1.1 02/03/07 02:40:53 stenn@whimsy.udel.edu +32 -0
+
+ arlib/README
+ 1.1 02/03/07 02:40:53 stenn@whimsy.udel.edu +49 -0
+
+ arlib/configure.in
+ 1.0 02/03/07 02:40:53 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/configure.in
+
+ arlib/arplib.h
+ 1.0 02/03/07 02:40:53 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/arplib.h
+
+ arlib/arlib.h
+ 1.0 02/03/07 02:40:53 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/arlib.h
+
+ arlib/arlib.c
+ 1.0 02/03/07 02:40:53 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/arlib.c
+
+ arlib/arlib.3
+ 1.0 02/03/07 02:40:53 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/arlib.3
+
+ arlib/UNSHAR.HDR
+ 1.0 02/03/07 02:40:53 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/UNSHAR.HDR
+
+ arlib/README
+ 1.0 02/03/07 02:40:53 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/README
+
+ arlib/Makefile.am
+ 1.1 02/03/07 02:40:52 stenn@whimsy.udel.edu +11 -0
+
+ arlib/INSTALL
+ 1.1 02/03/07 02:40:52 stenn@whimsy.udel.edu +182 -0
+
+ arlib/COPYING
+ 1.1 02/03/07 02:40:52 stenn@whimsy.udel.edu +0 -0
+
+ arlib/Makefile.am
+ 1.0 02/03/07 02:40:52 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/Makefile.am
+
+ arlib/INSTALL
+ 1.0 02/03/07 02:40:52 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/INSTALL
+
+ arlib/COPYING
+ 1.0 02/03/07 02:40:52 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/arlib/COPYING
+
+ChangeSet
+ 1.706.2.41 02/03/04 01:30:41 harlan@dog.pfcs.com +2 -0
+ Add in conditional support for building the async resolver library.
+ We're not using this (yet).
+
+ configure.in
+ 1.226.1.21 02/03/04 01:30:39 harlan@dog.pfcs.com +13 -6
+ Add in conditional support for building the async resolver library.
+ We're not using this (yet).
+
+ Makefile.am
+ 1.16.1.9 02/03/04 01:30:38 harlan@dog.pfcs.com +1 -0
+ Add in conditional support for building the async resolver library.
+ We're not using this (yet).
+
+ChangeSet
+ 1.706.2.40 02/03/02 16:42:08 harlan@dog.pfcs.com +1 -0
+ Patches to html2man.pl
+
+ scripts/html2man.pl
+ 1.2 02/03/02 16:42:07 harlan@dog.pfcs.com +6 -4
+ Recent perl's mkdir seems to require the 2nd arg...
+
+ChangeSet
+ 1.790 02/03/02 16:29:04 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.243 02/03/02 16:29:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/ignore
+ 1.17 02/03/02 16:28:57 stenn@whimsy.udel.edu +0 -0
+ auto-union
+
+ChangeSet
+ 1.706.2.39 02/03/02 16:11:35 harlan@dog.pfcs.com +1 -0
+ Ignore generated man pages.
+
+ BitKeeper/etc/ignore
+ 1.14.1.2 02/03/02 16:11:35 harlan@dog.pfcs.com +1 -0
+ Ignore generated man pages.
+
+ChangeSet
+ 1.706.2.38 02/03/02 16:08:40 harlan@dog.pfcs.com +2 -0
+ PCM_SOUND: Check for struct snd_size - apparently it's not in Linux.
+
+ libntp/audio.c
+ 1.15 02/03/02 16:08:39 harlan@dog.pfcs.com +4 -0
+ Guard use of struct snd_size.
+
+ configure.in
+ 1.226.1.20 02/03/02 16:08:37 harlan@dog.pfcs.com +21 -0
+ PCM_SOUND: Check for struct snd_size - apparently it's not in Linux
+
+ChangeSet
+ 1.706.5.1 02/02/28 15:17:46 harlan@dog.pfcs.com +1 -0
+ Added html2man script.
+
+ From: Peter Boettcher <boettcher@ll.mit.edu>
+
+ scripts/html2man.pl
+ 1.1 02/02/28 15:17:45 harlan@dog.pfcs.com +172 -0
+
+ scripts/html2man.pl
+ 1.0 02/02/28 15:17:45 harlan@dog.pfcs.com +0 -0
+ BitKeeper file /a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-dev/scripts/html2man.pl
+
+ChangeSet
+ 1.789 02/02/27 01:41:33 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.242 02/02/27 01:41:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.36 02/02/27 01:38:22 stenn@whimsy.udel.edu +2 -0
+ Resolve the automerge - ntp-dev's version number is the one we want.
+
+ configure.in
+ 1.226.1.19 02/02/27 01:38:21 stenn@whimsy.udel.edu +0 -1
+ Resolve the automerge - ntp-dev uses ntp-dev's version number.
+
+ NEWS
+ 1.38 02/02/27 01:31:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.7.1 02/02/26 22:44:34 stenn@whimsy.udel.edu +2 -0
ntp-4.1.1
- TAG: NTP_4_1_1
configure.in
- 1.235 02/02/26 22:44:33 stenn@whimsy.udel.edu +1 -1
+ 1.219.4.1 02/02/26 22:44:33 stenn@whimsy.udel.edu +1 -1
ntp-4.1.1
NEWS
- 1.38 02/02/26 22:44:32 stenn@whimsy.udel.edu +1 -0
+ 1.31.1.7 02/02/26 22:44:32 stenn@whimsy.udel.edu +1 -0
Update the NEWS file.
-ChangeSet@1.785, 2002-02-22 21:10:08-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.2.35 02/02/26 04:01:55 stenn@whimsy.udel.edu +1 -0
+ Apparently, the TPRO refclock didn't get updated when the refclockproc
+ structure changed the usec member to nsec. Fix it now.
+
+ ntpd/refclock_tpro.c
+ 1.8 02/02/26 04:01:55 stenn@whimsy.udel.edu +7 -1
+ Apparently, the TPRO refclock didn't get updated when the refclockproc
+ structure changed the usec member to nsec. Fix it now.
+
+ChangeSet
+ 1.706.2.34 02/02/26 03:38:12 stenn@whimsy.udel.edu +1 -0
+ Generate X509v3 certificate requests.
+
+ util/genkeys.c
+ 1.7 02/02/26 03:38:11 stenn@whimsy.udel.edu +5 -5
+ Generate X509v3 certificate requests.
+
+ util/audio-pcm.c
+ 1.1 02/02/24 02:21:11 harlan@dog.pfcs.com +154 -0
+
+ChangeSet
+ 1.706.2.33 02/02/24 02:21:11 harlan@dog.pfcs.com +2 -0
+ New program: util/audio-pcm, used for debugging the PCM audio stuff.
+
+ util/audio-pcm.c
+ 1.0 02/02/24 02:21:11 harlan@dog.pfcs.com +0 -0
+ BitKeeper file /a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-dev/util/audio-pcm.c
+
+ util/Makefile.am
+ 1.14 02/02/24 02:21:10 harlan@dog.pfcs.com +4 -1
+ audio-pcm is a new extra program.
+
+ChangeSet
+ 1.706.2.32 02/02/24 02:17:52 harlan@dog.pfcs.com +1 -0
+ Finish off the /etc/ntp.audio config file processing.
+
+ libntp/audio.c
+ 1.14 02/02/24 02:17:51 harlan@dog.pfcs.com +71 -8
+ Finish off the /etc/ntp.audio config file processing.
+
+ChangeSet
+ 1.706.2.31 02/02/23 22:05:20 harlan@dog.pfcs.com +1 -0
+ Only do PCM audio config file processing if we have PCM audio.
+
+ libntp/audio.c
+ 1.13 02/02/23 22:05:19 harlan@dog.pfcs.com +2 -0
+ Only do PCM audio config file processing if we have PCM audio.
+
+ChangeSet
+ 1.706.2.30 02/02/23 21:51:51 harlan@dog.pfcs.com +5 -0
+ Revert the audio port/mongain changes.
+
+ Prepare for PCM audio config files.
+
+ ntpd/refclock_wwv.c
+ 1.35 02/02/23 21:51:48 harlan@dog.pfcs.com +27 -29
+ Revert the audio port/mongain changes.
+
+ ntpd/refclock_irig.c
+ 1.14 02/02/23 21:51:47 harlan@dog.pfcs.com +31 -31
+ Revert the audio port/mongain changes.
+
+ ntpd/refclock_chu.c
+ 1.29 02/02/23 21:51:46 harlan@dog.pfcs.com +37 -42
+ Revert the audio port/mongain changes.
+
+ libntp/audio.c
+ 1.12 02/02/23 21:51:45 harlan@dog.pfcs.com +163 -51
+ Revert the audio port/mongain changes.
+
+ Prepare for PCM audio config files.
+
+ include/audio.h
+ 1.6 02/02/23 21:51:45 harlan@dog.pfcs.com +2 -2
+ Revert the audio port/mongain changes.
+
+ChangeSet
+ 1.706.2.29 02/02/22 22:23:28 harlan@dog.pfcs.com +1 -0
+ Merge stenn@whimsy.udel.edu:/backroom/ntp-dev
+ into dog.pfcs.com:/a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-dev
+
+ ntpd/refclock_chu.c
+ 1.28 02/02/22 22:23:27 harlan@dog.pfcs.com +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.4.1 02/02/22 22:21:38 harlan@dog.pfcs.com +5 -0
+ Set the port and mongain in audio_init(), not audio_gain().
+
+ ntpd/refclock_wwv.c
+ 1.34 02/02/22 22:21:34 harlan@dog.pfcs.com +30 -28
+ Set the port and mongain in audio_init(), not audio_gain().
+
+ ntpd/refclock_irig.c
+ 1.13 02/02/22 22:21:33 harlan@dog.pfcs.com +33 -33
+ Set the port and mongain in audio_init(), not audio_gain().
+
+ ntpd/refclock_chu.c
+ 1.26.1.1 02/02/22 22:21:32 harlan@dog.pfcs.com +42 -37
+ Set the port and mongain in audio_init(), not audio_gain().
+
+ libntp/audio.c
+ 1.11 02/02/22 22:21:32 harlan@dog.pfcs.com +82 -66
+ Set the port and mongain in audio_init(), not audio_gain().
+
+ include/audio.h
+ 1.5 02/02/22 22:21:32 harlan@dog.pfcs.com +2 -2
+ Set the port and mongain in audio_init(), not audio_gain().
+
+ChangeSet
+ 1.706.2.28 02/02/22 21:59:51 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_chu.c
+ 1.27 02/02/22 21:59:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.27 02/02/22 21:58:56 stenn@whimsy.udel.edu +1 -0
+ Begin PPS support for the Zyfer.
+
+ ntpd/refclock_zyfer.c
+ 1.2 02/02/22 21:58:55 stenn@whimsy.udel.edu +10 -0
+ Begin PPS support for the Zyfer.
+
+ChangeSet
+ 1.683.4.76 02/02/22 21:10:08 stenn@whimsy.udel.edu +1 -0
LEAP_DELSECOND support for CHU.
From: Ralph Siemsen <ralphs@netwinder.org>
ntpd/refclock_chu.c
- 1.22 02/02/22 21:10:07 stenn@whimsy.udel.edu +3 -0
+ 1.21.1.1 02/02/22 21:10:07 stenn@whimsy.udel.edu +3 -0
LEAP_DELSECOND support.
From: Ralph Siemsen <ralphs@netwinder.org>
-ChangeSet@1.784, 2002-02-19 19:07:29-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.6.1 02/02/20 12:36:45 harlan@dog.pfcs.com +1 -0
+ Merge bk://www.ntp.org/home/bk/ntp-stable
+ into dog.pfcs.com:/a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-stable
+
+ ntpd/ntp_loopfilter.c
+ 1.53.1.4 02/02/20 12:36:43 harlan@dog.pfcs.com +0 -2
+ Auto merged
+
+ChangeSet
+ 1.786 02/02/19 19:16:50 stenn@whimsy.udel.edu +4 -0
+ Merge
+
+ include/ntp.h
+ 1.59 02/02/19 19:16:49 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ ntpd/ntp_control.c
+ 1.48 02/02/19 19:14:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.241 02/02/19 19:14:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.9 02/02/19 19:14:17 stenn@whimsy.udel.edu +0 -0
+ auto-union
+
+ChangeSet
+ 1.683.4.75 02/02/19 19:07:29 stenn@whimsy.udel.edu +2 -0
Trigger improvements.
+ BitKeeper/triggers/trigger.cfg
+ 1.9 02/02/19 19:07:28 stenn@whimsy.udel.edu +2 -2
+ Enable the email-related log messages.
+
BitKeeper/triggers/delta-changelog
1.4 02/02/19 19:07:28 stenn@whimsy.udel.edu +3 -2
Don't use this to update ChangeLog, but use it only to send the
checkin log email.
- BitKeeper/triggers/trigger.cfg
- 1.9 02/02/19 19:07:28 stenn@whimsy.udel.edu +2 -2
- Enable the email-related log messages.
+ChangeSet
+ 1.706.2.25 02/02/19 13:35:59 harlan@dog.pfcs.com +5 -0
+ Automerge cleanup.
+
+ ntpd/refclock_conf.c
+ 1.18 02/02/19 13:35:58 harlan@dog.pfcs.com +8 -9
+ Automerge cleanup.
+
+ ntpd/Makefile.am
+ 1.26 02/02/19 13:35:58 harlan@dog.pfcs.com +0 -2
+ Automerge cleanup
+
+ libntp/clocktypes.c
+ 1.12 02/02/19 13:35:57 harlan@dog.pfcs.com +3 -3
+ Automerge cleanup
+
+ include/ntp.h
+ 1.50.1.7 02/02/19 13:35:56 harlan@dog.pfcs.com +3 -4
+ Automerge cleanup.
+
+ configure.in
+ 1.226.1.18 02/02/19 13:35:54 harlan@dog.pfcs.com +11 -20
+ Automerge cleanup.
+
+ChangeSet
+ 1.706.3.2 02/02/19 13:07:32 harlan@dog.pfcs.com +10 -0
+ Merge dog.pfcs.com:/a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-stable
+ into dog.pfcs.com:/a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-dev
-ChangeSet@1.783, 2002-02-18 23:27:09-05:00, stenn@whimsy.udel.edu
+ ntpd/refclock_conf.c
+ 1.16.1.2 02/02/19 13:07:31 harlan@dog.pfcs.com +0 -8
+ Auto merged
+
+ ntpd/ntp_loopfilter.c
+ 1.63 02/02/19 13:07:29 harlan@dog.pfcs.com +0 -2
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.39.1.8 02/02/19 13:07:26 harlan@dog.pfcs.com +0 -1
+ Auto merged
+
+ ntpd/Makefile.am
+ 1.24.1.2 02/02/19 13:07:23 harlan@dog.pfcs.com +0 -4
+ Auto merged
+
+ libntp/clocktypes.c
+ 1.10.1.2 02/02/19 13:07:23 harlan@dog.pfcs.com +0 -2
+ Auto merged
+
+ include/ntp.h
+ 1.50.2.2 02/02/19 13:07:21 harlan@dog.pfcs.com +0 -2
+ Auto merged
+
+ configure.in
+ 1.226.2.2 02/02/19 13:07:18 harlan@dog.pfcs.com +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-refclock_zyfer.c
+ 1.2 02/02/19 13:07:14 harlan@dog.pfcs.com +0 -0
+ Delete: ntpd/refclock_zyfer.c
+
+ BitKeeper/etc/logging_ok
+ 1.3.2.4 02/02/19 13:06:36 harlan@dog.pfcs.com +1 -1
+ 'Auto converge'
+
+ BitKeeper/etc/logging_ok
+ 1.3.2.3 02/02/19 13:06:36 harlan@dog.pfcs.com +0 -0
+ Rename: BitKeeper/deleted/.del-logging_ok~bebb84d857254496 -> BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.8 02/02/19 13:06:36 harlan@dog.pfcs.com +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.3.2.2 02/02/19 13:06:35 harlan@dog.pfcs.com +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.7 02/02/19 13:06:34 harlan@dog.pfcs.com +1 -1
+ auto-union
+
+ChangeSet
+ 1.706.3.1 02/02/19 13:04:34 harlan@dog.pfcs.com +9 -0
+ PCM sound support, from Harlan Stenn.
+
+ Zyfer GPStarplus support, from Harlan Stenn
+
+ BitKeeper/etc/logging_ok
+ 1.3.2.1 02/02/19 13:04:26 harlan@dog.pfcs.com +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpd/refclock_zyfer.c
+ 1.1 02/02/19 13:04:14 harlan@dog.pfcs.com +336 -0
+
+ ntpd/refclock_zyfer.c
+ 1.0 02/02/19 13:04:14 harlan@dog.pfcs.com +0 -0
+ BitKeeper file /a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-dev/ntpd/refclock_zyfer.c
+
+ ntpd/refclock_conf.c
+ 1.16.1.1 02/02/19 13:04:14 harlan@dog.pfcs.com +8 -1
+ Zyfer GPStarplus support.
+
+ ntpd/ntp_control.c
+ 1.39.1.7 02/02/19 13:04:13 harlan@dog.pfcs.com +1 -0
+ Added Zyfer GPStarplus.
+
+ ntpd/Makefile.am
+ 1.24.1.1 02/02/19 13:04:12 harlan@dog.pfcs.com +4 -3
+ refclock_zyfer.c added to refclock list.
+
+ libntp/clocktypes.c
+ 1.10.1.1 02/02/19 13:04:12 harlan@dog.pfcs.com +2 -0
+ Zyfer GPStarplus support.
+
+ libntp/audio.c
+ 1.10 02/02/19 13:04:12 harlan@dog.pfcs.com +135 -18
+ PCM audio support.
+
+ include/ntp.h
+ 1.50.2.1 02/02/19 13:04:11 harlan@dog.pfcs.com +2 -1
+ Zyfer GPStarplus support.
+
+ configure.in
+ 1.226.2.1 02/02/19 13:04:09 harlan@dog.pfcs.com +14 -2
+ PCM Audio support.
+
+ Zyfer GPStarplus support.
+
+ChangeSet
+ 1.683.5.1 02/02/19 12:52:08 harlan@dog.pfcs.com +10 -0
+ Zyfer GPStarplus driver (From Harlan Stenn)
+
+ debug cleanup in loopfilter.
+
+ BitKeeper/etc/logging_ok
+ 1.1.1.3 02/02/19 12:52:02 harlan@dog.pfcs.com +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpd/refclock_zyfer.c
+ 1.1 02/02/19 12:51:58 harlan@dog.pfcs.com +336 -0
+
+ ntpd/refclock_zyfer.c
+ 1.0 02/02/19 12:51:58 harlan@dog.pfcs.com +0 -0
+ BitKeeper file /a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-stable/ntpd/refclock_zyfer.c
+
+ html/driver42.html
+ 1.1 02/02/19 12:51:57 harlan@dog.pfcs.com +39 -0
+
+ ntpd/refclock_conf.c
+ 1.13.1.3 02/02/19 12:51:57 harlan@dog.pfcs.com +8 -1
+ Added hooks for the ZyferGPStarplus.
+
+ html/driver42.html
+ 1.0 02/02/19 12:51:57 harlan@dog.pfcs.com +0 -0
+ BitKeeper file /a/local/etc/amd.stage/spot/._d/da3s1f/src/Networking/Xntp/ntp-stable/html/driver42.html
+
+ ntpd/ntp_loopfilter.c
+ 1.53.2.1 02/02/19 12:51:56 harlan@dog.pfcs.com +2 -2
+ Don't divide the sys_jitter by mu, as mu may be zero.
+
+ ntpd/ntp_control.c
+ 1.37.3.3 02/02/19 12:51:54 harlan@dog.pfcs.com +1 -0
+ Zyfer GPStarplus refclock.
+
+ ntpd/Makefile.am
+ 1.18.2.5 02/02/19 12:51:54 harlan@dog.pfcs.com +4 -3
+ Added refclock_zyfer.c to the refclock list.
+
+ libntp/clocktypes.c
+ 1.7.1.3 02/02/19 12:51:54 harlan@dog.pfcs.com +2 -0
+ Zyfer GPStarplus receiver.
+
+ include/ntp.h
+ 1.47.3.3 02/02/19 12:51:53 harlan@dog.pfcs.com +2 -1
+ Zyfer GPStarplus receiver.
+
+ configure.in
+ 1.219.3.13 02/02/19 12:51:51 harlan@dog.pfcs.com +10 -0
+ Zyfer GPStarplus refclock support.
+
+ChangeSet
+ 1.706.2.24 02/02/19 12:37:55 stenn@whimsy.udel.edu +2 -0
+ Don't enable the TT560 by default yet.
+
+ Finish adding the hooks for the TT560.
+
+ ntpd/refclock_conf.c
+ 1.17 02/02/19 12:37:54 stenn@whimsy.udel.edu +8 -1
+ Add the tt560 clock to the list.
+
+ configure.in
+ 1.226.1.17 02/02/19 12:37:53 stenn@whimsy.udel.edu +2 -2
+ Disable the TT560 for now - it doesn't compile and I need to
+ check in another driver.
+
+ChangeSet
+ 1.785 02/02/19 00:30:20 stenn@whimsy.udel.edu +1 -0
+ Allocate memory for entry->ce_name
+ and remove some unnecessary code.
+
+ From: John Hay.
+
+ ntpd/ntp_intres.c
+ 1.25 02/02/19 00:30:19 stenn@whimsy.udel.edu +3 -5
+ Allocate memory for entry->ce_name
+ and remove some unnecessary code.
+
+ From: John Hay.
+
+ChangeSet
+ 1.784 02/02/19 00:08:56 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_crypto.c
+ 1.50 02/02/19 00:08:55 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.23 02/02/19 00:03:21 stenn@whimsy.udel.edu +1 -0
+ struct value encrypt -> encryptval (avoid name collision).
+
+ From: John Hay
+
+ ntpd/ntp_crypto.c
+ 1.48.1.2 02/02/19 00:03:20 stenn@whimsy.udel.edu +2 -2
+ struct value encrypt -> encryptval (avoid name collision).
+
+ From: John Hay
+
+ChangeSet
+ 1.706.2.22 02/02/18 23:39:12 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_crypto.c
+ 1.48.1.1 02/02/18 23:39:12 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.74 02/02/18 23:27:09 stenn@whimsy.udel.edu +1 -0
ntp_adjtime() call cleanup.
From: John Hay
ntpd/ntp_crypto.c
- 1.45 02/02/18 23:27:08 stenn@whimsy.udel.edu +1 -3
+ 1.43.1.2 02/02/18 23:27:08 stenn@whimsy.udel.edu +1 -3
ntp_adjtime() call cleanup.
From John Hay.
-ChangeSet@1.782, 2002-01-25 18:51:26-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.783 02/02/18 22:42:10 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ include/ntp.h
+ 1.58 02/02/18 22:42:09 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ChangeSet
+ 1.782 02/02/18 22:41:06 stenn@whimsy.udel.edu +1 -0
+ Automerge cleanup.
+
+ configure.in
+ 1.240 02/02/18 22:23:54 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.21 02/02/18 22:17:33 stenn@whimsy.udel.edu +7 -0
+ TrueTime 560 refclock.
+
+ Some configure.in cleanup.
+
+ ntpd/refclock_tt560.c
+ 1.1 02/02/18 22:17:32 stenn@whimsy.udel.edu +274 -0
+
+ kernel/sys/tt560_api.h
+ 1.1 02/02/18 22:17:32 stenn@whimsy.udel.edu +489 -0
+
+ ntpd/refclock_tt560.c
+ 1.0 02/02/18 22:17:32 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/ntpd/refclock_tt560.c
+
+ ntpd/Makefile.am
+ 1.25 02/02/18 22:17:32 stenn@whimsy.udel.edu +11 -11
+ A
+
+ libntp/clocktypes.c
+ 1.11 02/02/18 22:17:32 stenn@whimsy.udel.edu +4 -2
+ TT560 support.
+
+ kernel/sys/tt560_api.h
+ 1.0 02/02/18 22:17:32 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/kernel/sys/tt560_api.h
+
+ kernel/sys/Makefile.am
+ 1.3 02/02/18 22:17:32 stenn@whimsy.udel.edu +1 -1
+ noinst_HEADERS: add tt560_api.h
+
+ include/ntp.h
+ 1.50.1.6 02/02/18 22:17:32 stenn@whimsy.udel.edu +4 -3
+ Add support for the TT560.
+
+ configure.in
+ 1.226.1.16 02/02/18 22:17:31 stenn@whimsy.udel.edu +188 -128
+ Alphabetize the clock list by "enable" option name.
+
+ Convert the clock enable list to AC_HELP_STRING() format.
+
+ Add support for the TrueTime 560 clock.
+
+ChangeSet
+ 1.706.2.20 02/02/18 13:39:54 stenn@whimsy.udel.edu +1 -0
+ JJY driver doc cleanup from Takao Abe.
+
+ html/driver40.htm
+ 1.3 02/02/18 13:39:53 stenn@whimsy.udel.edu +39 -4
+ Cleanup from Takao Abe
+
+ChangeSet
+ 1.706.2.19 02/01/25 18:54:43 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_loopfilter.c
+ 1.62 02/01/25 18:54:42 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.73 02/01/25 18:51:26 stenn@whimsy.udel.edu +1 -0
mu can be 0, and the (old) debug info would divide sys_jitter by mu.
Lose the division.
From: Dave Mills.
ntpd/ntp_loopfilter.c
- 1.56 02/01/25 18:51:25 stenn@whimsy.udel.edu +2 -2
+ 1.53.1.3 02/01/25 18:51:25 stenn@whimsy.udel.edu +2 -2
mu can be 0, and the (old) debug info would divide sys_jitter by mu.
Lose the division.
From: Dave Mills.
-ChangeSet@1.781, 2002-01-22 18:16:09-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.780 02/01/22 18:43:08 stenn@whimsy.udel.edu +1 -0
+ Gotta wonder where this code went...
+
+ ntpd/ntp_intres.c
+ 1.24 02/01/22 18:43:08 stenn@whimsy.udel.edu +3 -0
+ Gotta wonder where this code went...
+
+ChangeSet
+ 1.706.2.18 02/01/22 18:19:55 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ util/ntp-genkeys.c
+ 1.61 02/01/22 18:19:53 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.72 02/01/22 18:16:09 stenn@whimsy.udel.edu +2 -0
Lint cleanup.
From Marc.Brett@westerngeco.com
- ntpd/ntp_intres.c
- 1.20 02/01/22 18:16:08 stenn@whimsy.udel.edu +1 -1
+ util/ntp-genkeys.c
+ 1.56.1.4 02/01/22 18:16:08 stenn@whimsy.udel.edu +0 -1
Lint.
- util/ntp-genkeys.c
- 1.60 02/01/22 18:16:08 stenn@whimsy.udel.edu +0 -1
+ ntpd/ntp_intres.c
+ 1.17.1.3 02/01/22 18:16:08 stenn@whimsy.udel.edu +1 -1
Lint.
-ChangeSet@1.780, 2002-01-17 17:52:47-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.779 02/01/17 18:01:29 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_proto.c
+ 1.106 02/01/17 18:01:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.17 02/01/17 17:56:08 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_proto.c
+ 1.99.1.6 02/01/17 17:56:07 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.71 02/01/17 17:52:47 stenn@whimsy.udel.edu +1 -0
Lose the source port check. Too many folks are going thru Port and
Address Translators, and present wisdom says that one should not
trust source ports anyway.
ntpd/ntp_proto.c
- 1.96 02/01/17 17:52:46 stenn@whimsy.udel.edu +1 -5
+ 1.93.2.3 02/01/17 17:52:46 stenn@whimsy.udel.edu +1 -5
Lose the source port check. Too many folks are going thru Port and
Address Translators, and present wisdom says that one should not
trust source ports anyway.
-ChangeSet@1.779, 2002-01-17 16:02:37-05:00, stenn@whimsy.udel.edu
- Lint cleanup from Marc.Brett@westerngeco.com .
+ChangeSet
+ 1.706.2.16 02/01/17 16:12:23 stenn@whimsy.udel.edu +3 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_palisade.c
+ 1.11 02/01/17 16:12:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/refclock_local.c
+ 1.9 02/01/17 16:12:22 stenn@whimsy.udel.edu +0 -0
+ Auto merged
ntpd/refclock_jjy.c
- 1.4 02/01/17 16:02:36 stenn@whimsy.udel.edu +1 -4
+ 1.9 02/01/17 16:12:22 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.70 02/01/17 16:02:37 stenn@whimsy.udel.edu +3 -0
+ Lint cleanup from Marc.Brett@westerngeco.com .
+
+ ntpd/refclock_palisade.c
+ 1.9.1.1 02/01/17 16:02:36 stenn@whimsy.udel.edu +2 -0
Lint.
ntpd/refclock_local.c
- 1.7 02/01/17 16:02:36 stenn@whimsy.udel.edu +2 -0
+ 1.6.1.1 02/01/17 16:02:36 stenn@whimsy.udel.edu +2 -0
Lint.
- ntpd/refclock_palisade.c
- 1.10 02/01/17 16:02:36 stenn@whimsy.udel.edu +2 -0
+ ntpd/refclock_jjy.c
+ 1.2.2.1 02/01/17 16:02:36 stenn@whimsy.udel.edu +1 -4
Lint.
-ChangeSet@1.778, 2002-01-13 11:52:50-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.69 02/01/13 11:52:50 stenn@whimsy.udel.edu +1 -0
Disable the delta-changelog and related scripts.
BitKeeper/triggers/trigger.cfg
1.8 02/01/13 11:52:49 stenn@whimsy.udel.edu +2 -2
Disable the delta-changelog and related scripts.
-ChangeSet@1.777, 2002-01-12 23:36:13-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.776 02/01/13 11:33:49 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.239 02/01/13 11:33:48 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.14 02/01/13 11:23:35 stenn@whimsy.udel.edu +1 -0
+ ntp-dev uses its own version string.
+
+ configure.in
+ 1.226.1.15 02/01/13 11:23:34 stenn@whimsy.udel.edu +0 -1
+ ntp-dev uses its own version string.
+
+ChangeSet
+ 1.683.4.68 02/01/12 23:36:13 stenn@whimsy.udel.edu +1 -0
4.1.0b-rc3
- TAG: ntp-stable
- TAG: NTP_4_1_0B_RC3
configure.in
- 1.234 02/01/12 23:36:12 stenn@whimsy.udel.edu +1 -1
+ 1.219.3.12 02/01/12 23:36:12 stenn@whimsy.udel.edu +1 -1
4.1.0b-rc3
-ChangeSet@1.776, 2002-01-10 20:43:25-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.2.13 02/01/12 02:15:25 stenn@whimsy.udel.edu +1 -0
+ Validate the version of OpenSSL we're using against the version
+ we had when we were compiled.
+ If RAND_load_file() fails, print a bit more info. Still not enough...
+
+ util/genkeys.c
+ 1.6 02/01/12 02:15:24 stenn@whimsy.udel.edu +12 -1
+ Validate the version of OpenSSL we're using against the version
+ we had when we were compiled.
+ If RAND_load_file() fails, print a bit more info. Still not enough...
+
+ChangeSet
+ 1.706.2.12 02/01/10 20:48:59 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ NEWS
+ 1.37 02/01/10 20:48:58 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.67 02/01/10 20:43:25 stenn@whimsy.udel.edu +1 -0
Update the NEWS file.
NEWS
- 1.37 02/01/10 20:43:25 stenn@whimsy.udel.edu +5 -0
+ 1.31.1.6 02/01/10 20:43:25 stenn@whimsy.udel.edu +5 -0
Update the NEWS file.
-ChangeSet@1.775, 2002-01-06 18:35:45-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.2.11 02/01/06 18:42:12 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/refclock_true.c
+ 1.9 02/01/06 18:42:12 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.66 02/01/06 18:35:45 stenn@whimsy.udel.edu +1 -0
Disable the refclock_report(peer, CEVNT_BADREPLY) if the GOES
clock reports !(lon > 7000 && lon < 14000).
From: Paul Vixie.
ntpd/refclock_true.c
- 1.8 02/01/06 18:35:45 stenn@whimsy.udel.edu +1 -1
+ 1.7.1.1 02/01/06 18:35:45 stenn@whimsy.udel.edu +1 -1
Disable the refclock_report(peer, CEVNT_BADREPLY) if the GOES
clock reports !(lon > 7000 && lon < 14000).
From: Paul Vixie.
-ChangeSet@1.774, 2002-01-04 04:03:26-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.773 02/01/05 00:01:18 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_control.c
+ 1.47 02/01/05 00:01:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.10 02/01/04 23:57:50 stenn@whimsy.udel.edu +1 -0
+ Lose the extra EOV entry.
+
+ ntpd/ntp_control.c
+ 1.39.1.6 02/01/04 23:57:49 stenn@whimsy.udel.edu +1 -3
+ Lose the extra EOV entry.
+
+ChangeSet
+ 1.772 02/01/04 04:15:00 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_request.c
+ 1.35 02/01/04 04:14:59 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.9 02/01/04 04:08:21 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_request.c
+ 1.24.1.6 02/01/04 04:08:21 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.65 02/01/04 04:03:26 stenn@whimsy.udel.edu +1 -0
Lose some implementation debug output.
From: John Hay
ntpd/ntp_request.c
- 1.28 02/01/04 04:03:25 stenn@whimsy.udel.edu +0 -7
+ 1.23.2.5 02/01/04 04:03:25 stenn@whimsy.udel.edu +0 -7
Lose some implementation debug output.
-ChangeSet@1.773, 2002-01-04 00:37:40-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.771 02/01/04 10:27:36 jhay@angel.cids.org.za +1 -0
+ Fix another merge mistake. The implementation version is a variable in the -ipv6
+ tree.
+
+ ntpdc/ntpdc_ops.c
+ 1.16 02/01/04 10:27:35 jhay@angel.cids.org.za +1 -1
+ Fix another merge mistake. The implementation version is a variable in the -ipv6
+ tree.
+
+ChangeSet
+ 1.770 02/01/04 10:09:58 jhay@angel.cids.org.za +1 -0
+ Fix merge mistake, remove duplicate struct req_pkt_tail.
+
+ include/ntp_request.h
+ 1.17 02/01/04 10:09:58 jhay@angel.cids.org.za +0 -10
+ Fix merge mistake, remove duplicate struct req_pkt_tail.
+
+ChangeSet
+ 1.769 02/01/04 10:02:57 jhay@angel.cids.org.za +4 -0
+ merge (x)ntpdc compatibilty changes.
+
+ ntpdc/ntpdc_ops.c
+ 1.15 02/01/04 10:02:57 jhay@angel.cids.org.za +8 -7
+ merge (x)ntpdc compatibilty changes.
+
+ ntpdc/ntpdc.c
+ 1.14 02/01/04 10:02:57 jhay@angel.cids.org.za +0 -36
+ merge (x)ntpdc compatibilty changes.
+
+ ntpd/ntp_request.c
+ 1.34 02/01/04 10:02:57 jhay@angel.cids.org.za +13 -49
+ merge (x)ntpdc compatibilty changes.
+
+ include/ntp_request.h
+ 1.16 02/01/04 08:52:16 jhay@angel.cids.org.za +0 -1
+ Auto merged
+
+ChangeSet
+ 1.706.2.8 02/01/04 01:08:45 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpdc/ntpdc.c
+ 1.11.1.1 02/01/04 01:08:45 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_request.c
+ 1.24.1.5 02/01/04 01:08:44 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.64 02/01/04 00:37:40 stenn@whimsy.udel.edu +4 -0
From: John Hay <jhay@icomtek.csir.co.za>
Subject: [ntp:hackers] (x)ntpdc compatibility patch
And there was much rejoicing...
- include/ntp_request.h
- 1.13 02/01/04 00:37:39 stenn@whimsy.udel.edu +23 -0
- Added struct req_pkt_tail, REQ_LEN_HDR, and struct old_conf_peer.
+ ntpdc/ntpdc_ops.c
+ 1.12.1.1 02/01/04 00:37:39 stenn@whimsy.udel.edu +7 -0
+ If we get back INFO_ERR_FMT, try again with the old conf_peer size.
+
+ ntpdc/ntpdc.c
+ 1.8.1.2 02/01/04 00:37:39 stenn@whimsy.udel.edu +36 -5
+ Handle sending packets of both size. We might need to send along
+ a req_pkt_tail. If we send the request and get back INFO_ERR_FMT,
+ try again with a req_pkt_size of 48.
ntpd/ntp_request.c
- 1.27 02/01/04 00:37:39 stenn@whimsy.udel.edu +48 -11
+ 1.23.2.4 02/01/04 00:37:39 stenn@whimsy.udel.edu +48 -11
Deal with both short and long packets. REQ_CONFIG can have two
sizes, too. Count old_conf_peer packets. Lose keystr - it's no
longer used.
- ntpdc/ntpdc.c
- 1.10 02/01/04 00:37:39 stenn@whimsy.udel.edu +36 -5
- Handle sending packets of both size. We might need to send along
- a req_pkt_tail. If we send the request and get back INFO_ERR_FMT,
- try again with a req_pkt_size of 48.
+ include/ntp_request.h
+ 1.10.1.3 02/01/04 00:37:39 stenn@whimsy.udel.edu +23 -0
+ Added struct req_pkt_tail, REQ_LEN_HDR, and struct old_conf_peer.
- ntpdc/ntpdc_ops.c
- 1.13 02/01/04 00:37:39 stenn@whimsy.udel.edu +7 -0
- If we get back INFO_ERR_FMT, try again with the old conf_peer size.
+ChangeSet
+ 1.768 02/01/03 13:29:04 jhay@angel.cids.org.za +1 -0
+ proto_config() has 4 parameters in the IPv6 tree.
+
+ ntpd/ntp_config.c
+ 1.63 02/01/03 13:29:04 jhay@angel.cids.org.za +5 -5
+ proto_config() has 4 parameters in the IPv6 tree.
+
+ChangeSet
+ 1.767 02/01/03 13:09:39 jhay@angel.cids.org.za +4 -0
+ merge
+
+ ntpd/ntp_io.c
+ 1.32 02/01/03 13:09:39 jhay@angel.cids.org.za +3 -8
+ Merge virtual ips on loopback device.
+
+ configure.in
+ 1.238 02/01/03 12:37:01 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.8 02/01/03 12:36:51 jhay@angel.cids.org.za +0 -1
+ auto-union
+
+ChangeSet
+ 1.706.2.7 02/01/02 23:57:06 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
-ChangeSet@1.772, 2002-01-02 23:52:46-05:00, stenn@whimsy.udel.edu
+ ntpd/ntp_io.c
+ 1.21.1.4 02/01/02 23:57:05 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.63 02/01/02 23:52:46 stenn@whimsy.udel.edu +1 -0
The loopback is OK if we're listening to virtual IPs.
Show candidate interface addresses during debug.
From: Paul Vixie
ntpd/ntp_io.c
- 1.23 02/01/02 23:52:46 stenn@whimsy.udel.edu +14 -8
+ 1.20.2.3 02/01/02 23:52:46 stenn@whimsy.udel.edu +14 -8
The loopback is OK if we're listening to virtual IPs.
Show candidate interface addresses during debug.
-ChangeSet@1.771, 2002-01-02 22:36:34-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.2.6 02/01/02 22:50:05 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ BitKeeper/deleted/.del-README.cvs~1e180ca3
+ 1.10 02/01/02 22:50:05 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.226.1.14 02/01/02 22:50:04 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-README.cvs~1e180ca3
+ 1.6.2.2 02/01/02 22:50:04 stenn@whimsy.udel.edu +0 -0
+ Merge rename: README.cvs -> BitKeeper/deleted/.del-README.cvs~1e180ca3
+
+ChangeSet
+ 1.683.4.62 02/01/02 22:36:34 stenn@whimsy.udel.edu +1 -0
F_SETOWN bsdi typo fix
From: Paul Vixie
configure.in
- 1.233 02/01/02 22:36:33 stenn@whimsy.udel.edu +1 -1
+ 1.219.3.11 02/01/02 22:36:33 stenn@whimsy.udel.edu +1 -1
F_SETOWN bsdi typo fix
From: Paul Vixie
-ChangeSet@1.770, 2002-01-02 22:26:22-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.61 02/01/02 22:26:22 stenn@whimsy.udel.edu +2 -0
Boring documentation cleanup.
- README.cvs
- 1.11 02/01/02 22:26:22 stenn@whimsy.udel.edu +4 -0
- Note that the CVS repo is dormant.
-
README.versions
1.2 02/01/02 22:26:22 stenn@whimsy.udel.edu +1 -1
Bit-o-cleanup...
-ChangeSet@1.769, 2001-12-31 00:53:29-05:00, stenn@whimsy.udel.edu
- Later verisons of FreeBSD need the PARENB IGNPAR thing.
- Backport ntp_loopfilter fixes.
+ README.cvs
+ 1.6.2.1 02/01/02 22:26:22 stenn@whimsy.udel.edu +4 -0
+ Note that the CVS repo is dormant.
+
+ChangeSet
+ 1.706.2.5 01/12/31 19:31:31 stenn@whimsy.udel.edu +1 -0
+ Document the "includefile" config parameter.
+ From: Dean Gibson.
+
+ html/miscopt.htm
+ 1.16 01/12/31 19:31:31 stenn@whimsy.udel.edu +9 -0
+ Document the "includefile" config parameter.
+
+ChangeSet
+ 1.765 01/12/31 03:03:54 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ include/ntpd.h
+ 1.38 01/12/31 03:03:53 stenn@whimsy.udel.edu +0 -0
+ Auto merged
configure.in
- 1.232 01/12/31 00:53:28 stenn@whimsy.udel.edu +5 -0
- Later verisons of FreeBSD need the PARENB IGNPAR thing.
+ 1.237 01/12/31 03:03:53 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.4 01/12/31 02:54:46 stenn@whimsy.udel.edu +3 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_loopfilter.c
+ 1.61 01/12/31 02:54:45 stenn@whimsy.udel.edu +0 -55
+ Auto merged
include/ntpd.h
- 1.29 01/12/31 00:53:28 stenn@whimsy.udel.edu +1 -1
- Backport ntp_loopfilter fixes.
+ 1.31.1.4 01/12/31 02:54:45 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ configure.in
+ 1.226.1.13 01/12/31 02:54:45 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.764 01/12/31 02:53:22 stenn@whimsy.udel.edu +9 -0
+ Automerge Dvae's recent changes from ntp-dev.
+ I probably broke something when doing the conflict resolution on
+ ntp_proto.c .
+
+ ntpd/ntp_proto.c
+ 1.105 01/12/31 02:53:21 stenn@whimsy.udel.edu +0 -2
+ Somebody should look at this patch - there are differences between
+ this and ntp-dev that I just don't understand. Things like svalue/value
+ and the new "weeding" of the manycast survivors.
+
+ ntpq/ntpq.c
+ 1.22 01/12/31 02:37:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/refclock_parse.c
+ 1.20 01/12/31 02:37:50 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.39 01/12/31 02:37:49 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.46 01/12/31 02:37:46 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.62 01/12/31 02:37:46 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.37 01/12/31 02:37:46 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_control.h
+ 1.19 01/12/31 02:37:46 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.57 01/12/31 02:37:45 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.3 01/12/31 02:32:00 stenn@whimsy.udel.edu +30 -0
+ Changes/improvements from Dave Mills.
+
+ html/manyopt.htm
+ 1.1 01/12/31 02:31:58 stenn@whimsy.udel.edu +265 -0
+
+ ntpq/ntpq.c
+ 1.19.1.1 01/12/31 02:31:58 stenn@whimsy.udel.edu +0 -1
+ ttlmax -> ttl cleanup.
+
+ ntpd/refclock_wwv.c
+ 1.33 01/12/31 02:31:58 stenn@whimsy.udel.edu +3 -3
+ ttlmax -> ttl cleanup.
+
+ html/manyopt.htm
+ 1.0 01/12/31 02:31:58 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/html/manyopt.htm
+
+ ntpd/refclock_usno.c
+ 1.8 01/12/31 02:31:57 stenn@whimsy.udel.edu +1 -1
+ ttlmax -> ttl cleanup.
+
+ ntpd/refclock_parse.c
+ 1.18.1.1 01/12/31 02:31:57 stenn@whimsy.udel.edu +2 -2
+ ttlmax -> ttl cleanup.
+
+ ntpd/refclock_nmea.c
+ 1.18 01/12/31 02:31:57 stenn@whimsy.udel.edu +2 -2
+ ttlmax -> ttl cleanup.
+
+ ntpd/refclock_jjy.c
+ 1.8 01/12/31 02:31:57 stenn@whimsy.udel.edu +7 -7
+ ttlmax -> ttl cleanup.
+
+ ntpd/refclock_heath.c
+ 1.11 01/12/31 02:31:57 stenn@whimsy.udel.edu +1 -1
+ ttlmax -> ttl cleanup.
+
+ ntpd/refclock_chu.c
+ 1.26 01/12/31 02:31:57 stenn@whimsy.udel.edu +4 -4
+ ttlmax -> ttl cleanup.
+
+ ntpd/refclock_as2201.c
+ 1.9 01/12/31 02:31:56 stenn@whimsy.udel.edu +1 -1
+ pp->nsec is a "long".
+
+ ntpd/refclock_acts.c
+ 1.10 01/12/31 02:31:56 stenn@whimsy.udel.edu +1 -1
+ ttlmax -> ttl cleanup.
+
+ ntpd/ntp_proto.c
+ 1.99.1.5 01/12/31 02:31:56 stenn@whimsy.udel.edu +195 -134
+ FLOOR, CEILING, MINSANE, MINCLOCK, COHORT, and ttl cleanup.
+ Other cleanup/improvements.
+
+ ntpd/ntp_peer.c
+ 1.32.1.4 01/12/31 02:31:56 stenn@whimsy.udel.edu +3 -3
+ ttlmax -> ttl cleanup.
+
+ ntpd/ntp_loopfilter.c
+ 1.60 01/12/31 02:31:56 stenn@whimsy.udel.edu +1 -1
+ allow_panic should be FALSE in the default case.
+
+ ntpd/ntp_control.c
+ 1.39.1.5 01/12/31 02:31:55 stenn@whimsy.udel.edu +5 -13
+ Lose TTLMAX. Cleanup.
+
+ ntpd/ntp_config.c
+ 1.52.1.7 01/12/31 02:31:55 stenn@whimsy.udel.edu +78 -9
+ TOS config stuff. Cleanup/validation.
+
+ include/ntpd.h
+ 1.31.1.3 01/12/31 02:31:55 stenn@whimsy.udel.edu +7 -1
+ Add support for minclock, minsane, floor, ceiling, and the
+ ttl cleanup.
+
+ include/ntp_control.h
+ 1.15.1.3 01/12/31 02:31:55 stenn@whimsy.udel.edu +9 -10
+ Lose TTLMAX.
+
+ include/ntp_config.h
+ 1.15 01/12/31 02:31:55 stenn@whimsy.udel.edu +14 -4
+ CONFIG_ TOS, TTL, and INCLUDEFILE.
+ CONFIG_TOS_ MINCLOC, MINSANE, FLOOR, CEILING, and COHORT.
+
+ include/ntp.h
+ 1.50.1.5 01/12/31 02:31:55 stenn@whimsy.udel.edu +7 -2
+ Lose ttlmax; ttl alone is just fine.
+ MINCLOCK, MINSANE, FLOOR, CEILING, and COHORT.
+
+ html/release.htm
+ 1.18 01/12/31 02:31:55 stenn@whimsy.udel.edu +55 -65
+ Cleanup. Note that ntpdate is headed for retirement.
+ Talk about the PPS refclock.
+
+ html/quick.htm
+ 1.7 01/12/31 02:31:54 stenn@whimsy.udel.edu +4 -4
+ Cleanup.
+
+ html/ntpd.htm
+ 1.16 01/12/31 02:31:54 stenn@whimsy.udel.edu +2 -1
+ Cleanup. Reference the new manyopt.htm page.
+
+ html/miscopt.htm
+ 1.15 01/12/31 02:31:54 stenn@whimsy.udel.edu +46 -40
+ Cleanup. Discuss the new "tinker" options.
+
+ html/index.htm
+ 1.13 01/12/31 02:31:54 stenn@whimsy.udel.edu +50 -15
+ Cleanup. Mention the OpenSSL crypto stuff, and manycast.
+
+ html/hints.htm
+ 1.6 01/12/31 02:31:54 stenn@whimsy.udel.edu +1 -1
+ Cleanup.
+
+ html/build.htm
+ 1.10 01/12/31 02:31:54 stenn@whimsy.udel.edu +42 -36
+ Lose the RSAREF comments, talk about OpenSSL instead.
+ Cleanup. Mention the .rnd file and point folks at the directions
+ for generating auth keys. Also mention the manyicast stuff.
+
+ html/authopt.htm
+ 1.16 01/12/31 02:31:54 stenn@whimsy.udel.edu +11 -8
+ Cleanup. Update the "crypto" config line.
+
+ html/assoc.htm
+ 1.10 01/12/31 02:31:54 stenn@whimsy.udel.edu +9 -97
+ Cleanup. Moved a bunch of stuff to the new manyopt.htm page.
+
+ conf/baldwin.conf
+ 1.4 01/12/31 02:31:54 stenn@whimsy.udel.edu +7 -31
+ Converted to a manycast configuration file.
+
+ChangeSet
+ 1.683.4.60 01/12/31 00:53:29 stenn@whimsy.udel.edu +3 -0
+ Later verisons of FreeBSD need the PARENB IGNPAR thing.
+ Backport ntp_loopfilter fixes.
ntpd/ntp_loopfilter.c
- 1.55 01/12/31 00:53:28 stenn@whimsy.udel.edu +55 -26
+ 1.53.1.2 01/12/31 00:53:28 stenn@whimsy.udel.edu +55 -26
+ Backport ntp_loopfilter fixes.
+
+ include/ntpd.h
+ 1.27.2.2 01/12/31 00:53:28 stenn@whimsy.udel.edu +1 -1
Backport ntp_loopfilter fixes.
-ChangeSet@1.768, 2001-12-19 15:57:09-05:00, stenn@whimsy.udel.edu
+ configure.in
+ 1.219.3.10 01/12/31 00:53:28 stenn@whimsy.udel.edu +5 -0
+ Later verisons of FreeBSD need the PARENB IGNPAR thing.
+
+ChangeSet
+ 1.763 01/12/22 00:22:06 stenn@whimsy.udel.edu +3 -0
+ Resolve automerge conflict: removed refclock_atom's LEAP_NOWARNING.
+ Could be wrong...
+
+ ntpd/refclock_atom.c
+ 1.38 01/12/22 00:22:06 stenn@whimsy.udel.edu +1 -2
+ Remove pp->leap = LEAP_NOWARNING. Could be wrong...
+
+ ntpd/ntp_refclock.c
+ 1.44 01/12/21 23:58:20 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_refclock.h
+ 1.13 01/12/21 23:58:19 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.2.2 01/12/21 23:27:19 stenn@whimsy.udel.edu +2 -0
+ Documentation cleanup from Dave Mills.
+
+ html/howto.htm
+ 1.7 01/12/21 23:27:18 stenn@whimsy.udel.edu +346 -246
+ Documentation cleanup
+
+ html/driver36.htm
+ 1.10 01/12/21 23:27:18 stenn@whimsy.udel.edu +97 -122
+ Documentation cleanup
+
+ChangeSet
+ 1.706.2.1 01/12/21 22:24:22 stenn@whimsy.udel.edu +37 -0
+ Guys,
+
+ Fixed a wee bug and the house caved in. Just about every driver was
+ broken in a little evil way and broke the interface conventions in the
+ following:
+
+ 1. The drivers did not correctly update the reference time variable
+ pp->lastref. Some left it untouched, some broke the rule that the
+ reference time must not be later than the receive timestamp. I added
+ pp->lastref = pp->lastrec just before the refclock_receive() call, which
+ should be correct in most cases. For those drivers that use
+ refclock_process(), coders might want to move the line just before that
+ call.
+
+ 2. There were two variables pp->usec and pp->msec for microseconds and
+ milliseconds, respectively, of the second. There was no provision for
+ nanoseconds. Some drivers used both of these, which was not handled
+ correctly in the interface. I removed both and replaced with pp->nsec
+ for nanoseconds and recoded various drivers to do that correctly.
+
+ 3. Some drivers did not zero the fraction part of the l_fp offset
+ variable computed by clocktime(). This was the first thing I noticed in
+ testing. The result in some cases was garbage when computing the
+ difference between clock time and system time.
+
+ 4. The SAMPLE macro in ntp_refclock.h and the refclock_sample() routine
+ was defective. If the median filter ever filled up, the latter would
+ consider it empty and toss the entire filter contents. The intent when
+ the filter fills up is that old samples are overwritten and the filter
+ retains its maximum size untl refclock_receive() empties it.
+
+ 5. Small changes were made to interface routines in order to improve and
+ simplify the debug trace.
+
+ While I carefully checked all the drivers and the changes are minor, I
+ am able to test only a few, including the audio drivers, PSTI,
+ Spectracom, Arbiter and PPS, which do just fine. I have done nothing for
+ the parse drivers, which may or may not need the same updates. I was
+ able to confirm the Solaris, SunOS, FreeBSD and Linux builds work. Later
+ for HPUX and Alpha.
+
+ Aside: In experimenting with the -N high option, which is necessary for
+ the WWV audio driver, I discovered some little evils. First, the serial
+ port jitter is terrible with my Ultra 30 - simething like 10 ms - and
+ the latency surprisingly large, like 10 ms. Checking timestamps, I
+ discovered without -N the CR and LF have the same timestamp, while with
+ -N they have separate and much more precise timestamps. I also
+ discovered for whatever reason the monitor function of the audio codec
+ doesn't work in the Ultra 30, but works just fine using the same code in
+ the Blade 1000, both Solariba 8.
+
+ ntpd/refclock_wwvb.c
+ 1.11 01/12/21 22:24:21 stenn@whimsy.udel.edu +20 -17
+ Dave's big cleanup
+
+ ntpd/refclock_wwv.c
+ 1.32 01/12/21 22:24:20 stenn@whimsy.udel.edu +12 -11
+ Dave's big cleanup
+
+ ntpd/refclock_usno.c
+ 1.7 01/12/21 22:24:20 stenn@whimsy.udel.edu +2 -1
+ Dave's big cleanup
+
+ ntpd/refclock_ulink.c
+ 1.12 01/12/21 22:24:20 stenn@whimsy.udel.edu +6 -7
+ Dave's big cleanup
+
+ ntpd/refclock_true.c
+ 1.8 01/12/21 22:24:20 stenn@whimsy.udel.edu +3 -1
+ Dave's big cleanup
+
+ ntpd/refclock_trak.c
+ 1.8 01/12/21 22:24:20 stenn@whimsy.udel.edu +1 -0
+ Dave's big cleanup
+
+ ntpd/refclock_tpro.c
+ 1.7 01/12/21 22:24:20 stenn@whimsy.udel.edu +2 -0
+ Dave's big cleanup
+
+ ntpd/refclock_shm.c
+ 1.11 01/12/21 22:24:20 stenn@whimsy.udel.edu +1 -0
+ Dave's big cleanup
+
+ ntpd/refclock_pst.c
+ 1.7 01/12/21 22:24:20 stenn@whimsy.udel.edu +24 -20
+ Dave's big cleanup
+
+ ntpd/refclock_pcf.c
+ 1.7 01/12/21 22:24:19 stenn@whimsy.udel.edu +3 -2
+ Dave's big cleanup
+
+ ntpd/refclock_palisade.c
+ 1.10 01/12/21 22:24:19 stenn@whimsy.udel.edu +7 -7
+ Dave's big cleanup
+
+ ntpd/refclock_oncore.c
+ 1.39 01/12/21 22:24:19 stenn@whimsy.udel.edu +1 -1
+ Dave's big cleanup
+
+ ntpd/refclock_nmea.c
+ 1.17 01/12/21 22:24:19 stenn@whimsy.udel.edu +7 -7
+ Dave's big cleanup
+
+ ntpd/refclock_mx4200.c
+ 1.16 01/12/21 22:24:19 stenn@whimsy.udel.edu +1 -3
+ Dave's big cleanup
+
+ ntpd/refclock_local.c
+ 1.8 01/12/21 22:24:19 stenn@whimsy.udel.edu +1 -0
+ Dave's big cleanup
+
+ ntpd/refclock_leitch.c
+ 1.6 01/12/21 22:24:19 stenn@whimsy.udel.edu +1 -0
+ Dave's big cleanup
+
+ ntpd/refclock_jupiter.c
+ 1.9 01/12/21 22:24:18 stenn@whimsy.udel.edu +4 -8
+ Dave's big cleanup
+
+ ntpd/refclock_jjy.c
+ 1.7 01/12/21 22:24:18 stenn@whimsy.udel.edu +3 -5
+ Dave's big cleanup
+
+ ntpd/refclock_irig.c
+ 1.12 01/12/21 22:24:18 stenn@whimsy.udel.edu +94 -84
+ Dave's big cleanup
+
+ ntpd/refclock_hpgps.c
+ 1.6 01/12/21 22:24:18 stenn@whimsy.udel.edu +1 -0
+ Dave's big cleanup
+
+ ntpd/refclock_hopfser.c
+ 1.4 01/12/21 22:24:18 stenn@whimsy.udel.edu +1 -0
+ Dave's big cleanup
+
+ ntpd/refclock_hopfpci.c
+ 1.4 01/12/21 22:24:18 stenn@whimsy.udel.edu +1 -2
+ Dave's big cleanup
+
+ ntpd/refclock_heath.c
+ 1.10 01/12/21 22:24:18 stenn@whimsy.udel.edu +15 -51
+ Dave's big cleanup
+
+ ntpd/refclock_gpsvme.c
+ 1.6 01/12/21 22:24:18 stenn@whimsy.udel.edu +8 -5
+ Dave's big cleanup
+
+ ntpd/refclock_fg.c
+ 1.8 01/12/21 22:24:18 stenn@whimsy.udel.edu +5 -5
+ Dave's big cleanup
+
+ ntpd/refclock_dumbclock.c
+ 1.6 01/12/21 22:24:18 stenn@whimsy.udel.edu +2 -2
+ Dave's big cleanup
+
+ ntpd/refclock_datum.c
+ 1.8 01/12/21 22:24:17 stenn@whimsy.udel.edu +2 -0
+ Dave's big cleanup
+
+ ntpd/refclock_chu.c
+ 1.25 01/12/21 22:24:17 stenn@whimsy.udel.edu +6 -5
+ Dave's big cleanup
+
+ ntpd/refclock_chronolog.c
+ 1.6 01/12/21 22:24:17 stenn@whimsy.udel.edu +2 -2
+ Dave's big cleanup
+
+ ntpd/refclock_bancomm.c
+ 1.8 01/12/21 22:24:17 stenn@whimsy.udel.edu +2 -1
+ Dave's big cleanup
+
+ ntpd/refclock_atom.c
+ 1.34.1.3 01/12/21 22:24:17 stenn@whimsy.udel.edu +1 -0
+ Dave's big cleanup
+
+ ntpd/refclock_as2201.c
+ 1.8 01/12/21 22:24:17 stenn@whimsy.udel.edu +2 -1
+ Dave's big cleanup
+
+ ntpd/refclock_arc.c
+ 1.9 01/12/21 22:24:17 stenn@whimsy.udel.edu +1 -5
+ Dave's big cleanup
+
+ ntpd/refclock_arbiter.c
+ 1.6 01/12/21 22:24:17 stenn@whimsy.udel.edu +2 -1
+ Dave's big cleanup
+
+ ntpd/refclock_acts.c
+ 1.9 01/12/21 22:24:17 stenn@whimsy.udel.edu +2 -1
+ Dave's big cleanup
+
+ ntpd/ntp_refclock.c
+ 1.40.1.4 01/12/21 22:24:16 stenn@whimsy.udel.edu +29 -22
+ Dave's big cleanup
+
+ include/ntp_refclock.h
+ 1.9.1.3 01/12/21 22:24:16 stenn@whimsy.udel.edu +7 -7
+ Dave's big cleanup
+
+ChangeSet
+ 1.706.1.59 01/12/21 16:45:12 jhay@angel.cids.org.za +2 -0
+ Merge
+
+ BitKeeper/etc/logging_ok
+ 1.3.1.5 01/12/21 16:45:12 jhay@angel.cids.org.za +1 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-logging_ok~f9e0e77ee75409f0
+ 1.2 01/12/21 16:45:12 jhay@angel.cids.org.za +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/etc/logging_ok
+ 1.1 01/12/21 15:46:14 jhay@angel.cids.org.za +1 -0
+
+ChangeSet
+ 1.706.1.58 01/12/21 15:46:14 jhay@angel.cids.org.za +2 -0
+ Merge bk://ntp.bkserver.net/ntp-dev
+ into angel.cids.org.za:/home/ntp/ntp-dev
+
+ BitKeeper/etc/logging_ok
+ 1.0 01/12/21 15:46:14 jhay@angel.cids.org.za +0 -0
+ BitKeeper file /home/ntp/ntp-dev/RESYNC/BitKeeper/etc/logging_ok
+
+ChangeSet
+ 1.762 01/12/19 18:56:48 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.236 01/12/19 18:56:47 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.25 01/12/19 18:56:47 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.57 01/12/19 18:52:03 stenn@whimsy.udel.edu +2 -0
+ Usual nits when the parent's version is changed.
+
+ configure.in
+ 1.226.1.12 01/12/19 18:52:03 stenn@whimsy.udel.edu +0 -1
+ Nits.
+
+ Makefile.am
+ 1.16.1.8 01/12/19 18:52:02 stenn@whimsy.udel.edu +0 -0
+ Nits.
+
+ChangeSet
+ 1.683.4.59 01/12/19 15:57:09 stenn@whimsy.udel.edu +1 -0
Distribute README.versions .
Makefile.am
- 1.25 01/12/19 15:57:07 stenn@whimsy.udel.edu +1 -0
+ 1.12.1.13 01/12/19 15:57:07 stenn@whimsy.udel.edu +1 -0
Distribute README.versions .
-ChangeSet@1.767, 2001-12-18 19:27:29-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.1.56 01/12/18 21:23:31 stenn@whimsy.udel.edu +1 -0
+ 4.1.72
+
+ configure.in
+ 1.226.1.11 01/12/18 21:23:30 stenn@whimsy.udel.edu +1 -1
+ 4.1.72
+
+ChangeSet
+ 1.706.1.55 01/12/18 20:17:53 stenn@whimsy.udel.edu +3 -0
+ Cleanup from Dave Mills.
+
+ ntpd/refclock_wwv.c
+ 1.31 01/12/18 20:17:52 stenn@whimsy.udel.edu +25 -34
+ Cleanup from Dave Mills.
+
+ ntpd/refclock_irig.c
+ 1.11 01/12/18 20:17:52 stenn@whimsy.udel.edu +5 -9
+ Cleanup from Dave Mills.
+
+ ntpd/refclock_chu.c
+ 1.24 01/12/18 20:17:52 stenn@whimsy.udel.edu +4 -6
+ Cleanup from Dave Mills.
+
+ChangeSet
+ 1.683.4.58 01/12/18 19:27:29 stenn@whimsy.udel.edu +1 -0
4.1.0b-rc2
- TAG: NTP_4_1_0B_RC2
- TAG: ntp-stable
configure.in
- 1.231 01/12/18 19:27:28 stenn@whimsy.udel.edu +1 -1
+ 1.219.3.9 01/12/18 19:27:28 stenn@whimsy.udel.edu +1 -1
4.1.0b-rc2
-ChangeSet@1.766, 2001-12-17 23:25:13-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.761 01/12/17 23:32:08 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpdate/ntpdate.c
+ 1.31 01/12/17 23:32:07 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.57 01/12/17 23:25:13 stenn@whimsy.udel.edu +1 -0
Be more verbose/descriptive of problems in debug mode.
From: Todd MacDermid <tmacderm@uu.net>
ntpdate/ntpdate.c
- 1.27 01/12/17 23:25:12 stenn@whimsy.udel.edu +30 -9
+ 1.23.1.4 01/12/17 23:25:12 stenn@whimsy.udel.edu +30 -9
Be more verbose/descriptive of problems in debug mode.
From: Todd MacDermid <tmacderm@uu.net>
-ChangeSet@1.765, 2001-12-17 00:26:09-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.760 01/12/17 00:37:32 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ libntp/machines.c
+ 1.16 01/12/17 00:37:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.53 01/12/17 00:29:05 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ libntp/machines.c
+ 1.12.1.3 01/12/17 00:29:05 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.56 01/12/17 00:26:09 stenn@whimsy.udel.edu +1 -0
Make the ntp_set_tod() debug messages less confusing/chatty.
libntp/machines.c
- 1.13 01/12/17 00:26:09 stenn@whimsy.udel.edu +16 -16
+ 1.11.1.2 01/12/17 00:26:09 stenn@whimsy.udel.edu +16 -16
Make the ntp_set_tod() debug messages less confusing/chatty.
-ChangeSet@1.764, 2001-12-14 02:43:08-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.1.52 01/12/16 23:16:41 stenn@whimsy.udel.edu +1 -0
+ cleanup/improvements from Dave Mills.
+
+ ntpd/refclock_wwv.c
+ 1.30 01/12/16 23:16:40 stenn@whimsy.udel.edu +233 -191
+ cleanup/improvements from Dave Mills.
+
+ChangeSet
+ 1.706.1.51 01/12/16 01:41:34 stenn@whimsy.udel.edu +1 -0
+ cleanup for systems without sys/audioio.h .
+ From Dave Mills.
+
+ libntp/audio.c
+ 1.9 01/12/16 01:41:33 stenn@whimsy.udel.edu +6 -5
+ cleanup for systems without sys/audioio.h .
+ From Dave Mills.
+
+ChangeSet
+ 1.683.4.55 01/12/14 02:43:08 stenn@whimsy.udel.edu +1 -0
This patch fixes a bug in NTP which appears if NTP is built on a system
where signaled I/O is used, i.e. HAVE_SIGNALED_IO is defined in
config.h. The bug has been found in ntp-4.1.71 but seems to last in the
@@ -294,16 +16285,52 @@ ChangeSet@1.764, 2001-12-14 02:43:08-05:00, stenn@whimsy.udel.edu
From: Martin Burnicki <martin.burnicki@meinberg.de>
-ChangeSet@1.763, 2001-12-12 21:46:20-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.756 01/12/12 21:53:52 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpdate/ntpdate.c
+ 1.30 01/12/12 21:53:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.54 01/12/12 21:46:20 stenn@whimsy.udel.edu +1 -0
Alter the "ci" calculation to reduce the chance of overflow.
From: Michael Andres <ma@suse.de>
ntpdate/ntpdate.c
- 1.26 01/12/12 21:46:19 stenn@whimsy.udel.edu +8 -2
+ 1.23.1.3 01/12/12 21:46:19 stenn@whimsy.udel.edu +8 -2
Alter the "ci" calculation to reduce the chance of overflow.
From: Michael Andres <ma@suse.de>
-ChangeSet@1.762, 2001-12-10 22:02:24-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.1.48 01/12/11 02:03:30 stenn@whimsy.udel.edu +5 -0
+ wwv/audio improvements from Dave Mills.
+
+ ntpd/refclock_wwv.c
+ 1.29 01/12/11 02:03:29 stenn@whimsy.udel.edu +282 -358
+ Improvements and cleanup.
+
+ ntpd/refclock_irig.c
+ 1.10 01/12/11 02:03:29 stenn@whimsy.udel.edu +28 -26
+ Improvements.
+
+ ntpd/refclock_chu.c
+ 1.23 01/12/11 02:03:29 stenn@whimsy.udel.edu +42 -70
+ Improvements.
+
+ libntp/audio.c
+ 1.8 01/12/11 02:03:29 stenn@whimsy.udel.edu +16 -12
+ audio_init()'s new arg is bufsize, plus various improvements.
+ Audio_gain()'s new arg is monitor gain, plus various improvements.
+
+ include/audio.h
+ 1.4 01/12/11 02:03:28 stenn@whimsy.udel.edu +4 -3
+ audio_init() and audio_gain() now take another arg.
+
+ChangeSet
+ 1.683.4.53 01/12/10 22:02:24 stenn@whimsy.udel.edu +1 -0
Properly check the pps_device variable.
From: "David G. Andersen" <dga@lcs.mit.edu>
@@ -312,50 +16339,296 @@ ChangeSet@1.762, 2001-12-10 22:02:24-05:00, stenn@whimsy.udel.edu
Properly check the pps_device variable.
From: "David G. Andersen" <dga@lcs.mit.edu>
-ChangeSet@1.761, 2001-12-05 01:24:04-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.753 01/12/06 11:03:58 jhay@angel.cids.org.za +3 -0
+ Portability fixes to make it compile on the Udel flock.
+
+ ntpdc/ntpdc_ops.c
+ 1.14 01/12/06 11:03:58 jhay@angel.cids.org.za +38 -8
+ Portability fixes to make it compile on the Udel flock.
+
+ ntpdc/ntpdc.c
+ 1.13 01/12/06 11:03:58 jhay@angel.cids.org.za +1 -1
+ Portability fixes to make it compile on the Udel flock.
+
+ ntpd/ntp_request.c
+ 1.33 01/12/06 11:03:58 jhay@angel.cids.org.za +21 -2
+ Portability fixes to make it compile on the Udel flock.
+
+ChangeSet
+ 1.752 01/12/05 21:22:32 jhay@angel.cids.org.za +1 -0
+ Merge angel.cids.org.za:/home/ntp/ntp-dev-ipv6-clean
+ into angel.cids.org.za:/home/ntp/ntp-dev-ipv6
+
+ ntpd/ntp_request.c
+ 1.32 01/12/05 21:22:32 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ChangeSet
+ 1.745.1.1 01/12/05 21:21:09 jhay@angel.cids.org.za +9 -0
+ Add IPv6 support for ntpdc and make both ntpd and ntpdc capable of talking to
+ older versions of (x)ntpdc and (x)ntpd.
+
+ ntpdc/ntpdc_ops.c
+ 1.13 01/12/05 21:21:08 jhay@angel.cids.org.za +689 -208
+ Add IPv6 support to ntpdc and also make it capable of talking to older versions
+ of ntpd.
+
+ ntpdc/ntpdc.h
+ 1.3 01/12/05 21:21:08 jhay@angel.cids.org.za +8 -3
+ Add IPv6 support to ntpdc and also make it capable of talking to older versions
+ of ntpd.
+
+ ntpdc/ntpdc.c
+ 1.12 01/12/05 21:21:08 jhay@angel.cids.org.za +180 -70
+ Add IPv6 support to ntpdc and also make it capable of talking to older versions
+ of ntpd.
+
+ ntpd/ntp_request.c
+ 1.30.1.1 01/12/05 21:21:08 jhay@angel.cids.org.za +609 -362
+ Add IPv6 support to mode 7 packets and add backward compatability so that just
+ about any (x)ntpdc can talk to it.
+
+ ntpd/ntp_peer.c
+ 1.38 01/12/05 21:21:08 jhay@angel.cids.org.za +1 -1
+ Handle the case where dstadr == NULL correctly.
+
+ ntpd/ntp_intres.c
+ 1.23 01/12/05 21:21:08 jhay@angel.cids.org.za +25 -10
+ Catch up to the ntp_request.h changes.
+
+ include/ntpd.h
+ 1.36 01/12/05 21:21:08 jhay@angel.cids.org.za +2 -1
+ Export the IPv6 restrictlist.
+
+ include/ntp_request.h
+ 1.15 01/12/05 21:21:08 jhay@angel.cids.org.za +95 -28
+ Add IPv6 addresses to structures for use by ntpdc. Also add struct req_pkt_tail
+ so that variable length request packets can be supported.
+
+ include/ntp.h
+ 1.56 01/12/05 21:21:08 jhay@angel.cids.org.za +5 -0
+ Add some macros used in the ntpdc port to IPv6.
+
+ChangeSet
+ 1.706.1.46 01/12/05 03:25:31 stenn@whimsy.udel.edu +1 -0
+ Fix the "gone" file.
+
+ BitKeeper/etc/gone
+ 1.1 01/12/05 03:21:09 stenn@whimsy.udel.edu +1 -0
+
+ BitKeeper/etc/gone
+ 1.0 01/12/05 03:21:09 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev/BitKeeper/etc/gone
+
+ChangeSet
+ 1.751 01/12/05 02:44:54 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ChangeSet
+ 1.706.1.45 01/12/05 02:35:45 stenn@whimsy.udel.edu +1 -0
+ Use the right copy of refclock_jjy.c
+
+ ntpd/refclock_jjy.c
+ 1.6 01/12/05 02:35:44 stenn@whimsy.udel.edu +0 -0
+ Use the right copy of the file...
+
+ refclock_jjy.c
+ 1.5 01/12/05 02:19:59 stenn@whimsy.udel.edu +0 -0
+ Rename: BitKeeper/deleted/.del-refclock_jjy.c -> refclock_jjy.c
+
+ChangeSet
+ 1.706.1.44 01/12/05 01:28:27 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ BitKeeper/deleted/.del-refclock_jjy.c
+ 1.4 01/12/05 01:28:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-refclock_jjy.c
+ 1.2.1.2 01/12/05 01:28:26 stenn@whimsy.udel.edu +0 -0
+ Merge rename: ntpd/refclock_jjy.c -> BitKeeper/deleted/.del-refclock_jjy.c
+
+ChangeSet
+ 1.683.4.52 01/12/05 01:24:04 stenn@whimsy.udel.edu +1 -0
C-DEX patch.
From: Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>
ntpd/refclock_jjy.c
- 1.3 01/12/05 01:24:03 stenn@whimsy.udel.edu +3 -1
+ 1.2.1.1 01/12/05 01:24:03 stenn@whimsy.udel.edu +3 -1
C-DEX patch.
From: Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>
-ChangeSet@1.760, 2001-12-02 23:02:32-05:00, stenn@whimsy.udel.edu
- Added README.versions, which describes the version numbering scheme
- we are using. Suggested by Ulrich Windl.
-
README.versions
1.1 01/12/02 23:02:32 stenn@whimsy.udel.edu +35 -0
+ChangeSet
+ 1.683.4.51 01/12/02 23:02:32 stenn@whimsy.udel.edu +1 -0
+ Added README.versions, which describes the version numbering scheme
+ we are using. Suggested by Ulrich Windl.
+
README.versions
1.0 01/12/02 23:02:32 stenn@whimsy.udel.edu +0 -0
BitKeeper file /backroom/ntp-stable/README.versions
-ChangeSet@1.759, 2001-12-02 04:12:13-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.749 01/12/02 12:42:06 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ libntp/machines.c
+ 1.15 01/12/02 12:42:05 stenn@whimsy.udel.edu +0 -2
+ Auto merged
+
+ChangeSet
+ 1.706.1.42 01/12/02 12:33:54 stenn@whimsy.udel.edu +1 -0
+ Put the definition of adjtv where it belongs.
+
+ libntp/machines.c
+ 1.12.1.2 01/12/02 12:33:53 stenn@whimsy.udel.edu +2 -1
+ Put the definition of adjtv where it belongs.
+
+ChangeSet
+ 1.748 01/12/02 12:23:39 stenn@whimsy.udel.edu +2 -0
+ automerge + conflict resolution.
+
+ libntp/machines.c
+ 1.14 01/12/02 12:23:38 stenn@whimsy.udel.edu +1 -2
+ Conflict cleanup from automerge.
+
+ configure.in
+ 1.235 01/12/02 04:40:05 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.41 01/12/02 04:26:18 stenn@whimsy.udel.edu +2 -0
+ Boring conflict resolution after automerge.
+
+ libntp/machines.c
+ 1.12.1.1 01/12/02 04:26:18 stenn@whimsy.udel.edu +1 -1
+ Boring conflict resolution.
+
+ configure.in
+ 1.226.1.10 01/12/02 04:15:37 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.50 01/12/02 04:12:13 stenn@whimsy.udel.edu +2 -0
settimeofday() fix in configure, do a better job tracking and
reporting progress in ntp_set_tod().
+ libntp/machines.c
+ 1.11.1.1 01/12/02 04:12:12 stenn@whimsy.udel.edu +40 -21
+ Do a better job tracking (and reporting, if debug enabled) progress
+ in ntp_set_tod().
+
configure.in
- 1.230 01/12/02 04:12:12 stenn@whimsy.udel.edu +1 -1
+ 1.219.3.8 01/12/02 04:12:12 stenn@whimsy.udel.edu +1 -1
Use AC_CHECK_FUNCS instead of _FUNC to check for settimeofday()
because we need HAVE_SETTIMEOFDAY.
- libntp/machines.c
- 1.12 01/12/02 04:12:12 stenn@whimsy.udel.edu +40 -21
- Do a better job tracking (and reporting, if debug enabled) progress
- in ntp_set_tod().
+ChangeSet
+ 1.706.1.40 01/12/01 23:08:32 stenn@whimsy.udel.edu +4 -0
+ WWV and CHU improvements from Dave Mills.
+
+ ntpd/refclock_wwv.c
+ 1.28 01/12/01 23:08:31 stenn@whimsy.udel.edu +350 -400
+ Improvements from Dave Mills:
+
+ it does better with the audio codec than my
+ Spectracom WWVB receiver with serial port.
+
+ ntpd/refclock_chu.c
+ 1.22 01/12/01 23:08:31 stenn@whimsy.udel.edu +4 -9
+ Simplify - let refclock_process_offset() do the work.
+ From Dave Mills.
+
+ html/authopt.htm
+ 1.15 01/12/01 23:08:31 stenn@whimsy.udel.edu +1 -3
+ Update the documentation of the crypto line.
+
+ NEWS
+ 1.36 01/12/01 23:08:30 stenn@whimsy.udel.edu +1 -0
+ Document wwv and chu improvements in the NEWS file.
+
+ChangeSet
+ 1.746 01/11/30 19:42:42 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
-ChangeSet@1.758, 2001-11-30 19:36:36-05:00, stenn@whimsy.udel.edu
+ ntpd/ntp_request.c
+ 1.31 01/11/30 19:42:41 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.39 01/11/30 19:39:37 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_request.c
+ 1.24.1.4 01/11/30 19:39:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.49 01/11/30 19:36:36 stenn@whimsy.udel.edu +1 -0
If no REFCLOCK, no cal_enable.
From: Ralf Nyren <ralf.nyren@educ.umu.se>
ntpd/ntp_request.c
- 1.26 01/11/30 19:36:35 stenn@whimsy.udel.edu +2 -0
+ 1.23.2.3 01/11/30 19:36:35 stenn@whimsy.udel.edu +2 -0
If no REFCLOCK, no cal_enable.
From: Ralf Nyren <ralf.nyren@educ.umu.se>
-ChangeSet@1.757, 2001-11-24 23:30:49-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.745 01/11/30 01:10:14 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.234 01/11/30 01:10:13 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.38 01/11/30 00:56:47 stenn@whimsy.udel.edu +2 -0
+ Check for EVP_md2 - Some redhat distros have lost it, too.
+
+ util/genkeys.c
+ 1.5 01/11/30 00:56:46 stenn@whimsy.udel.edu +2 -0
+ Check for EVP_md2 - Some redhat distros have lost it, too.
+
+ configure.in
+ 1.226.1.9 01/11/30 00:56:46 stenn@whimsy.udel.edu +1 -1
+ Check for EVP_md2 - Some redhat distros have lost it, too.
+
+ChangeSet
+ 1.741.1.5 01/11/24 23:58:03 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.233 01/11/24 23:58:02 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.37 01/11/24 23:50:35 stenn@whimsy.udel.edu +3 -0
+ Mostly updates to the NEWS file.
+
+ configure.in
+ 1.226.1.8 01/11/24 23:50:34 stenn@whimsy.udel.edu +0 -1
+ Use the ntp-dev version number.
+
+ NEWS
+ 1.35 01/11/24 23:38:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-driver40.htm
+ 1.2 01/11/24 23:38:03 stenn@whimsy.udel.edu +0 -0
+ Delete: html/driver40.htm
+
+ChangeSet
+ 1.683.4.48 01/11/24 23:30:49 stenn@whimsy.udel.edu +1 -0
Somewhere along the line, the driver40.htm file got lost - recover it.
html/driver40.htm
@@ -365,82 +16638,279 @@ ChangeSet@1.757, 2001-11-24 23:30:49-05:00, stenn@whimsy.udel.edu
1.0 01/11/24 23:30:48 stenn@whimsy.udel.edu +0 -0
BitKeeper file /backroom/ntp-stable/html/driver40.htm
-ChangeSet@1.756, 2001-11-23 23:23:23-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.47 01/11/23 23:23:23 stenn@whimsy.udel.edu +2 -0
4.1.0b-rc1
- TAG: NTP_4_1_0B_RC1
+
+ configure.in
+ 1.219.3.7 01/11/23 23:23:22 stenn@whimsy.udel.edu +1 -1
+ 4.1.0b-rc1
NEWS
- 1.36 01/11/23 23:23:22 stenn@whimsy.udel.edu +7 -0
+ 1.31.1.5 01/11/23 23:23:22 stenn@whimsy.udel.edu +7 -0
Update the NEWS file.
- configure.in
- 1.229 01/11/23 23:23:22 stenn@whimsy.udel.edu +1 -1
- 4.1.0b-rc1
+ChangeSet
+ 1.706.1.36 01/11/19 22:20:56 stenn@whimsy.udel.edu +2 -0
+ Doc cleanups from Dave Mills.
+
+ html/ntpdc.htm
+ 1.8 01/11/19 22:20:55 stenn@whimsy.udel.edu +8 -69
+ Doc cleanups from Dave Mills.
+
+ html/miscopt.htm
+ 1.14 01/11/19 22:20:55 stenn@whimsy.udel.edu +33 -32
+ Doc cleanups from Dave Mills.
+
+ChangeSet
+ 1.741.1.3 01/11/19 21:58:25 stenn@whimsy.udel.edu +3 -0
+ proto_config() needs a 4th arg in the IPv6 code.
+
+ ntpd/ntp_request.c
+ 1.30 01/11/19 21:58:24 stenn@whimsy.udel.edu +8 -14
+ proto_config() apparently takes a 4th arg in the IPv6 code.
-ChangeSet@1.755, 2001-11-19 21:29:34-05:00, stenn@whimsy.udel.edu
+ ntpd/ntp_config.c
+ 1.61 01/11/19 21:40:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_request.h
+ 1.14 01/11/19 21:40:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.35 01/11/19 21:35:42 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_request.c
+ 1.24.1.3 01/11/19 21:35:41 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.52.1.6 01/11/19 21:35:41 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.46 01/11/19 21:29:34 stenn@whimsy.udel.edu +4 -0
enable/disable calibrate.
Flags cleanup for ntpdc and friends.
From Dave Mills.
- include/ntp_request.h
- 1.12 01/11/19 21:29:33 stenn@whimsy.udel.edu +7 -5
- Cleanup/fixes from Dave Mills.
+ ntpdc/ntpdc_ops.c
+ 1.12 01/11/19 21:29:33 stenn@whimsy.udel.edu +17 -13
+ Flag cleanup.
+
+ ntpd/ntp_request.c
+ 1.23.2.2 01/11/19 21:29:33 stenn@whimsy.udel.edu +25 -20
+ Alphabetize the keyword checks.
+
+ setclr/handle the CAL and AUTH flag bits, too.
ntpd/ntp_config.c
- 1.54 01/11/19 21:29:33 stenn@whimsy.udel.edu +4 -4
+ 1.50.3.3 01/11/19 21:29:33 stenn@whimsy.udel.edu +4 -4
One can also enable/disable calibrate.
Alphabetize the flag keywords.
- ntpd/ntp_request.c
- 1.25 01/11/19 21:29:33 stenn@whimsy.udel.edu +25 -20
- Alphabetize the keyword checks.
-
- setclr/handle the CAL and AUTH flag bits, too.
+ include/ntp_request.h
+ 1.10.1.2 01/11/19 21:29:33 stenn@whimsy.udel.edu +7 -5
+ Cleanup/fixes from Dave Mills.
- ntpdc/ntpdc_ops.c
- 1.12 01/11/19 21:29:33 stenn@whimsy.udel.edu +17 -13
- Flag cleanup.
+ChangeSet
+ 1.706.1.34 01/11/17 00:53:52 stenn@whimsy.udel.edu +3 -0
+ HTML cleanup from Dave Mills.
+
+ html/parsedata.htm
+ 1.6 01/11/17 00:53:51 stenn@whimsy.udel.edu +1 -1
+ HTML cleanup from Dave Mills.
+
+ html/driver39.htm
+ 1.5 01/11/17 00:53:51 stenn@whimsy.udel.edu +1 -1
+ HTML cleanup from Dave Mills.
+
+ html/driver38.htm
+ 1.5 01/11/17 00:53:51 stenn@whimsy.udel.edu +1 -1
+ HTML cleanup from Dave Mills.
-ChangeSet@1.754, 2001-11-16 23:35:26-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.1.33 01/11/16 23:51:30 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/Makefile.am
+ 1.24 01/11/16 23:51:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.45 01/11/16 23:35:26 stenn@whimsy.udel.edu +1 -0
ntp_resolver.c is currently unused.
ntpd/Makefile.am
- 1.22 01/11/16 23:35:25 stenn@whimsy.udel.edu +2 -1
+ 1.18.2.4 01/11/16 23:35:25 stenn@whimsy.udel.edu +2 -1
ntp_resolver.c is currently unused.
-ChangeSet@1.753, 2001-11-10 13:46:34-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.742 01/11/15 19:25:09 jhay@angel.cids.org.za +1 -0
+ Fix an off by 1 error.
+ Handle the case where ai->ai_canonname is NULL sometimes.
+
+ ntpq/ntpq.c
+ 1.21 01/11/15 19:25:09 jhay@angel.cids.org.za +8 -2
+ Fix an off by 1 error.
+ Handle the case where ai->ai_canonname is NULL sometimes.
+
+ChangeSet
+ 1.739.1.1 01/11/10 13:58:28 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ Makefile.am
+ 1.24 01/11/10 13:58:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.32 01/11/10 13:50:22 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ Makefile.am
+ 1.16.1.7 01/11/10 13:50:21 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.44 01/11/10 13:46:34 stenn@whimsy.udel.edu +1 -0
Handle the version stuff even when building completely outside
the srcdir.
Makefile.am
- 1.24 01/11/10 13:46:34 stenn@whimsy.udel.edu +7 -1
+ 1.12.1.12 01/11/10 13:46:34 stenn@whimsy.udel.edu +7 -1
Handle the version stuff even when building completely outside
the srcdir.
-ChangeSet@1.752, 2001-11-09 23:29:51-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.740 01/11/10 13:32:50 jhay@angel.cids.org.za +1 -0
+ Make ntpdate also compile and run on rackety (SunOS 4.1.3)
+ Catch a if(... = ...).
+
+ ntpdate/ntpdate.c
+ 1.29 01/11/10 13:32:50 jhay@angel.cids.org.za +5 -3
+ Make ntpdate also compile and run on rackety (SunOS 4.1.3)
+ Catch a if(... = ...).
+
+ChangeSet
+ 1.706.1.31 01/11/10 02:00:29 stenn@whimsy.udel.edu +1 -0
+ Be less aggressive when looking for ASYNC and NDELAY alternatives.
+ From John Hay.
+
+ include/ntp_io.h
+ 1.5 01/11/10 02:00:29 stenn@whimsy.udel.edu +4 -6
+ Be less aggressive when looking for ASYNC and NDELAY alternatives.
+ From John Hay.
+
+ChangeSet
+ 1.738 01/11/09 23:44:59 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ Makefile.am
+ 1.23 01/11/09 23:44:58 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.30 01/11/09 23:41:20 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ Makefile.am
+ 1.16.1.6 01/11/09 23:41:20 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.43 01/11/09 23:29:51 stenn@whimsy.udel.edu +1 -0
Improve the version file generation code.
Makefile.am
- 1.23 01/11/09 23:29:50 stenn@whimsy.udel.edu +3 -4
+ 1.12.1.11 01/11/09 23:29:50 stenn@whimsy.udel.edu +3 -4
Improve the version file generation code.
-ChangeSet@1.751, 2001-11-08 16:46:12-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.737 01/11/09 20:23:41 jhay@angel.cids.org.za +8 -0
+ IPv6 port by Bill Cote USG <billcote@zk3.dec.com> with twiddling be me to make
+ it work with the rest of our code.
+
+ ntpq/ntpq_ops.c
+ 1.12 01/11/09 20:23:41 jhay@angel.cids.org.za +139 -70
+ IPv6 port by Bill Cote USG <billcote@zk3.dec.com> with twiddling be me to make
+ it work with the rest of our code.
+
+ ntpq/ntpq.h
+ 1.3 01/11/09 20:23:41 jhay@angel.cids.org.za +4 -3
+ IPv6 port by Bill Cote USG <billcote@zk3.dec.com> with twiddling be me to make
+ it work with the rest of our code.
+
+ ntpq/ntpq.c
+ 1.20 01/11/09 20:23:41 jhay@angel.cids.org.za +102 -53
+ IPv6 port by Bill Cote USG <billcote@zk3.dec.com> with twiddling be me to make
+ it work with the rest of our code.
+
+ libntp/socktohost.c
+ 1.2 01/11/09 20:23:41 jhay@angel.cids.org.za +3 -1
+ Return a string representation of the address if the dns lookup fail.
+
+ libntp/ntp_rfc2553.c
+ 1.4 01/11/09 20:23:41 jhay@angel.cids.org.za +9 -2
+ ntpq needs a little more of the rfc2553 api.
+
+ libntp/decodenetnum.c
+ 1.3 01/11/09 20:23:41 jhay@angel.cids.org.za +16 -35
+ IPv6 port by Bill Cote USG <billcote@zk3.dec.com> with twiddling be me to make
+ it work with the rest of our code.
+
+ include/ntp_stdlib.h
+ 1.16 01/11/09 20:23:41 jhay@angel.cids.org.za +2 -2
+ Change decodenetnum to use sockaddr_storage.
+
+ include/ntp_rfc2553.h
+ 1.3 01/11/09 20:23:41 jhay@angel.cids.org.za +2 -0
+ We now need AI_ADDRCONFIG too.
+
+ChangeSet
+ 1.736 01/11/08 16:52:48 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ Makefile.am
+ 1.22 01/11/08 16:52:48 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.29 01/11/08 16:49:41 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ Makefile.am
+ 1.16.1.5 01/11/08 16:49:40 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.42 01/11/08 16:46:12 stenn@whimsy.udel.edu +1 -0
Make the cmp of the version file be silent.
Makefile.am
- 1.22 01/11/08 16:46:11 stenn@whimsy.udel.edu +1 -1
+ 1.12.1.10 01/11/08 16:46:11 stenn@whimsy.udel.edu +1 -1
Make the cmp of the version file be silent.
-ChangeSet@1.750, 2001-11-08 16:37:05-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.41 01/11/08 16:37:05 stenn@whimsy.udel.edu +2 -0
Fix the version file update code.
Reported by John Hay.
The "version" file should not be checked in.
Makefile.am
- 1.21 01/11/08 16:37:02 stenn@whimsy.udel.edu +3 -2
+ 1.12.1.9 01/11/08 16:37:02 stenn@whimsy.udel.edu +3 -2
Fix the version file update code.
Reported by John Hay.
@@ -448,81 +16918,243 @@ ChangeSet@1.750, 2001-11-08 16:37:05-05:00, stenn@whimsy.udel.edu
1.2 01/11/08 16:34:27 stenn@whimsy.udel.edu +1 -1
Delete: version
-ChangeSet@1.749, 2001-11-08 03:06:18-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.735 01/11/08 03:40:27 stenn@whimsy.udel.edu +3 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.232 01/11/08 03:40:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.21 01/11/08 03:40:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/ignore
+ 1.16 01/11/08 03:40:17 stenn@whimsy.udel.edu +7 -0
+ auto-union
+
+ChangeSet
+ 1.706.1.28 01/11/08 03:32:50 stenn@whimsy.udel.edu +1 -0
+ Comment out apparently unused RSA stuff.
+
+ configure.in
+ 1.226.1.7 01/11/08 03:32:49 stenn@whimsy.udel.edu +6 -6
+ Comment out RSA stuff - I think it's no longer used.
+
+ChangeSet
+ 1.706.1.27 01/11/08 03:19:45 stenn@whimsy.udel.edu +6 -0
+ Merge
+
+ ntpq/Makefile.am
+ 1.8 01/11/08 03:19:45 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ ntpdc/Makefile.am
+ 1.7 01/11/08 03:19:45 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ ntpdate/Makefile.am
+ 1.9 01/11/08 03:19:45 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ ntpd/Makefile.am
+ 1.23 01/11/08 03:19:45 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ Makefile.am
+ 1.16.1.4 01/11/08 03:15:40 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/ignore
+ 1.14.1.1 01/11/08 03:15:34 stenn@whimsy.udel.edu +0 -0
+ auto-union
+
+ChangeSet
+ 1.683.4.40 01/11/08 03:06:18 stenn@whimsy.udel.edu +9 -0
Get the ChangeSet number in the compiled-in version strings.
version
1.1 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -0
BitKeeper/etc/ignore
- 1.12 01/11/08 03:06:17 stenn@whimsy.udel.edu +1 -0
+ 1.1.2.7 01/11/08 03:06:17 stenn@whimsy.udel.edu +1 -0
Added version to the ignore list
version
1.0 01/11/08 03:06:16 stenn@whimsy.udel.edu +0 -0
BitKeeper file /backroom/ntp-stable/version
- Makefile.am
- 1.20 01/11/08 03:06:16 stenn@whimsy.udel.edu +9 -3
- Maintain the version file, which holds the latest ChangeSet number.
+ scripts/mkver.in
+ 1.9 01/11/08 03:06:16 stenn@whimsy.udel.edu +5 -0
+ If
- ntpd/Makefile.am
- 1.21 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -1
+ ntptrace/Makefile.am
+ 1.4 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -1
Pass the contents of the version file in to the mkver script.
- ntpdate/Makefile.am
- 1.7 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -1
+ ntpq/Makefile.am
+ 1.4.1.2 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -1
Pass the contents of the version file in to the mkver script.
ntpdc/Makefile.am
- 1.5 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -1
+ 1.3.1.2 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -1
Pass the contents of the version file in to the mkver script.
- ntpq/Makefile.am
- 1.6 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -1
+ ntpdate/Makefile.am
+ 1.5.1.2 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -1
Pass the contents of the version file in to the mkver script.
- ntptrace/Makefile.am
- 1.4 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -1
+ ntpd/Makefile.am
+ 1.18.2.3 01/11/08 03:06:16 stenn@whimsy.udel.edu +1 -1
Pass the contents of the version file in to the mkver script.
- scripts/mkver.in
- 1.9 01/11/08 03:06:16 stenn@whimsy.udel.edu +5 -0
- If
+ Makefile.am
+ 1.12.1.8 01/11/08 03:06:16 stenn@whimsy.udel.edu +9 -3
+ Maintain the version file, which holds the latest ChangeSet number.
+
+ChangeSet
+ 1.734 01/11/05 00:34:46 stenn@whimsy.udel.edu +1 -0
+ Attempt to reconcile the multicast patch with the one in ntp-dev.
+
+ ntpd/ntp_peer.c
+ 1.37 01/11/05 00:34:46 stenn@whimsy.udel.edu +0 -8
+ Attempt to reconcile the multicast patch with the one in ntp-dev.
+
+ChangeSet
+ 1.706.1.26 01/11/04 23:48:00 stenn@whimsy.udel.edu +1 -0
+ Multicast improvements
+ From: John.Hay@icomtek.csir.co.za
+
+ ntpd/ntp_peer.c
+ 1.32.1.3 01/11/04 23:47:59 stenn@whimsy.udel.edu +8 -2
+ Multicast improvements
+ From: John.Hay@icomtek.csir.co.za
+
+ChangeSet
+ 1.706.1.25 01/11/04 04:42:02 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
-ChangeSet@1.748, 2001-11-04 04:38:31-05:00, stenn@whimsy.udel.edu
+ BitKeeper/deleted/.del-00-list~baf8bb517d043606
+ 1.5 01/11/04 04:42:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-00-list~baf8bb517d043606
+ 1.4 01/11/04 04:42:01 stenn@whimsy.udel.edu +0 -0
+ Merge rename: BitKeeper/deleted/.del-00-list -> BitKeeper/deleted/.del-00-list~baf8bb517d043606
+
+ChangeSet
+ 1.683.4.39 01/11/04 04:38:31 stenn@whimsy.udel.edu +1 -0
Lose an obsolete file.
BitKeeper/deleted/.del-00-list~baf8bb517d043606
- 1.3 01/11/04 04:34:24 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/11/04 04:34:24 stenn@whimsy.udel.edu +0 -0
Delete: BitKeeper/triggers/00-list
-ChangeSet@1.747, 2001-11-04 04:21:46-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.723.1.5 01/11/04 04:30:43 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.231 01/11/04 04:30:42 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.38 01/11/04 04:21:46 stenn@whimsy.udel.edu +3 -0
Attempt to handle the cases where triggers are being run from the
RESYNC dir.
- BitKeeper/triggers/delta-changelog
- 1.3 01/11/04 04:21:45 stenn@whimsy.udel.edu +1 -1
- Use bkp to make sure we get the .lgc file in the repo and not
- (potentially) the (bogus) one in the RESYNC tree.
+ BitKeeper/triggers/triggert
+ 1.4 01/11/04 04:21:45 stenn@whimsy.udel.edu +10 -4
+ General cleanup, and pass along $bkp (bk repo prefix) so we can
+ find the repo directory instead of the RESYNC dir.
BitKeeper/triggers/lg-changeset
1.2 01/11/04 04:21:45 stenn@whimsy.udel.edu +1 -1
Make sure we're're accessing the .lgc file in the main repo and not in a RESYNC dir.
- BitKeeper/triggers/triggert
- 1.4 01/11/04 04:21:45 stenn@whimsy.udel.edu +10 -4
- General cleanup, and pass along $bkp (bk repo prefix) so we can
- find the repo directory instead of the RESYNC dir.
+ BitKeeper/triggers/delta-changelog
+ 1.3 01/11/04 04:21:45 stenn@whimsy.udel.edu +1 -1
+ Use bkp to make sure we get the .lgc file in the repo and not
+ (potentially) the (bogus) one in the RESYNC tree.
-ChangeSet@1.746, 2001-11-03 14:46:21-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.37 01/11/03 14:46:21 stenn@whimsy.udel.edu +1 -0
Cleanup
BitKeeper/triggers/trigger.mk
1.7 01/11/03 14:46:20 stenn@whimsy.udel.edu +2 -7
Cleanup
-ChangeSet@1.745, 2001-11-02 16:56:25-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.723.1.4 01/11/03 14:25:15 stenn@whimsy.udel.edu +1 -0
+ Clean up the ignore file
+
+ BitKeeper/etc/ignore
+ 1.15 01/11/03 14:25:14 stenn@whimsy.udel.edu +0 -7
+ Clean up the ignore file
+
+ChangeSet
+ 1.706.1.23 01/11/03 02:16:34 stenn@whimsy.udel.edu +5 -0
+ QNX 6.x patches
+ From: Chris Burghart <burghart@atd.ucar.edu>
+
+ util/genkeys.c
+ 1.4 01/11/03 02:16:34 stenn@whimsy.udel.edu +3 -0
+ util/genkeys.c needs a protected sys/types.h for QNX.
+
+ ntpd/check_y2k.c
+ 1.7 01/11/03 02:16:34 stenn@whimsy.udel.edu +3 -0
+ ntpd/check_y2k needs a protected sys/signal.h for QNX.
+
+ libntp/adjtime.c
+ 1.4 01/11/03 02:16:33 stenn@whimsy.udel.edu +77 -3
+ QNX adjtime hack.
+
+ include/ntp_io.h
+ 1.4 01/11/03 02:16:33 stenn@whimsy.udel.edu +19 -0
+ QNX 6 patches
+
+ configure.in
+ 1.226.1.6 01/11/03 02:16:33 stenn@whimsy.udel.edu +23 -1
+ QNX patches
+
+ChangeSet
+ 1.732 01/11/03 08:26:08 jhay@angel.cids.org.za +1 -0
+ Make multicasting from other subnets work with autokey.
+
+ ntpd/ntp_peer.c
+ 1.36 01/11/03 08:26:08 jhay@angel.cids.org.za +8 -2
+ Make multicasting from other subnets work with autokey.
+
+ChangeSet
+ 1.706.1.22 01/11/02 17:06:51 stenn@whimsy.udel.edu +2 -0
+ .del-pre-apply.paranoid~eabcafcd55240e3e:
+ Delete: BitKeeper/triggers/pre-apply.paranoid
+ .del-post-commit.changelog~eabcee9c552e8cb4:
+ Delete: BitKeeper/triggers/post-commit.changelog
+
+ BitKeeper/deleted/.del-pre-apply.paranoid~eabcafcd55240e3e
+ 1.2 01/11/02 17:06:20 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/triggers/pre-apply.paranoid
+
+ BitKeeper/deleted/.del-post-commit.changelog~eabcee9c552e8cb4
+ 1.2 01/11/02 17:06:19 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/triggers/post-commit.changelog
+
+ChangeSet
+ 1.706.1.21 01/11/02 17:04:56 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ BitKeeper/etc/ignore
+ 1.14 01/11/02 17:04:36 stenn@whimsy.udel.edu +1 -1
+ auto-union
+
+ChangeSet
+ 1.683.4.36 01/11/02 16:56:25 stenn@whimsy.udel.edu +1 -0
Cleanup.
BitKeeper/triggers/trigger.mk
@@ -530,101 +17162,113 @@ ChangeSet@1.745, 2001-11-02 16:56:25-05:00, stenn@whimsy.udel.edu
Remove the trigger.touch file. No longer needed.
We should look at some of the other touch files, too.
-ChangeSet@1.744, 2001-11-02 16:39:34-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.35 01/11/02 16:39:34 stenn@whimsy.udel.edu +2 -0
Cleanup/reality check smoe trigger stuff.
- BitKeeper/triggers/trigger.README
- 1.3 01/11/02 16:39:33 stenn@whimsy.udel.edu +8 -7
- Cleanup/reality check the file.
-
BitKeeper/triggers/trigger.cfg
1.7 01/11/02 16:39:33 stenn@whimsy.udel.edu +3 -5
Update the header docs, merge some of the trigger scripts.
-ChangeSet@1.743, 2001-11-02 04:52:47-05:00, stenn@whimsy.udel.edu
+ BitKeeper/triggers/trigger.README
+ 1.3 01/11/02 16:39:33 stenn@whimsy.udel.edu +8 -7
+ Cleanup/reality check the file.
+
+ChangeSet
+ 1.683.4.34 01/11/02 04:52:47 stenn@whimsy.udel.edu +1 -0
Enable the delta changelog and last-good changeset triggers.
BitKeeper/triggers/trigger.cfg
1.6 01/11/02 04:52:47 stenn@whimsy.udel.edu +4 -4
Enable the delta changelog and last-good changeset triggers.
-ChangeSet@1.742, 2001-11-02 04:33:25-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.33 01/11/02 04:33:25 stenn@whimsy.udel.edu +1 -0
Prepend the new logs to the ChangeLog.
BitKeeper/triggers/delta-changelog
1.2 01/11/02 04:33:25 stenn@whimsy.udel.edu +3 -1
Prepend the new logs to the ChangeLog.
-ChangeSet@1.741, 2001-11-02 04:15:19-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.32 01/11/02 04:15:19 stenn@whimsy.udel.edu +2 -0
Now that we are using sed to install the trigger, call 'chmod +x'
when we're done.
- BitKeeper/triggers/trigger.mk
- 1.5 01/11/02 04:15:18 stenn@whimsy.udel.edu +1 -1
+ BitKeeper/triggers/triggerd
+ 1.15 01/11/02 04:15:18 stenn@whimsy.udel.edu +1 -0
Now that we are using sed to install the trigger, call 'chmod +x'
when we're done.
- BitKeeper/triggers/triggerd
- 1.15 01/11/02 04:15:18 stenn@whimsy.udel.edu +1 -0
+ BitKeeper/triggers/trigger.mk
+ 1.5 01/11/02 04:15:18 stenn@whimsy.udel.edu +1 -1
Now that we are using sed to install the trigger, call 'chmod +x'
when we're done.
-ChangeSet@1.740, 2001-11-02 04:05:19-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.31 01/11/02 04:05:19 stenn@whimsy.udel.edu +1 -0
Better logging.
BitKeeper/triggers/triggert
1.3 01/11/02 04:05:18 stenn@whimsy.udel.edu +1 -1
Better logging.
-ChangeSet@1.739, 2001-11-02 03:58:14-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.30 01/11/02 03:58:14 stenn@whimsy.udel.edu +1 -0
Mirror updates.
BitKeeper/triggers/trigger.cfg
1.5 01/11/02 03:58:13 stenn@whimsy.udel.edu +2 -2
Enable the mirror updates
-ChangeSet@1.738, 2001-11-02 03:49:01-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.29 01/11/02 03:49:01 stenn@whimsy.udel.edu +1 -0
Typos.
BitKeeper/triggers/triggerd
1.14 01/11/02 03:49:00 stenn@whimsy.udel.edu +1 -1
Typos. I"m getting pretty tired...
-ChangeSet@1.737, 2001-11-02 03:42:45-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.28 01/11/02 03:42:45 stenn@whimsy.udel.edu +1 -0
Trigger manager improvements.
BitKeeper/triggers/triggerd
1.13 01/11/02 03:42:44 stenn@whimsy.udel.edu +3 -3
Install triggert to call the actual trigger, using a sed substitution.
-ChangeSet@1.736, 2001-11-02 03:33:15-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.27 01/11/02 03:33:15 stenn@whimsy.udel.edu +1 -0
Typo.
BitKeeper/triggers/trigger.mk
1.4 01/11/02 03:33:15 stenn@whimsy.udel.edu +1 -1
Typo.
-ChangeSet@1.735, 2001-11-02 03:24:31-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.26 01/11/02 03:24:31 stenn@whimsy.udel.edu +2 -0
trigger manager improvements.
+ BitKeeper/triggers/triggert
+ 1.2 01/11/02 03:24:30 stenn@whimsy.udel.edu +1 -1
+ Use a sed substitution for the target trigger name.
+
BitKeeper/triggers/trigger.mk
1.3 01/11/02 03:24:30 stenn@whimsy.udel.edu +1 -1
Use sed instead of cp to copy triggert to the target; we will
most likely want to use this trick for the triggers in trigger.cfg,
too.
- BitKeeper/triggers/triggert
- 1.2 01/11/02 03:24:30 stenn@whimsy.udel.edu +1 -1
- Use a sed substitution for the target trigger name.
-
-ChangeSet@1.734, 2001-11-02 03:08:17-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.25 01/11/02 03:08:17 stenn@whimsy.udel.edu +1 -0
More trigger manager fixes
BitKeeper/triggers/triggerd
1.12 01/11/02 03:08:17 stenn@whimsy.udel.edu +2 -2
Set the file count to 0 even earlier.
-ChangeSet@1.733, 2001-11-02 02:49:46-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.24 01/11/02 02:49:46 stenn@whimsy.udel.edu +1 -0
More trigger manager work
BitKeeper/triggers/triggerd
@@ -632,7 +17276,8 @@ ChangeSet@1.733, 2001-11-02 02:49:46-05:00, stenn@whimsy.udel.edu
Don't reset the count at each new tag; somebody might use a tag more
than once.
-ChangeSet@1.732, 2001-11-02 02:36:34-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.23 01/11/02 02:36:34 stenn@whimsy.udel.edu +2 -0
Start enabling more triggers...
BitKeeper/triggers/trigger.cfg
@@ -640,18 +17285,20 @@ ChangeSet@1.732, 2001-11-02 02:36:34-05:00, stenn@whimsy.udel.edu
Try enabling the paranoid check.
BitKeeper/etc/ignore
- 1.11 01/11/02 02:36:33 stenn@whimsy.udel.edu +1 -0
+ 1.1.2.6 01/11/02 02:36:33 stenn@whimsy.udel.edu +1 -0
Ignore BitKeeper/triggers/p*--*, as those are the files installed
by the trigger manager package.
-ChangeSet@1.731, 2001-11-02 02:29:37-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.22 01/11/02 02:29:37 stenn@whimsy.udel.edu +1 -0
More trigger manager cleanup.
BitKeeper/triggers/triggerd
1.10 01/11/02 02:29:36 stenn@whimsy.udel.edu +26 -21
Typos, cleanup.
-ChangeSet@1.730, 2001-11-02 00:27:34-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.21 01/11/02 00:27:34 stenn@whimsy.udel.edu +1 -0
More trigger manager work.
BitKeeper/triggers/triggerd
@@ -659,21 +17306,10 @@ ChangeSet@1.730, 2001-11-02 00:27:34-05:00, stenn@whimsy.udel.edu
Better logging.
Fix some typos.
-ChangeSet@1.729, 2001-11-02 00:12:41-05:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.20 01/11/02 00:12:41 stenn@whimsy.udel.edu +4 -0
Another pass at the trigger manager.
- BitKeeper/triggers/trigger.README
- 1.2 01/11/02 00:12:40 stenn@whimsy.udel.edu +2 -5
- Implement multiple triggers per tag line.
-
- BitKeeper/triggers/trigger.cfg
- 1.3 01/11/02 00:12:40 stenn@whimsy.udel.edu +1 -1
- Enable the "notify" trigger.
-
- BitKeeper/triggers/trigger.mk
- 1.2 01/11/02 00:12:40 stenn@whimsy.udel.edu +1 -2
- Only install triggerd for post-commit and post-incoming.
-
BitKeeper/triggers/triggerd
1.8 01/11/02 00:12:40 stenn@whimsy.udel.edu +55 -19
Now that wedon't call the triggers from triggerd, there is no reason
@@ -684,14 +17320,118 @@ ChangeSet@1.729, 2001-11-02 00:12:41-05:00, stenn@whimsy.udel.edu
Process each script for each tag, installing them so that they are
executed in the correct order.
-ChangeSet@1.728, 2001-10-24 10:00:02-04:00, stenn@whimsy.udel.edu
+ BitKeeper/triggers/trigger.mk
+ 1.2 01/11/02 00:12:40 stenn@whimsy.udel.edu +1 -2
+ Only install triggerd for post-commit and post-incoming.
+
+ BitKeeper/triggers/trigger.cfg
+ 1.3 01/11/02 00:12:40 stenn@whimsy.udel.edu +1 -1
+ Enable the "notify" trigger.
+
+ BitKeeper/triggers/trigger.README
+ 1.2 01/11/02 00:12:40 stenn@whimsy.udel.edu +2 -5
+ Implement multiple triggers per tag line.
+
+ChangeSet
+ 1.706.1.20 01/11/01 02:10:09 stenn@whimsy.udel.edu +5 -0
+ Cleanup. From Dave Mills.
+
+ ntpd/refclock_wwv.c
+ 1.27 01/11/01 02:10:08 stenn@whimsy.udel.edu +5 -5
+ Cleanup. From Dave Mills.
+
+ html/notes.htm
+ 1.8 01/11/01 02:10:08 stenn@whimsy.udel.edu +1237 -1421
+ Cleanup. From Dave Mills.
+
+ html/driver6.htm
+ 1.7 01/11/01 02:10:07 stenn@whimsy.udel.edu +62 -49
+ Cleanup. From Dave Mills.
+
+ html/driver36.htm
+ 1.9 01/11/01 02:10:07 stenn@whimsy.udel.edu +4 -3
+ Cleanup. From Dave Mills.
+
+ html/audio.htm
+ 1.8 01/11/01 02:10:07 stenn@whimsy.udel.edu +54 -14
+ Cleanup. From Dave Mills.
+
+ChangeSet
+ 1.723.1.1 01/11/01 01:38:33 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ Makefile.am
+ 1.20 01/11/01 01:38:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.7 01/11/01 01:38:25 stenn@whimsy.udel.edu +1 -1
+ auto-union
+
+ChangeSet
+ 1.706.1.19 01/11/01 01:25:02 stenn@whimsy.udel.edu +8 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntpd.c
+ 1.38 01/11/01 01:25:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.16.1.3 01/11/01 01:25:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-pre-apply.paranoid~baecee4c7d243e1c
+ 1.5 01/11/01 01:25:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-post-commit.changelog~baedea457d24369c
+ 1.8 01/11/01 01:25:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-2mirrors
+ 1.2 01/11/01 01:25:00 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/triggers/2mirrors
+
+ BitKeeper/deleted/.del-pre-apply.paranoid~baecee4c7d243e1c
+ 1.4 01/11/01 01:23:43 stenn@whimsy.udel.edu +0 -0
+ Merge rename: BitKeeper/deleted/.del-pre-apply.paranoid -> BitKeeper/deleted/.del-pre-apply.paranoid~baecee4c7d243e1c
+
+ BitKeeper/deleted/.del-post-commit.changelog~baedea457d24369c
+ 1.7 01/11/01 01:23:40 stenn@whimsy.udel.edu +0 -0
+ Merge rename: BitKeeper/deleted/.del-post-commit.changelog -> BitKeeper/deleted/.del-post-commit.changelog~baedea457d24369c
+
+ BitKeeper/etc/logging_ok
+ 1.3.1.4 01/11/01 01:22:03 stenn@whimsy.udel.edu +1 -0
+ 'Auto converge'
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.6 01/11/01 01:22:03 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.3.1.3 01/11/01 01:22:03 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.5 01/11/01 01:22:01 stenn@whimsy.udel.edu +0 -0
+ auto-union
+
+ BitKeeper/etc/ignore
+ 1.13 01/11/01 01:22:00 stenn@whimsy.udel.edu +13 -13
+ auto-union
+
+ChangeSet
+ 1.683.4.19 01/10/24 10:00:02 stenn@whimsy.udel.edu +1 -0
Disable our triggers until I can find the processing bug.
BitKeeper/triggers/trigger.cfg
1.2 01/10/24 10:00:02 stenn@whimsy.udel.edu +8 -8
Disable our triggers until I can find the processing bug.
-ChangeSet@1.727, 2001-10-24 04:42:37-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.18 01/10/24 04:42:37 stenn@whimsy.udel.edu +2 -0
Recover the 2mirror script.
BitKeeper/triggers/2mirrors
@@ -726,18 +17466,20 @@ ChangeSet@1.727, 2001-10-24 04:42:37-04:00, stenn@whimsy.udel.edu
1.2 01/10/24 01:59:12 stenn@whimsy.udel.edu +1 -0
Play ball - actually run the intended trigger script.
-ChangeSet@1.726, 2001-10-24 01:50:16-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.17 01/10/24 01:50:16 stenn@whimsy.udel.edu +1 -0
Ignore some of the trigger system overhead files.
BitKeeper/etc/ignore
- 1.10 01/10/24 01:37:32 stenn@whimsy.udel.edu +3 -0
+ 1.1.2.5 01/10/24 01:37:32 stenn@whimsy.udel.edu +3 -0
added BitKeeper/triggers/trigger.t1 BitKeeper/triggers/trigger.t2 BitKeeper/triggers/trigger.touch
BitKeeper/etc/ignore
- 1.9 01/10/24 01:37:05 stenn@whimsy.udel.edu +8 -0
+ 1.1.2.4 01/10/24 01:37:05 stenn@whimsy.udel.edu +8 -0
added BitKeeper/triggers/post-commit BitKeeper/triggers/post-incoming BitKeeper/triggers/post-outgoing BitKeeper/triggers/pre-apply BitKeeper/triggers/pre-commit BitKeeper/triggers/pre-incoming BitKeeper/triggers/pre-outgoing BitKeeper/triggers/pre-resolve
-ChangeSet@1.725, 2001-10-24 01:32:31-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.16 01/10/24 01:32:31 stenn@whimsy.udel.edu +14 -0
New ChagneLog processing.
New trigger scripts.
@@ -747,135 +17489,1647 @@ ChangeSet@1.725, 2001-10-24 01:32:31-04:00, stenn@whimsy.udel.edu
BitKeeper/triggers/triggerd
1.1 01/10/24 01:32:30 stenn@whimsy.udel.edu +54 -0
- BitKeeper/triggers/trigger.README
- 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +53 -0
-
BitKeeper/triggers/triggert
1.0 01/10/24 01:32:30 stenn@whimsy.udel.edu +0 -0
BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/triggert
- BitKeeper/etc/ignore
- 1.8 01/10/24 01:32:30 stenn@whimsy.udel.edu +2 -0
- Added ChangeLog BitKeeper/triggers/.lgc to the ignore list
-
- BitKeeper/triggers/delta-changelog
- 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +64 -0
-
BitKeeper/triggers/triggerd
1.0 01/10/24 01:32:30 stenn@whimsy.udel.edu +0 -0
BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/triggerd
- BitKeeper/triggers/lg-changeset
- 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +15 -0
-
- BitKeeper/triggers/paranoid
- 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +80 -0
+ BitKeeper/triggers/trigger.mk
+ 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +17 -0
BitKeeper/triggers/trigger.cfg
1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +25 -0
- BitKeeper/triggers/trigger.mk
- 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +17 -0
+ BitKeeper/triggers/trigger.README
+ 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +53 -0
- BitKeeper/triggers/lg-changeset
- 1.0 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/lg-changeset
+ BitKeeper/triggers/paranoid
+ 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +80 -0
- BitKeeper/triggers/trigger.README
- 1.0 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/trigger.README
+ BitKeeper/triggers/lg-changeset
+ 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +15 -0
BitKeeper/triggers/delta-changelog
+ 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +64 -0
+
+ BitKeeper/etc/ignore
+ 1.1.2.3 01/10/24 01:32:30 stenn@whimsy.udel.edu +2 -0
+ Added ChangeLog BitKeeper/triggers/.lgc to the ignore list
+
+ Makefile.am
+ 1.12.1.7 01/10/24 01:32:29 stenn@whimsy.udel.edu +1 -0
+ Distribute ChangeLog-4.1.0.
+
+ ChangeLog-4.1.0
+ 1.589 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
+ Renamed the CVS ChangeLog to ChangeLog-4.1.0;
+ the new ChangeLog is auto-generated.
+
+ BitKeeper/triggers/trigger.mk
1.0 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/delta-changelog
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/trigger.mk
BitKeeper/triggers/trigger.cfg
1.0 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/trigger.cfg
- BitKeeper/triggers/trigger.mk
+ BitKeeper/triggers/trigger.README
1.0 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/trigger.mk
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/trigger.README
BitKeeper/triggers/paranoid
1.0 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/paranoid
- Makefile.am
- 1.19 01/10/24 01:32:29 stenn@whimsy.udel.edu +1 -0
- Distribute ChangeLog-4.1.0.
+ BitKeeper/triggers/lg-changeset
+ 1.0 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/lg-changeset
- ChangeLog-4.1.0
- 1.589 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
- Renamed the CVS ChangeLog to ChangeLog-4.1.0;
- the new ChangeLog is auto-generated.
+ BitKeeper/triggers/delta-changelog
+ 1.0 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/delta-changelog
BitKeeper/deleted/.del-post-commit.changelog~baedea457d24369c
- 1.6 01/10/24 01:11:24 stenn@whimsy.udel.edu +0 -0
+ 1.5.1.1 01/10/24 01:11:24 stenn@whimsy.udel.edu +0 -0
Delete: BitKeeper/triggers/post-commit.changelog
BitKeeper/deleted/.del-pre-apply.paranoid~baecee4c7d243e1c
- 1.3 01/10/24 00:42:20 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/24 00:42:20 stenn@whimsy.udel.edu +0 -0
Delete: BitKeeper/triggers/pre-apply.paranoid
BitKeeper/deleted/.del-post-incoming.2mirrors~baedfb107d26b494
1.5 01/10/24 00:42:11 stenn@whimsy.udel.edu +0 -0
Delete: BitKeeper/triggers/post-incoming.2mirrors
-ChangeSet@1.724, 2001-10-20 12:07:53-07:00, wink@iris1.saville.com
+ChangeSet
+ 1.729 01/10/23 15:06:06 jhay@angel.cids.org.za +1 -0
+ Get rid of & in front of addr6 and rl6->addr6. Those are pointers already.
+
+ ntpd/ntp_restrict.c
+ 1.8 01/10/23 15:06:06 jhay@angel.cids.org.za +5 -5
+ Get rid of & in front of addr6 and rl6->addr6. Those are pointers already.
+
+ChangeSet
+ 1.728 01/10/23 15:02:59 jhay@angel.cids.org.za +1 -0
+ Move adjtv to get rid of an unused variable warning.
+
+ libntp/machines.c
+ 1.13 01/10/23 15:02:59 jhay@angel.cids.org.za +2 -1
+ Move adjtv to get rid of an unused variable warning.
+
+ChangeSet
+ 1.727 01/10/23 14:38:35 jhay@angel.cids.org.za +3 -0
+ Some sockaddr_in to sockaddr_storage conversions. They were missed because they came
+ after the initial IPv6 port.
+
+ ntpd/ntp_util.c
+ 1.19 01/10/23 14:38:35 jhay@angel.cids.org.za +2 -2
+ Some sockaddr_in to sockaddr_storage conversions. They were missed because they came
+ after the initial IPv6 port.
+
+ ntpd/ntp_crypto.c
+ 1.49 01/10/23 14:38:35 jhay@angel.cids.org.za +12 -4
+ Some sockaddr_in to sockaddr_storage conversions. They were missed because they came
+ after the initial IPv6 port.
+
+ include/ntpd.h
+ 1.35 01/10/23 14:38:35 jhay@angel.cids.org.za +2 -2
+ Some sockaddr_in to sockaddr_storage conversions. They were missed because they came
+ after the initial IPv6 port.
+
+ChangeSet
+ 1.726 01/10/23 10:44:04 jhay@angel.cids.org.za +1 -0
+ Oops, I forgot the copyright for this file. Give credit where credit is due.
+
+ libntp/ntp_rfc2553.c
+ 1.3 01/10/23 10:44:04 jhay@angel.cids.org.za +67 -0
+ Oops, I forgot the copyright for this file. Give credit where credit is due.
+
+ChangeSet
+ 1.725 01/10/23 09:23:04 jhay@angel.cids.org.za +3 -0
+ With these changes a flock-build of libntp and ntpd survive.
+
+ ntpd/ntp_io.c
+ 1.31 01/10/23 09:23:04 jhay@angel.cids.org.za +1 -1
+ Add a missing &, addr is not a pointer.
+
+ libntp/ntp_rfc2553.c
+ 1.2 01/10/23 09:23:04 jhay@angel.cids.org.za +1 -0
+ At least on some systems including ntp_stdlib.h is needed.
+
+ include/ntp_rfc2553.h
+ 1.2 01/10/23 09:23:04 jhay@angel.cids.org.za +1 -3
+ Try a different way of defining u_int64_t.
+
+ChangeSet
+ 1.724 01/10/22 20:59:18 jhay@angel.cids.org.za +1 -0
+ Fix two places where refnumtoa() usage were not converted to the post IPv6 way.
+
+ ntpd/refclock_parse.c
+ 1.19 01/10/22 20:59:17 jhay@angel.cids.org.za +2 -2
+ Fix two places where refnumtoa() usage were not converted to the post IPv6 way.
+
+ChangeSet
+ 1.683.4.15 01/10/20 12:07:53 wink@iris1.saville.com +4 -0
Add support for waiting on an IO event under Windows NT. This improves the responsiveness
of the system when running under NT.
BitKeeper/etc/logging_ok
- 1.3 01/10/20 12:07:50 wink@iris1.saville.com +1 -0
+ 1.1.1.2 01/10/20 12:07:50 wink@iris1.saville.com +1 -0
Logging to logging@openlogging.org accepted
- ntpd/ntpd.c
- 1.36 01/10/20 12:07:43 wink@iris1.saville.com +27 -6
- Add support for waiting on an IO event under Windows NT. This improves the responsiveness
- of the system when running under NT.
+ ports/winnt/ntpd/ntp_iocompletionport.c
+ 1.6 01/10/20 12:07:43 wink@iris1.saville.com +33 -0
+ Add support for waiting on an IO event under to improve responsiveness.
ports/winnt/include/ntp_iocompletionport.h
1.5 01/10/20 12:07:43 wink@iris1.saville.com +2 -0
Add get_io_event
- ports/winnt/ntpd/ntp_iocompletionport.c
- 1.6 01/10/20 12:07:43 wink@iris1.saville.com +33 -0
- Add support for waiting on an IO event under to improve responsiveness.
+ ntpd/ntpd.c
+ 1.33.1.3 01/10/20 12:07:43 wink@iris1.saville.com +27 -6
+ Add support for waiting on an IO event under Windows NT. This improves the responsiveness
+ of the system when running under NT.
+
+ChangeSet
+ 1.723 01/10/20 12:55:32 jhay@angel.cids.org.za +1 -0
+ Make IPv6 multicasting work.
+
+ ntpd/ntp_io.c
+ 1.30 01/10/20 12:55:32 jhay@angel.cids.org.za +3 -3
+ Make IPv6 multicasting work.
+
+ChangeSet
+ 1.720.1.1 01/10/19 17:22:38 jhay@angel.cids.org.za +2 -0
+ Make IPv4 multicastclient work again after the IPv6 merge.
+
+ ntpd/ntp_io.c
+ 1.29 01/10/19 17:22:38 jhay@angel.cids.org.za +1 -15
+ Make IPv4 multicastclient work again after the IPv6 merge.
+
+ include/ntp.h
+ 1.55 01/10/19 17:22:38 jhay@angel.cids.org.za +6 -6
+ Protect the macros with brackets around them.
+
+ChangeSet
+ 1.706.1.18 01/10/18 00:34:09 stenn@whimsy.udel.edu +1 -0
+ #include ntp_machine.h so we can use the P() macros
+ so we can use prototype declarations.
+
+ util/genkeys.c
+ 1.3 01/10/18 00:34:08 stenn@whimsy.udel.edu +5 -4
+ #include ntp_machine.h so we can use the P() macros
+ so we can use prototype declarations.
+
+ChangeSet
+ 1.720 01/10/17 01:49:20 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ configure.in
+ 1.230 01/10/17 01:49:19 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.17 01/10/17 01:44:22 stenn@whimsy.udel.edu +2 -0
+ Changes from Dave Mills:
+ cleanup and portability improvements.
-ChangeSet@1.723, 2001-10-15 23:36:58-04:00, stenn@whimsy.udel.edu
+ ntpd/ntp_loopfilter.c
+ 1.59 01/10/17 01:44:22 stenn@whimsy.udel.edu +1 -2
+ flladj calc cleanup.
+ From: Dave Mills.
+
+ libntp/machines.c
+ 1.12 01/10/17 01:44:22 stenn@whimsy.udel.edu +7 -0
+ Some broken systems don't reset adjtime() when the clock is stepped.
+ From: Dave Mills.
+
+ChangeSet
+ 1.706.1.16 01/10/17 01:19:23 stenn@whimsy.udel.edu +2 -0
+ EVP_mdc2() portability hack.
+ portability improvement to genkey.c.
+
+ util/genkeys.c
+ 1.2 01/10/17 01:19:23 stenn@whimsy.udel.edu +3 -1
+ Define JAN_1970 using the ULONG_CONST macro.
+ Guard the call to EVP_mdc2().
+
+ configure.in
+ 1.226.1.5 01/10/17 01:19:23 stenn@whimsy.udel.edu +1 -0
+ Look for EVP_mdc2; some Linux distros don't have it.
+
+ChangeSet
+ 1.719 01/10/16 00:11:03 stenn@whimsy.udel.edu +2 -0
+ Merge
+
+ libntp/Makefile.am
+ 1.17 01/10/16 00:11:03 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ ntpd/ntp_config.c
+ 1.60 01/10/16 00:06:39 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.15 01/10/15 23:57:46 stenn@whimsy.udel.edu +1 -0
+ Merge
+
+ libntp/Makefile.am
+ 1.12.1.3 01/10/15 23:57:46 stenn@whimsy.udel.edu +0 -0
+ SCCS merged
+
+ChangeSet
+ 1.683.4.14 01/10/15 23:36:58 stenn@whimsy.udel.edu +1 -0
Lose mktime.c snprintf.c strdup.c strerror.c from
EXTRA_libntp_a_SOURCES as they are auto-added by AC_REPLACE_FUNCS
libntp/Makefile.am
- 1.13 01/10/15 23:36:58 stenn@whimsy.udel.edu +2 -2
+ 1.11.2.2 01/10/15 23:36:58 stenn@whimsy.udel.edu +2 -2
Lose mktime.c snprintf.c strdup.c strerror.c from
EXTRA_libntp_a_SOURCES as they are auto-added by AC_REPLACE_FUNCS
-ChangeSet@1.722, 2001-10-11 00:15:50-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.718 01/10/15 19:19:45 jhay@angel.cids.org.za +1 -0
+ Fix a memory leak.
+
+ libntp/netof.c
+ 1.5 01/10/15 19:19:45 jhay@angel.cids.org.za +8 -1
+ Fix a memory leak. Is there a better way?
+
+ChangeSet
+ 1.717 01/10/15 19:18:42 jhay@angel.cids.org.za +1 -0
+ Fixup after latest ntp-dev merge.
+
+ ntpd/ntp_control.c
+ 1.45 01/10/15 19:18:41 jhay@angel.cids.org.za +2 -2
+ Fixup after latest ntp-dev merge.
+
+ChangeSet
+ 1.683.4.13 01/10/11 00:15:50 stenn@whimsy.udel.edu +1 -0
Make a little mirror trigger noise
BitKeeper/triggers/post-incoming.2mirrors
1.4 01/10/11 00:14:58 stenn@whimsy.udel.edu +2 -0
Make a little mirror trigger noise
-ChangeSet@1.721, 2001-10-10 21:14:30-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.1.14 01/10/10 21:22:59 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_config.c
+ 1.52.1.5 01/10/10 21:22:59 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.12 01/10/10 21:14:30 stenn@whimsy.udel.edu +1 -0
Use %u to display the keyid.
From: Simon Burge <simonb@wasabisystems.com>
ntpd/ntp_config.c
- 1.53 01/10/10 21:14:29 stenn@whimsy.udel.edu +2 -2
+ 1.50.3.2 01/10/10 21:14:29 stenn@whimsy.udel.edu +2 -2
Use %u to display the keyid.
From: Simon Burge <simonb@wasabisystems.com>
-ChangeSet@1.720, 2001-10-09 02:04:10-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.716 01/10/09 21:31:44 jhay@angel.cids.org.za +11 -0
+ Merge angel.cids.org.za:/home/ntp/ntp-dev-ipv6
+ into angel.cids.org.za:/export/3-stable/home/ntp/ntp-dev-ipv6
+
+ ntpdate/ntpdate.c
+ 1.28 01/10/09 21:31:43 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ ntpdate/ntpdate.c
+ 1.27 01/10/09 21:31:43 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_restrict.c
+ 1.7 01/10/09 21:31:41 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ ntpd/ntp_restrict.c
+ 1.6 01/10/09 21:31:41 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_request.c
+ 1.29 01/10/09 21:31:39 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ ntpd/ntp_request.c
+ 1.28 01/10/09 21:31:39 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_io.c
+ 1.28 01/10/09 21:31:36 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ ntpd/ntp_io.c
+ 1.27 01/10/09 21:31:36 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_intres.c
+ 1.22 01/10/09 21:31:27 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ ntpd/ntp_intres.c
+ 1.21 01/10/09 21:31:27 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_control.c
+ 1.44 01/10/09 21:31:24 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.43 01/10/09 21:31:24 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_config.c
+ 1.59 01/10/09 21:31:21 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.58 01/10/09 21:31:21 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/Makefile.am
+ 1.16 01/10/09 21:31:13 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ libntp/Makefile.am
+ 1.15 01/10/09 21:31:13 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_stdlib.h
+ 1.15 01/10/09 21:31:11 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ include/ntp_stdlib.h
+ 1.14 01/10/09 21:31:11 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_fp.h
+ 1.6 01/10/09 21:30:59 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ include/ntp_fp.h
+ 1.5 01/10/09 21:30:59 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ configure.in
+ 1.229 01/10/09 21:28:53 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ configure.in
+ 1.228 01/10/09 21:28:53 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ChangeSet
+ 1.712.1.2 01/10/09 21:22:30 jhay@angel.cids.org.za +4 -0
+ Merge bk://ntp.bkserver.net/ntp-dev-ipv6
+ into angel.cids.org.za:/home/ntp/ntp-dev-ipv6
+
+ ntpd/ntp_proto.c
+ 1.104 01/10/09 21:22:29 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ ntpd/ntp_proto.c
+ 1.103 01/10/09 21:22:29 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_io.c
+ 1.24.1.2 01/10/09 21:22:14 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ ntpd/ntp_io.c
+ 1.24.1.1 01/10/09 21:22:14 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_config.c
+ 1.56.1.2 01/10/09 21:21:48 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.56.1.1 01/10/09 21:21:48 jhay@angel.cids.org.za +0 -0
+ Turn on EOLN_NATIVE flag
+
+ BitKeeper/etc/logging_ok
+ 1.6 01/10/09 21:15:27 jhay@angel.cids.org.za +0 -0
+ auto-union
+
+ChangeSet
+ 1.708.1.9 01/10/09 03:49:37 stenn@whimsy.udel.edu +29 -0
+ Automerge, EOLN_NATIVE cleanup, REFID cleanup.
+
+ ntpd/refclock_atom.c
+ 1.37 01/10/09 03:49:36 stenn@whimsy.udel.edu +2 -1
+ REFID cleanup
+
+ ntpd/ntp_refclock.c
+ 1.43 01/10/09 03:49:35 stenn@whimsy.udel.edu +4 -1
+ REFID cleanup.
+
+ ntpd/ntp_control.c
+ 1.41.1.2 01/10/09 03:49:35 stenn@whimsy.udel.edu +1 -1
+ REFID cleanup.
+
+ ntpdate/ntpdate.h
+ 1.7 01/10/09 03:06:43 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpdate/ntpdate.h
+ 1.6 01/10/09 03:06:43 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpdate/ntpdate.c
+ 1.25.1.2 01/10/09 03:06:41 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpdate/ntpdate.c
+ 1.25.1.1 01/10/09 03:06:40 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/refclock_atom.c
+ 1.36 01/10/09 03:06:38 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_util.c
+ 1.18 01/10/09 03:06:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_util.c
+ 1.17 01/10/09 03:06:36 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_restrict.c
+ 1.4.1.2 01/10/09 03:06:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_restrict.c
+ 1.4.1.1 01/10/09 03:06:34 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_resolver.c
+ 1.15 01/10/09 03:06:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_resolver.c
+ 1.14 01/10/09 03:06:31 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_request.c
+ 1.25.1.2 01/10/09 03:06:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_request.c
+ 1.25.1.1 01/10/09 03:06:29 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_refclock.c
+ 1.42 01/10/09 03:06:27 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_proto.c
+ 1.100.1.4 01/10/09 03:06:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_proto.c
+ 1.100.1.3 01/10/09 03:06:23 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_peer.c
+ 1.35 01/10/09 03:06:21 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.34 01/10/09 03:06:20 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_monitor.c
+ 1.7 01/10/09 03:06:18 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_monitor.c
+ 1.6 01/10/09 03:06:18 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_io.c
+ 1.22.1.4 01/10/09 03:06:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_io.c
+ 1.22.1.3 01/10/09 03:06:16 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_intres.c
+ 1.19.1.2 01/10/09 03:06:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_intres.c
+ 1.19.1.1 01/10/09 03:06:14 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_control.c
+ 1.41.1.1 01/10/09 03:05:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_config.c
+ 1.53.1.5 01/10/09 03:05:55 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.53.1.4 01/10/09 03:05:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/cmd_args.c
+ 1.10 01/10/09 03:05:48 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/cmd_args.c
+ 1.9 01/10/09 03:05:47 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/refnumtoa.c
+ 1.4 01/10/09 03:05:38 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/refnumtoa.c
+ 1.3 01/10/09 03:05:38 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/netof.c
+ 1.4 01/10/09 03:05:35 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/netof.c
+ 1.3 01/10/09 03:05:35 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/Makefile.am
+ 1.13.1.2 01/10/09 03:05:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/Makefile.am
+ 1.13.1.1 01/10/09 03:05:32 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/recvbuff.h
+ 1.4 01/10/09 03:05:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/recvbuff.h
+ 1.3 01/10/09 03:05:25 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntpd.h
+ 1.34 01/10/09 03:05:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.33 01/10/09 03:05:16 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_stdlib.h
+ 1.12.1.2 01/10/09 03:05:08 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_stdlib.h
+ 1.12.1.1 01/10/09 03:05:08 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_request.h
+ 1.13 01/10/09 03:05:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_request.h
+ 1.12 01/10/09 03:05:03 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_refclock.h
+ 1.12 01/10/09 03:05:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_refclock.h
+ 1.11 01/10/09 03:05:01 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_fp.h
+ 1.3.1.2 01/10/09 03:04:59 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_fp.h
+ 1.3.1.1 01/10/09 03:04:58 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_control.h
+ 1.18 01/10/09 03:04:56 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_control.h
+ 1.17 01/10/09 03:04:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp.h
+ 1.54 01/10/09 03:04:47 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.53 01/10/09 03:04:47 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ README.bk
+ 1.10 01/10/09 03:04:38 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.19 01/10/09 03:04:37 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.18 01/10/09 03:04:37 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ChangeSet
+ 1.706.1.13 01/10/09 02:57:09 stenn@whimsy.udel.edu +2 -0
+ Lose autokey.
+
+ flock-build
+ 1.24 01/10/09 02:57:09 stenn@whimsy.udel.edu +0 -2
+ Lose autokey.
+
+ configure.in
+ 1.226.1.4 01/10/09 02:57:09 stenn@whimsy.udel.edu +1 -9
+ Lose autokey.
+
+ChangeSet
+ 1.706.1.12 01/10/09 02:19:59 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ configure.in
+ 1.226.1.3 01/10/09 02:19:58 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.4.11 01/10/09 02:04:10 stenn@whimsy.udel.edu +1 -0
Check for clock_gettime().
configure.in
- 1.228 01/10/09 02:04:09 stenn@whimsy.udel.edu +1 -1
+ 1.219.3.6 01/10/09 02:04:09 stenn@whimsy.udel.edu +1 -1
Check for clock_gettime().
-ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.1.11 01/10/08 23:13:17 stenn@whimsy.udel.edu +149 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev-hms
+
+ util/ntp-genkeys.c
+ 1.60 01/10/08 23:13:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ util/ntp-genkeys.c
+ 1.59 01/10/08 23:13:15 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ util/Makefile.am
+ 1.13 01/10/08 23:13:08 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ util/Makefile.am
+ 1.12 01/10/08 23:13:08 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpq/ntpq.c
+ 1.19 01/10/08 23:13:05 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpq/ntpq.c
+ 1.18 01/10/08 23:13:05 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpq/Makefile.am
+ 1.7 01/10/08 23:13:01 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpq/Makefile.am
+ 1.6 01/10/08 23:13:01 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpdc/ntpdc.c
+ 1.11 01/10/08 23:12:50 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpdc/ntpdc.c
+ 1.10 01/10/08 23:12:50 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpdc/Makefile.am
+ 1.6 01/10/08 23:12:38 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpdc/Makefile.am
+ 1.5 01/10/08 23:12:38 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpdate/Makefile.am
+ 1.8 01/10/08 23:12:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpdate/Makefile.am
+ 1.7 01/10/08 23:12:33 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/refclock_local.c
+ 1.7 01/10/08 23:12:21 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/refclock_local.c
+ 1.5.1.2 01/10/08 23:12:20 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/refclock_conf.c
+ 1.16 01/10/08 23:12:16 stenn@whimsy.udel.edu +0 -8
+ Auto merged
+
+ ntpd/refclock_conf.c
+ 1.15 01/10/08 23:12:16 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/refclock_atom.c
+ 1.34.1.2 01/10/08 23:12:13 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/refclock_atom.c
+ 1.34.2.2 01/10/08 23:12:13 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntpd.c
+ 1.37 01/10/08 23:12:06 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntpd.c
+ 1.36 01/10/08 23:12:06 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_util.c
+ 1.15.1.2 01/10/08 23:12:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_util.c
+ 1.15.1.1 01/10/08 23:12:03 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_timer.c
+ 1.20 01/10/08 23:11:57 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_timer.c
+ 1.19 01/10/08 23:11:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_request.c
+ 1.24.1.2 01/10/08 23:11:54 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_request.c
+ 1.24.1.1 01/10/08 23:11:54 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_refclock.c
+ 1.40.1.3 01/10/08 23:11:49 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_refclock.c
+ 1.40.1.2 01/10/08 23:11:49 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_proto.c
+ 1.99.1.4 01/10/08 23:11:43 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_proto.c
+ 1.99.1.3 01/10/08 23:11:43 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_peer.c
+ 1.32.1.2 01/10/08 23:11:39 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.32.1.1 01/10/08 23:11:39 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_loopfilter.c
+ 1.58 01/10/08 23:11:35 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_loopfilter.c
+ 1.57 01/10/08 23:11:35 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_io.c
+ 1.21.1.3 01/10/08 23:11:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_io.c
+ 1.21.1.2 01/10/08 23:11:29 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_crypto.c
+ 1.48 01/10/08 23:11:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_crypto.c
+ 1.47 01/10/08 23:11:25 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_control.c
+ 1.39.1.4 01/10/08 23:11:22 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.39.1.3 01/10/08 23:11:22 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_config.c
+ 1.52.1.4 01/10/08 23:11:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.52.1.3 01/10/08 23:11:15 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/Makefile.am
+ 1.22 01/10/08 23:11:11 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ ntpd/Makefile.am
+ 1.21 01/10/08 23:11:10 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/statestr.c
+ 1.5 01/10/08 23:10:59 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/statestr.c
+ 1.4 01/10/08 23:10:59 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/clocktypes.c
+ 1.10 01/10/08 23:10:54 stenn@whimsy.udel.edu +0 -2
+ Auto merged
+
+ libntp/clocktypes.c
+ 1.9 01/10/08 23:10:54 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/authusekey.c
+ 1.6 01/10/08 23:10:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/authusekey.c
+ 1.5 01/10/08 23:10:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/authreadkeys.c
+ 1.6 01/10/08 23:10:43 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/authreadkeys.c
+ 1.5 01/10/08 23:10:43 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/authkeys.c
+ 1.9 01/10/08 23:10:40 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/authkeys.c
+ 1.8 01/10/08 23:10:40 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/a_md5encrypt.c
+ 1.8 01/10/08 23:10:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/a_md5encrypt.c
+ 1.7 01/10/08 23:10:34 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/Makefile.am
+ 1.12.1.2 01/10/08 23:10:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/Makefile.am
+ 1.12.1.1 01/10/08 23:10:31 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntpd.h
+ 1.31.1.2 01/10/08 23:10:20 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntpd.h
+ 1.31.1.1 01/10/08 23:10:20 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_stdlib.h
+ 1.11.1.2 01/10/08 23:10:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_stdlib.h
+ 1.11.1.1 01/10/08 23:10:15 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_refclock.h
+ 1.9.1.2 01/10/08 23:10:13 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_refclock.h
+ 1.9.2.2 01/10/08 23:10:12 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_machine.h
+ 1.11 01/10/08 23:10:07 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_machine.h
+ 1.10 01/10/08 23:10:07 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_crypto.h
+ 1.23 01/10/08 23:10:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_crypto.h
+ 1.22 01/10/08 23:10:03 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_control.h
+ 1.15.1.2 01/10/08 23:09:53 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_control.h
+ 1.15.1.1 01/10/08 23:09:53 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp_config.h
+ 1.14 01/10/08 23:09:47 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_config.h
+ 1.13 01/10/08 23:09:47 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/ntp.h
+ 1.50.1.4 01/10/08 23:09:44 stenn@whimsy.udel.edu +0 -2
+ Auto merged
+
+ include/ntp.h
+ 1.50.1.3 01/10/08 23:09:43 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ conf/rackety.conf
+ 1.4 01/10/08 23:09:41 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ conf/rackety.conf
+ 1.3 01/10/08 23:09:41 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ conf/pogo.conf
+ 1.5 01/10/08 23:09:39 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ conf/pogo.conf
+ 1.4 01/10/08 23:09:38 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ conf/malarky.conf
+ 1.4 01/10/08 23:09:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ conf/malarky.conf
+ 1.3 01/10/08 23:09:36 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ conf/grundoon.conf
+ 1.5 01/10/08 23:09:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ conf/grundoon.conf
+ 1.4 01/10/08 23:09:32 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ conf/README
+ 1.6 01/10/08 23:09:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ conf/README
+ 1.5 01/10/08 23:09:28 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ports/winnt/include/config.h
+ 1.12 01/10/08 23:09:24 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ports/winnt/include/config.h
+ 1.11 01/10/08 23:09:24 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/refclock.htm
+ 1.17 01/10/08 23:09:15 stenn@whimsy.udel.edu +0 -8
+ Auto merged
+
+ html/tickadj.htm
+ 1.7 01/10/08 23:09:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/release.htm
+ 1.17 01/10/08 23:09:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/refclock.htm
+ 1.16 01/10/08 23:09:15 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/rdebug.htm
+ 1.6 01/10/08 23:09:07 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/qth.htm
+ 1.5 01/10/08 23:09:06 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/quick.htm
+ 1.6 01/10/08 23:09:06 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/qth.htm
+ 1.4 01/10/08 23:09:06 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/prefer.htm
+ 1.6 01/10/08 23:08:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/pps.htm
+ 1.10 01/10/08 23:08:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/porting.htm
+ 1.5 01/10/08 23:08:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/patches.htm
+ 1.6 01/10/08 23:08:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/parsenew.htm
+ 1.3 01/10/08 23:08:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/parsedata.htm
+ 1.5 01/10/08 23:08:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/ntptrace.htm
+ 1.6 01/10/08 23:08:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/ntptime.htm
+ 1.8 01/10/08 23:08:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/ntpq.htm
+ 1.10 01/10/08 23:08:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/ntpdc.htm
+ 1.7 01/10/08 23:08:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/ntpdate.htm
+ 1.7 01/10/08 23:08:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/ntpd.htm
+ 1.15 01/10/08 23:08:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/notes.htm
+ 1.7 01/10/08 23:08:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/mx4200data.htm
+ 1.6 01/10/08 23:08:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/monopt.htm
+ 1.9 01/10/08 23:08:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/miscopt.htm
+ 1.13 01/10/08 23:08:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/measure.htm
+ 1.5 01/10/08 23:08:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/leap.htm
+ 1.3 01/10/08 23:08:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/ldisc.htm
+ 1.4 01/10/08 23:08:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/kernpps.htm
+ 1.5 01/10/08 23:08:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/kern.htm
+ 1.7 01/10/08 23:08:31 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/index.htm
+ 1.12 01/10/08 23:08:30 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/htmlprimer.htm
+ 1.3 01/10/08 23:08:30 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/howto.htm
+ 1.6 01/10/08 23:08:30 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/hints.htm
+ 1.5 01/10/08 23:08:30 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/genkeys.htm
+ 1.8 01/10/08 23:08:30 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/gadget.htm
+ 1.5 01/10/08 23:08:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/extern.htm
+ 1.6 01/10/08 23:08:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/exec.htm
+ 1.8 01/10/08 23:08:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver9.htm
+ 1.6 01/10/08 23:08:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver8.htm
+ 1.5 01/10/08 23:08:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver7.htm
+ 1.11 01/10/08 23:08:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver6.htm
+ 1.6 01/10/08 23:08:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver5.htm
+ 1.4 01/10/08 23:08:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver4.htm
+ 1.5 01/10/08 23:08:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver39.htm
+ 1.4 01/10/08 23:08:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver38.htm
+ 1.4 01/10/08 23:08:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver37.htm
+ 1.4 01/10/08 23:08:28 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver36.htm
+ 1.8 01/10/08 23:08:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver35.htm
+ 1.7 01/10/08 23:08:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver34.htm
+ 1.4 01/10/08 23:08:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver33.htm
+ 1.5 01/10/08 23:08:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver32.htm
+ 1.5 01/10/08 23:08:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver30.htm
+ 1.8 01/10/08 23:08:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver3.htm
+ 1.4 01/10/08 23:08:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver29.htm
+ 1.4 01/10/08 23:08:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver28.htm
+ 1.4 01/10/08 23:08:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver27.htm
+ 1.4 01/10/08 23:08:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver26.htm
+ 1.3 01/10/08 23:08:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver24.htm
+ 1.3 01/10/08 23:08:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver23.htm
+ 1.5 01/10/08 23:08:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver22.htm
+ 1.8 01/10/08 23:08:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver20.htm
+ 1.6 01/10/08 23:08:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver2.htm
+ 1.4 01/10/08 23:08:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver19.htm
+ 1.4 01/10/08 23:08:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver18.htm
+ 1.4 01/10/08 23:08:25 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver16.htm
+ 1.3 01/10/08 23:08:24 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver12.htm
+ 1.4 01/10/08 23:08:24 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver11.htm
+ 1.4 01/10/08 23:08:24 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver10.htm
+ 1.4 01/10/08 23:08:24 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/driver1.htm
+ 1.5 01/10/08 23:08:24 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/debug.htm
+ 1.8 01/10/08 23:08:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/copyright.htm
+ 1.19 01/10/08 23:08:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/confopt.htm
+ 1.17 01/10/08 23:08:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/config.htm
+ 1.7 01/10/08 23:08:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/clockopt.htm
+ 1.9 01/10/08 23:08:22 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/clockopt.htm
+ 1.7.1.2 01/10/08 23:08:22 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/build.htm
+ 1.9 01/10/08 23:08:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/biblio.htm
+ 1.6 01/10/08 23:08:16 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/authopt.htm
+ 1.14 01/10/08 23:08:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/audio.htm
+ 1.7 01/10/08 23:08:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/assoc.htm
+ 1.9 01/10/08 23:08:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/accopt.htm
+ 1.9 01/10/08 23:08:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ html/Oncore-SHMEM.htm
+ 1.4 01/10/08 23:08:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-ntp_update~382c0630
+ 1.9 01/10/08 23:08:14 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-ntp_update~382c0630
+ 1.8 01/10/08 23:08:14 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ BitKeeper/deleted/.del-README.rsa~6f1a085f
+ 1.6 01/10/08 23:08:12 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-README.rsa~6f1a085f
+ 1.5 01/10/08 23:08:11 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ BitKeeper/deleted/.del-README.des~3aed0663
+ 1.9 01/10/08 23:08:08 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-README.des~3aed0663
+ 1.8 01/10/08 23:08:08 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ BitKeeper/deleted/.del-Makefile.am~e832209e
+ 1.17 01/10/08 23:07:44 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-Makefile.am~e832209e
+ 1.16 01/10/08 23:07:44 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ BitKeeper/deleted/.del-authparity.c~3aed0663
+ 1.6 01/10/08 23:06:58 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-authparity.c~3aed0663
+ 1.5 01/10/08 23:06:58 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ BitKeeper/deleted/.del-authencrypt.c~3aed0663
+ 1.8 01/10/08 23:06:46 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-authencrypt.c~3aed0663
+ 1.7 01/10/08 23:06:46 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ BitKeeper/deleted/.del-dewey.conf~3e480692
+ 1.4 01/10/08 23:06:30 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-dewey.conf~3e480692
+ 1.3 01/10/08 23:06:30 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ BitKeeper/deleted/.del-README.cvs~1e180ca3
+ 1.9 01/10/08 23:06:27 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-README.cvs~1e180ca3
+ 1.8 01/10/08 23:06:27 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ configure.in
+ 1.226.1.2 01/10/08 23:06:18 stenn@whimsy.udel.edu +0 -9
+ Auto merged
+
+ BitKeeper/etc/config
+ 1.6 01/10/08 23:06:19 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.226.1.1 01/10/08 23:06:18 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ build
+ 1.19 01/10/08 23:06:15 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ build
+ 1.18 01/10/08 23:06:15 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ acinclude.m4
+ 1.6 01/10/08 23:06:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ acinclude.m4
+ 1.5 01/10/08 23:06:03 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ acconfig.h
+ 1.28 01/10/08 23:05:57 stenn@whimsy.udel.edu +0 -3
+ Auto merged
+
+ acconfig.h
+ 1.27 01/10/08 23:05:56 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ README
+ 1.18 01/10/08 23:05:51 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ README
+ 1.17 01/10/08 23:05:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ README.bk
+ 1.7.1.2 01/10/08 23:05:39 stenn@whimsy.udel.edu +1 -3
+ Auto merged
+
+ NEWS
+ 1.34 01/10/08 23:05:39 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ NEWS
+ 1.33 01/10/08 23:05:38 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ Makefile.am
+ 1.16.1.2 01/10/08 23:03:40 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.16.1.1 01/10/08 23:03:40 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ BitKeeper/deleted/.del-pre-apply.paranoid
+ 1.3 01/10/08 23:03:00 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/triggers/pre-apply.paranoid
+
+ BitKeeper/deleted/.del-post-incoming.2mirrors
+ 1.2 01/10/08 23:02:49 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/triggers/post-incoming.2mirrors
+
+ BitKeeper/deleted/.del-post-commit.changelog
+ 1.6 01/10/08 23:02:18 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/triggers/post-commit.changelog
+
+ BitKeeper/deleted/.del-notify
+ 1.3 01/10/08 23:01:58 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/triggers/notify
+
+ BitKeeper/deleted/.del-00-list
+ 1.3 01/10/08 23:01:44 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/triggers/00-list
+
+ BitKeeper/deleted/.del-refclock_jjy.c
+ 1.3 01/10/08 23:01:17 stenn@whimsy.udel.edu +0 -0
+ Delete: ntpd/refclock_jjy.c
+
+ BitKeeper/deleted/.del-ntp_update~382c0630
+ 1.6.1.5 01/10/08 22:55:52 stenn@whimsy.udel.edu +0 -0
+ Merge rename: ntp_update -> BitKeeper/deleted/.del-ntp_update~382c0630
+
+ BitKeeper/deleted/.del-dewey.conf~3e480692
+ 1.1.1.2 01/10/08 22:55:52 stenn@whimsy.udel.edu +0 -0
+ Merge rename: conf/dewey.conf -> BitKeeper/deleted/.del-dewey.conf~3e480692
+
+ BitKeeper/deleted/.del-authparity.c~3aed0663
+ 1.3.1.2 01/10/08 22:55:52 stenn@whimsy.udel.edu +0 -0
+ Merge rename: libntp/authparity.c -> BitKeeper/deleted/.del-authparity.c~3aed0663
+
+ BitKeeper/deleted/.del-authencrypt.c~3aed0663
+ 1.4.1.2 01/10/08 22:55:52 stenn@whimsy.udel.edu +0 -0
+ Merge rename: libntp/authencrypt.c -> BitKeeper/deleted/.del-authencrypt.c~3aed0663
+
+ BitKeeper/deleted/.del-README.rsa~6f1a085f
+ 1.3.1.5 01/10/08 22:55:52 stenn@whimsy.udel.edu +0 -0
+ Merge rename: README.rsa -> BitKeeper/deleted/.del-README.rsa~6f1a085f
+
+ BitKeeper/deleted/.del-README.des~3aed0663
+ 1.6.1.5 01/10/08 22:55:52 stenn@whimsy.udel.edu +0 -0
+ Merge rename: README.des -> BitKeeper/deleted/.del-README.des~3aed0663
+
+ BitKeeper/deleted/.del-Makefile.am~e832209e
+ 1.14.1.2 01/10/08 22:55:52 stenn@whimsy.udel.edu +0 -0
+ Merge rename: librsaref/Makefile.am -> BitKeeper/deleted/.del-Makefile.am~e832209e
+
+ BitKeeper/deleted/.del-README.cvs~1e180ca3
+ 1.6.1.5 01/10/08 22:55:51 stenn@whimsy.udel.edu +0 -0
+ Merge rename: README.cvs -> BitKeeper/deleted/.del-README.cvs~1e180ca3
+
+ BitKeeper/etc/logging_ok
+ 1.3.1.2 01/10/08 22:55:47 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge'
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.4 01/10/08 22:55:46 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.3.1.1 01/10/08 22:55:45 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge rename'
+
+ BitKeeper/etc/logging_ok
+ 1.3 01/10/08 22:55:44 stenn@whimsy.udel.edu +0 -0
+ auto-union
+
+ BitKeeper/etc/ignore
+ 1.12 01/10/08 22:55:44 stenn@whimsy.udel.edu +3 -24
+ auto-union
+
+ChangeSet
+ 1.706.1.10 01/10/08 22:36:23 stenn@whimsy.udel.edu +89 -0
+ Cleanup and improvements from Dave Mills.
+
+ ntpd/refclock_local.c
+ 1.5.1.1 01/10/08 22:36:20 stenn@whimsy.udel.edu +1 -1
+ The stratum is in pp, not peer.
+
+ ntpd/refclock_atom.c
+ 1.34.2.1 01/10/08 22:36:20 stenn@whimsy.udel.edu +12 -8
+ Cleanup and improvements.
+
+ ntpd/ntp_refclock.c
+ 1.40.1.1 01/10/08 22:36:20 stenn@whimsy.udel.edu +8 -13
+ Cleanup and improvements.
+
+ BitKeeper/etc/ignore
+ 1.11 01/10/08 22:36:20 stenn@whimsy.udel.edu +3 -0
+ Added ntpd/atom.bak ntpd/atom.c ntpd/ntp_proto.c.2 to the ignore list
+
+ ntpd/ntp_proto.c
+ 1.99.1.2 01/10/08 22:36:19 stenn@whimsy.udel.edu +77 -123
+ Comment cleanup.
+ Improvements and cleanup.
+
+ ntpd/ntp_loopfilter.c
+ 1.56 01/10/08 22:36:19 stenn@whimsy.udel.edu +1 -1
+ Use clock_offset, not fp_offset.
+
+ ntpd/ntp_control.c
+ 1.39.1.2 01/10/08 22:36:19 stenn@whimsy.udel.edu +11 -7
+ REFID cleanup.
+
+ include/ntp_refclock.h
+ 1.9.2.1 01/10/08 22:36:18 stenn@whimsy.udel.edu +1 -0
+ Lose unused stratum variable.
+
+ include/ntp.h
+ 1.50.1.2 01/10/08 22:36:18 stenn@whimsy.udel.edu +1 -1
+ Comment cleanup
+
+ html/refclock.htm
+ 1.15 01/10/08 22:36:18 stenn@whimsy.udel.edu +6 -5
+ Cleanup from Dave Mills.
+
+ html/qth.htm
+ 1.3 01/10/08 22:36:18 stenn@whimsy.udel.edu +2 -28
+ Cleanup from Dave Mills.
+
+ html/driver40.htm
+ 1.2 01/10/08 22:36:18 stenn@whimsy.udel.edu +87 -178
+ Convert to NTP-style format
+
+ html/clockopt.htm
+ 1.7.1.1 01/10/08 22:36:18 stenn@whimsy.udel.edu +182 -39
+ Clean up.
+
+ChangeSet
+ 1.683.4.10 01/10/08 21:51:07 stenn@whimsy.udel.edu +548 -0
Use EOLN_NATIVE.
ElectricFence/tstheap.c
@@ -902,6 +19156,10 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.7 01/10/08 21:18:40 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
+ util/timetrim.c
+ 1.3 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
util/tickadj.c
1.5 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -914,31 +19172,27 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- util/timetrim.c
- 1.3 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/CHANGES
+ ElectricFence/eftest.c
1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ElectricFence/COPYING
+ ElectricFence/efence.h
1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ElectricFence/Makefile-
+ ElectricFence/efence.c
1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ElectricFence/efence.h
+ ElectricFence/Makefile-
1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ElectricFence/efence.c
+ ElectricFence/COPYING
1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ElectricFence/eftest.c
+ ElectricFence/CHANGES
1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -950,34 +19204,38 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.3 01/10/08 21:18:38 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- util/jitter.c
- 1.3 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
+ util/ntptime.c
+ 1.14 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- util/kern.c
- 1.3 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
+ util/ntp-genkeys.c
+ 1.56.1.3 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
util/longsize.c
1.2 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- util/ntp-genkeys.c
- 1.59 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
+ util/kern.c
+ 1.3 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- util/ntptime.c
- 1.14 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
+ util/jitter.c
+ 1.3 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
util/Makefile.am
- 1.10 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
+ 1.9.1.1 01/10/08 21:18:37 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
util/hist.c
1.5 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
+ util/byteorder.c
+ 1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
util/ansi2knr.c
1.3 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -986,10 +19244,6 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- util/byteorder.c
- 1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
scripts/support/etc/setup
1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1010,30 +19264,42 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/rc1/postinstall
+ scripts/rc2/local.ntpd
1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/rc1/preremove
+ scripts/rc1/xntp
1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/rc1/preinstall
+ scripts/rc1/prototype
1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/rc1/xntp
+ scripts/rc1/preremove
1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/rc2/local.ntpd
+ scripts/rc1/preinstall
1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/rc1/prototype
+ scripts/rc1/postinstall
1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
+ scripts/support/conf/tickconf
+ 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ scripts/support/conf/sun4.sun4m
+ 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ scripts/support/conf/sun4.sun4m.faui45m
+ 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
scripts/support/conf/sun4.sun4m.faui42
1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1062,42 +19328,50 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/support/conf/hp700.hp700
+ scripts/support/conf/ntp.conf
1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/support/conf/hp700.hp700.faui47
+ scripts/support/conf/hp800.hp800
1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/support/conf/hp300.hp300
+ scripts/support/conf/hp700.hp700
1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/support/conf/sun4.sun4m.faui45m
+ scripts/support/conf/hp700.hp700.faui47
1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/support/conf/hp800.hp800
+ scripts/support/conf/hp300.hp300
1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/support/conf/tickconf
- 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
+ scripts/support/bin/mvstats
+ 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/support/conf/ntp.conf
- 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
+ scripts/support/bin/monl
+ 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/support/conf/sun4.sun4m
- 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
+ scripts/support/README
+ 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ scripts/stats/tdata.awk
+ 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
scripts/stats/tdata.S
1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
+ scripts/stats/summary.sh
+ 1.3 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
scripts/stats/psummary.awk
1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1126,14 +19400,6 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/stats/summary.sh
- 1.3 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/stats/tdata.awk
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
scripts/stats/README
1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1146,23 +19412,19 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/support/README
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/support/bin/monl
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
+ scripts/stats/etf.awk
+ 1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/support/bin/mvstats
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
+ scripts/stats/etf.S
+ 1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
scripts/stats/ensemble.awk
1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/stats/etf.awk
+ scripts/stats/ensemble.S
1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1174,28 +19436,24 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/stats/ensemble.S
+ scripts/monitoring/timelocal.pl
1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/stats/etf.S
+ scripts/monitoring/ntptrap
1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/monitoring/README
- 1.3 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
scripts/monitoring/ntploopwatch
1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/monitoring/ntptrap
- 1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
+ scripts/monitoring/README
+ 1.3 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/monitoring/timelocal.pl
- 1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
+ scripts/summary.in
+ 1.2 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
scripts/plot_summary.in
@@ -1214,10 +19472,6 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.5 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/summary.in
- 1.2 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
scripts/monitoring/ntploopstat
1.3 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1234,7 +19488,7 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/ntp-groper
+ scripts/ntp-status
1.2 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1242,7 +19496,7 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.3 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- scripts/ntp-status
+ scripts/ntp-groper
1.2 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1282,59 +19536,59 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.8 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/arpa/inet.h
+ ports/winnt/include/sys/wait.h
1.3 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/netinet/in.h
+ ports/winnt/include/sys/time.h
1.3 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/netinet/in_system.h
- 1.2 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/include/sys/socket.h
+ 1.3 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ports/winnt/include/netinet/ip.h
1.2 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/sys/socket.h
- 1.3 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/include/netinet/in_system.h
+ 1.2 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/sys/time.h
+ ports/winnt/include/netinet/in.h
1.3 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/sys/wait.h
+ ports/winnt/include/arpa/inet.h
1.3 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/sys/signal.h
- 1.3 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/include/win32_io.h
+ 1.4 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/sys/ioctl.h
- 1.4 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/include/unistd.h
+ 1.2 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/sys/param.h
+ ports/winnt/include/transmitbuff.h
1.3 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/sys/resource.h
+ ports/winnt/include/sys/signal.h
1.3 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/transmitbuff.h
+ ports/winnt/include/sys/resource.h
1.3 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/unistd.h
- 1.2 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/include/sys/param.h
+ 1.3 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/win32_io.h
+ ports/winnt/include/sys/ioctl.h
1.4 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1342,10 +19596,6 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.5 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/netdb.h
- 1.3 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
ports/winnt/include/termios.h
1.2 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1354,62 +19604,70 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.3 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/clockstuff.h
+ ports/winnt/include/ntp_timer.h
+ 1.3 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ports/winnt/include/ntp_iocompletionport.h
1.4 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/config.h
- 1.10 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/include/netdb.h
+ 1.3 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ports/winnt/include/hopf_PCI_io.h
1.2 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/ntp_timer.h
- 1.3 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/include/config.h
+ 1.9.1.1 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/include/ntp_iocompletionport.h
+ ports/winnt/include/clockstuff.h
1.4 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/libntp/SetSystemTime.c
+ ports/winnt/ntpd/refclock_trimbledc.h
1.3 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/libntp/log.h
- 1.3 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/ntpd/refclock_trimbledc.c
+ 1.4 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ports/winnt/ntpd/ntp_iocompletionport.c
1.5 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/libntp/mexit.c
- 1.3 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
ports/winnt/libntp/util_clockstuff.c
1.3 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/ntpd/refclock_trimbledc.c
+ ports/winnt/libntp/transmitbuff.c
1.4 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
+ ports/winnt/libntp/mexit.c
+ 1.3 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
ports/winnt/libntp/messages.mc
1.3 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/libntp/transmitbuff.c
- 1.4 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/libntp/log.h
+ 1.3 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/ntpd/refclock_trimbledc.h
+ ports/winnt/libntp/SetSystemTime.c
1.3 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
+ ports/winnt/scripts/mkver.bat
+ 1.4 01/10/08 21:18:26 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
ports/winnt/ntpd/win32_io.c
1.5 01/10/08 21:18:26 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1422,10 +19680,6 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:26 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/scripts/mkver.bat
- 1.4 01/10/08 21:18:26 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
parseutil/testdcf.c
1.3 01/10/08 21:18:26 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1471,11 +19725,11 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
ntpq/ntpq.c
- 1.17 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
+ 1.16.1.1 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpq/Makefile.am
- 1.5 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
+ 1.4.1.1 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpdc/ntpdc_ops.c
@@ -1487,7 +19741,7 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
ntpdc/ntpdc.c
- 1.9 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
+ 1.8.1.1 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpdc/README
@@ -1495,7 +19749,7 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
ntpdc/Makefile.am
- 1.4 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpdate/ntptimeset.c
@@ -1507,15 +19761,15 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
ntpdate/ntpdate.h
- 1.5 01/10/08 21:18:23 stenn@whimsy.udel.edu +0 -0
+ 1.4.1.1 01/10/08 21:18:23 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpdate/ntpdate.c
- 1.25 01/10/08 21:18:23 stenn@whimsy.udel.edu +0 -0
+ 1.23.1.2 01/10/08 21:18:23 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpdate/Makefile.am
- 1.6 01/10/08 21:18:23 stenn@whimsy.udel.edu +0 -0
+ 1.5.1.1 01/10/08 21:18:23 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpdate/README
@@ -1549,6 +19803,10 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.7 01/10/08 21:18:21 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
+ ntpd/refclock_tpro.c
+ 1.6 01/10/08 21:18:21 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
ntpd/refclock_shm.c
1.10 01/10/08 21:18:21 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1557,10 +19815,6 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:21 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ntpd/refclock_tpro.c
- 1.6 01/10/08 21:18:21 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
ntpd/refclock_parse.c
1.18 01/10/08 21:18:21 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1589,6 +19843,10 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.6 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
+ ntpd/refclock_pcf.c
+ 1.6 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
ntpd/refclock_msfees.c
1.8 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1605,10 +19863,6 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.8 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ntpd/refclock_pcf.c
- 1.6 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
ntpd/refclock_irig.c
1.9 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1646,7 +19900,7 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
ntpd/refclock_conf.c
- 1.15 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
+ 1.13.1.2 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/refclock_chu.c
@@ -1662,7 +19916,7 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
ntpd/refclock_atom.c
- 1.35 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
+ 1.34.1.1 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/refclock_as2201.c
@@ -1681,56 +19935,52 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.8 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ntpd/ntp_timer.c
- 1.17 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
ntpd/ntp_util.c
- 1.15 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
+ 1.14.2.1 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ntpd/ntp_peer.c
- 1.30 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
+ ntpd/ntp_timer.c
+ 1.15.1.2 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_restrict.c
- 1.4 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_resolver.c
- 1.13 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
+ 1.11.1.2 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_request.c
- 1.24 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
+ 1.23.2.1 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_refclock.c
- 1.40 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
+ 1.39.2.1 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_proto.c
- 1.95 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
+ 1.93.2.2 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_peer.c
+ 1.29.2.1 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_monitor.c
- 1.5 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
+ 1.4.1.1 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_loopfilter.c
- 1.54 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
+ 1.53.1.1 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntpd.c
- 1.35 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/ntp_control.c
- 1.39 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
+ 1.33.1.2 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_intres.c
- 1.19 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
+ 1.17.1.2 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_filegen.c
@@ -1738,11 +19988,15 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
ntpd/ntp_crypto.c
- 1.44 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
+ 1.43.1.1 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ ntpd/ntp_control.c
+ 1.37.3.2 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_config.c
- 1.52 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
+ 1.50.3.1 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/map_vme.c
@@ -1754,19 +20008,19 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
ntpd/Makefile.am
- 1.20 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
+ 1.18.2.2 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ntpd/ntp_io.c
- 1.22 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
+ 1.20.2.2 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ntpd/check_y2k.c
- 1.6 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
+ ntpd/cmd_args.c
+ 1.7.1.1 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ntpd/cmd_args.c
- 1.8 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
+ ntpd/check_y2k.c
+ 1.6 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
libparse/trim_info.c
@@ -1905,16 +20159,8 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.4 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/octtoint.c
- 1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/README
- 1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
libntp/statestr.c
- 1.3 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
libntp/snprintf.c
@@ -1922,7 +20168,7 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
libntp/refnumtoa.c
- 1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.1 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
libntp/recvbuff.c
@@ -1941,7 +20187,7 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.3 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/msutotsf.c
+ libntp/octtoint.c
1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1954,26 +20200,26 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
libntp/netof.c
- 1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.1 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
libntp/msyslog.c
1.11 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/Makefile.am
- 1.12 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
+ libntp/msutotsf.c
+ 1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/mstolfp.c
- 1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
+ libntp/README
+ 1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/modetoa.c
+ libntp/mstolfp.c
1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/mfptoa.c
+ libntp/modetoa.c
1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -1985,11 +20231,11 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/mfp_mul.c
- 1.3 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
+ libntp/mfptoa.c
+ 1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/humandate.c
+ libntp/mfp_mul.c
1.3 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2013,31 +20259,43 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/ieee754io.c
- 1.4 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
+ libntp/lib_strbuf.h
+ 1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/lib_strbuf.c
+ 1.3 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
libntp/iosignal.c
1.8 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/lib_strbuf.c
+ libntp/ieee754io.c
+ 1.4 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/humandate.c
1.3 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/lib_strbuf.h
- 1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
+ libntp/Makefile.am
+ 1.11.2.1 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/fptoa.c
+ libntp/inttoa.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/fptoms.c
+ libntp/icom.c
+ 1.7 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/hextolfp.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/getopt.c
+ libntp/hextoint.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2045,23 +20303,19 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.5 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/calyearstart.c
+ libntp/getopt.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/clocktime.c
+ libntp/fptoms.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/findconfig.c
+ libntp/fptoa.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/icom.c
- 1.7 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/inttoa.c
+ libntp/findconfig.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2069,14 +20323,10 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.5 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/calleapwhen.c
+ libntp/dolfptoa.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/clocktypes.c
- 1.9 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
libntp/dofptoa.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2085,15 +20335,19 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/hextolfp.c
+ libntp/clocktypes.c
+ 1.7.1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ libntp/clocktime.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/dolfptoa.c
+ libntp/calyearstart.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- libntp/hextoint.c
+ libntp/calleapwhen.c
1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2114,23 +20368,23 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
libntp/authusekey.c
- 1.4 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
libntp/authreadkeys.c
- 1.4 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
libntp/authparity.c
- 1.4 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
libntp/authkeys.c
- 1.7 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
+ 1.6.1.1 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
libntp/authencrypt.c
- 1.5 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
+ 1.4.1.1 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
libntp/audio.c
@@ -2158,7 +20412,7 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
libntp/a_md5encrypt.c
- 1.6 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
+ 1.5.1.1 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
kernel/tty_clk_STREAMS.c
@@ -2237,20 +20491,12 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/README
- 1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/ntp_request.h
- 1.11 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
include/trimble.h
1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
include/recvbuff.h
- 1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.1 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
include/parse_conf.h
@@ -2261,10 +20507,6 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.4 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/ntp_select.h
- 1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
include/ntp_unixtime.h
1.3 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2273,10 +20515,6 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.4 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/ntp_stdlib.h
- 1.11 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
include/ntp_syslog.h
1.3 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2289,40 +20527,28 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/ntp_io.h
- 1.3 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/ntp_config.h
- 1.12 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
+ include/ntp_stdlib.h
+ 1.10.2.1 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/ntp_tty.h
- 1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
+ include/ntp_select.h
+ 1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/ntp.h
- 1.49 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
+ include/ntp_request.h
+ 1.10.1.1 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/ntp_calendar.h
- 1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
+ include/README
+ 1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/ntp_cmdargs.h
+ include/ntp_tty.h
1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
include/ntp_refclock.h
- 1.10 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/ntp_control.h
- 1.14 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/ntp_crypto.h
- 1.21 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
+ 1.9.1.1 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
include/ntp_proto.h
@@ -2334,11 +20560,11 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
include/ntp_machine.h
- 1.9 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
+ 1.7.1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/ntp_datum.h
- 1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
+ include/ntp_io.h
+ 1.3 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
include/ntp_if.h
@@ -2346,43 +20572,43 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
include/ntp_fp.h
- 1.3 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
include/ntp_filegen.h
1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/ntpd.h
- 1.28 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ include/ntp_datum.h
+ 1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/Makefile.am
- 1.12 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ include/ntp_crypto.h
+ 1.20.1.1 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/adjtime.h
- 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ include/ntp_control.h
+ 1.13.2.1 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/l_stdlib.h
- 1.8 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ include/ntp_config.h
+ 1.11.1.1 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/mbg_gps166.h
- 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ include/ntp_cmdargs.h
+ 1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/ascii.h
- 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ include/ntp_calendar.h
+ 1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/iosignal.h
- 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ include/ntp.h
+ 1.47.3.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- include/audio.h
- 1.3 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ include/ntpd.h
+ 1.27.2.1 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
include/ntif.h
@@ -2397,6 +20623,18 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
+ include/mbg_gps166.h
+ 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/l_stdlib.h
+ 1.8 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/iosignal.h
+ 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
include/ieee754io.h
1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2421,35 +20659,50 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- clockstuff/clktest.c
- 1.2 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+ include/audio.h
+ 1.3 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- conf/dewey.conf
- 1.2 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+ include/ascii.h
+ 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- conf/beauregard.conf
+ include/adjtime.h
+ 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ include/Makefile.am
+ 1.12 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/hints/winnt.htm
+ 1.8 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/hints/mpeix
1.2 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+
+ conf/rackety.conf
+ 1.1.1.1 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- clockstuff/propdelay.c
- 1.3 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+ conf/pogo.conf
+ 1.2.1.1 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- conf/README
- 1.4 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+ conf/malarky.conf
+ 1.1.1.1 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- clockstuff/README
- 1.3 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+ conf/grundoon.conf
+ 1.2.1.1 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- clockstuff/Makefile.am
- 1.3 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+ conf/dewey.conf
+ 1.1.1.1 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- clockstuff/chutest.c
+ conf/beauregard.conf
1.2 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2457,50 +20710,47 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.3 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- conf/grundoon.conf
- 1.3 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- conf/malarky.conf
- 1.2 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+ conf/README
+ 1.3.1.1 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- conf/pogo.conf
+ clockstuff/propdelay.c
1.3 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- conf/rackety.conf
+ clockstuff/clktest.c
1.2 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/mpeix
+ clockstuff/chutest.c
1.2 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
- html/hints/winnt.htm
- 1.8 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
+ clockstuff/README
+ 1.3 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/solaris-dosynctodr.html
- 1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
+ clockstuff/Makefile.am
+ 1.3 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/solaris.html
- 1.4 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
+ html/hints/vxworks.htm
+ 1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/solaris.xtra.4023118
+ html/hints/vxworks.html
1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/sco.htm
+ html/hints/todo
1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/solaris.xtra.S99ntpd
- 1.3 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
+ html/hints/svr4_package
+ 1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/solaris.xtra.patchfreq
+ html/hints/svr4-dell
1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2508,55 +20758,55 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/svr4-dell
+ html/hints/solaris.xtra.patchfreq
1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/svr4_package
- 1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
+ html/hints/solaris.xtra.S99ntpd
+ 1.3 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/todo
+ html/hints/solaris.xtra.4095849
1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/vxworks.html
+ html/hints/solaris.xtra.4023118
1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/vxworks.htm
- 1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
+ html/hints/solaris.html
+ 1.4 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/solaris.xtra.4095849
+ html/hints/solaris-dosynctodr.html
1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/refclocks
- 1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
+ html/hints/sco.htm
+ 1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/hints/sgi
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/bsdi
+ html/hints/rs6000
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/changes
+ html/hints/refclocks
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/decosf1
+ html/hints/parse
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/decosf2
+ html/hints/notes-xntp-v3
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/freebsd
+ html/hints/linux
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -2564,312 +20814,320 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/linux
+ html/hints/freebsd
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/notes-xntp-v3
+ html/hints/decosf2
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/parse
+ html/hints/decosf1
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/rs6000
+ html/hints/changes
+ 1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/hints/bsdi
1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/tickadj.htm
- 1.6 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ 1.5.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/quick.htm
- 1.5 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/release.htm
+ 1.13.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/hints/a-ux
- 1.2 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/refclock.htm
+ 1.13.1.2 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/rdebug.htm
- 1.5 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ 1.4.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/Oncore-SHMEM.htm
- 1.3 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/quick.htm
+ 1.4.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/ntptime.htm
- 1.7 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/qth.htm
+ 1.1.1.2 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/ntptrace.htm
- 1.5 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/porting.htm
+ 1.3.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/parsedata.htm
- 1.3 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/patches.htm
+ 1.4.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/parsenew.htm
- 1.2 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/patches.htm
- 1.5 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/parsedata.htm
+ 1.2.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/porting.htm
- 1.4 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/ntptrace.htm
+ 1.4.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/ntptime.htm
+ 1.6.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/hints/aix
1.2 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/qth.htm
- 1.3 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/hints/a-ux
+ 1.2 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/release.htm
- 1.14 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/Oncore-SHMEM.htm
+ 1.2.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/refclock.htm
- 1.15 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
+ html/prefer.htm
+ 1.4.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/ntpq.htm
- 1.7 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
+ html/pps.htm
+ 1.8.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/prefer.htm
- 1.5 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
+ html/ntpq.htm
+ 1.6.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/mx4200data.htm
- 1.5 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
+ html/ntpdc.htm
+ 1.5.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/ntpdc.htm
- 1.6 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
+ html/ntpdate.htm
+ 1.5.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/notes.htm
- 1.6 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
+ html/ntpd.htm
+ 1.13.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/pps.htm
- 1.9 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
+ html/notes.htm
+ 1.5.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/ntpdate.htm
- 1.6 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
+ html/mx4200data.htm
+ 1.4.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/ntpd.htm
- 1.14 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
+ html/miscopt.htm
+ 1.11.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/measure.htm
- 1.4 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/miscopt.htm
- 1.12 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
+ html/monopt.htm
+ 1.6.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/leap.htm
- 1.2 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/ldisc.htm
- 1.3 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/kernpps.htm
- 1.4 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/kern.htm
+ 1.5.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/index.htm
+ 1.10.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/htmlprimer.htm
+ 1.1.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/howto.htm
+ 1.4.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/hints.htm
- 1.4 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/kern.htm
- 1.6 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ html/genkeys.htm
+ 1.5.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/gadget.htm
- 1.4 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/extern.htm
- 1.5 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/index.htm
- 1.11 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ 1.4.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/htmlprimer.htm
- 1.2 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ html/driver9.htm
+ 1.4.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/howto.htm
- 1.5 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ html/driver8.htm
+ 1.3.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/monopt.htm
- 1.7 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ html/driver7.htm
+ 1.9.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/genkeys.htm
- 1.6 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
+ html/driver6.htm
+ 1.4.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver5.htm
- 1.3 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver4.htm
- 1.4 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver39.htm
- 1.2 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver38.htm
- 1.2 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver37.htm
- 1.3 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver36.htm
- 1.7 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ 1.6.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver35.htm
- 1.5 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ 1.4.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver34.htm
- 1.3 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver33.htm
- 1.4 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver8.htm
- 1.4 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver3.htm
- 1.3 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver9.htm
- 1.5 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/driver6.htm
- 1.5 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver7.htm
- 1.10 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
+ html/driver32.htm
+ 1.3.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver30.htm
- 1.7 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.6.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver29.htm
- 1.3 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver28.htm
- 1.3 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/driver32.htm
- 1.4 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ html/driver27.htm
+ 1.2.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver26.htm
- 1.2 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver24.htm
+ 1.1.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver23.htm
- 1.4 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver22.htm
- 1.7 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.6.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver20.htm
- 1.5 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.4.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver2.htm
- 1.3 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver27.htm
- 1.3 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver24.htm
- 1.2 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver19.htm
- 1.3 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver18.htm
- 1.3 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver16.htm
- 1.2 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver1.htm
- 1.4 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/exec.htm
+ 1.6.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver12.htm
- 1.3 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver11.htm
- 1.3 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/driver10.htm
- 1.3 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
+ 1.2.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/debug.htm
- 1.6 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
+ 1.5.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/exec.htm
- 1.7 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
+ html/copyright.htm
+ 1.17.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/confopt.htm
- 1.15 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
+ 1.14.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/config.htm
- 1.5 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
+ 1.4.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/clockopt.htm
@@ -2877,336 +21135,333 @@ ChangeSet@1.719, 2001-10-08 21:51:07-04:00, stenn@whimsy.udel.edu
Turn on EOLN_NATIVE flag
html/build.htm
- 1.7 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
+ 1.6.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/copyright.htm
- 1.18 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
+ librsaref/Makefile.am
+ 1.14.1.1 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/biblio.htm
+ 1.4.1.1 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/authopt.htm
- 1.12 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
+ 1.11.1.1 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/audio.htm
- 1.6 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
+ 1.5.1.1 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/assoc.htm
- 1.7 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
+ 1.6.1.1 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
html/accopt.htm
- 1.8 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
+ 1.7.1.1 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- html/biblio.htm
- 1.5 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
+ adjtimed/adjtimed.c
+ 1.4 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- BitKeeper/triggers/00-list
- 1.2 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
-
- BitKeeper/triggers/post-commit.changelog
- 1.5 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
+ adjtimed/README
+ 1.3 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
adjtimed/Makefile.am
1.2 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- adjtimed/README
- 1.3 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
BitKeeper/triggers/pre-apply.paranoid
1.2 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
- adjtimed/adjtimed.c
- 1.4 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
+ BitKeeper/triggers/post-commit.changelog
+ 1.5 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
- librsaref/Makefile.am
- 1.15 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
+ BitKeeper/triggers/00-list
+ 1.2 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
- BitKeeper/triggers/post-incoming.2mirrors
- 1.3 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ results.y2kfixes
+ 1.5 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- BitKeeper/etc/config
- 1.4 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ readme.y2kfixes
+ 1.5 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- BitKeeper/etc/ignore
- 1.7 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ ntp_update
+ 1.6.1.4 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- BitKeeper/etc/logging_ok
- 1.2 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ mkinstalldirs
+ 1.7 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- readme.y2kfixes
+ WHERE-TO-START
1.5 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- BitKeeper/triggers/notify
- 1.2 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ TODO
+ 1.6 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- README.hackers
- 1.5 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ README
+ 1.14.1.4 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- results.y2kfixes
+ README.rsa
+ 1.3.1.4 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+
+ README.hackers
1.5 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- NEWS
- 1.35 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ README.des
+ 1.6.1.4 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- WHERE-TO-START
- 1.5 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ README.cvs
+ 1.6.1.4 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
NOTES.y2kfixes
1.6 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- README.cvs
- 1.10 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
-
- ntp_update
- 1.10 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ NEWS
+ 1.31.1.4 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- mkinstalldirs
- 1.7 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ BitKeeper/triggers/post-incoming.2mirrors
+ 1.3 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- README.des
- 1.10 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ BitKeeper/triggers/notify
+ 1.2 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- TODO
- 1.6 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ BitKeeper/etc/logging_ok
+ 1.1.1.1 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- README.rsa
- 1.7 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ BitKeeper/etc/ignore
+ 1.1.2.2 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
- README
- 1.18 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
+ BitKeeper/etc/config
+ 1.1.1.3 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
missing
1.7 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
- config.sub
- 1.10 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
-
install-sh
1.5 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
- configure.in
- 1.227 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
+ flock-build
+ 1.23 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
- depcomp
- 1.6 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
+ excludes
+ 1.5 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
dot.emacs
1.7 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
- excludes
- 1.5 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
+ depcomp
+ 1.6 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
- config.guess
+ configure.in
+ 1.219.3.5 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
+
+ config.sub
1.10 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
- flock-build
- 1.23 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
+ config.guess
+ 1.10 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
acconfig.h
- 1.29 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
+ 1.23.3.5 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
README.bk
- 1.13 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.12 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
INSTALL
1.7 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
+ build
+ 1.16.1.4 01/10/08 21:17:52 stenn@whimsy.udel.edu +0 -0
+
acinclude.m4
- 1.7 01/10/08 21:17:52 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.4 01/10/08 21:17:52 stenn@whimsy.udel.edu +0 -0
Makefile.am
- 1.18 01/10/08 21:17:52 stenn@whimsy.udel.edu +0 -0
-
- build
- 1.20 01/10/08 21:17:52 stenn@whimsy.udel.edu +0 -0
+ 1.12.1.6 01/10/08 21:17:52 stenn@whimsy.udel.edu +0 -0
ChangeLog
1.588 01/10/08 21:17:52 stenn@whimsy.udel.edu +0 -0
- TODO
- 1.5 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
-
- README
- 1.17 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
-
- WHERE-TO-START
+ results.y2kfixes
1.4 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- missing
- 1.6 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
-
- README.hackers
+ readme.y2kfixes
1.4 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- README.des
- 1.9 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+ ntp_update
+ 1.6.1.3 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
mkinstalldirs
1.6 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- README.cvs
- 1.9 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
-
- ntp_update
- 1.9 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+ missing
+ 1.6 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
install-sh
1.4 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- README.rsa
- 1.6 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+ flock-build
+ 1.22 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- readme.y2kfixes
+ excludes
1.4 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- NOTES.y2kfixes
+ dot.emacs
+ 1.6 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+
+ depcomp
1.5 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- results.y2kfixes
+ configure.in
+ 1.219.3.4 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+
+ acconfig.h
+ 1.23.3.4 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+
+ WHERE-TO-START
1.4 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- NEWS
- 1.34 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+ TODO
+ 1.5 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- acconfig.h
- 1.28 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+ README
+ 1.14.1.3 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- INSTALL
- 1.6 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+ README.rsa
+ 1.3.1.3 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- configure.in
- 1.226 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+ README.hackers
+ 1.4 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- depcomp
+ README.des
+ 1.6.1.3 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+
+ README.cvs
+ 1.6.1.3 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+
+ NOTES.y2kfixes
1.5 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- dot.emacs
- 1.6 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+ NEWS
+ 1.31.1.3 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- excludes
- 1.4 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+ INSTALL
+ 1.6 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
- flock-build
- 1.22 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
+ config.sub
+ 1.9 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
- Makefile.am
- 1.17 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
+ config.guess
+ 1.9 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
build
- 1.19 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
+ 1.16.1.3 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
acinclude.m4
- 1.6 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.3 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
README.bk
- 1.12 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
+ 1.1.1.11 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
- config.guess
- 1.9 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
-
- config.sub
- 1.9 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
+ Makefile.am
+ 1.12.1.5 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
ChangeLog
1.587 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
-ChangeSet@1.718, 2001-10-08 02:05:47-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.9 01/10/08 02:05:47 stenn@whimsy.udel.edu +29 -0
EOLN_NATIVE.
results.y2kfixes
1.3 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
- NOTES.y2kfixes
- 1.4 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
-
readme.y2kfixes
1.3 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
- README.rsa
- 1.5 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
+ WHERE-TO-START
+ 1.3 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
+
+ TODO
+ 1.4 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
README
- 1.16 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
+ 1.14.1.2 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
- WHERE-TO-START
- 1.3 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
+ README.rsa
+ 1.3.1.2 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
README.hackers
1.3 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
- TODO
+ README.des
+ 1.6.1.2 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
+
+ NOTES.y2kfixes
1.4 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
- README.des
- 1.8 01/10/08 01:57:14 stenn@whimsy.udel.edu +0 -0
+ ntp_update
+ 1.6.1.2 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
mkinstalldirs
1.5 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
- NEWS
- 1.33 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
-
missing
1.5 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
- ChangeLog
- 1.586 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
-
- INSTALL
- 1.5 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
+ install-sh
+ 1.3 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
- ntp_update
- 1.8 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
+ flock-build
+ 1.21 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
- README.cvs
- 1.8 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
+ excludes
+ 1.3 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
dot.emacs
1.5 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
- flock-build
- 1.21 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
-
depcomp
1.4 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
- install-sh
- 1.3 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
-
configure.in
- 1.225 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
-
- README.bk
- 1.11 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
+ 1.219.3.3 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
config.sub
1.8 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
- excludes
- 1.3 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
-
config.guess
1.8 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
build
- 1.18 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
+ 1.16.1.2 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
acconfig.h
- 1.27 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
+ 1.23.3.3 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
- Makefile.am
- 1.16 01/10/08 01:57:12 stenn@whimsy.udel.edu +0 -0
+ README.cvs
+ 1.6.1.2 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
+
+ README.bk
+ 1.1.1.10 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
+
+ NEWS
+ 1.31.1.2 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
+
+ INSTALL
+ 1.5 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
+
+ ChangeLog
+ 1.586 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
acinclude.m4
- 1.5 01/10/08 01:57:12 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.2 01/10/08 01:57:12 stenn@whimsy.udel.edu +0 -0
+
+ Makefile.am
+ 1.12.1.4 01/10/08 01:57:12 stenn@whimsy.udel.edu +0 -0
results.y2kfixes
1.2 01/10/08 01:57:02 stenn@whimsy.udel.edu +0 -0
@@ -3216,135 +21471,443 @@ ChangeSet@1.718, 2001-10-08 02:05:47-04:00, stenn@whimsy.udel.edu
1.2 01/10/08 01:57:02 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- README.des
- 1.7 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
+ readme.y2kfixes
+ 1.2 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- flock-build
- 1.20 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
+ ntp_update
+ 1.6.1.1 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- INSTALL
+ mkinstalldirs
1.4 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- readme.y2kfixes
- 1.2 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
+ missing
+ 1.4 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- TODO
- 1.3 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
+ flock-build
+ 1.20 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
configure.in
- 1.224 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
+ 1.219.3.2 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- README
- 1.15 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
+ TODO
+ 1.3 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- mkinstalldirs
- 1.4 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
+ README
+ 1.14.1.1 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
README.rsa
- 1.4 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
+ 1.3.1.1 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
README.hackers
1.2 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- NEWS
- 1.32 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntp_update
- 1.7 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
+ README.des
+ 1.6.1.1 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
README.cvs
- 1.7 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- missing
- 1.4 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
+ 1.6.1.1 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
NOTES.y2kfixes
1.3 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- dot.emacs
- 1.4 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ NEWS
+ 1.31.1.1 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- depcomp
- 1.3 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ INSTALL
+ 1.4 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
install-sh
1.2 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- README.bk
- 1.10 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ excludes
+ 1.2 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
- build
- 1.17 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ dot.emacs
+ 1.4 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- excludes
- 1.2 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ depcomp
+ 1.3 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ config.sub
+ 1.7 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
config.guess
1.7 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- Makefile.am
- 1.15 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ build
+ 1.16.1.1 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- config.sub
- 1.7 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ acinclude.m4
+ 1.3.1.1 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
acconfig.h
- 1.26 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ 1.23.3.2 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- acinclude.m4
- 1.4 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+ README.bk
+ 1.1.1.9 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
+
+ Makefile.am
+ 1.12.1.3 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ChangeLog
1.585 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
-ChangeSet@1.717, 2001-10-08 01:55:18-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.8 01/10/08 01:55:18 stenn@whimsy.udel.edu +1 -0
Re-import the JJY patch.
html/qth.htm
- 1.2 01/10/08 01:55:17 stenn@whimsy.udel.edu +12 -0
+ 1.1.1.1 01/10/08 01:55:17 stenn@whimsy.udel.edu +12 -0
JJY entries.
-ChangeSet@1.716, 2001-10-06 15:30:18-04:00, stenn@whimsy.udel.edu
+ html/tickadj.htm
+ 1.6 01/10/08 01:12:58 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/release.htm
+ 1.16 01/10/08 01:12:58 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/rdebug.htm
+ 1.5 01/10/08 01:12:58 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/quick.htm
+ 1.5 01/10/08 01:12:58 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/prefer.htm
+ 1.5 01/10/08 01:12:58 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/pps.htm
+ 1.9 01/10/08 01:12:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/porting.htm
+ 1.4 01/10/08 01:12:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/patches.htm
+ 1.5 01/10/08 01:12:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/parsenew.htm
+ 1.2 01/10/08 01:12:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/parsedata.htm
+ 1.4 01/10/08 01:12:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/ntptrace.htm
+ 1.5 01/10/08 01:12:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/ntptime.htm
+ 1.7 01/10/08 01:12:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/ntpq.htm
+ 1.9 01/10/08 01:12:57 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/ntpdc.htm
+ 1.6 01/10/08 01:12:56 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/ntpdate.htm
+ 1.6 01/10/08 01:12:56 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/ntpd.htm
+ 1.14 01/10/08 01:12:56 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/notes.htm
+ 1.6 01/10/08 01:12:56 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/mx4200data.htm
+ 1.5 01/10/08 01:12:56 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/monopt.htm
+ 1.8 01/10/08 01:12:56 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/miscopt.htm
+ 1.12 01/10/08 01:12:56 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/measure.htm
+ 1.4 01/10/08 01:12:56 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/leap.htm
+ 1.2 01/10/08 01:12:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/ldisc.htm
+ 1.3 01/10/08 01:12:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/kernpps.htm
+ 1.4 01/10/08 01:12:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/kern.htm
+ 1.6 01/10/08 01:12:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/index.htm
+ 1.11 01/10/08 01:12:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/htmlprimer.htm
+ 1.2 01/10/08 01:12:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/howto.htm
+ 1.5 01/10/08 01:12:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/hints.htm
+ 1.4 01/10/08 01:12:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/genkeys.htm
+ 1.7 01/10/08 01:12:55 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/gadget.htm
+ 1.4 01/10/08 01:12:54 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/extern.htm
+ 1.5 01/10/08 01:12:54 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/exec.htm
+ 1.7 01/10/08 01:12:54 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver9.htm
+ 1.5 01/10/08 01:12:54 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver8.htm
+ 1.4 01/10/08 01:12:54 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver7.htm
+ 1.10 01/10/08 01:12:54 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver6.htm
+ 1.5 01/10/08 01:12:54 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver5.htm
+ 1.3 01/10/08 01:12:54 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver4.htm
+ 1.4 01/10/08 01:12:53 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver39.htm
+ 1.3 01/10/08 01:12:53 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver38.htm
+ 1.3 01/10/08 01:12:53 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver37.htm
+ 1.3 01/10/08 01:12:53 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver36.htm
+ 1.7 01/10/08 01:12:53 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver35.htm
+ 1.6 01/10/08 01:12:53 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver34.htm
+ 1.3 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver33.htm
+ 1.4 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver32.htm
+ 1.4 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver30.htm
+ 1.7 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver3.htm
+ 1.3 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver29.htm
+ 1.3 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver28.htm
+ 1.3 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver27.htm
+ 1.3 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver26.htm
+ 1.2 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver24.htm
+ 1.2 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver23.htm
+ 1.4 01/10/08 01:12:52 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver22.htm
+ 1.7 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver20.htm
+ 1.5 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver2.htm
+ 1.3 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver19.htm
+ 1.3 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver18.htm
+ 1.3 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver16.htm
+ 1.2 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver12.htm
+ 1.3 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver11.htm
+ 1.3 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver10.htm
+ 1.3 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/driver1.htm
+ 1.4 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/debug.htm
+ 1.7 01/10/08 01:12:51 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/copyright.htm
+ 1.18 01/10/08 01:12:50 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/confopt.htm
+ 1.16 01/10/08 01:12:50 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/config.htm
+ 1.6 01/10/08 01:12:50 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/build.htm
+ 1.8 01/10/08 01:12:50 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/biblio.htm
+ 1.5 01/10/08 01:12:50 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/authopt.htm
+ 1.13 01/10/08 01:12:50 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/audio.htm
+ 1.6 01/10/08 01:12:49 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/assoc.htm
+ 1.8 01/10/08 01:12:49 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/accopt.htm
+ 1.8 01/10/08 01:12:49 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ html/Oncore-SHMEM.htm
+ 1.3 01/10/08 01:12:49 stenn@whimsy.udel.edu +0 -0
+ Turn on EOLN_NATIVE flag
+
+ChangeSet
+ 1.683.4.7 01/10/06 15:30:18 stenn@whimsy.udel.edu +1 -0
More trigger debugging.
BitKeeper/triggers/post-commit.changelog
1.4 01/10/06 15:30:18 stenn@whimsy.udel.edu +3 -0
More debug stuff.
-ChangeSet@1.715, 2001-10-06 14:48:38-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.6 01/10/06 14:48:38 stenn@whimsy.udel.edu +1 -0
Debug the post-commit.changelog trigger.
BitKeeper/triggers/post-commit.changelog
1.3 01/10/06 14:48:37 stenn@whimsy.udel.edu +4 -0
More debug stuff.
-ChangeSet@1.714, 2001-10-06 13:50:26-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.5 01/10/06 13:50:26 stenn@whimsy.udel.edu +3 -0
Trigger cleanup and debug.
BitKeeper/triggers/post-commit.changelog
@@ -3360,14 +21923,16 @@ ChangeSet@1.714, 2001-10-06 13:50:26-04:00, stenn@whimsy.udel.edu
1.3 01/10/06 12:57:43 stenn@whimsy.udel.edu +0 -0
Delete: BitKeeper/triggers/2mirrors
-ChangeSet@1.713, 2001-10-06 04:28:47-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.4 01/10/06 04:28:47 stenn@whimsy.udel.edu +1 -0
Grab the updates from the master 2mirrors script.
BitKeeper/triggers/post-incoming.2mirrors
1.2 01/10/06 04:28:47 stenn@whimsy.udel.edu +2 -2
Grab the updates from the master 2mirrors script.
-ChangeSet@1.712, 2001-10-06 04:16:36-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.3 01/10/06 04:16:36 stenn@whimsy.udel.edu +1 -0
2mirrors trigger is now quiet when we don't run it.
BitKeeper/triggers/2mirrors
@@ -3375,9 +21940,16 @@ ChangeSet@1.712, 2001-10-06 04:16:36-04:00, stenn@whimsy.udel.edu
Don't show the "starting 2mirrors trigger" message unless we're
on a host that actually runs it.
-ChangeSet@1.711, 2001-10-06 03:34:37-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.2 01/10/06 03:34:37 stenn@whimsy.udel.edu +8 -0
Recover ntp-stable - update the ignore file and replace the triggers.
+ BitKeeper/triggers/pre-apply.paranoid
+ 1.1 01/10/06 03:34:36 stenn@whimsy.udel.edu +80 -0
+
+ BitKeeper/triggers/post-incoming.2mirrors
+ 1.1 01/10/06 03:34:36 stenn@whimsy.udel.edu +40 -0
+
BitKeeper/triggers/post-commit.changelog
1.1 01/10/06 03:34:36 stenn@whimsy.udel.edu +61 -0
@@ -3388,122 +21960,525 @@ ChangeSet@1.711, 2001-10-06 03:34:37-04:00, stenn@whimsy.udel.edu
1.1 01/10/06 03:34:36 stenn@whimsy.udel.edu +61 -0
BitKeeper/triggers/pre-apply.paranoid
- 1.1 01/10/06 03:34:36 stenn@whimsy.udel.edu +80 -0
+ 1.0 01/10/06 03:34:36 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/pre-apply.paranoid
BitKeeper/triggers/post-incoming.2mirrors
- 1.1 01/10/06 03:34:36 stenn@whimsy.udel.edu +40 -0
-
- BitKeeper/triggers/00-list
- 1.1 01/10/06 03:34:35 stenn@whimsy.udel.edu +8 -0
-
- BitKeeper/triggers/2mirrors
- 1.1 01/10/06 03:34:35 stenn@whimsy.udel.edu +40 -0
-
- BitKeeper/triggers/changelog
1.0 01/10/06 03:34:36 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/changelog
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/post-incoming.2mirrors
BitKeeper/triggers/post-commit.changelog
1.0 01/10/06 03:34:36 stenn@whimsy.udel.edu +0 -0
BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/post-commit.changelog
- BitKeeper/triggers/post-incoming.2mirrors
+ BitKeeper/triggers/notify
1.0 01/10/06 03:34:36 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/post-incoming.2mirrors
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/notify
- BitKeeper/triggers/pre-apply.paranoid
+ BitKeeper/triggers/changelog
1.0 01/10/06 03:34:36 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/pre-apply.paranoid
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/changelog
- BitKeeper/triggers/notify
- 1.0 01/10/06 03:34:36 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/notify
+ BitKeeper/triggers/2mirrors
+ 1.1 01/10/06 03:34:35 stenn@whimsy.udel.edu +40 -0
+
+ BitKeeper/triggers/00-list
+ 1.1 01/10/06 03:34:35 stenn@whimsy.udel.edu +8 -0
+
+ BitKeeper/triggers/2mirrors
+ 1.0 01/10/06 03:34:35 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/2mirrors
BitKeeper/triggers/00-list
1.0 01/10/06 03:34:35 stenn@whimsy.udel.edu +0 -0
BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/00-list
BitKeeper/etc/ignore
- 1.6 01/10/06 03:34:35 stenn@whimsy.udel.edu +25 -5
+ 1.1.2.1 01/10/06 03:34:35 stenn@whimsy.udel.edu +25 -5
Recover the changes to the ignore file.
- BitKeeper/triggers/2mirrors
- 1.0 01/10/06 03:34:35 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/2mirrors
-
-ChangeSet@1.710, 2001-10-06 03:09:54-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.4.1 01/10/06 03:09:54 stenn@whimsy.udel.edu +3 -0
Merge maccarony://home/bk/ntp-stable-hosed
into whimsy.udel.edu:/backroom/ntp-stable
configure.in
- 1.223 01/10/06 03:09:53 stenn@whimsy.udel.edu +0 -0
+ 1.219.3.1 01/10/06 03:09:53 stenn@whimsy.udel.edu +0 -0
Auto merged
acconfig.h
- 1.25 01/10/06 03:09:52 stenn@whimsy.udel.edu +0 -0
+ 1.23.3.1 01/10/06 03:09:52 stenn@whimsy.udel.edu +0 -0
Auto merged
README.bk
- 1.9 01/10/06 03:09:52 stenn@whimsy.udel.edu +0 -8
+ 1.1.1.8 01/10/06 03:09:52 stenn@whimsy.udel.edu +0 -8
Auto merged
-ChangeSet@1.702.1.1, 2001-10-06 02:03:04-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.3.1 01/10/06 02:03:04 stenn@whimsy.udel.edu +10 -0
README.bk improvements.
JJY driver patch.
ntpd/refclock_jjy.c
1.1 01/10/06 02:02:57 stenn@whimsy.udel.edu +713 -0
- libntp/clocktypes.c
- 1.8 01/10/06 02:02:57 stenn@whimsy.udel.edu +2 -0
- Re-import the JJY driver patch.
+ ntpd/refclock_jjy.c
+ 1.0 01/10/06 02:02:57 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable-hms/ntpd/refclock_jjy.c
- ntpd/Makefile.am
- 1.19 01/10/06 02:02:57 stenn@whimsy.udel.edu +1 -1
+ ntpd/refclock_conf.c
+ 1.13.1.1 01/10/06 02:02:57 stenn@whimsy.udel.edu +8 -1
Re-import the JJY driver patch.
ntpd/ntp_control.c
- 1.38 01/10/06 02:02:57 stenn@whimsy.udel.edu +1 -0
+ 1.37.3.1 01/10/06 02:02:57 stenn@whimsy.udel.edu +1 -0
Re-import the JJY driver patch.
- ntpd/refclock_conf.c
- 1.14 01/10/06 02:02:57 stenn@whimsy.udel.edu +8 -1
+ ntpd/Makefile.am
+ 1.18.2.1 01/10/06 02:02:57 stenn@whimsy.udel.edu +1 -1
Re-import the JJY driver patch.
- ntpd/refclock_jjy.c
- 1.0 01/10/06 02:02:57 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable-hms/ntpd/refclock_jjy.c
-
- acconfig.h
- 1.23.1.1 01/10/06 02:02:56 stenn@whimsy.udel.edu +3 -0
+ libntp/clocktypes.c
+ 1.7.1.1 01/10/06 02:02:57 stenn@whimsy.udel.edu +2 -0
Re-import the JJY driver patch.
- configure.in
- 1.221.1.1 01/10/06 02:02:56 stenn@whimsy.udel.edu +9 -1
+ include/ntp.h
+ 1.47.3.1 01/10/06 02:02:56 stenn@whimsy.udel.edu +2 -1
Re-import the JJY driver patch.
html/refclock.htm
- 1.14 01/10/06 02:02:56 stenn@whimsy.udel.edu +8 -4
+ 1.13.1.1 01/10/06 02:02:56 stenn@whimsy.udel.edu +8 -4
Re-import the JJY driver patch.
- include/ntp.h
- 1.48 01/10/06 02:02:56 stenn@whimsy.udel.edu +2 -1
+ configure.in
+ 1.219.2.1 01/10/06 02:02:56 stenn@whimsy.udel.edu +9 -1
+ Re-import the JJY driver patch.
+
+ acconfig.h
+ 1.23.2.1 01/10/06 02:02:56 stenn@whimsy.udel.edu +3 -0
Re-import the JJY driver patch.
README.bk
- 1.5.1.1 01/10/06 02:02:56 stenn@whimsy.udel.edu +22 -7
+ 1.1.2.1 01/10/06 02:02:56 stenn@whimsy.udel.edu +22 -7
Resync with latest copy, add new info about getting bitkeeper
and using HTTP as the transport protocol.
-ChangeSet@1.709, 2001-09-20 04:54:45-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.714 01/10/04 21:49:32 jhay@angel.cids.org.za +5 -0
+ With these fixes ntpd can sync to another ntpd using IPv6.
+
+ ntpd/ntp_request.c
+ 1.27 01/10/04 21:49:32 jhay@angel.cids.org.za +3 -3
+ IPv6 fix
+
+ ntpd/ntp_io.c
+ 1.26 01/10/04 21:49:32 jhay@angel.cids.org.za +4 -1
+ IPv6 fix
+
+ ntpd/ntp_intres.c
+ 1.20 01/10/04 21:49:32 jhay@angel.cids.org.za +2 -0
+ IPv6 fix
+
+ ntpd/ntp_control.c
+ 1.42 01/10/04 21:49:32 jhay@angel.cids.org.za +4 -3
+ IPv6 fix
+
+ ntpd/ntp_config.c
+ 1.57 01/10/04 21:49:32 jhay@angel.cids.org.za +5 -4
+ IPv6 fix
+
+ChangeSet
+ 1.713 01/10/04 21:42:50 jhay@angel.cids.org.za +11 -0
+ Port the new IPv6 codebase to legacy systems
+
+ libntp/ntp_rfc2553.c
+ 1.1 01/10/04 21:42:49 jhay@angel.cids.org.za +146 -0
+
+ include/ntp_rfc2553.h
+ 1.1 01/10/04 21:42:49 jhay@angel.cids.org.za +232 -0
+
+ ntpdate/ntpdate.c
+ 1.26 01/10/04 21:42:49 jhay@angel.cids.org.za +3 -3
+ Port to legacy systems
+
+ ntpd/ntp_restrict.c
+ 1.5 01/10/04 21:42:49 jhay@angel.cids.org.za +2 -2
+ Port to legacy systems
+
+ libntp/ntp_rfc2553.c
+ 1.0 01/10/04 21:42:49 jhay@angel.cids.org.za +0 -0
+ BitKeeper file /export/3-stable/home/ntp/ntp-dev-ipv6/libntp/ntp_rfc2553.c
+
+ include/ntp_rfc2553.h
+ 1.0 01/10/04 21:42:49 jhay@angel.cids.org.za +0 -0
+ BitKeeper file /export/3-stable/home/ntp/ntp-dev-ipv6/include/ntp_rfc2553.h
+
+ ntpd/ntp_request.c
+ 1.26 01/10/04 21:42:48 jhay@angel.cids.org.za +0 -2
+ Port to legacy systems
+
+ ntpd/ntp_io.c
+ 1.25 01/10/04 21:42:48 jhay@angel.cids.org.za +26 -2
+ Port to legacy systems
+
+ libntp/socktoa.c
+ 1.2 01/10/04 21:42:48 jhay@angel.cids.org.za +4 -1
+ Port to legacy systems
+
+ libntp/Makefile.am
+ 1.14 01/10/04 21:42:48 jhay@angel.cids.org.za +1 -1
+ Port to legacy systems
+
+ include/ntp_stdlib.h
+ 1.13 01/10/04 21:42:48 jhay@angel.cids.org.za +1 -0
+ Port to legacy systems
+
+ include/ntp_fp.h
+ 1.4 01/10/04 21:42:48 jhay@angel.cids.org.za +1 -0
+ Port to legacy systems
+
+ configure.in
+ 1.227 01/10/04 21:42:48 jhay@angel.cids.org.za +10 -0
+ Port to legacy systems
+
+ChangeSet
+ 1.712 01/09/24 20:21:51 jhay@angel.cids.org.za +1 -0
+ Merge bk://ntp.bkserver.net/ntp-dev-ipv6
+ into angel.cids.org.za:/home/ntp/ntp-dev-ipv6
+
+ ntpd/ntp_config.c
+ 1.56 01/09/24 20:21:51 jhay@angel.cids.org.za +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.9 01/09/24 01:15:15 stenn@whimsy.udel.edu +1 -0
+ ntfs hates names with `:' in them; rename :list to 00-list
+
+ BitKeeper/triggers/00-list
+ 1.2 01/09/24 01:15:15 stenn@whimsy.udel.edu +0 -0
+ Renamed from :list
+
+ChangeSet
+ 1.708.1.7 01/09/22 03:26:30 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_config.c
+ 1.53.1.3 01/09/22 03:26:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.8 01/09/22 03:15:03 stenn@whimsy.udel.edu +1 -0
+ Clean up the patch that was already in there.
+
+ ntpd/ntp_config.c
+ 1.52.1.2 01/09/22 03:15:02 stenn@whimsy.udel.edu +0 -3
+ The patch was already there...
+
+ChangeSet
+ 1.683.2.13 01/09/22 03:07:03 stenn@whimsy.udel.edu +1 -0
+ manycastclient bugfix.
+ From: Sydney Weinstein <syd@verne.myxa.com>
+
+ ntpd/ntp_config.c
+ 1.50.2.2 01/09/22 03:07:02 stenn@whimsy.udel.edu +3 -0
+ On at least Solaris 8 (5.8), the manycastclient does not do the calls
+ to join the multicast group, so it works on the local LAN but not
+ across routers. The switch statements in ntp_config.c for
+ MULTICASTCLIENT do this as they are part of MANYCASTSERVER as well.
+ I added the call to MANYCASTCLIENT switch statement.
+
+ChangeSet
+ 1.708.1.6 01/09/22 02:44:30 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ ntpd/ntp_control.c
+ 1.41 01/09/22 02:44:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.52 01/09/22 02:44:29 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.7 01/09/22 02:35:35 stenn@whimsy.udel.edu +5 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ ntpd/ntp_control.c
+ 1.39.1.1 01/09/22 02:35:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/Makefile.am
+ 1.20 01/09/22 02:35:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.50.1.1 01/09/22 02:35:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.226 01/09/22 02:35:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ acconfig.h
+ 1.26 01/09/22 02:35:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.2.12 01/09/22 02:31:31 stenn@whimsy.udel.edu +11 -0
+ Add support for the JJY receiver.
+ From: Takao Abe <abetakao@bea.hi-ho.ne.jp>
+
+ html/driver40.htm
+ 1.1 01/09/22 02:31:30 stenn@whimsy.udel.edu +232 -0
+
+ ntpd/refclock_conf.c
+ 1.14 01/09/22 02:31:30 stenn@whimsy.udel.edu +8 -1
+ Add the entries for the refclk_jjy driver.
+
+ ntpd/ntp_control.c
+ 1.37.2.1 01/09/22 02:31:30 stenn@whimsy.udel.edu +1 -0
+ REFCLK_JJY is a CTL_SST_TS_LF beast.
+
+ ntpd/Makefile.am
+ 1.18.1.1 01/09/22 02:31:30 stenn@whimsy.udel.edu +1 -1
+ Add the refclock_jjy.c module to the build list.
+
+ html/driver40.htm
+ 1.0 01/09/22 02:31:30 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/html/driver40.htm
+
+ libntp/clocktypes.c
+ 1.8 01/09/22 02:31:29 stenn@whimsy.udel.edu +2 -0
+ Add the JJY refclock entries.
+
+ include/ntp.h
+ 1.47.2.1 01/09/22 02:31:29 stenn@whimsy.udel.edu +2 -1
+ Add #define for REFCLK_JJY.
+
+ html/refclock.htm
+ 1.14 01/09/22 02:31:29 stenn@whimsy.udel.edu +4 -1
+ Add a link to the JJY driver.
+
+ html/qth.htm
+ 1.2 01/09/22 02:31:29 stenn@whimsy.udel.edu +28 -2
+ Add JJY frequencies.
+
+ configure.in
+ 1.219.1.4 01/09/22 02:31:29 stenn@whimsy.udel.edu +9 -1
+ Cleanup whitespace, add the test for the JJY clock.
+
+ acconfig.h
+ 1.23.1.2 01/09/22 02:31:29 stenn@whimsy.udel.edu +3 -0
+ Add the #define for CLOCK_JJY
+
+ChangeSet
+ 1.706.1.6 01/09/22 00:39:27 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ BitKeeper/etc/ignore
+ 1.10 01/09/22 00:39:23 stenn@whimsy.udel.edu +2 -4
+ auto-union
+
+ChangeSet
+ 1.683.2.11 01/09/22 00:34:44 stenn@whimsy.udel.edu +9 -0
+ Update the ignore list.
+ Check in the triggers.
+
+ br-flock
+ 1.1 01/09/22 00:34:42 stenn@whimsy.udel.edu +8 -0
+
+ BitKeeper/triggers/pre-apply.paranoid
+ 1.1 01/09/22 00:34:42 stenn@whimsy.udel.edu +80 -0
+
+ BitKeeper/triggers/post-incoming.2mirrors
+ 1.1 01/09/22 00:34:42 stenn@whimsy.udel.edu +40 -0
+
+ BitKeeper/triggers/post-commit.changelog
+ 1.1 01/09/22 00:34:42 stenn@whimsy.udel.edu +61 -0
+
+ BitKeeper/triggers/notify
+ 1.1 01/09/22 00:34:42 stenn@whimsy.udel.edu +81 -0
+
+ BitKeeper/triggers/changelog
+ 1.1 01/09/22 00:34:42 stenn@whimsy.udel.edu +61 -0
+
+ BitKeeper/triggers/:list
+ 1.1 01/09/22 00:34:42 stenn@whimsy.udel.edu +8 -0
+
+ BitKeeper/triggers/2mirrors
+ 1.1 01/09/22 00:34:42 stenn@whimsy.udel.edu +40 -0
+
+ BitKeeper/etc/ignore
+ 1.1.1.7 01/09/22 00:34:43 stenn@whimsy.udel.edu +2 -0
+ Added .buildkey rsaref2 to the ignore list
+
+ br-flock
+ 1.0 01/09/22 00:34:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/br-flock
+
+ BitKeeper/triggers/pre-apply.paranoid
+ 1.0 01/09/22 00:34:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/pre-apply.paranoid
+
+ BitKeeper/triggers/post-incoming.2mirrors
+ 1.0 01/09/22 00:34:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/post-incoming.2mirrors
+
+ BitKeeper/triggers/post-commit.changelog
+ 1.0 01/09/22 00:34:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/post-commit.changelog
+
+ BitKeeper/triggers/notify
+ 1.0 01/09/22 00:34:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/notify
+
+ BitKeeper/triggers/changelog
+ 1.0 01/09/22 00:34:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/changelog
+
+ BitKeeper/triggers/:list
+ 1.0 01/09/22 00:34:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/:list
+
+ BitKeeper/triggers/2mirrors
+ 1.0 01/09/22 00:34:42 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/2mirrors
+
+ BitKeeper/etc/ignore
+ 1.1.1.6 01/09/22 00:34:42 stenn@whimsy.udel.edu +1 -1
+ Alphabetize the librsaref/*.h entry.
+
+ BitKeeper/etc/ignore
+ 1.1.1.5 01/09/22 00:24:48 stenn@whimsy.udel.edu +7 -3
+ added librsaref/*.h
+
+ChangeSet
+ 1.711 01/09/21 17:24:45 jhay@angel.cids.org.za +3 -0
+ Merge bk://ntp.bkserver.net/ntp-dev-ipv6
+ into angel.cids.org.za:/home/ntp/ntp-dev-ipv6
+
+ ntpd/ntp_proto.c
+ 1.102 01/09/21 17:24:45 jhay@angel.cids.org.za +0 -5
+ Auto merged
+
+ ntpd/ntp_io.c
+ 1.24 01/09/21 17:24:45 jhay@angel.cids.org.za +0 -1
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.55 01/09/21 17:24:45 jhay@angel.cids.org.za +0 -1
+ Auto merged
+
+ChangeSet
+ 1.708.1.4 01/09/21 03:08:08 stenn@whimsy.udel.edu +3 -0
+ IPv6 patches to make it compile under FreeBSD (at least).
+ From: John Hay <jhay@icomtek.csir.co.za>
+
+ ntpd/ntp_proto.c
+ 1.100.1.2 01/09/21 03:08:08 stenn@whimsy.udel.edu +5 -3
+ Add a missing reference operator.
+ Fix/conditionalize an address compare.
+
+ ntpd/ntp_io.c
+ 1.22.1.2 01/09/21 03:08:08 stenn@whimsy.udel.edu +1 -1
+ Use fd instead of listenfds[n] on the setsockopt() call
+
+ ntpd/ntp_config.c
+ 1.53.1.2 01/09/21 03:08:07 stenn@whimsy.udel.edu +1 -1
+ Use 0 instead of peeeraddr...s_addr.
+
+ChangeSet
+ 1.708.1.3 01/09/21 02:48:37 stenn@whimsy.udel.edu +7 -0
+ Looks like reconciliation of the HP-MPE/iX stuff...
+
+ ntpdate/ntpdate.c
+ 1.25 01/09/21 02:48:36 stenn@whimsy.udel.edu +4 -0
+ We might need netinfo/ni.h, apparently.
+
+ ntpd/ntp_io.c
+ 1.22.1.1 01/09/21 02:48:36 stenn@whimsy.udel.edu +1 -2
+ Reconcile the default 127.0.0.1 test
+
+ ntpd/ntp_resolver.c
+ 1.13 01/09/20 18:06:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_proto.c
+ 1.100.1.1 01/09/20 18:06:23 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_intres.c
+ 1.19 01/09/20 18:06:22 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.53.1.1 01/09/20 18:06:22 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ README.bk
+ 1.9 01/09/20 18:06:21 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.5 01/09/20 16:09:38 stenn@whimsy.udel.edu +10 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ util/ntp-genkeys.c
+ 1.58 01/09/20 16:09:37 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntpd.c
+ 1.35 01/09/20 16:09:37 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_timer.c
+ 1.18 01/09/20 16:09:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_proto.c
+ 1.99.1.1 01/09/20 16:09:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_io.c
+ 1.21.1.1 01/09/20 16:09:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.52.1.1 01/09/20 16:09:35 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_machine.h
+ 1.9 01/09/20 16:09:35 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ configure.in
+ 1.225 01/09/20 16:09:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ acconfig.h
+ 1.25 01/09/20 16:09:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ README.bk
+ 1.7.1.1 01/09/20 16:09:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.2.10 01/09/20 04:54:45 stenn@whimsy.udel.edu +1 -0
Clean up a small portability nit from the MPE port.
util/ntp-genkeys.c
- 1.58 01/09/20 04:54:45 stenn@whimsy.udel.edu +4 -0
+ 1.56.1.2 01/09/20 04:54:45 stenn@whimsy.udel.edu +4 -0
There are a number of platforms that don't use GETTIMEOFDAY;
deal with it here, where we need it.
-ChangeSet@1.708, 2001-09-20 02:15:15-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.2.9 01/09/20 02:15:15 stenn@whimsy.udel.edu +18 -0
HP MPE/iX patch
From: "BIXBY,MARK (HP-Cupertino,ex1)" <mark_bixby@hp.com>
@@ -3511,15 +22486,11 @@ ChangeSet@1.708, 2001-09-20 02:15:15-04:00, stenn@whimsy.udel.edu
1.1 01/09/20 02:15:14 stenn@whimsy.udel.edu +50 -0
util/ntp-genkeys.c
- 1.57 01/09/20 02:15:14 stenn@whimsy.udel.edu +8 -5
+ 1.56.1.1 01/09/20 02:15:14 stenn@whimsy.udel.edu +8 -5
#include cleanup.
Use the GETTIMEOFDAY macro instead of making the call directly.
Ditto for SRANDOM() and RANDOM().
- html/hints/mpeix
- 1.0 01/09/20 02:15:14 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/html/hints/mpeix
-
ntptrace/ntptrace.c
1.14 01/09/20 02:15:14 stenn@whimsy.udel.edu +8 -2
#include guarding
@@ -3529,42 +22500,46 @@ ChangeSet@1.708, 2001-09-20 02:15:15-04:00, stenn@whimsy.udel.edu
#include cleanup and guarding
ntpdate/ntpdate.c
- 1.24 01/09/20 02:15:14 stenn@whimsy.udel.edu +6 -1
+ 1.23.1.1 01/09/20 02:15:14 stenn@whimsy.udel.edu +6 -1
#include guarding
- ntpd/ntp_io.c
- 1.21 01/09/20 02:15:13 stenn@whimsy.udel.edu +8 -4
+ html/hints/mpeix
+ 1.0 01/09/20 02:15:14 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/html/hints/mpeix
+
+ ntpd/ntpd.c
+ 1.33.1.1 01/09/20 02:15:13 stenn@whimsy.udel.edu +10 -3
#include guarding
- Clean up the default local loopback test
+ MPE doesn't have the concept of "root".
- ntpd/ntp_proto.c
- 1.94 01/09/20 02:15:13 stenn@whimsy.udel.edu +2 -1
- MPE does not use a struct timezone tzp.
+ ntpd/ntp_timer.c
+ 1.15.1.1 01/09/20 02:15:13 stenn@whimsy.udel.edu +3 -1
+ #include guarding
ntpd/ntp_resolver.c
- 1.12 01/09/20 02:15:13 stenn@whimsy.udel.edu +1 -0
+ 1.11.1.1 01/09/20 02:15:13 stenn@whimsy.udel.edu +1 -0
#include cleanup
- ntpd/ntp_timer.c
- 1.16 01/09/20 02:15:13 stenn@whimsy.udel.edu +3 -1
- #include guarding
+ ntpd/ntp_proto.c
+ 1.93.2.1 01/09/20 02:15:13 stenn@whimsy.udel.edu +2 -1
+ MPE does not use a struct timezone tzp.
- ntpd/ntpd.c
- 1.34 01/09/20 02:15:13 stenn@whimsy.udel.edu +10 -3
+ ntpd/ntp_io.c
+ 1.20.2.1 01/09/20 02:15:13 stenn@whimsy.udel.edu +8 -4
#include guarding
- MPE doesn't have the concept of "root".
+ Clean up the default local loopback test
- libntp/strdup.c
- 1.3 01/09/20 02:15:12 stenn@whimsy.udel.edu +3 -1
- MPE header cleanup
+ ntpd/ntp_intres.c
+ 1.17.1.1 01/09/20 02:15:12 stenn@whimsy.udel.edu +1 -0
+ #include cleanup
ntpd/ntp_config.c
- 1.51 01/09/20 02:15:12 stenn@whimsy.udel.edu +2 -0
+ 1.50.2.1 01/09/20 02:15:12 stenn@whimsy.udel.edu +2 -0
header #include cleanup/guarding
- acconfig.h
- 1.24 01/09/20 02:15:12 stenn@whimsy.udel.edu +3 -0
- Added DECL_INET_NTOA_0
+ libntp/strdup.c
+ 1.3 01/09/20 02:15:12 stenn@whimsy.udel.edu +3 -1
+ MPE header cleanup
libntp/machines.c
1.10 01/09/20 02:15:12 stenn@whimsy.udel.edu +285 -1
@@ -3576,80 +22551,196 @@ ChangeSet@1.708, 2001-09-20 02:15:15-04:00, stenn@whimsy.udel.edu
adjtime() implementation for MPE/iX
include/ntp_machine.h
- 1.8 01/09/20 02:15:12 stenn@whimsy.udel.edu +42 -0
+ 1.7.1.1 01/09/20 02:15:12 stenn@whimsy.udel.edu +42 -0
MPE portability stuff
configure.in
- 1.222 01/09/20 02:15:12 stenn@whimsy.udel.edu +56 -6
+ 1.219.1.3 01/09/20 02:15:12 stenn@whimsy.udel.edu +56 -6
Various portability and MPE/iX porting patches.
- ntpd/ntp_intres.c
- 1.18 01/09/20 02:15:12 stenn@whimsy.udel.edu +1 -0
- #include cleanup
+ acconfig.h
+ 1.23.1.1 01/09/20 02:15:12 stenn@whimsy.udel.edu +3 -0
+ Added DECL_INET_NTOA_0
-ChangeSet@1.707, 2001-09-19 20:27:23-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.2.8 01/09/19 20:27:23 stenn@whimsy.udel.edu +1 -0
README.bk improvements
README.bk
- 1.8 01/09/19 20:27:22 stenn@whimsy.udel.edu +2 -1
+ 1.1.1.7 01/09/19 20:27:22 stenn@whimsy.udel.edu +2 -1
Mention that warnings from autorefonc are expected.
-ChangeSet@1.706, 2001-09-19 01:40:46-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.710 01/09/19 19:00:18 jhay@angel.cids.org.za +1 -0
+ Merge bk://ntp.bkserver.net/ntp-dev-ipv6
+ into angel.cids.org.za:/home/ntp/ntp-dev-ipv6
+
+ BitKeeper/etc/logging_ok
+ 1.5 01/09/19 19:00:17 jhay@angel.cids.org.za +1 -1
+ 'Auto converge'
+
+ChangeSet
+ 1.708.1.2 01/09/19 02:51:42 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ README.bk
+ 1.8 01/09/19 02:51:42 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ Makefile.am
+ 1.17 01/09/19 02:51:41 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.4 01/09/19 02:44:16 stenn@whimsy.udel.edu +2 -0
+ Version 4.1.71.
+
+ configure.in
+ 1.224 01/09/19 02:44:15 stenn@whimsy.udel.edu +1 -1
+ version 4.1.71 - a testing release.
+
+ Makefile.am
+ 1.16 01/09/19 02:44:15 stenn@whimsy.udel.edu +0 -4
+ Lose obsolete files from the tarball distribution.
+
+ChangeSet
+ 1.708.1.1 01/09/19 01:55:12 stenn@whimsy.udel.edu +2 -0
+ Merge cleanup.
+
+ README.bk
+ 1.4.1.2 01/09/19 01:55:12 stenn@whimsy.udel.edu +1 -2
+ Merge cleanup.
+
+ Makefile.am
+ 1.13.1.1 01/09/19 01:48:18 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.3 01/09/19 01:44:27 stenn@whimsy.udel.edu +2 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ README.bk
+ 1.7 01/09/19 01:44:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ Makefile.am
+ 1.15 01/09/19 01:44:26 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.2.7 01/09/19 01:40:46 stenn@whimsy.udel.edu +1 -0
Makefile.am cruft cleanup.
Makefile.am
- 1.14 01/09/19 01:40:46 stenn@whimsy.udel.edu +16 -13
+ 1.12.1.2 01/09/19 01:40:46 stenn@whimsy.udel.edu +16 -13
More cruft cleanup.
-ChangeSet@1.705, 2001-09-19 01:26:24-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.2.6 01/09/19 01:26:24 stenn@whimsy.udel.edu +1 -0
Fix a typo.
README.bk
- 1.7 01/09/19 01:26:24 stenn@whimsy.udel.edu +1 -1
+ 1.1.1.6 01/09/19 01:26:24 stenn@whimsy.udel.edu +1 -1
Typo.
-ChangeSet@1.704, 2001-09-19 00:21:06-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.706.1.2 01/09/19 01:18:03 stenn@whimsy.udel.edu +2 -0
+ Makefile.am automerge and README.bk cleanup
+
+ README.bk
+ 1.6 01/09/19 01:18:02 stenn@whimsy.udel.edu +1 -2
+ Cleanup the README.bk commit.
+
+ Makefile.am
+ 1.14 01/09/19 01:05:44 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.2.5 01/09/19 00:21:06 stenn@whimsy.udel.edu +1 -0
README.bk improvements
README.bk
- 1.6 01/09/19 00:21:06 stenn@whimsy.udel.edu +5 -4
+ 1.1.1.5 01/09/19 00:21:06 stenn@whimsy.udel.edu +5 -4
Clean it up even more.
-ChangeSet@1.703, 2001-09-18 03:20:33-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.709 01/09/18 17:55:36 jhay@angel.cids.org.za +4 -0
+ Make ntp-dev-ipv6 compile again.
+
+ BitKeeper/etc/logging_ok
+ 1.4 01/09/18 17:55:34 jhay@angel.cids.org.za +1 -0
+ Logging to logging@openlogging.org accepted
+
+ ntpd/ntp_proto.c
+ 1.101 01/09/18 17:54:56 jhay@angel.cids.org.za +5 -3
+ IPv6 conversion.
+
+ ntpd/ntp_io.c
+ 1.23 01/09/18 17:54:56 jhay@angel.cids.org.za +1 -1
+ Fix filedescriptor.
+
+ ntpd/ntp_config.c
+ 1.54 01/09/18 17:54:56 jhay@angel.cids.org.za +1 -1
+ IPv6 conversion
+
+ChangeSet
+ 1.683.2.4 01/09/18 03:20:33 stenn@whimsy.udel.edu +1 -0
Makefile.am cleanup
Makefile.am
- 1.13 01/09/18 03:20:33 stenn@whimsy.udel.edu +3 -3
+ 1.12.1.1 01/09/18 03:20:33 stenn@whimsy.udel.edu +3 -3
Add README.bk to the distribution list.
Do the .warning message as a BUILT_SOURCES entry, not as a dependency to Makefile.
-ChangeSet@1.702, 2001-09-16 00:25:29-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.708 01/09/16 00:29:33 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev-ipv6
+
+ README.bk
+ 1.4.1.1 01/09/16 00:29:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.706.1.1 01/09/16 00:28:33 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ README.bk
+ 1.5 01/09/16 00:28:32 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.2.3 01/09/16 00:25:29 stenn@whimsy.udel.edu +1 -0
autoreconf updates
README.bk
- 1.5 01/09/16 00:25:28 stenn@whimsy.udel.edu +1 -1
+ 1.1.1.4 01/09/16 00:25:28 stenn@whimsy.udel.edu +1 -1
autoreconf updates
-ChangeSet@1.701, 2001-09-16 00:14:53-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.2.2 01/09/16 00:14:53 stenn@whimsy.udel.edu +8 -0
Make the *.ds[pw] files be EOLN_NATIVE.
- ports/winnt/instsrv/Instsrv.dsp
- 1.4 01/09/16 00:07:14 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/ntpd/ntpd.dsp
+ 1.11 01/09/16 00:07:14 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
ports/winnt/libntp/libntp.dsp
1.6 01/09/16 00:07:14 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/ntpd/ntpd.dsp
- 1.11 01/09/16 00:07:14 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/instsrv/Instsrv.dsp
+ 1.4 01/09/16 00:07:14 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/ntp.dsw
- 1.5 01/09/16 00:07:13 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/ntptrace/ntptrace.dsp
+ 1.6 01/09/16 00:07:13 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/ntpdate/ntpdate.dsp
+ ports/winnt/ntpq/ntpq.dsp
1.6 01/09/16 00:07:13 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
@@ -3657,71 +22748,456 @@ ChangeSet@1.701, 2001-09-16 00:14:53-04:00, stenn@whimsy.udel.edu
1.6 01/09/16 00:07:13 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/ntpq/ntpq.dsp
+ ports/winnt/ntpdate/ntpdate.dsp
1.6 01/09/16 00:07:13 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
- ports/winnt/ntptrace/ntptrace.dsp
- 1.6 01/09/16 00:07:13 stenn@whimsy.udel.edu +0 -0
+ ports/winnt/ntp.dsw
+ 1.5 01/09/16 00:07:13 stenn@whimsy.udel.edu +0 -0
Turn on EOLN_NATIVE flag
-ChangeSet@1.700, 2001-09-15 03:16:54-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.2.1 01/09/15 03:16:54 stenn@whimsy.udel.edu +1 -0
ntp-dev-ipv6 update to README.bk
README.bk
- 1.4 01/09/15 03:16:54 stenn@whimsy.udel.edu +9 -0
+ 1.1.1.3 01/09/15 03:16:54 stenn@whimsy.udel.edu +9 -0
Talk about the new ntp-dev-ipv6 repo.
-ChangeSet@1.699, 2001-09-13 01:42:48-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.707 01/09/14 23:45:35 stenn@whimsy.udel.edu +13 -0
+ Merge ipv6 changes with stuff since 4.1.0
+
+ ntpd/ntp_proto.c
+ 1.100 01/09/14 23:45:35 stenn@whimsy.udel.edu +3 -8
+ ipv6 merges
+
+ ntpd/ntp_io.c
+ 1.22 01/09/14 23:45:34 stenn@whimsy.udel.edu +14 -0
+ ipv6 merges
+
+ include/ntpd.h
+ 1.32 01/09/14 23:45:34 stenn@whimsy.udel.edu +1 -1
+ ipv6 merges
+
+ ntpd/ntp_util.c
+ 1.16 01/09/14 22:12:37 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_request.c
+ 1.25 01/09/14 22:12:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_refclock.c
+ 1.41 01/09/14 22:12:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_peer.c
+ 1.33 01/09/14 22:12:35 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_control.c
+ 1.40 01/09/14 22:12:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.53 01/09/14 22:12:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ libntp/Makefile.am
+ 1.13 01/09/14 22:12:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_stdlib.h
+ 1.12 01/09/14 22:12:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp_control.h
+ 1.16 01/09/14 22:12:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ include/ntp.h
+ 1.51 01/09/14 22:12:33 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.683.1.17 01/09/14 17:54:19 stenn@whimsy.udel.edu +30 -0
+ IPV6 patches
+ From: Jean-Francois.Boudreault@viagenie.qc.ca
+
+ libntp/socktohost.c
+ 1.1 01/09/14 17:54:17 stenn@whimsy.udel.edu +30 -0
+
+ libntp/socktoa.c
+ 1.1 01/09/14 17:54:17 stenn@whimsy.udel.edu +41 -0
+
+ INSTALLv6.txt
+ 1.1 01/09/14 17:54:17 stenn@whimsy.udel.edu +13 -0
+
+ ntpdate/ntpdate.h
+ 1.5 01/09/14 17:54:17 stenn@whimsy.udel.edu +6 -1
+ IPV6 patches
+
+ ntpdate/ntpdate.c
+ 1.24 01/09/14 17:54:17 stenn@whimsy.udel.edu +218 -90
+ IPV6 patches
+
+ libntp/socktohost.c
+ 1.0 01/09/14 17:54:17 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev-ipv6/libntp/socktohost.c
+
+ libntp/socktoa.c
+ 1.0 01/09/14 17:54:17 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev-ipv6/libntp/socktoa.c
+
+ INSTALLv6.txt
+ 1.0 01/09/14 17:54:17 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-dev-ipv6/INSTALLv6.txt
+
+ ntpd/refclock_atom.c
+ 1.35 01/09/14 17:54:16 stenn@whimsy.udel.edu +1 -1
+ IPV6 patches
+
+ ntpd/ntp_util.c
+ 1.14.1.1 01/09/14 17:54:16 stenn@whimsy.udel.edu +34 -7
+ IPV6 patches
+
+ ntpd/ntp_restrict.c
+ 1.4 01/09/14 17:54:16 stenn@whimsy.udel.edu +249 -34
+ IPV6 patches
+
+ ntpd/ntp_resolver.c
+ 1.12 01/09/14 17:54:16 stenn@whimsy.udel.edu +14 -30
+ IPV6 patches
+
+ ntpd/ntp_request.c
+ 1.23.1.1 01/09/14 17:54:16 stenn@whimsy.udel.edu +276 -229
+ IPV6 patches
+
+ ntpd/ntp_refclock.c
+ 1.39.1.1 01/09/14 17:54:16 stenn@whimsy.udel.edu +27 -13
+ IPV6 patches
+
+ ntpd/ntp_proto.c
+ 1.93.1.1 01/09/14 17:54:16 stenn@whimsy.udel.edu +33 -31
+ IPV6 patches
+
+ ntpd/ntp_peer.c
+ 1.29.1.1 01/09/14 17:54:15 stenn@whimsy.udel.edu +41 -23
+ IPV6 patches
+
+ ntpd/ntp_monitor.c
+ 1.5 01/09/14 17:54:15 stenn@whimsy.udel.edu +9 -8
+ IPV6 patches
+
+ ntpd/ntp_io.c
+ 1.20.1.1 01/09/14 17:54:15 stenn@whimsy.udel.edu +696 -306
+ IPV6 patches
+
+ ntpd/ntp_intres.c
+ 1.18 01/09/14 17:54:15 stenn@whimsy.udel.edu +29 -46
+ IPV6 patches
+
+ ntpd/ntp_control.c
+ 1.37.1.1 01/09/14 17:54:15 stenn@whimsy.udel.edu +30 -27
+ IPV6 patches
+
+ ntpd/ntp_config.c
+ 1.50.1.1 01/09/14 17:54:15 stenn@whimsy.udel.edu +79 -85
+ IPV6 patches
+
+ ntpd/cmd_args.c
+ 1.8 01/09/14 17:54:15 stenn@whimsy.udel.edu +9 -5
+ IPV6 patches
+
+ libntp/refnumtoa.c
+ 1.2 01/09/14 17:54:15 stenn@whimsy.udel.edu +15 -10
+ IPV6 patches
+
+ libntp/netof.c
+ 1.2 01/09/14 17:54:14 stenn@whimsy.udel.edu +17 -5
+ IPV6 patches
+
+ libntp/Makefile.am
+ 1.11.1.1 01/09/14 17:54:14 stenn@whimsy.udel.edu +1 -1
+ IPV6 patches
+
+ include/recvbuff.h
+ 1.2 01/09/14 17:54:14 stenn@whimsy.udel.edu +2 -2
+ IPV6 patches
+
+ include/ntpd.h
+ 1.27.1.1 01/09/14 17:54:14 stenn@whimsy.udel.edu +23 -20
+ IPV6 patches
+
+ include/ntp_stdlib.h
+ 1.10.1.1 01/09/14 17:54:14 stenn@whimsy.udel.edu +5 -2
+ IPV6 patches
+
+ include/ntp_request.h
+ 1.11 01/09/14 17:54:14 stenn@whimsy.udel.edu +26 -34
+ IPV6 patches
+
+ include/ntp_refclock.h
+ 1.10 01/09/14 17:54:14 stenn@whimsy.udel.edu +2 -2
+ IPV6 patches
+
+ include/ntp_fp.h
+ 1.3 01/09/14 17:54:14 stenn@whimsy.udel.edu +5 -2
+ IPV6 patches
+
+ include/ntp_control.h
+ 1.13.1.1 01/09/14 17:54:14 stenn@whimsy.udel.edu +1 -1
+ IPV6 patches
+
+ include/ntp.h
+ 1.47.1.1 01/09/14 17:54:14 stenn@whimsy.udel.edu +43 -11
+ IPV6 patches
+
+ChangeSet
+ 1.706 01/09/13 02:05:34 stenn@whimsy.udel.edu +1 -0
+ Fix from Dave Mills: location of #endif typo.
+
+ ntpd/ntp_peer.c
+ 1.32 01/09/13 02:05:33 stenn@whimsy.udel.edu +1 -1
+ Fix a typo (location) on an #endif for OPENSSL.
+ From: Dave Mills.
+
+ChangeSet
+ 1.705 01/09/13 01:58:19 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ BitKeeper/etc/ignore
+ 1.9 01/09/13 01:58:13 stenn@whimsy.udel.edu +2 -2
+ auto-union
+
+ChangeSet
+ 1.683.1.16 01/09/13 01:42:48 stenn@whimsy.udel.edu +1 -0
Ignore some auto* related files.
BitKeeper/etc/ignore
- 1.5 01/09/13 01:38:23 stenn@whimsy.udel.edu +2 -0
+ 1.1.1.4 01/09/13 01:38:23 stenn@whimsy.udel.edu +2 -0
added config.h.in stamp-h.in
-ChangeSet@1.698, 2001-09-11 21:41:11-04:00, stenn@whimsy.udel.edu
- Remove more auto* generated/related files.
+ChangeSet
+ 1.704 01/09/11 22:03:54 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
BitKeeper/deleted/.del-config.h.in~3aed0663
- 1.63 01/09/11 21:33:41 stenn@whimsy.udel.edu +0 -0
- Delete: config.h.in
+ 1.65 01/09/11 22:03:53 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-config.h.in~3aed0663
+ 1.64 01/09/11 22:03:52 stenn@whimsy.udel.edu +0 -0
+ Merge rename: config.h.in -> BitKeeper/deleted/.del-config.h.in~3aed0663
+
+ChangeSet
+ 1.683.1.15 01/09/11 21:41:11 stenn@whimsy.udel.edu +2 -0
+ Remove more auto* generated/related files.
BitKeeper/deleted/.del-stamp-h.in~3aed0663
1.4 01/09/11 21:33:41 stenn@whimsy.udel.edu +0 -0
Delete: stamp-h.in
-ChangeSet@1.697, 2001-09-08 20:23:01-04:00, stenn@whimsy.udel.edu
+ BitKeeper/deleted/.del-config.h.in~3aed0663
+ 1.62.1.1 01/09/11 21:33:41 stenn@whimsy.udel.edu +0 -0
+ Delete: config.h.in
+
+ChangeSet
+ 1.703 01/09/08 20:29:17 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ README.bk
+ 1.4 01/09/08 20:29:16 stenn@whimsy.udel.edu +8 -9
+ Auto merged
+
+ChangeSet
+ 1.683.1.14 01/09/08 20:23:01 stenn@whimsy.udel.edu +1 -0
Document the mirrors at www.ntp.org.
README.bk
- 1.3 01/09/08 20:23:01 stenn@whimsy.udel.edu +14 -1
+ 1.1.1.2 01/09/08 20:23:01 stenn@whimsy.udel.edu +14 -1
Document the mirrors at www.ntp.org.
-ChangeSet@1.696, 2001-09-08 19:39:22-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.702 01/09/08 19:54:57 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ README.bk
+ 1.3 01/09/08 19:54:57 stenn@whimsy.udel.edu +0 -12
+ Auto merged
+
+ChangeSet
+ 1.683.1.13 01/09/08 19:39:22 stenn@whimsy.udel.edu +1 -0
Doc updates.
README.bk
- 1.2 01/09/08 19:39:21 stenn@whimsy.udel.edu +12 -2
+ 1.1.1.1 01/09/08 19:39:21 stenn@whimsy.udel.edu +12 -2
Say what versions of the auto* tools we need.
Say where to find bk and the ntp repos.
-ChangeSet@1.695, 2001-09-06 04:09:32-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.701 01/09/08 03:57:56 stenn@whimsy.udel.edu +2 -0
+ Lose ntp_update. It's a CVS thing...
+
+ README
+ 1.16 01/09/08 03:57:55 stenn@whimsy.udel.edu +0 -2
+ Lose ntp_update - we don't need it anymore.
+
+ BitKeeper/deleted/.del-ntp_update~382c0630
+ 1.7 01/09/08 03:51:39 stenn@whimsy.udel.edu +0 -0
+ Delete: ntp_update
+
+ChangeSet
+ 1.700 01/09/08 03:31:34 stenn@whimsy.udel.edu +27 -0
+ Lose DES and MD5 manifests, lose rsaref stuff.
+
+ util/ntp-genkeys.c
+ 1.57 01/09/08 03:31:28 stenn@whimsy.udel.edu +2 -2
+ Lose DES stuff.
+
+ util/Makefile.am
+ 1.11 01/09/08 03:31:28 stenn@whimsy.udel.edu +3 -3
+ Lose rsaref stuff.
+
+ ports/winnt/include/config.h
+ 1.10 01/09/08 03:31:28 stenn@whimsy.udel.edu +0 -2
+ Lose DES and MD5.
+
+ ntpq/ntpq.c
+ 1.17 01/09/08 03:31:27 stenn@whimsy.udel.edu +5 -15
+ Lose DES stuff.
+
+ ntpq/Makefile.am
+ 1.5 01/09/08 03:31:27 stenn@whimsy.udel.edu +2 -2
+ Lose rsaref stuff.
+
+ ntpdc/ntpdc.c
+ 1.9 01/09/08 03:31:27 stenn@whimsy.udel.edu +6 -16
+ Lose DES stuff.
+
+ ntpdc/Makefile.am
+ 1.4 01/09/08 03:31:27 stenn@whimsy.udel.edu +2 -2
+ Lose rsaref stuff.
+
+ ntpdate/Makefile.am
+ 1.6 01/09/08 03:31:27 stenn@whimsy.udel.edu +2 -2
+ Lose rsaref stuff.
+
+ ntpd/ntp_proto.c
+ 1.99 01/09/08 03:31:27 stenn@whimsy.udel.edu +1 -1
+ Lose DES.
+
+ ntpd/Makefile.am
+ 1.19 01/09/08 03:31:27 stenn@whimsy.udel.edu +3 -3
+ Lose rsaref stuff.
+
+ libntp/authusekey.c
+ 1.4 01/09/08 03:31:27 stenn@whimsy.udel.edu +0 -83
+ Lose DES-related stuff.
+
+ libntp/authreadkeys.c
+ 1.4 01/09/08 03:31:27 stenn@whimsy.udel.edu +0 -37
+ Lose DES-related stuff.
+
+ libntp/authkeys.c
+ 1.7 01/09/08 03:31:27 stenn@whimsy.udel.edu +0 -74
+ Lose DES stuff.
+
+ libntp/Makefile.am
+ 1.12 01/09/08 03:31:27 stenn@whimsy.udel.edu +2 -2
+ Lose DES- and rsaref-related stuff.
+
+ include/ntp_stdlib.h
+ 1.11 01/09/08 03:31:26 stenn@whimsy.udel.edu +0 -9
+ Lose DES-related stuff.
+
+ include/ntp_machine.h
+ 1.8 01/09/08 03:31:26 stenn@whimsy.udel.edu +2 -2
+ Lose DES-related stuff.
+
+ configure.in
+ 1.223 01/09/08 03:31:26 stenn@whimsy.udel.edu +15 -51
+ Lose rsaref-related stuff.
+
+ config.h.in
+ 1.63 01/09/08 03:31:26 stenn@whimsy.udel.edu +0 -9
+ Perhaps we should lose this file from the repo...
+ Lose the DES, MD5, and RSAREF manifests.
+
+ acconfig.h
+ 1.24 01/09/08 03:31:26 stenn@whimsy.udel.edu +0 -6
+ Lose the MD5 manifest - we always support it.
+ Lose the DES manifest - we don't support DES anymore.
+
+ README
+ 1.15 01/09/08 03:31:26 stenn@whimsy.udel.edu +1 -5
+ Added README.bk, lose README.cvs, README.des, and librsaref entries.
+
+ Makefile.am
+ 1.13 01/09/08 03:31:26 stenn@whimsy.udel.edu +0 -1
+ Lose librsaref - we don't use it anymore.
+
+ BitKeeper/deleted/.del-authparity.c~3aed0663
+ 1.4 01/09/08 02:37:24 stenn@whimsy.udel.edu +0 -0
+ Delete: libntp/authparity.c
+
+ BitKeeper/deleted/.del-authencrypt.c~3aed0663
+ 1.6 01/09/08 02:35:05 stenn@whimsy.udel.edu +0 -0
+ Delete: libntp/authencrypt.c
+
+ BitKeeper/deleted/.del-README.cvs~1e180ca3
+ 1.7 01/09/08 02:23:03 stenn@whimsy.udel.edu +0 -0
+ Delete: README.cvs
+
+ BitKeeper/deleted/.del-README.rsa~6f1a085f
+ 1.4 01/09/08 02:22:08 stenn@whimsy.udel.edu +0 -0
+ Delete: README.rsa
+
+ BitKeeper/deleted/.del-README.des~3aed0663
+ 1.7 01/09/08 02:21:37 stenn@whimsy.udel.edu +0 -0
+ Delete: README.des
+
+ BitKeeper/deleted/.del-Makefile.am~e832209e
+ 1.15 01/09/08 02:18:56 stenn@whimsy.udel.edu +0 -0
+ Delete: librsaref/Makefile.am
+
+ChangeSet
+ 1.699 01/09/06 04:22:29 stenn@whimsy.udel.edu +2 -0
+ Cleanup pull from ntp-stable
+
+ configure.in
+ 1.222 01/09/06 04:22:29 stenn@whimsy.udel.edu +0 -1
+ We use ntp-dev version numbers, not ntp-stable ones.
+
+ BitKeeper/etc/ignore
+ 1.8 01/09/06 04:15:41 stenn@whimsy.udel.edu +10 -11
+ auto-union
+
+ChangeSet
+ 1.683.1.12 01/09/06 04:09:32 stenn@whimsy.udel.edu +1 -0
From: David Campbell <dcampbell@uk.ibm.com>
Subject: [ntp:bugs] Compiling ntp on Dynix PTX (CFLAGS patch)
configure.in
- 1.221 01/09/06 04:09:31 stenn@whimsy.udel.edu +2 -2
+ 1.219.1.2 01/09/06 04:09:31 stenn@whimsy.udel.edu +2 -2
From: David Campbell <dcampbell@uk.ibm.com>
Subject: [ntp:bugs] Compiling ntp on Dynix PTX (CFLAGS patch)
-ChangeSet@1.694, 2001-09-06 03:36:29-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.1.11 01/09/06 03:36:29 stenn@whimsy.udel.edu +1 -0
Ignore ~ backup files.
BitKeeper/etc/ignore
- 1.4 01/09/06 03:36:28 stenn@whimsy.udel.edu +1 -0
+ 1.1.1.3 01/09/06 03:36:28 stenn@whimsy.udel.edu +1 -0
Ignore ~ backup files.
-ChangeSet@1.693, 2001-09-06 03:26:08-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.1.10 01/09/06 03:26:08 stenn@whimsy.udel.edu +1 -0
From: Hubert Feyrer <hubert@feyrer.de>
Subject: [ntp:bugs] "-u" missing from ntpdate usage statement
@@ -3730,41 +23206,224 @@ ChangeSet@1.693, 2001-09-06 03:26:08-04:00, stenn@whimsy.udel.edu
From: Hubert Feyrer <hubert@feyrer.de>
Subject: [ntp:bugs] "-u" missing from ntpdate usage statement
-ChangeSet@1.692, 2001-09-06 02:28:37-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.698 01/09/06 02:42:14 stenn@whimsy.udel.edu +1 -0
+ Merge whimsy.udel.edu:/backroom/ntp-stable
+ into whimsy.udel.edu:/backroom/ntp-dev
+
+ BitKeeper/etc/config
+ 1.5 01/09/06 02:42:14 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ChangeSet
+ 1.683.1.9 01/09/06 02:28:37 stenn@whimsy.udel.edu +1 -0
Try the new EDIT checkout mode - it's supposed to fix the timestamp problem.
BitKeeper/etc/config
- 1.3 01/09/06 02:28:36 stenn@whimsy.udel.edu +1 -1
+ 1.1.1.2 01/09/06 02:28:36 stenn@whimsy.udel.edu +1 -1
Use checkout:EDIT instead of checkout:edit.
-ChangeSet@1.691, 2001-08-27 03:49:01-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.697 01/09/06 01:30:35 stenn@whimsy.udel.edu +3 -0
+ Changes from Dave Mills: loop stability improvements.
+
+ ntpd/ntp_proto.c
+ 1.98 01/09/06 01:30:34 stenn@whimsy.udel.edu +3 -4
+ allan_xpt changes.
+
+ ntpd/ntp_loopfilter.c
+ 1.55 01/09/06 01:30:34 stenn@whimsy.udel.edu +38 -34
+ CLOCK_* #define cleanups.
+ The allan_xpt is now log2 seconds.
+ Added hybrid PLL/FLL parameters.
+ Loop stability improvements.
+
+ include/ntpd.h
+ 1.31 01/09/06 01:30:33 stenn@whimsy.udel.edu +1 -1
+ allan_xpt is now a u_char (was a double).
+
+ChangeSet
+ 1.696 01/09/06 01:04:40 stenn@whimsy.udel.edu +2 -0
+ Say more in README.bk, ignore ~ files.
+
+ README.bk
+ 1.2 01/09/06 01:04:39 stenn@whimsy.udel.edu +12 -2
+ Add more stuff.
+
+ BitKeeper/etc/ignore
+ 1.7 01/09/06 01:04:39 stenn@whimsy.udel.edu +1 -0
+ Ignore *~ files.
+
+ChangeSet
+ 1.695 01/09/06 00:48:43 stenn@whimsy.udel.edu +1 -0
+ checkout:EDIT
+
+ BitKeeper/etc/config
+ 1.4 01/09/06 00:48:42 stenn@whimsy.udel.edu +1 -1
+ try using EDIT instead of edit for the checkout mode.
+
+ChangeSet
+ 1.694 01/09/03 05:25:45 stenn@whimsy.udel.edu +11 -0
+ Changes and updates from Dave Mills.
+
+ ntpd/ntp_timer.c
+ 1.17 01/09/03 05:25:44 stenn@whimsy.udel.edu +8 -4
+ sys_revoke chagnes. Use a random poll interval.
+ Record the refresh timestamp in the crypto stats.
+
+ ntpd/ntp_refclock.c
+ 1.40 01/09/03 05:25:43 stenn@whimsy.udel.edu +1 -7
+ Lose the local hpoll stuff.
+
+ ntpd/ntp_proto.c
+ 1.97 01/09/03 05:25:43 stenn@whimsy.udel.edu +65 -55
+ Fix a typo re config.h inclusion.
+ clock_select() cleanup. Be careful when we unpeer() versus peer_clear().
+ poll_update() changes for SKEY.
+ hpoll changes.
+ Randomization changes.
+ More debug info on the selection stuff.
+ peer list survivor cleanup.
+ Lose a call to poll_update(). No more hcookie.
+
+ ntpd/ntp_peer.c
+ 1.31 01/09/03 05:25:43 stenn@whimsy.udel.edu +29 -8
+ Log unpeer info.
+ hpoll/ppoll cleanup.
+ Log newpeer info.
+ More peer-related wiggles.
+ anycast(?) poll_update cleanup.
+
+ ntpd/ntp_loopfilter.c
+ 1.54 01/09/03 05:25:43 stenn@whimsy.udel.edu +39 -13
+ Group PPS_MAXAGE with earlier #define's.
+ PLL/FLL/Allan intercept wiggles.
+
+ ntpd/ntp_crypto.c
+ 1.46 01/09/03 05:25:43 stenn@whimsy.udel.edu +9 -13
+ Lose MAX_LINELEN and MAX_STATLEN in favor of NTP_MAXSTRLEN.
+ No more hcookie.
+
+ ntpd/ntp_control.c
+ 1.39 01/09/03 05:25:42 stenn@whimsy.udel.edu +6 -10
+ CP_SASKEY changes.
+ Deal with losing hcookie.
+
+ ntpd/ntp_config.c
+ 1.52 01/09/03 05:25:42 stenn@whimsy.udel.edu +1 -1
+ sys_revoke changes.
+
+ include/ntpd.h
+ 1.30 01/09/03 05:25:42 stenn@whimsy.udel.edu +1 -1
+ sys_revoke is now log2 - make it a u_char instead of a u_long.
+
+ include/ntp_control.h
+ 1.15 01/09/03 05:25:42 stenn@whimsy.udel.edu +4 -5
+ Lose CP_SASKEY.
+
+ include/ntp.h
+ 1.50 01/09/03 05:25:42 stenn@whimsy.udel.edu +2 -2
+ Create NTP_MAXSTR, a generic max strlen value.
+ Lose the host cookie.
+
+ChangeSet
+ 1.693 01/09/03 04:15:52 stenn@whimsy.udel.edu +5 -0
+ html cleanup from Dave Mills.
+
+ BitKeeper/etc/ignore
+ 1.6 01/09/03 04:15:52 stenn@whimsy.udel.edu +9 -0
+ Added html/pic/thumbs.db html/thumbs.db ntpd/loop.bak ntpd/loop.c ntpd/ntp_crypto.c.1 ntpd/ntp_proto.c.1 ntpd/peer.bak ntpd/peer.c ntpd/precision to the ignore list
+
+ html/release.htm
+ 1.15 01/09/03 04:15:51 stenn@whimsy.udel.edu +31 -26
+ Cleanup, reformat, and reality check.
+
+ html/ntpq.htm
+ 1.8 01/09/03 04:15:51 stenn@whimsy.udel.edu +8 -2
+ Cleanup, reformat, and reality check.
+
+ html/confopt.htm
+ 1.15 01/09/03 04:15:51 stenn@whimsy.udel.edu +11 -15
+ Cleanup, reformat, and reality check.
+
+ html/assoc.htm
+ 1.7 01/09/03 04:15:51 stenn@whimsy.udel.edu +304 -54
+ Cleanup, reformat, and reality check.
+
+ChangeSet
+ 1.692 01/08/27 04:17:41 stenn@whimsy.udel.edu +6 -0
+ Lose auto* generated files.
+
+ configure.in
+ 1.221 01/08/27 04:17:40 stenn@whimsy.udel.edu +1 -2
+ Update version number
+
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~13
+ 1.29 01/08/27 04:17:40 stenn@whimsy.udel.edu +79 -26
+ Pedantic cruft.
+
+ BitKeeper/deleted/.del-configure~3aed0663
+ 1.227 01/08/27 04:05:05 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-aclocal.m4~3aed0663
+ 1.90 01/08/27 04:05:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-COPYRIGHT~3aed0663
+ 1.25 01/08/27 04:05:03 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ BitKeeper/deleted/.del-configure~3aed0663
+ 1.226 01/08/27 04:05:02 stenn@whimsy.udel.edu +0 -0
+ Merge rename: configure -> BitKeeper/deleted/.del-configure~3aed0663
+
+ BitKeeper/deleted/.del-aclocal.m4~3aed0663
+ 1.89 01/08/27 04:05:01 stenn@whimsy.udel.edu +0 -0
+ Merge rename: aclocal.m4 -> BitKeeper/deleted/.del-aclocal.m4~3aed0663
+
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~13
+ 1.28 01/08/27 04:05:00 stenn@whimsy.udel.edu +0 -0
+ Merge rename: util/Makefile.in -> BitKeeper/deleted/.del-Makefile.in~3aed0663~13
+
+ BitKeeper/deleted/.del-COPYRIGHT~3aed0663
+ 1.24 01/08/27 04:05:00 stenn@whimsy.udel.edu +0 -0
+ Merge rename: COPYRIGHT -> BitKeeper/deleted/.del-COPYRIGHT~3aed0663
+
+ BitKeeper/etc/ignore
+ 1.5 01/08/27 04:04:54 stenn@whimsy.udel.edu +7 -7
+ auto-union
+
+ChangeSet
+ 1.683.1.8 01/08/27 03:49:01 stenn@whimsy.udel.edu +5 -0
Finish up cleanup from losing generated files.
Bump verison number.
+ README.bk
+ 1.1 01/08/27 03:49:00 stenn@whimsy.udel.edu +15 -0
+
BitKeeper/etc/ignore
- 1.3 01/08/27 03:49:01 stenn@whimsy.udel.edu +22 -0
+ 1.1.1.2 01/08/27 03:49:01 stenn@whimsy.udel.edu +22 -0
Added COPYRIGHT ElectricFence/Makefile.in Makefile.in aclocal.m4 adjtimed/Makefile.in am.log clockstuff/Makefile.in configure include/Makefile.in kernel/Makefile.in kernel/sys/Makefile.in libntp/Makefile.in libparse/Makefile.in librsaref/Makefile.in ntpd/Makefile.in ntpdate/Makefile.in ntpdc/Makefile.in ntpq/Makefile.in ntptrace/Makefile.in parseutil/Makefile.in scripts/Makefile.in util/Makefile.in to the ignore list
- README.bk
- 1.1 01/08/27 03:49:00 stenn@whimsy.udel.edu +15 -0
+ configure.in
+ 1.219.1.1 01/08/27 03:49:00 stenn@whimsy.udel.edu +1 -1
+ Call this version '0a1.
config.h.in
1.62 01/08/27 03:49:00 stenn@whimsy.udel.edu +3 -0
HAVE_STDINT_H check.
- README.bk
- 1.0 01/08/27 03:49:00 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/README.bk
-
clockstuff/Makefile.am
1.2 01/08/27 03:49:00 stenn@whimsy.udel.edu +2 -2
Portability improvements found by automake 1.5
- configure.in
- 1.220 01/08/27 03:49:00 stenn@whimsy.udel.edu +1 -1
- Call this version '0a1.
+ README.bk
+ 1.0 01/08/27 03:49:00 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-stable/README.bk
-ChangeSet@1.690, 2001-08-27 03:30:52-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.1.7 01/08/27 03:30:52 stenn@whimsy.udel.edu +21 -0
.del-aclocal.m4~3aed0663:
Delete: aclocal.m4
.del-Makefile.in~52231e38:
@@ -3809,90 +23468,91 @@ ChangeSet@1.690, 2001-08-27 03:30:52-04:00, stenn@whimsy.udel.edu
Delete: configure
BitKeeper/deleted/.del-aclocal.m4~3aed0663
- 1.88 01/08/27 02:37:31 stenn@whimsy.udel.edu +217 -160
+ 1.86.1.2 01/08/27 02:37:31 stenn@whimsy.udel.edu +217 -160
Delete: aclocal.m4
- BitKeeper/deleted/.del-Makefile.in~52231e38
- 1.18 01/08/27 02:35:20 stenn@whimsy.udel.edu +89 -97
- Delete: ElectricFence/Makefile.in
-
BitKeeper/deleted/.del-Makefile.in~bd702e17
1.27 01/08/27 02:35:20 stenn@whimsy.udel.edu +30 -39
Delete: scripts/Makefile.in
- BitKeeper/deleted/.del-Makefile.in~3aed0663~12
- 1.23 01/08/27 02:35:20 stenn@whimsy.udel.edu +76 -88
- Delete: parseutil/Makefile.in
-
- BitKeeper/deleted/.del-Makefile.in~3aed0663~13
- 1.27 01/08/27 02:35:20 stenn@whimsy.udel.edu +150 -169
- Delete: util/Makefile.in
+ BitKeeper/deleted/.del-Makefile.in~52231e38
+ 1.18 01/08/27 02:35:20 stenn@whimsy.udel.edu +89 -97
+ Delete: ElectricFence/Makefile.in
BitKeeper/deleted/.del-Makefile.in~3aed0663~14
1.43 01/08/27 02:35:20 stenn@whimsy.udel.edu +62 -63
Delete: Makefile.in
- BitKeeper/deleted/.del-Makefile.in~3aed0663~11
- 1.22 01/08/27 02:35:19 stenn@whimsy.udel.edu +76 -87
- Delete: ntptrace/Makefile.in
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~13
+ 1.26.1.1 01/08/27 02:35:20 stenn@whimsy.udel.edu +150 -169
+ Delete: util/Makefile.in
- BitKeeper/deleted/.del-Makefile.in~3aed0663~10
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~12
+ 1.23 01/08/27 02:35:20 stenn@whimsy.udel.edu +76 -88
+ Delete: parseutil/Makefile.in
+
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~9
1.27 01/08/27 02:35:19 stenn@whimsy.udel.edu +78 -89
- Delete: ntpq/Makefile.in
+ Delete: ntpdc/Makefile.in
- BitKeeper/deleted/.del-Makefile.in~3aed0663~6
- 1.27 01/08/27 02:35:19 stenn@whimsy.udel.edu +148 -152
- Delete: libparse/Makefile.in
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~8
+ 1.31 01/08/27 02:35:19 stenn@whimsy.udel.edu +86 -97
+ Delete: ntpdate/Makefile.in
BitKeeper/deleted/.del-Makefile.in~3aed0663~7
1.30 01/08/27 02:35:19 stenn@whimsy.udel.edu +273 -260
Delete: ntpd/Makefile.in
- BitKeeper/deleted/.del-Makefile.in~3aed0663~8
- 1.31 01/08/27 02:35:19 stenn@whimsy.udel.edu +86 -97
- Delete: ntpdate/Makefile.in
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~6
+ 1.27 01/08/27 02:35:19 stenn@whimsy.udel.edu +148 -152
+ Delete: libparse/Makefile.in
- BitKeeper/deleted/.del-Makefile.in~3aed0663~9
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~11
+ 1.22 01/08/27 02:35:19 stenn@whimsy.udel.edu +76 -87
+ Delete: ntptrace/Makefile.in
+
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~10
1.27 01/08/27 02:35:19 stenn@whimsy.udel.edu +78 -89
- Delete: ntpdc/Makefile.in
+ Delete: ntpq/Makefile.in
- BitKeeper/deleted/.del-Makefile.in~3aed0663~1
- 1.22 01/08/27 02:35:18 stenn@whimsy.udel.edu +78 -89
- Delete: clockstuff/Makefile.in
+ BitKeeper/deleted/.del-Makefile.in~e832209e
+ 1.33 01/08/27 02:35:18 stenn@whimsy.udel.edu +89 -95
+ Delete: librsaref/Makefile.in
- BitKeeper/deleted/.del-Makefile.in~3aed0663
- 1.22 01/08/27 02:35:18 stenn@whimsy.udel.edu +76 -87
- Delete: adjtimed/Makefile.in
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~5
+ 1.31 01/08/27 02:35:18 stenn@whimsy.udel.edu +282 -286
+ Delete: libntp/Makefile.in
BitKeeper/deleted/.del-Makefile.in~3aed0663~4
1.22 01/08/27 02:35:18 stenn@whimsy.udel.edu +43 -47
Delete: kernel/Makefile.in
- BitKeeper/deleted/.del-Makefile.in~3aed0663~5
- 1.31 01/08/27 02:35:18 stenn@whimsy.udel.edu +282 -286
- Delete: libntp/Makefile.in
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~3
+ 1.21 01/08/27 02:35:18 stenn@whimsy.udel.edu +34 -41
+ Delete: kernel/sys/Makefile.in
BitKeeper/deleted/.del-Makefile.in~3aed0663~2
1.34 01/08/27 02:35:18 stenn@whimsy.udel.edu +35 -42
Delete: include/Makefile.in
- BitKeeper/deleted/.del-Makefile.in~3aed0663~3
- 1.21 01/08/27 02:35:18 stenn@whimsy.udel.edu +34 -41
- Delete: kernel/sys/Makefile.in
-
- BitKeeper/deleted/.del-Makefile.in~e832209e
- 1.33 01/08/27 02:35:18 stenn@whimsy.udel.edu +89 -95
- Delete: librsaref/Makefile.in
+ BitKeeper/deleted/.del-Makefile.in~3aed0663~1
+ 1.22 01/08/27 02:35:18 stenn@whimsy.udel.edu +78 -89
+ Delete: clockstuff/Makefile.in
- BitKeeper/deleted/.del-COPYRIGHT~3aed0663
- 1.22 01/08/27 02:35:16 stenn@whimsy.udel.edu +0 -0
- Delete: COPYRIGHT
+ BitKeeper/deleted/.del-Makefile.in~3aed0663
+ 1.22 01/08/27 02:35:18 stenn@whimsy.udel.edu +76 -87
+ Delete: adjtimed/Makefile.in
BitKeeper/deleted/.del-configure~3aed0663
- 1.225 01/08/27 02:35:16 stenn@whimsy.udel.edu +1959 -2108
+ 1.224.1.1 01/08/27 02:35:16 stenn@whimsy.udel.edu +1959 -2108
Delete: configure
-ChangeSet@1.689, 2001-08-26 04:41:45-04:00, stenn@whimsy.udel.edu
+ BitKeeper/deleted/.del-COPYRIGHT~3aed0663
+ 1.20.1.2 01/08/27 02:35:16 stenn@whimsy.udel.edu +0 -0
+ Delete: COPYRIGHT
+
+ChangeSet
+ 1.683.1.6 01/08/26 04:41:45 stenn@whimsy.udel.edu +1 -0
Readline support,
From: Ollivier Robert <roberto@eurocontrol.fr>
@@ -3900,33 +23560,132 @@ ChangeSet@1.689, 2001-08-26 04:41:45-04:00, stenn@whimsy.udel.edu
1.16 01/08/26 03:06:34 stenn@whimsy.udel.edu +30 -14
Readline support.
-ChangeSet@1.688, 2001-08-23 03:56:20-04:00, stenn@whimsy.udel.edu
- Ignore A.* directories.
+ChangeSet
+ 1.690 01/08/26 00:14:37 stenn@whimsy.udel.edu +2 -0
+ Anti-clockhop hysteresis stuff from Dave Mills.
+
+ ntpd/ntp_proto.c
+ 1.96 01/08/26 00:14:36 stenn@whimsy.udel.edu +8 -1
+ Implement the anti-clockhop hysteresis stuff.
+ Comment accordingly.
+
+ include/ntp.h
+ 1.49 01/08/26 00:14:36 stenn@whimsy.udel.edu +3 -0
+ anti-clockhop hysteresis #defines
+
+ChangeSet
+ 1.689 01/08/26 00:05:56 stenn@whimsy.udel.edu +1 -0
+ Generated files. Gotta try and lose these soon...
+
+ COPYRIGHT
+ 1.23 01/08/26 00:05:55 stenn@whimsy.udel.edu +1 -1
+ Generated file
+
+ChangeSet
+ 1.688 01/08/23 22:52:15 stenn@whimsy.udel.edu +4 -0
+ Changes fro Dave Mills: crypto_recv() improvements, etc.
+
+ ntpd/ntp_proto.c
+ 1.95 01/08/23 22:52:15 stenn@whimsy.udel.edu +58 -46
+ Document some variables.
+ Call crypto_recv() with the new 3rd arg.
+ Do test4 (access denied) sooner.
+ Comment cleanup.
+ OpenSSL patch for is_org.
+ Call peer_clear() instead of key_expire()+flag wiggle.
BitKeeper/etc/ignore
- 1.2 01/08/23 02:35:50 stenn@whimsy.udel.edu +1 -0
- added A.*
+ 1.4 01/08/23 22:52:15 stenn@whimsy.udel.edu +6 -0
+ Added .buildkey br-flock ntpd/crypto.bak ntpd/crypto.c ntpd/proto.bak ntpd/proto.c to the ignore list
-ChangeSet@1.687, 2001-08-23 03:46:22-04:00, stenn@whimsy.udel.edu
- Don't include SCCS subdirs in a distribution.
+ ntpd/ntp_crypto.c
+ 1.45 01/08/23 22:52:14 stenn@whimsy.udel.edu +67 -27
+ Only create a sig if the tstamp isn't 0.
+
+ Add a timestamps test arg to crypto_recv().
+ Postpone setting peer->assoc.
+ Discard the message if the status word has already been received or
+ the response does not match the request.
+
+ include/ntpd.h
+ 1.29 01/08/23 22:52:14 stenn@whimsy.udel.edu +1 -1
+ crypto_recv() now takes a 3rd arg - the timestamps test flag.
+
+ChangeSet
+ 1.687 01/08/23 04:17:09 stenn@whimsy.udel.edu +3 -0
+ pull resolution
COPYRIGHT
- 1.21 01/08/23 03:46:21 stenn@whimsy.udel.edu +1 -1
+ 1.22 01/08/23 04:17:08 stenn@whimsy.udel.edu +0 -1
+ Conflict cleanup
+
+ aclocal.m4
+ 1.88 01/08/23 04:04:49 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ BitKeeper/etc/ignore
+ 1.3 01/08/23 04:04:45 stenn@whimsy.udel.edu +1 -2
+ auto-union
+
+ChangeSet
+ 1.683.1.5 01/08/23 03:56:20 stenn@whimsy.udel.edu +1 -0
+ Ignore A.* directories.
+
+ChangeSet
+ 1.683.1.4 01/08/23 03:46:22 stenn@whimsy.udel.edu +4 -0
+ Don't include SCCS subdirs in a distribution.
+
+ aclocal.m4
+ 1.86.1.1 01/08/23 03:46:21 stenn@whimsy.udel.edu +1 -1
Regenerated file.
Makefile.in
1.42 01/08/23 03:46:21 stenn@whimsy.udel.edu +1 -0
Regenerated file.
- aclocal.m4
- 1.87 01/08/23 03:46:21 stenn@whimsy.udel.edu +1 -1
- Regenerated file.
-
Makefile.am
1.12 01/08/23 03:46:21 stenn@whimsy.udel.edu +1 -0
Clean out SCCS subdirs when making a distribution.
-ChangeSet@1.686, 2001-08-16 02:47:35-04:00, stenn@whimsy.udel.edu
+ COPYRIGHT
+ 1.20.1.1 01/08/23 03:46:21 stenn@whimsy.udel.edu +1 -1
+ Regenerated file.
+
+ BitKeeper/etc/ignore
+ 1.1.1.1 01/08/23 02:35:50 stenn@whimsy.udel.edu +1 -0
+ added A.*
+
+ChangeSet
+ 1.686 01/08/17 18:36:01 stenn@whimsy.udel.edu +1 -0
+ Note the integration of OpenSSL in the NEWS file
+
+ NEWS
+ 1.32 01/08/17 18:35:57 stenn@whimsy.udel.edu +1 -0
+ Note the integration of OpenSSL
+
+ChangeSet
+ 1.685 01/08/17 18:21:24 stenn@whimsy.udel.edu +3 -0
+ Merge whimsy.udel.edu:/backroom/ntp-dev
+ into whimsy.udel.edu:/backroom/ntpssl41c
+
+ BitKeeper/etc/config
+ 1.3 01/08/17 18:21:24 stenn@whimsy.udel.edu +0 -2
+ Auto merged
+
+ BitKeeper/etc/logging_ok
+ 1.3 01/08/17 18:21:22 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge'
+
+ BitKeeper/deleted/.del-logging_ok~bfee81887dad4c1e
+ 1.2 01/08/17 18:21:21 stenn@whimsy.udel.edu +0 -0
+ Delete: BitKeeper/etc/logging_ok
+
+ BitKeeper/deleted/.del-logging_ok~bebb84d857254496
+ 1.2 01/08/17 18:21:21 stenn@whimsy.udel.edu +0 -0
+ 'Auto converge rename'
+
+ChangeSet
+ 1.683.1.3 01/08/16 02:47:35 stenn@whimsy.udel.edu +1 -0
Add a marker to the NEWS file.
NEWS
@@ -3934,14 +23693,16 @@ ChangeSet@1.686, 2001-08-16 02:47:35-04:00, stenn@whimsy.udel.edu
Add a "marker" to the file so we can easily segregate stable from
development changes in the NEWS file.
-ChangeSet@1.685, 2001-08-16 02:28:43-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.1.2 01/08/16 02:28:43 stenn@whimsy.udel.edu +1 -0
Final ntp-4.1.0 changes to the NEWS file.
NEWS
1.30 01/08/16 02:28:43 stenn@whimsy.udel.edu +2 -0
Add the final missing bits to the NEWS file for the 4.1.0 release.
-ChangeSet@1.684, 2001-08-16 01:05:37-04:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.683.1.1 01/08/16 01:05:37 stenn@whimsy.udel.edu +2 -0
Enable auto-checkout.
BitKeeper/etc/logging_ok
@@ -3952,13 +23713,263 @@ ChangeSet@1.684, 2001-08-16 01:05:37-04:00, stenn@whimsy.udel.edu
BitKeeper file /backroom/ntp-stable/BitKeeper/etc/logging_ok
BitKeeper/etc/config
- 1.2 01/08/16 01:05:21 stenn@whimsy.udel.edu +2 -0
+ 1.1.1.1 01/08/16 01:05:21 stenn@whimsy.udel.edu +2 -0
Dave and I want auto-checkout.
-ChangeSet@1.683, 2001-08-01 23:01:12-00:00, stenn@whimsy.udel.edu
+ChangeSet
+ 1.684 01/08/16 00:57:43 stenn@whimsy.udel.edu +8 -0
+ Merge Dave's OpenSSL work with the latest code.
+
+ include/ntp_config.h
+ 1.12 01/08/16 00:57:42 stenn@whimsy.udel.edu +0 -1
+ Lose an extra/redundant #define.
+
+ configure.in
+ 1.220 01/08/16 00:57:42 stenn@whimsy.udel.edu +1 -2
+ Use 4.1.70 as the version number for the merged OpenSSL code.
+
+ configure
+ 1.225 01/08/16 00:57:41 stenn@whimsy.udel.edu +1 -2
+ Generated file
+
+ ntpd/ntp_control.c
+ 1.38 01/08/16 00:49:36 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ ntpd/ntp_config.c
+ 1.51 01/08/16 00:49:36 stenn@whimsy.udel.edu +0 -39
+ Auto merged
+
+ html/driver35.htm
+ 1.5 01/08/16 00:49:35 stenn@whimsy.udel.edu +0 -1
+ Auto merged
+
+ html/config.htm
+ 1.5 01/08/16 00:49:35 stenn@whimsy.udel.edu +0 -150
+ Auto merged
+
+ aclocal.m4
+ 1.87 01/08/16 00:49:34 stenn@whimsy.udel.edu +0 -0
+ Auto merged
+
+ChangeSet
+ 1.672.1.3 01/08/15 18:45:08 stenn@whimsy.udel.edu +4 -0
+ Update some generated files. I'd like to lose these from the repo...
+
+ configure
+ 1.219.1.1 01/08/15 18:45:06 stenn@whimsy.udel.edu +3 -3
+ generated file
+
+ aclocal.m4
+ 1.81.1.1 01/08/15 18:45:06 stenn@whimsy.udel.edu +2 -2
+ Generated file
+
+ COPYRIGHT
+ 1.21 01/08/15 18:45:05 stenn@whimsy.udel.edu +1 -1
+ Generated file
+
+ BitKeeper/etc/ignore
+ 1.2 01/08/15 18:39:01 stenn@whimsy.udel.edu +1 -0
+ added A.*
+
+ChangeSet
+ 1.672.1.2 01/08/15 18:04:18 stenn@whimsy.udel.edu +1 -0
+ Dave and I like our code visible...
+
+ BitKeeper/etc/config
+ 1.2 01/08/15 18:04:18 stenn@whimsy.udel.edu +2 -0
+ Dave and I like our code visible...
+
+ChangeSet
+ 1.672.1.1 01/08/15 17:45:05 stenn@whimsy.udel.edu +44 -0
+ Dave's OpenSSL modifications
+
+ BitKeeper/etc/logging_ok
+ 1.1 01/08/15 05:13:24 stenn@whimsy.udel.edu +1 -0
+
+ BitKeeper/etc/logging_ok
+ 1.0 01/08/15 05:13:24 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-ssl-int/BitKeeper/etc/logging_ok
+
+ util/genkeys.c
+ 1.1 01/08/15 05:12:59 stenn@whimsy.udel.edu +452 -0
+
+ util/genkeys.c
+ 1.0 01/08/15 05:12:59 stenn@whimsy.udel.edu +0 -0
+ BitKeeper file /backroom/ntp-ssl-int/util/genkeys.c
+
+ util/Makefile.in
+ 1.27 01/08/15 05:12:59 stenn@whimsy.udel.edu +32 -29
+ generated file
+
+ util/Makefile.am
+ 1.10 01/08/15 05:12:59 stenn@whimsy.udel.edu +4 -3
+ Disable ntp_genkeys for now. Make genkeys instead.
+
+ ntpd/ntpd.c
+ 1.34 01/08/15 05:12:58 stenn@whimsy.udel.edu +4 -18
+ OpenSSL changes
+
+ ntpd/ntp_util.c
+ 1.15 01/08/15 05:12:58 stenn@whimsy.udel.edu +72 -3
+ OpenSSL changes
+
+ ntpd/ntp_timer.c
+ 1.16 01/08/15 05:12:58 stenn@whimsy.udel.edu +6 -6
+ OpenSSL changes
+
+ ntpd/ntp_request.c
+ 1.24 01/08/15 05:12:58 stenn@whimsy.udel.edu +2 -2
+ OpenSSL changes
+
+ ntpd/ntp_proto.c
+ 1.94 01/08/15 05:12:58 stenn@whimsy.udel.edu +312 -256
+ OpenSSL changes
+
+ ntpd/ntp_peer.c
+ 1.30 01/08/15 05:12:58 stenn@whimsy.udel.edu +9 -11
+ OpenSSL changes
+
+ ntpd/ntp_io.c
+ 1.21 01/08/15 05:12:58 stenn@whimsy.udel.edu +4 -0
+ OpenSSL changes
+
+ ntpd/ntp_crypto.c
+ 1.44 01/08/15 05:12:57 stenn@whimsy.udel.edu +1246 -1446
+ OpenSSL changes
+
+ ntpd/ntp_control.c
+ 1.36.1.1 01/08/15 05:12:57 stenn@whimsy.udel.edu +85 -68
+ OpenSSL changes
+
+ ntpd/ntp_config.c
+ 1.47.1.1 01/08/15 05:12:57 stenn@whimsy.udel.edu +70 -45
+ OpenSSL changes
+
+ libntp/statestr.c
+ 1.3 01/08/15 05:12:57 stenn@whimsy.udel.edu +35 -2
+ OpenSSL changes
+
+ libntp/authencrypt.c
+ 1.5 01/08/15 05:12:57 stenn@whimsy.udel.edu +2 -48
+ OpenSSL changes
+
+ libntp/a_md5encrypt.c
+ 1.6 01/08/15 05:12:57 stenn@whimsy.udel.edu +18 -26
+ OpenSSL changes
+
+ include/ntpd.h
+ 1.28 01/08/15 05:12:57 stenn@whimsy.udel.edu +21 -4
+ OpenSSL changes
+
+ include/ntp_crypto.h
+ 1.21 01/08/15 05:12:57 stenn@whimsy.udel.edu +75 -70
+ OpenSSL changes
+
+ include/ntp_control.h
+ 1.14 01/08/15 05:12:56 stenn@whimsy.udel.edu +17 -17
+ OpenSSL changes
+
+ include/ntp_config.h
+ 1.10.1.1 01/08/15 05:12:56 stenn@whimsy.udel.edu +14 -13
+ OpenSSL changes
+
+ include/ntp.h
+ 1.48 01/08/15 05:12:56 stenn@whimsy.udel.edu +26 -42
+ OpenSSL changes
+
+ html/release.htm
+ 1.14 01/08/15 05:12:56 stenn@whimsy.udel.edu +133 -89
+ Documentation cleanup
+
+ html/parsedata.htm
+ 1.3 01/08/15 05:12:56 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup
+
+ html/ntpq.htm
+ 1.7 01/08/15 05:12:56 stenn@whimsy.udel.edu +235 -168
+ Documentation cleanup
+
+ html/monopt.htm
+ 1.7 01/08/15 05:12:56 stenn@whimsy.udel.edu +227 -174
+ Documentation cleanup
+
+ html/genkeys.htm
+ 1.6 01/08/15 05:12:56 stenn@whimsy.udel.edu +237 -133
+ Documentation cleanup
+
+ html/driver39.htm
+ 1.2 01/08/15 05:12:56 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup
+
+ html/driver38.htm
+ 1.2 01/08/15 05:12:55 stenn@whimsy.udel.edu +1 -1
+ Documentation cleanup
+
+ html/driver35.htm
+ 1.3.1.1 01/08/15 05:12:55 stenn@whimsy.udel.edu +1 -2
+ Documentation cleanup
+
+ html/debug.htm
+ 1.6 01/08/15 05:12:55 stenn@whimsy.udel.edu +89 -37
+ Documentation cleanup
+
+ html/config.htm
+ 1.3.1.1 01/08/15 05:12:55 stenn@whimsy.udel.edu +150 -255
+ Documentation cleanup
+
+ html/build.htm
+ 1.7 01/08/15 05:12:55 stenn@whimsy.udel.edu +23 -26
+ Documentation cleanup
+
+ html/authopt.htm
+ 1.12 01/08/15 05:12:55 stenn@whimsy.udel.edu +307 -247
+ Documentation cleanup
+
+ configure.in
+ 1.214.1.1 01/08/15 05:12:55 stenn@whimsy.udel.edu +4 -4
+ version changes, crypto option update.
+
+ conf/rackety.conf
+ 1.2 01/08/15 05:12:55 stenn@whimsy.udel.edu +9 -1
+ Comment cleanup, restrict changes (KOD and version)
+
+ conf/pogo.conf
+ 1.3 01/08/15 05:12:55 stenn@whimsy.udel.edu +2 -13
+ comment cleanup, crypto line changes, added cryptostats.
+
+ conf/malarky.conf
+ 1.2 01/08/15 05:12:54 stenn@whimsy.udel.edu +1 -1
+ comment cleanup
+
+ conf/grundoon.conf
+ 1.3 01/08/15 05:12:54 stenn@whimsy.udel.edu +1 -1
+ Comment cleanup
+
+ conf/README
+ 1.4 01/08/15 05:12:54 stenn@whimsy.udel.edu +4 -8
+ OpenSSL updates
+
+ build
+ 1.17 01/08/15 05:12:54 stenn@whimsy.udel.edu +1 -1
+ OpenSSL changes
+
+ acinclude.m4
+ 1.4 01/08/15 05:12:54 stenn@whimsy.udel.edu +1 -1
+ Keyword expansion
+
+ BitKeeper/deleted/.del-stats.ulrich.patches~3aed0663
+ 1.3 01/08/15 05:12:54 stenn@whimsy.udel.edu +0 -0
+ No idea what this file is...
+
+ BitKeeper/deleted/.del-dewey.conf~3e480692
+ 1.2 01/08/15 04:27:03 stenn@whimsy.udel.edu +0 -0
+ Delete: conf/dewey.conf
+
+ChangeSet
+ 1.683 01/08/01 23:01:12 stenn@whimsy.udel.edu +4 -0
aclocal.m4, ChangeLog, configure, configure.in:
* configure.in: 4.1.0
- TAG: NTP_4_1_0
configure.in
1.219 01/08/01 23:01:12 stenn@whimsy.udel.edu +1 -1
@@ -3968,11 +23979,11 @@ ChangeSet@1.683, 2001-08-01 23:01:12-00:00, stenn@whimsy.udel.edu
1.224 01/08/01 23:01:10 stenn@whimsy.udel.edu +1 -1
* configure.in: 4.1.0
- ChangeLog
- 1.584 01/08/01 23:01:10 stenn@whimsy.udel.edu +4 -0
- * configure.in: 4.1.0
-
aclocal.m4
1.86 01/08/01 23:01:10 stenn@whimsy.udel.edu +0 -0
* configure.in: 4.1.0
+ ChangeLog
+ 1.584 01/08/01 23:01:10 stenn@whimsy.udel.edu +4 -0
+ * configure.in: 4.1.0
+
diff --git a/contrib/ntp/ChangeLog-4.1.0 b/contrib/ntp/ChangeLog-4.1.0
index 69b566ee0194..b748b8057d7d 100644
--- a/contrib/ntp/ChangeLog-4.1.0
+++ b/contrib/ntp/ChangeLog-4.1.0
@@ -4364,7 +4364,7 @@ Tue May 25 18:00:49 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
since it may be malloc'ed.
* ntpdc/ntpdc.c (sendrequest): Declare pass as const char *, don't
- loose const in cast.
+ lose const in cast.
* ntpq/ntpq.c (sendrequest): Likewise.
* ntpd/ntp_control.c (ctl_getitem): Remove superfluous cast.
diff --git a/contrib/ntp/Makefile.am b/contrib/ntp/Makefile.am
index 40200e32c012..96918fc01dd0 100644
--- a/contrib/ntp/Makefile.am
+++ b/contrib/ntp/Makefile.am
@@ -1,24 +1,43 @@
#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
-AUTOMAKE_OPTIONS = util/ansi2knr foreign
+AUTOMAKE_OPTIONS = util/ansi2knr foreign 1.5
SUBDIRS = \
scripts \
include \
ElectricFence \
- librsaref \
+ @ARLIB_DIR@ \
libntp \
libparse \
ntpd \
ntpdate \
ntpdc \
ntpq \
- ntptrace \
parseutil \
adjtimed \
clockstuff \
kernel \
+ @MAKE_SNTP@ \
util
+DIST_SUBDIRS= \
+ scripts \
+ include \
+ ElectricFence \
+ arlib \
+ libntp \
+ libparse \
+ ntpd \
+ ntpdate \
+ ntpdc \
+ ntpq \
+ parseutil \
+ adjtimed \
+ clockstuff \
+ kernel \
+ sntp \
+ util
+DISTCHECK_CONFIGURE_FLAGS= --with-arlib --with-sntp
+
EXTRA_DIST = \
COPYRIGHT \
ChangeLog \
@@ -26,15 +45,12 @@ EXTRA_DIST = \
NEWS \
NOTES.y2kfixes \
README.bk \
- README.cvs \
- README.des \
README.hackers \
+ README.patches \
README.refclocks \
- README.rsa \
README.versions \
TODO \
WHERE-TO-START \
- acconfig.h \
build \
config.guess \
config.h.in \
@@ -43,18 +59,18 @@ EXTRA_DIST = \
excludes \
flock-build \
install-sh \
- ntp_update \
readme.y2kfixes \
results.y2kfixes \
conf \
html \
+ libisc \
ports \
version
DISTCLEANFILES = .warning
#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.in
-ETAGS_ARGS = Makefile.am configure.in acconfig.h
+ETAGS_ARGS = Makefile.am configure.in
# HMS: make ports be the last directory...
# DIST_HOOK_DIRS = conf html scripts ports
@@ -62,23 +78,25 @@ ETAGS_ARGS = Makefile.am configure.in acconfig.h
# HMS: Keep .warning first, as that way it gets printed first.
BUILT_SOURCES = .warning $(srcdir)/COPYRIGHT $(srcdir)/version
-$(srcdir)/COPYRIGHT: html/copyright.htm
- ( echo "This file is automatically generated from html/copyright.htm" ; lynx -dump $(srcdir)/html/copyright.htm ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
+$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
+ ( echo "This file is automatically generated from html/copyright.html" ; lynx -dump $(srcdir)/html/copyright.html ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
# HMS: The next bit is still suboptimal. If bk is present but this NTP
# repo is not a bk repo, we'll get an error message from the prs command.
# Unfortunately, I haven't found the necessary magic to redirect this error
# output to /dev/null under ancient/unique shells like the one Ultrix uses.
-# We'll also get an error of srcdir or version is unwritable.
+# We'll also get an error if srcdir or version is unwritable.
$(srcdir)/version: FRC.version
-(bk version) >/dev/null 2>&1 && \
cd $(srcdir) && \
x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
- case "$$x" in '') ;; *) echo $$x > version ;; esac
+ y=`cat version 2>/dev/null` || true && \
+ case "$$x" in ''|$$y) ;; *) echo $$x > version ;; esac
dist-hook:
@find $(distdir) -type d -name CVS -print | xargs rm -rf
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
+ @chmod u+w $(distdir)/ports/winnt
@for i in `find $(distdir)/ports/winnt -type f -name '*.ds*' -print`; \
do chmod u+w $$i ; unix2dos $$i $$i; done
diff --git a/contrib/ntp/Makefile.in b/contrib/ntp/Makefile.in
index 0bb02e2ee5e9..9cf55d24b2b6 100644
--- a/contrib/ntp/Makefile.in
+++ b/contrib/ntp/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,41 +94,105 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
-AUTOMAKE_OPTIONS = util/ansi2knr foreign
+#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
+AUTOMAKE_OPTIONS = util/ansi2knr foreign 1.5
SUBDIRS = \
scripts \
include \
ElectricFence \
- librsaref \
+ @ARLIB_DIR@ \
+ libntp \
+ libparse \
+ ntpd \
+ ntpdate \
+ ntpdc \
+ ntpq \
+ parseutil \
+ adjtimed \
+ clockstuff \
+ kernel \
+ @MAKE_SNTP@ \
+ util
+
+
+DIST_SUBDIRS = \
+ scripts \
+ include \
+ ElectricFence \
+ arlib \
libntp \
libparse \
ntpd \
ntpdate \
ntpdc \
ntpq \
- ntptrace \
parseutil \
adjtimed \
clockstuff \
kernel \
+ sntp \
util
+DISTCHECK_CONFIGURE_FLAGS = --with-arlib --with-sntp
EXTRA_DIST = \
COPYRIGHT \
@@ -139,15 +201,12 @@ EXTRA_DIST = \
NEWS \
NOTES.y2kfixes \
README.bk \
- README.cvs \
- README.des \
README.hackers \
+ README.patches \
README.refclocks \
- README.rsa \
README.versions \
TODO \
WHERE-TO-START \
- acconfig.h \
build \
config.guess \
config.h.in \
@@ -156,11 +215,11 @@ EXTRA_DIST = \
excludes \
flock-build \
install-sh \
- ntp_update \
readme.y2kfixes \
results.y2kfixes \
conf \
html \
+ libisc \
ports \
version
@@ -168,7 +227,7 @@ EXTRA_DIST = \
DISTCLEANFILES = .warning
#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.in
-ETAGS_ARGS = Makefile.am configure.in acconfig.h
+ETAGS_ARGS = Makefile.am configure.in
# HMS: make ports be the last directory...
# DIST_HOOK_DIRS = conf html scripts ports
@@ -188,26 +247,27 @@ CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
-RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
- uninstall-info-recursive all-recursive install-data-recursive \
- install-exec-recursive installdirs-recursive install-recursive \
- uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = README ./stamp-h.in ChangeLog INSTALL Makefile.am \
- Makefile.in NEWS TODO acconfig.h acinclude.m4 aclocal.m4 \
- config.guess config.h.in config.sub configure configure.in \
- depcomp install-sh missing mkinstalldirs
-DIST_SUBDIRS = $(SUBDIRS)
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+ ps-recursive install-info-recursive uninstall-info-recursive \
+ all-recursive install-data-recursive install-exec-recursive \
+ installdirs-recursive install-recursive uninstall-recursive \
+ check-recursive installcheck-recursive
+DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure \
+ ChangeLog INSTALL Makefile.am NEWS TODO acinclude.m4 aclocal.m4 \
+ compile config.guess config.h.in config.sub configure \
+ configure.in depcomp install-sh missing mkinstalldirs
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
+
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@@ -216,31 +276,23 @@ $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENC
$(ACLOCAL_M4): configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-config.h: stamp-h
- @if test ! -f $@; then \
- rm -f stamp-h; \
- $(MAKE) stamp-h; \
- else :; fi
-stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h stamp-hT
- @echo timestamp > stamp-hT 2> /dev/null
- cd $(top_builddir) \
- && CONFIG_FILES= CONFIG_HEADERS=config.h \
- $(SHELL) ./config.status
- @mv stamp-hT stamp-h
-$(srcdir)/config.h.in: $(srcdir)/./stamp-h.in
+
+config.h: stamp-h1
@if test ! -f $@; then \
- rm -f $(srcdir)/./stamp-h.in; \
- $(MAKE) $(srcdir)/./stamp-h.in; \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
else :; fi
-$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
- @rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
- @echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+
+$(srcdir)/config.h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
- @mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
+ touch $(srcdir)/config.h.in
distclean-hdr:
- -rm -f config.h
+ -rm -f config.h stamp-h1
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
@@ -250,7 +302,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -270,7 +322,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -297,72 +349,120 @@ tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if (etags --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ else \
+ include_option=--include; \
+ fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ test -f $$subdir/TAGS && \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
-# Avoid unsightly `./'.
distdir = $(PACKAGE)-$(VERSION)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+
GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
- -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+ $(am__remove_distdir)
mkdir $(distdir)
- $(mkinstalldirs) $(distdir)/scripts
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ $(mkinstalldirs) $(distdir)/ntpdc $(distdir)/scripts
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
- for subdir in $(SUBDIRS); do \
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
@@ -376,55 +476,86 @@ distdir: $(DISTFILES)
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="${top_distdir}" distdir="$(distdir)" \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
-dist: distdir
+dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
- -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ $(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
chmod a-w $(distdir)
- dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
- && cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
- || (echo "Error: files left after uninstall" 1>&2; \
- exit 1) ) \
- && $(MAKE) $(AM_MAKEFLAGS) dist \
- && $(MAKE) $(AM_MAKEFLAGS) distclean \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& rm -f $(distdir).tar.gz \
- && (test `find . -type f -print | wc -l` -eq 0 \
- || (echo "Error: files left after distclean" 1>&2; \
- exit 1) )
- -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
check-am: all-am
-check: check-recursive
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
all-am: Makefile config.h
installdirs: installdirs-recursive
installdirs-am:
-install: install-recursive
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
@@ -435,6 +566,7 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -442,7 +574,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@@ -453,11 +585,10 @@ clean: clean-recursive
clean-am: clean-generic mostlyclean-am
-dist-all: distdir
- $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
distclean: distclean-recursive
- -rm -f config.status config.cache config.log
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+
+ -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
@@ -479,50 +610,65 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
-.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
- clean-generic clean-recursive dist dist-all distcheck distclean \
- distclean-generic distclean-hdr distclean-recursive \
- distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
- info-recursive install install-am install-data install-data-am \
- install-data-recursive install-exec install-exec-am \
- install-exec-recursive install-info install-info-am \
- install-info-recursive install-man install-recursive \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am installdirs-recursive maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive mostlyclean \
- mostlyclean-generic mostlyclean-recursive tags tags-recursive \
- uninstall uninstall-am uninstall-info-am \
- uninstall-info-recursive uninstall-recursive
-
-
-$(srcdir)/COPYRIGHT: html/copyright.htm
- ( echo "This file is automatically generated from html/copyright.htm" ; lynx -dump $(srcdir)/html/copyright.htm ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+ clean-generic clean-recursive ctags ctags-recursive dist \
+ dist-all dist-gzip distcheck distclean distclean-generic \
+ distclean-hdr distclean-recursive distclean-tags distcleancheck \
+ distdir distuninstallcheck dvi dvi-am dvi-recursive info \
+ info-am info-recursive install install-am install-data \
+ install-data-am install-data-recursive install-exec \
+ install-exec-am install-exec-recursive install-info \
+ install-info-am install-info-recursive install-man \
+ install-recursive install-strip installcheck installcheck-am \
+ installdirs installdirs-am installdirs-recursive \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-generic \
+ mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
+ ps-recursive tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am uninstall-info-recursive uninstall-recursive
+
+
+$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
+ ( echo "This file is automatically generated from html/copyright.html" ; lynx -dump $(srcdir)/html/copyright.html ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
# HMS: The next bit is still suboptimal. If bk is present but this NTP
# repo is not a bk repo, we'll get an error message from the prs command.
# Unfortunately, I haven't found the necessary magic to redirect this error
# output to /dev/null under ancient/unique shells like the one Ultrix uses.
-# We'll also get an error of srcdir or version is unwritable.
+# We'll also get an error if srcdir or version is unwritable.
$(srcdir)/version: FRC.version
-(bk version) >/dev/null 2>&1 && \
cd $(srcdir) && \
x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
- case "$$x" in '') ;; *) echo $$x > version ;; esac
+ y=`cat version 2>/dev/null` || true && \
+ case "$$x" in ''|$$y) ;; *) echo $$x > version ;; esac
dist-hook:
@find $(distdir) -type d -name CVS -print | xargs rm -rf
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
+ @chmod u+w $(distdir)/ports/winnt
@for i in `find $(distdir)/ports/winnt -type f -name '*.ds*' -print`; \
do chmod u+w $$i ; unix2dos $$i $$i; done
diff --git a/contrib/ntp/NEWS b/contrib/ntp/NEWS
index 86662487c854..0d5bead2fb32 100644
--- a/contrib/ntp/NEWS
+++ b/contrib/ntp/NEWS
@@ -1,4 +1,11 @@
---
+(4.2.0)
+* More stuff than I have time to document
+* Bugfixes
+* call-gap filtering
+* wwv and chu refclock improvements
+* OpenSSL integration
+
+(4.1.2)
* clock state machine bugfix
* Lose the source port check on incoming packets
* (x)ntpdc compatibility patch
@@ -7,12 +14,17 @@
* ntpdc improvements
* GOES refclock fix
* JJY driver
+* Jupiter refclock fixes
+* Neoclock4X refclock fixes
+* AIX 5 port
* bsdi port fixes
+* Cray unicos port upgrade
* HP MPE/iX port
* Win/NT port upgrade
* Dynix PTX port fixes
* Document conversion from CVS to BK
* readline support for ntpq
+
(4.1.0)
* CERT problem fixed (99k23)
* Huff-n-Puff filter
@@ -34,6 +46,7 @@
* New/updated drivers: Forum Graphic GPS, WWV/H, Heath GC-100 II, HOPF
serial and PCI, ONCORE, ulink331
* Rewrite of the audio drivers
+
(4.0.99)
* Driver updates: CHU, DCF, GPS/VME, Oncore, PCF, Ulink, WWVB, burst
If you use the ONCORE driver with a HARDPPS kernel module,
@@ -45,6 +58,7 @@
* ntpd, ntpq, ntpdate cleanup and fixes
* NT port improvements
* AIX, BSDI, DEC OSF, FreeBSD, NetBSD, Reliant, SCO, Solaris port improvements
+
(4.0.98)
* Solaris kernel FLL bug is fixed in 106541-07
* Bug/lint cleanup
@@ -55,26 +69,31 @@
* Trimble OEM Ace-II support
* DCF77 power choices
* Oncore improvements
+
(4.0.97)
* NT patches
* AIX,SunOS,IRIX portability
* NeXT portability
* ntptimeset utility added
* cygwin portability patches
+
(4.0.96)
* -lnsl, -lsocket, -lgen configuration patches
* Y2K patches from AT&T
* Linux portability cruft
+
(4.0.95)
* NT port cleanup/replacement
* a few portability fixes
* VARITEXT Parse clock added
+
(4.0.94)
* PPS updates (including ntp.config options)
* Lose the old DES stuff in favor of the (optional) RSAREF stuff
* html cleanup/updates
* numerous drivers cleaned up
* numerous portability patches and code cleanup
+
(4.0.93)
* Oncore refclock needs PPS or one of two ioctls.
* Don't make ntptime under Linux. It doesn't compile for too many folks.
@@ -92,6 +111,7 @@
* New clock state machine
* SCO cleanup
* Skip alias interfaces
+
(4.0.92)
* chronolog and dumbclock refclocks
* SCO updates
@@ -104,6 +124,7 @@
* NMEA clock improvements
* PPS improvements
* AIX portability patches
+
(4.0.91)
* New ONCORE driver
* New MX4200 driver
@@ -113,15 +134,18 @@
* HP-UX, IRIX lint cleanup
* AIX portability patches
* NT cleanup
+
(4.0.90)
* Nanoseconds
* New palisade driver
* New Oncore driver
+
(4.0.73)
* README.hackers added
* PARSE driver is working again
* Solaris 2.6 has nasty kernel bugs. DO NOT enable pll!
* DES is out of the distribution.
+
(4.0.72)
* K&R C compiling should work again.
* IRIG patches.
diff --git a/contrib/ntp/README b/contrib/ntp/README
index ce516056b0a2..f9eeabcc5486 100644
--- a/contrib/ntp/README
+++ b/contrib/ntp/README
@@ -1,5 +1,7 @@
-Send patches and bug reports to <bugs@ntp.org> .
+Submit patches, bug reports, and enhancement requests via
+
+ http://bugzilla.ntp.org
The ntp Distribution Base Directory
@@ -17,7 +19,7 @@ read WHERE-TO-START.
For Windows/NT, visit html/hints/winnt .
-The base directory ./ contains the autoconfiguation files, source
+The base directory ./ contains the autoconfiguration files, source
directories and related stuff:
COPYRIGHT Excerpt from the HTML file ./html/copyright.html. This file
@@ -32,11 +34,9 @@ NEWS What's new in this release.
README This file.
-README.cvs Instructions for folks who use the CVS-repository
+README.bk Instructions for folks who use the BitKeeper-repository
version of NTP.
-README.des If you *need* DES support.
-
README.hackers Notes to folks who want to hack on the code.
TODO List of items the NTP developers are working on.
@@ -49,9 +49,6 @@ Makefile.am Automake file configuration file. Edit only if you have the
Makefile.in Autoconf make file template for Unix.
-acconfig.h Autoconf template header file. Edit only if you
- have the GNU automake and autoconf utilities installed.
-
adjtimed Directory containing the sources for the adjtime daemon
for HP/UX systems prior to HP-UX 10.0.
@@ -111,10 +108,6 @@ kernel Directory containing sources for kernel programs such as
libntp Directory containing library source code used by most
programs in the distribution.
-librsaref Staging directory for RSAREF.
-
-ntp_update Update an NTP CVS tree.
-
ntpdate Directory containing sources for a program to set the
local machine time from one or more remote machines
running NTP. Operates like rdate, but much more accurate.
diff --git a/contrib/ntp/README.bk b/contrib/ntp/README.bk
index df109b67bab5..2b840c4403ac 100644
--- a/contrib/ntp/README.bk
+++ b/contrib/ntp/README.bk
@@ -1,7 +1,7 @@
In order to use the BitKeeper repository version of NTP you will have
to have the following tools installed:
- autoconf 2.52 or later
+ autoconf 2.53 or later
automake 1.5 or later
lynx
@@ -37,17 +37,6 @@ You can get the ntp-dev repository by either of the following commands:
bk clone bk://ntp.bkbits.net/ntp-dev ntp-dev
-The IPV6 patch has been applied:
-
- bk clone bk://www.ntp.org/home/bk/ntp-dev-ipv6 ntp-dev-ipv6
-
- bk clone bk://ntp.bkserver.net/ntp-dev-ipv6 ntp-dev-ipv6
-
- bk clone bk://ntp.bkbits.net/ntp-dev-ipv6 ntp-dev-ipv6
-
-The ntp-dev-ipv6 repository will be merged back in to the ntp-dev repo
-as soon as the code is stable.
-
If you are stuck behind a firewall that blocks access to the default port
used by bitkeeper (14690) but you can use port 80 instead, you can use
http as a bk transport mechanism. Just use:
@@ -70,3 +59,5 @@ You can update your repository by incanting:
cd REPO
bk pull
+
+If you want to submit patches, please see the README.hackers file.
diff --git a/contrib/ntp/README.hackers b/contrib/ntp/README.hackers
index 230cd3239c07..a33b004e5ac0 100644
--- a/contrib/ntp/README.hackers
+++ b/contrib/ntp/README.hackers
@@ -1,5 +1,7 @@
Notes to hackers.
+See README.patches for information about submitting patches.
+
---
Dave likes this code indented formatted in a consistent way.
@@ -23,3 +25,4 @@ While the whitespace is optional, the function name MUST start at column 0.
We'd like to see *all* system function declarations live in include/l_stdlib.h
and NEVER appear in the .c files.
+---
diff --git a/contrib/ntp/README.patches b/contrib/ntp/README.patches
new file mode 100644
index 000000000000..d59345e41bca
--- /dev/null
+++ b/contrib/ntp/README.patches
@@ -0,0 +1,39 @@
+See README.hackers for notes on coding styles.
+
+If you are going to patch both ntp-stable and ntp-dev
+please do it this way:
+
+ > cd ntp-stable
+ > (make and test your changes to ntp-stable first)
+ > (commit your changes to ntp-stable)
+ > cd ../ntp-dev
+ > bk pull ../ntp-stable (get your changes from ntp-stable)
+ > (resolve any problems and test your changes)
+ > (commit your changes to ntp-dev)
+
+With the current release of bitkeeper it is *much* easier to move changes
+from ntp-stable to ntp-dev than it is to move changes from ntp-dev to
+ntp-stable.
+
+If you make your changes in the above order and then submit them,
+it will be trivial to apply your patches.
+
+Otherwise, it will be much more difficult to apply your patches.
+
+---
+
+Please read (and follow) the previous section if you want to submit
+patches for both ntp-stable and ntp-dev.
+
+To submit patches please use the 'bk send' command:
+
+ > cd REPO
+ > bk citool (or bk ci ... ; bk commit ... )
+ > bk pull # make sure your repo is up-to-date
+ > bk send -d -ubk://www.ntp.org/home/bk/REPO - > file-containing-the-patch
+ > bk receive -vv -a < file-containing-the-patch
+ # Sanity check.
+
+ # Open a bugzilla item at <http://bugzilla.ntp.org>
+
+ # After the bug is opened, visit the bug and attach file-containing-the-patch
diff --git a/contrib/ntp/TODO b/contrib/ntp/TODO
index 833d46976642..c9f81faf9845 100644
--- a/contrib/ntp/TODO
+++ b/contrib/ntp/TODO
@@ -16,10 +16,6 @@
970210: Find a way to dump the current configuration to either syslog or
a file.
-CPP macros we need to handle:
-
- SUN_3_3_STINKS (this will be easy to handle if anybody still needs it)
-
Problems that need to be fixed:
- Get rid of the old SYS_* macros:
diff --git a/contrib/ntp/acinclude.m4 b/contrib/ntp/acinclude.m4
index 2c02173fe591..194bf6a74690 100644
--- a/contrib/ntp/acinclude.m4
+++ b/contrib/ntp/acinclude.m4
@@ -1,5 +1,6 @@
AC_DEFUN(hs_ULONG_CONST,
-[ AC_EGREP_CPP(Circus,
+[ AH_TEMPLATE(ULONG_CONST, [How do we create unsigned long constants?])
+AC_EGREP_CPP(Circus,
[#define ACAT(a,b)a ## b
ACAT(Cir,cus)
], AC_DEFINE([ULONG_CONST(a)], [a ## UL]),
@@ -21,7 +22,7 @@ dnl
dnl AC_DEFINE_DIR(DATADIR, datadir)
dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
dnl
-dnl @version $Id$
+dnl @version $Id: acinclude.m4,v 1.3 2000/08/04 03:26:22 stenn Exp $
dnl @author Alexandre Oliva <oliva@lsd.ic.unicamp.br>
AC_DEFUN(AC_DEFINE_DIR, [
diff --git a/contrib/ntp/aclocal.m4 b/contrib/ntp/aclocal.m4
index cce4aeab4ed1..c4e624e76342 100644
--- a/contrib/ntp/aclocal.m4
+++ b/contrib/ntp/aclocal.m4
@@ -1,6 +1,6 @@
-# aclocal.m4 generated automatically by aclocal 1.5
+# generated automatically by aclocal 1.7.7 -*- Autoconf -*-
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,8 @@
# PARTICULAR PURPOSE.
AC_DEFUN(hs_ULONG_CONST,
-[ AC_EGREP_CPP(Circus,
+[ AH_TEMPLATE(ULONG_CONST, [How do we create unsigned long constants?])
+AC_EGREP_CPP(Circus,
[#define ACAT(a,b)a ## b
ACAT(Cir,cus)
], AC_DEFINE([ULONG_CONST(a)], [a ## UL]),
@@ -34,7 +35,7 @@ dnl
dnl AC_DEFINE_DIR(DATADIR, datadir)
dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
dnl
-dnl @version $Id$
+dnl @version $Id: acinclude.m4,v 1.3 2000/08/04 03:26:22 stenn Exp $
dnl @author Alexandre Oliva <oliva@lsd.ic.unicamp.br>
AC_DEFUN(AC_DEFINE_DIR, [
@@ -48,142 +49,113 @@ AC_DEFUN(AC_DEFINE_DIR, [
AC_DEFINE_UNQUOTED($1, "$ac_expanded", $3))
])
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
+# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
-# serial 3
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. We must strip everything past the first ":",
-# and everything past the last "/".
-
-AC_PREREQ([2.12])
-
-AC_DEFUN([AM_CONFIG_HEADER],
-[ifdef([AC_FOREACH],dnl
- [dnl init our file count if it isn't already
- m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
- dnl prepare to store our destination file list for use in config.status
- AC_FOREACH([_AM_File], [$1],
- [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
- m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
- dnl and add it to the list of files AC keeps track of, along
- dnl with our hook
- AC_CONFIG_HEADERS(_AM_File,
-dnl COMMANDS, [, INIT-CMDS]
-[# update the timestamp
-echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
-][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
- m4_popdef([_AM_Dest])])],dnl
-[AC_CONFIG_HEADER([$1])
- AC_OUTPUT_COMMANDS(
- ifelse(patsubst([$1], [[^ ]], []),
- [],
- [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
- patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
-[am_indx=1
-for am_file in $1; do
- case " \$CONFIG_HEADERS " in
- *" \$am_file "*)
- am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
- if test -n "\$am_dir"; then
- am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
- for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
- am_tmpdir=\$am_tmpdir\$am_subdir/
- if test ! -d \$am_tmpdir; then
- mkdir \$am_tmpdir
- fi
- done
- fi
- echo timestamp > "\$am_dir"stamp-h\$am_indx
- ;;
- esac
- am_indx=\`expr \$am_indx + 1\`
-done])
-])]) # AM_CONFIG_HEADER
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
-# _AM_DIRNAME(PATH)
-# -----------------
-# Like AS_DIRNAME, only do it during macro expansion
-AC_DEFUN([_AM_DIRNAME],
- [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
- m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
- m4_if(m4_regexp([$1], [^/.*]), -1,
- [.],
- m4_patsubst([$1], [^\(/\).*], [\1])),
- m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
- m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
-]) # _AM_DIRNAME
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
-# serial 5
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+AC_PREREQ([2.52])
+
+# serial 6
+
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake. -*- Autoconf -*-
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
-# We require 2.13 because we rely on SHELL being computed by configure.
-AC_PREREQ([2.13])
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
-# -----------------------------------------------------------
-# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
-# The purpose of this macro is to provide the user with a means to
-# check macros which are provided without letting her know how the
-# information is coded.
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
- [],
- [define([AC_PROVIDE_IFELSE],
- [ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
+# serial 10
+AC_PREREQ([2.54])
-# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
-# ----------------------------------------------
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AC_PROG_INSTALL])dnl
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
-if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
fi
+AC_SUBST([CYGPATH_W])
# Define the identity of the package.
-PACKAGE=$1
-AC_SUBST(PACKAGE)dnl
-VERSION=$2
-AC_SUBST(VERSION)dnl
-ifelse([$3],,
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
-
-# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
-# the ones we care about.
-ifdef([m4_pattern_allow],
- [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
-
-# Autoconf 2.50 always computes EXEEXT. However we need to be
-# compatible with 2.13, for now. So we always define EXEEXT, but we
-# don't compute it.
-AC_SUBST(EXEEXT)
-# Similar for OBJEXT -- only we only use OBJEXT if the user actually
-# requests that it be used. This is a bit dumb.
-: ${OBJEXT=o}
-AC_SUBST(OBJEXT)
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal)
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_MISSING_PROG(AMTAR, tar)
@@ -193,22 +165,135 @@ AM_PROG_INSTALL_STRIP
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_PROVIDE_IFELSE([AC_PROG_][CC],
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_][CC],
- defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_][CXX],
- defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.7.7])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
#
# Check to make sure that the build environment is sane.
#
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
# serial 3
# AM_SANITY_CHECK
@@ -252,8 +337,27 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
+# -*- Autoconf -*-
-# serial 2
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -275,13 +379,29 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
- am_backtick='`'
- AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
+ AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# AM_AUX_DIR_EXPAND
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -320,19 +440,59 @@ fi
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
AC_DEFUN([AM_AUX_DIR_EXPAND], [
# expand $ac_aux_dir to an absolute path
-am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
@@ -342,11 +502,68 @@ AC_SUBST(install_sh)])
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# serial 4 -*- Autoconf -*-
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# serial 5 -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
@@ -358,9 +575,9 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# _AM_DEPENDENCIES(NAME)
-# ---------------------
+# ----------------------
# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX" or "OBJC".
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -375,7 +592,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
@@ -392,18 +609,32 @@ AC_CACHE_CHECK([dependency style of $depcc],
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@@ -421,13 +652,20 @@ AC_CACHE_CHECK([dependency style of $depcc],
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- am_cv_$1_dependencies_compiler_type=$depmode
- break
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
fi
done
@@ -437,8 +675,10 @@ else
am_cv_$1_dependencies_compiler_type=none
fi
])
-$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
-AC_SUBST([$1DEPMODE])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
@@ -447,16 +687,8 @@ AC_SUBST([$1DEPMODE])
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
-[rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
- DEPDIR=.deps
-else
- # MS-DOS does not allow filenames that begin with a dot.
- DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
-AC_SUBST(DEPDIR)
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
@@ -471,30 +703,48 @@ if test "x$enable_dependency_tracking" != xno; then
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-pushdef([subst], defn([AC_SUBST]))
-subst(AMDEPBACKSLASH)
-popdef([subst])
+AC_SUBST([AMDEPBACKSLASH])
])
-# Generate code to set up dependency tracking.
-# This macro should only be invoked once -- use via AC_REQUIRE.
-# Usage:
-# AM_OUTPUT_DEPENDENCY_COMMANDS
+# Generate code to set up dependency tracking. -*- Autoconf -*-
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
-AC_OUTPUT_COMMANDS([
-test x"$AMDEP_TRUE" != x"" ||
-for mf in $CONFIG_FILES; do
- case "$mf" in
- Makefile) dirpart=.;;
- */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
- *) continue;;
- esac
- grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
@@ -518,14 +768,48 @@ for mf in $CONFIG_FILES; do
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
- fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
- $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
-], [AMDEP_TRUE="$AMDEP_TRUE"
-ac_aux_dir="$ac_aux_dir"])])
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
# AM_MAKE_INCLUDE()
# -----------------
@@ -533,12 +817,13 @@ ac_aux_dir="$ac_aux_dir"])])
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
-doit:
+am__doit:
@echo done
+.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
-am__include='#'
+am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
@@ -548,7 +833,7 @@ echo "include confinc" > confmf
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
@@ -558,33 +843,45 @@ if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
- am__quote='"'
+ am__quote="\""
_am_result=BSD
fi
fi
-AC_SUBST(am__include)
-AC_SUBST(am__quote)
-AC_MSG_RESULT($_am_result)
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
-# serial 3
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
-#
-# FIXME: Once using 2.50, use this:
-# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_DEFUN([AM_CONDITIONAL],
-[ifelse([$1], [TRUE],
- [errprint(__file__:__line__: [$0: invalid condition: $1
-])dnl
-m4exit(1)])dnl
-ifelse([$1], [FALSE],
- [errprint(__file__:__line__: [$0: invalid condition: $1
-])dnl
-m4exit(1)])dnl
+[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE])
if $2; then
@@ -593,10 +890,32 @@ if $2; then
else
$1_TRUE='#'
$1_FALSE=
-fi])
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
-# serial 1
+# Copyright 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
AC_DEFUN([AM_C_PROTOTYPES],
[AC_REQUIRE([AM_PROG_CC_STDC])
@@ -617,8 +936,27 @@ AC_SUBST(U)dnl
AC_SUBST(ANSI2KNR)dnl
])
+AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
-# serial 1
+
+# Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
# @defmac AC_PROG_CC_STDC
# @maindex PROG_CC_STDC
@@ -706,3 +1044,5 @@ case "x$am_cv_prog_cc_stdc" in
esac
])
+AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])
+
diff --git a/contrib/ntp/adjtimed/Makefile.in b/contrib/ntp/adjtimed/Makefile.in
index 5542484cd30c..b411260a3afa 100644
--- a/contrib/ntp/adjtimed/Makefile.in
+++ b/contrib/ntp/adjtimed/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../ansi2knr #no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,21 +94,65 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../ansi2knr #no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
bin_PROGRAMS = @MAKE_ADJTIMED@
EXTRA_PROGRAMS = adjtimed
@@ -119,6 +161,7 @@ LDADD = ../libntp/libntp.a
#EXTRA_DIST = TAGS
ETAGS_ARGS = Makefile.am
subdir = adjtimed
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -132,19 +175,16 @@ adjtimed_LDADD = $(LDADD)
adjtimed_DEPENDENCIES = ../libntp/libntp.a
adjtimed_LDFLAGS =
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/adjtimed$U.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/adjtimed$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = adjtimed.c
-DIST_COMMON = README Makefile.am Makefile.in
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
SOURCES = adjtimed.c
all: all-am
@@ -155,9 +195,8 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu adjtimed/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@@ -165,16 +204,16 @@ install-binPROGRAMS: $(bin_PROGRAMS)
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
- f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
@@ -196,77 +235,115 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/adjtimed$U.Po@am__quote@
+ -test "$U" = "" || rm -f *_.c
-distclean-depend:
- -rm -rf $(DEPDIR)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimed$U.Po@am__quote@
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
adjtimed_.c: adjtimed.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/adjtimed.c; then echo $(srcdir)/adjtimed.c; else echo adjtimed.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > adjtimed_.c || rm -f adjtimed_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/adjtimed.c; then echo $(srcdir)/adjtimed.c; else echo adjtimed.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
adjtimed_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -279,7 +356,6 @@ all-am: Makefile $(PROGRAMS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -291,6 +367,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -298,7 +375,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -308,9 +385,11 @@ clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -331,6 +410,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -338,18 +419,26 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic distclean distclean-compile distclean-depend \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic ctags distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am info \
info-am install install-am install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am
+ mostlyclean-generic mostlyclean-kr pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/ntp/arlib/COPYING b/contrib/ntp/arlib/COPYING
new file mode 100644
index 000000000000..57e5c2a68c7a
--- /dev/null
+++ b/contrib/ntp/arlib/COPYING
@@ -0,0 +1,46 @@
+Replied: Fri, 16 Feb 2001 14:12:54 -0500
+Replied: "Darren Reed <darrenr@reed.wattle.id.au> "
+Received: from [139.134.6.79] by whimsy.udel.edu id aa15476;
+ 16 Feb 2001 04:21 EST
+Received: from CPE-61-9-164-106.vic.bigpond.net.au
+ ([139.134.4.52]) by mailin6.bigpond.com (Netscape Messaging
+ Server 4.15) with SMTP id G8UFIB00.4QI for
+ <stenn@whimsy.udel.edu>; Fri, 16 Feb 2001 19:25:23 +1000
+Received: from CPE-61-9-164-110.vic.bigpond.net.au ([61.9.164.110]) by mail5.bigpond.com (Claudes-Retiring-MailRouter V2.9c 9/11963672); 16 Feb 2001 19:20:45
+Received: (from root@localhost)
+ by CPE-61-9-164-106.vic.bigpond.net.au (8.11.0/8.11.0) id f1G92GC29158
+ for <stenn@whimsy.udel.edu>; Fri, 16 Feb 2001 20:02:16 +1100
+From: Darren Reed <darrenr@reed.wattle.id.au>
+Message-Id: <200102160901.UAA23657@avalon.reed.wattle.id.au>
+Subject: Re: arlib?
+In-Reply-To: <901.982219274@whimsy.udel.edu> from Harlan Stenn at "Feb 15, 1 01:41:14 am"
+To: Harlan Stenn <stenn@whimsy.udel.edu>
+Date: Fri, 16 Feb 2001 20:01:46 +1100
+X-Mailer: ELM [version 2.4ME+ PL37 (25)]
+MIME-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+
+In some email I received from Harlan Stenn, sie wrote:
+> Darren,
+>
+> I'm looking for an async resolver library that I can use with NTP.
+>
+> I noticed your code in the contrib/ subdir of later bind8 distribution
+> and I noticed the Copyright notice in arlib.c:
+>
+> * arlib.c (C)opyright 1993 Darren Reed. All rights reserved.
+> * This file may not be distributed without the author's permission in any
+> * shape or form. The author takes no responsibility for any damage or loss
+> * of property which results from the use of this software.
+>
+> so I thought I'd ask your permission to distribute your files if I can
+> figure out how to make it all work with ntpd.
+
+http://coombs.anu.edu.au/~avalon/arlib.tar.gz
+
+a few bug fixes (inc. buffer overflow :) and stuff in there.
+
+But otherwise, go for it.
+
+Darren
diff --git a/contrib/ntp/arlib/INSTALL b/contrib/ntp/arlib/INSTALL
new file mode 100644
index 000000000000..b42a17ac4640
--- /dev/null
+++ b/contrib/ntp/arlib/INSTALL
@@ -0,0 +1,182 @@
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
diff --git a/contrib/ntp/arlib/Makefile.am b/contrib/ntp/arlib/Makefile.am
new file mode 100644
index 000000000000..c0b40942a2fc
--- /dev/null
+++ b/contrib/ntp/arlib/Makefile.am
@@ -0,0 +1,15 @@
+AUTOMAKE_OPTIONS = foreign # ansi2knr
+
+#lib_LIBRARIES = libares.a
+noinst_LIBRARIES = libares.a
+libares_a_SOURCES = arlib.c arplib.h
+#include_HEADERS = arlib.h
+noinst_HEADERS = arlib.h
+
+noinst_PROGRAMS = example
+example_SOURCES = sample.c
+example_LDADD = libares.a
+#man_MANS = arlib.3
+#EXTRA_DIST = $(man_MANS) UNSHAR.HDR
+noinst_MANS = arlib.3
+EXTRA_DIST = $(noinst_MANS) UNSHAR.HDR
diff --git a/contrib/ntp/arlib/Makefile.in b/contrib/ntp/arlib/Makefile.in
new file mode 100644
index 000000000000..728a9fcb3d7a
--- /dev/null
+++ b/contrib/ntp/arlib/Makefile.in
@@ -0,0 +1,484 @@
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign # ansi2knr
+
+#lib_LIBRARIES = libares.a
+noinst_LIBRARIES = libares.a
+libares_a_SOURCES = arlib.c arplib.h
+#include_HEADERS = arlib.h
+noinst_HEADERS = arlib.h
+
+noinst_PROGRAMS = example
+example_SOURCES = sample.c
+example_LDADD = libares.a
+#man_MANS = arlib.3
+#EXTRA_DIST = $(man_MANS) UNSHAR.HDR
+noinst_MANS = arlib.3
+EXTRA_DIST = $(noinst_MANS) UNSHAR.HDR
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+
+libares_a_AR = $(AR) cru
+libares_a_LIBADD =
+am_libares_a_OBJECTS = arlib.$(OBJEXT)
+libares_a_OBJECTS = $(am_libares_a_OBJECTS)
+noinst_PROGRAMS = example$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+
+am_example_OBJECTS = sample.$(OBJEXT)
+example_OBJECTS = $(am_example_OBJECTS)
+example_DEPENDENCIES = libares.a
+example_LDFLAGS =
+
+DEFAULT_INCLUDES = -I. -I$(srcdir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/arlib.Po ./$(DEPDIR)/sample.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libares_a_SOURCES) $(example_SOURCES)
+HEADERS = $(noinst_HEADERS)
+
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
+ $(srcdir)/configure COPYING INSTALL Makefile.am aclocal.m4 \
+ configure configure.in depcomp install-sh missing mkinstalldirs
+SOURCES = $(libares_a_SOURCES) $(example_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4): configure.in
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+AR = ar
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libares.a: $(libares_a_OBJECTS) $(libares_a_DEPENDENCIES)
+ -rm -f libares.a
+ $(libares_a_AR) libares.a $(libares_a_OBJECTS) $(libares_a_LIBADD)
+ $(RANLIB) libares.a
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+example$(EXEEXT): $(example_OBJECTS) $(example_DEPENDENCIES)
+ @rm -f example$(EXEEXT)
+ $(LINK) $(example_LDFLAGS) $(example_OBJECTS) $(example_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+distdir = $(PACKAGE)-$(VERSION)
+
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ $(am__remove_distdir)
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
+ && rm -f $(distdir).tar.gz \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=/g;p;x;p;x'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
+
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-noinstLIBRARIES clean-noinstPROGRAMS ctags dist dist-all \
+ dist-gzip distcheck distclean distclean-compile \
+ distclean-generic distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am info info-am install install-am \
+ install-data install-data-am install-exec install-exec-am \
+ install-info install-info-am install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/ntp/arlib/README b/contrib/ntp/arlib/README
new file mode 100644
index 000000000000..1d2e787b5781
--- /dev/null
+++ b/contrib/ntp/arlib/README
@@ -0,0 +1,49 @@
+
+ Asynchronous DNS
+ ----------------
+
+ Intro.
+
+For those who write real time network applications that have to handle
+multiple TCP or UDP connections, the problem of effectively doing DNS
+lookups is quite real. Generally, this means the program waits while
+the query finishes, holding everything else up. This small library of
+routines aims to solve that problem by performing the DNS query and
+then returning the program to its normal flow.
+
+ Whats included ?
+
+The library routines, arlib.c, a header file for it, arlib.h, a man
+page, arlib.3 and an example of how this sort of code is used,
+sample.c.
+
+
+ Compilation & Installation.
+
+Edit the Makefile and do "make install" to install things where you
+wish them to go. You should check it makes and works before doing
+this :)
+
+If the compilation is successful, you'll have an executeable called
+"example" and libares.a. "example" is a simple program which will
+do hostname->IP# or IP#->hostnae lookups by entering either the
+hostname or IP# on the line with "Host-->". You dont have to wait
+for a query to fail or succeed before typing in the next line.
+
+ Portability.
+
+I'm not sure how portable this is, it was written under SunOS 4.1.2
+on a Sparc 1+ and hasn't been tested very widely. If you find any
+problems when compiling/execution, plase send me a patch (using
+diff -c) to avalon@coombs.anu.edu.au. If it goes well enough, I'll
+send it to comp.unix.sources or comp.sources.misc for further testing.
+
+ Future additions.
+
+Adding a working cache would be nice but I'm not sure if that really
+is needed (?). I guess it depends on how often your program is
+required to do a DNS lookup and whether caching would help.
+
+
+Cheers,
+Darren.
diff --git a/contrib/ntp/arlib/UNSHAR.HDR b/contrib/ntp/arlib/UNSHAR.HDR
new file mode 100644
index 000000000000..c92d475feeff
--- /dev/null
+++ b/contrib/ntp/arlib/UNSHAR.HDR
@@ -0,0 +1,32 @@
+Replied: Sun, 19 Dec 93 09:58:30 PST
+Replied: "Darren Reed <avalon@coombs.anu.edu.au> "
+Return-Path: avalon@coombs.anu.edu.au
+Received: by gw.home.vix.com id AA12017; Sun, 19 Dec 93 07:04:44 -0800
+Message-Id: <9312191504.AA12017@gw.home.vix.com>
+Received: by coombs.anu.edu.au
+ (1.37.109.8/16.2) id AA10850; Mon, 20 Dec 1993 02:07:21 +1100
+From: Darren Reed <avalon@coombs.anu.edu.au>
+Subject: Addition for 4.9 "contrib" directory
+To: paul@vix.com
+Date: Mon, 20 Dec 1993 02:07:20 +1000 (EDT)
+X-Mailer: ELM [version 2.4 PL21]
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Content-Length: 67950
+
+
+Well, I just sent one letter off to dec.com, being from the 4.9 README I had.
+
+So, to sum up what I said, I've included below, some code I've written to
+perform async. DNS lookups - `replacements' for gethostbyname and
+gethostbyaddr. I've written and tested it mainly on a HP-UX machine, so
+I'm not sure how it will port to others, but I've tried to keep the amount
+of OS specific code to a minimum.
+
+The Makefile is setup to work best from "contrib/arlib", which is how I
+checked to make sure it worked and ran well. There's a man page included
+also.
+
+Cheers,
+Darren
diff --git a/contrib/ntp/arlib/aclocal.m4 b/contrib/ntp/arlib/aclocal.m4
new file mode 100644
index 000000000000..fb76c3da2cd9
--- /dev/null
+++ b/contrib/ntp/arlib/aclocal.m4
@@ -0,0 +1,835 @@
+# generated automatically by aclocal 1.7.7 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 10
+
+AC_PREREQ([2.54])
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.7.7])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# serial 5 -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
diff --git a/contrib/ntp/arlib/arlib.3 b/contrib/ntp/arlib/arlib.3
new file mode 100644
index 000000000000..afdc02f4d5bd
--- /dev/null
+++ b/contrib/ntp/arlib/arlib.3
@@ -0,0 +1,230 @@
+.TH arlib 3
+.SH NAME
+ar_answer, ar_close, ar_delete, ar_gethostbyname, ar_gethostbyaddr,
+ar_init, ar_open, ar_timeout - Asynchronous DNS library routines
+.SH SYNOPSIS
+.nf
+.B #include "arlib.h"
+
+.B struct hostent *ar_answer(dataptr, size)
+.B char *dataptr;
+.B int size;
+
+.B void ar_close();
+
+.B int ar_delete(dataptr, size)
+.B char *dataptr;
+.B int size;
+
+.B int ar_gethostbyname(name, dataptr, size)
+.B char *name;
+.B char *dataptr;
+.B int size;
+
+.B int ar_gethostbyaddr(name, dataptr, size)
+.B char *name;
+.B char *dataptr;
+.B int size;
+
+.B int ar_init(flags)
+.B int flags;
+
+.B int ar_open();
+
+.B long ar_timeout(time, dataptr, size)
+.B long time;
+.B char *dataptr;
+.B int size;
+.fi
+.SH DESCRIPTION
+
+.PP
+ This small library of DNS routines is intended to provide an
+asynchronous interface to performing hostname and IP number lookups.
+Only lookups of Internet domain are handled as yet. To use this
+set of routines properly, the presence of the
+.B "BIND 4.8"
+resolve
+libraries is required (or any library derived from it).
+.PP
+ This library should be used in conjunction with
+.B select(2)
+to wait for
+the name server's reply to arrive or the lookup to timeout.
+.PP
+ To open a fd for talking to the name server, either
+.B ar_open()
+or
+ar_init()
+must be used.
+.B ar_open()
+ will open either a datagram socket
+or a virtual circuit with the name server, depending on the flags
+set in the _res structure (see
+.B resolv(5)
+). In both cases, if the socket
+
+> i
+.B ar_init()
+is
+used to both open the socket (as in
+.B ar_open()
+) and initialize the
+queues used by this library. The values recognized as parameters to
+.B ar_init()
+are:
+
+.RS
+#define ARES_INITLIST 1
+.RE
+.RS
+#define ARES_CALLINIT 2
+.RE
+.RS
+#define ARES_INITSOCK 4
+.RE
+.RS
+#define ARES_INITDEBG 8
+.RE
+
+ ARES_INITLIST initializes the list of queries waiting for replies.
+ARES_CALLINIT is a flag which when set causes
+.B res_init()
+to be called.
+ARES_INITSOCK will close the current socket if it is open and call
+.B ar_open()
+to open a new one, returning the fd for that socket.
+ARES_INITDEBG sets the RES_DEBUG flag of the
+.B _res
+structure.
+ARES_INITCACH is as yet, unused and is for future use where the library
+keeps its own cache of replies.
+
+ To send a query about either a hostname or an IP number,
+.B ar_gethostbyname()
+and
+.B ar_gethostbyaddr()
+must be used. Each takes
+either a pointer to the hostname or the IP number respectively for use
+when making the query. In addition to this, both (optionally) can be
+passed a pointer to data, dataptr, with the size also passed which can
+be used for identifying individual queries. A copy of the area pointed
+to is made if dataptr is non NULL and size is non zero. These functions
+will always return NULL unless the answer to the query is found in
+internal caches. A new flag, RES_CHECKPTR is checked during the
+processing of answers for
+.B ar_gethostbyname()
+which will automatically
+cause a reverse lookup to be queued, causing a failure if that reply
+differs from the original.
+
+ To check for a query,
+.B ar_answer()
+is called with a pointer to an area
+of memory which is sufficient to hold what was originally passed via
+.B ar_gethostbyname()
+or
+.B ar_gethostbyaddr()
+through dataptr. If an answer
+is found, a pointer to the host information is returned and the data
+segment copied if dataptr is non NULL and it was originally passed. The
+size of the copied data is the smaller of the passed size and that of
+original data stored.
+
+ To expire old queries,
+.B ar_timeout()
+is called with the 'current' time
+(or the time for which you want to do timeouts for). If a queue entry
+is too old, it will be expired when it has exhausted all available avenues
+for lookups and the data segment for the expired query copied into
+dataptr. The size of the copied data is the smaller of the passed size
+and that of the original stored data. Only 1 entry is thus expired with
+each call, requiring that it be called immediately after an expiration
+to check for others. In addition to expiring lookups,
+.B ar_timeout()
+also
+triggers resends of queries and the searching of the domain tree for the
+host, the latter works from the
+.B _res
+structure of
+.B resolv(5).
+
+ To delete entries from the queue,
+.B ar_delete()
+can be used and by
+passing the pointer and size of the data segment, all queries have their
+data segments checked (if present) for an exact match, being deleted if
+and only if there is a match. A NULL pointer passed to ar_deleted()
+matches all queries which were called with a NULL dataptr parameter.
+The amount of data compared is the smaller of the size passed and that
+of the data stored for the queue entry being compared.
+
+ To close a socket opened by
+.B ar_open()
+,
+.B ar_close()
+should be used so
+that it is closed and also marked closed within this library.
+
+
+.SH DIAGNOSIS
+
+.B ar_open()
+returns -1 if a socket isn't open and could not be opened;
+otherwise returns the current fd open or the fd it opened.
+
+.B ar_init()
+returns -1 for any errors, the value returned by
+.B res_init()
+if
+.B res_init()
+was called, the return value for
+.B ar_open()
+if that was
+called or the current socket open if 0 is passed and a socket is open.
+If neither
+.B res_init()
+or
+.B ar_open()
+are called and the flags are non-zero, -2 is returned.
+
+.B ar_gethostbyaddr()
+and
+.B ar_gethostbyname()
+will always return NULL in this version but may return a pointer to a hostent
+structure if a cache is being used and the answer is found in the cache.
+
+.B ar_answer()
+returns NULL if the answer is either not found or the
+query returned an error and another attempt at a lookup is attempted.
+If an answer was found, it returned a pointer to this structure and
+the contents of the data segment copied over.
+
+.B ar_timeout()
+returns the time when it should be called next or 0 if
+there are no queries in the queue to be checked later. If any queries
+are expired, the data segment is copied over if dataptr is non NULL.
+
+.B ar_delete()
+returns the number of entries that were found to match
+and consequently deleted.
+
+.SH SEE ALSO
+
+gethostbyaddr(3), gethostbyname(3), resolv(5)
+
+.SH FILES
+.nf
+arlib.h
+/usr/include/resolv.h
+/usr/include/arpa/nameser.h
+/etc/resolv.conf
+
+.SH BUGS
+
+The results of a successful call to ar_answer() destroy the structure
+for any previous calls.
+
+.SH AUTHOR
+
+Darren Reed. Email address: avalon@coombs.anu.edu.au
diff --git a/contrib/ntp/arlib/arlib.c b/contrib/ntp/arlib/arlib.c
new file mode 100644
index 000000000000..3d76e5749336
--- /dev/null
+++ b/contrib/ntp/arlib/arlib.c
@@ -0,0 +1,1056 @@
+/*
+ * arlib.c (C)opyright 1993 Darren Reed. All rights reserved.
+ * This file may not be distributed without the author's permission in any
+ * shape or form. The author takes no responsibility for any damage or loss
+ * of property which results from the use of this software.
+ */
+#ifndef lint
+static char sccsid[] = "@(#)arlib.c 1.9 6/5/93 (C)opyright 1992 Darren \
+Reed. ASYNC DNS";
+#endif
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include "netdb.h"
+#include "arpa/nameser.h"
+#include <resolv.h>
+#include "arlib.h"
+#include "arplib.h"
+
+extern int errno, h_errno;
+static char ar_hostbuf[65], ar_domainname[65];
+static char ar_dot[] = ".";
+static int ar_resfd = -1, ar_vc = 0;
+static struct reslist *ar_last, *ar_first;
+
+/*
+ * Statistics structure.
+ */
+static struct resstats {
+ int re_errors;
+ int re_nu_look;
+ int re_na_look;
+ int re_replies;
+ int re_requests;
+ int re_resends;
+ int re_sent;
+ int re_timeouts;
+} ar_reinfo;
+
+static int do_query_name(/* struct resinfo *, char *, struct reslist * */);
+static int do_query_number(/* struct resinfo *, char *, struct reslist * */);
+static int ar_resend_query(/* struct reslist * */);
+
+/*
+ * ar_init
+ *
+ * Initializes the various ARLIB internal varilables and related DNS
+ * options for res_init().
+ *
+ * Returns 0 or the socket opened for use with talking to name servers
+ * if 0 is passed or ARES_INITSOCK is set.
+ */
+int ar_init(op)
+int op;
+{
+ int ret = 0;
+
+ if (op & ARES_INITLIST)
+ {
+ bzero(&ar_reinfo, sizeof(ar_reinfo));
+ ar_first = ar_last = NULL;
+ }
+
+ if (op & ARES_CALLINIT && !(_res.options & RES_INIT))
+ {
+ ret = res_init();
+ (void)strcpy(ar_domainname, ar_dot);
+ (void)strncat(ar_domainname, _res.defdname,
+ sizeof(ar_domainname)-2);
+ }
+
+ if (op & ARES_INITSOCK)
+ ret = ar_resfd = ar_open();
+
+ if (op & ARES_INITDEBG)
+ _res.options |= RES_DEBUG;
+
+ if (op == 0)
+ ret = ar_resfd;
+
+ return ret;
+}
+
+
+/*
+ * ar_open
+ *
+ * Open a socket to talk to a name server with.
+ * Check _res.options to see if we use a TCP or UDP socket.
+ */
+int ar_open()
+{
+ if (ar_resfd == -1)
+ {
+ if (_res.options & RES_USEVC)
+ {
+ struct sockaddr_in *sip;
+ int i;
+
+ sip = _res.NS_ADDR_LIST; /* was _res.nsaddr_list */
+ ar_vc = 1;
+ ar_resfd = socket(AF_INET, SOCK_STREAM, 0);
+
+ /*
+ * Try each name server listed in sequence until we
+ * succeed or run out.
+ */
+ while (connect(ar_resfd, (struct sockaddr *)sip++,
+ sizeof(struct sockaddr)))
+ {
+ (void)close(ar_resfd);
+ ar_resfd = -1;
+ if (i >= _res.nscount)
+ break;
+ ar_resfd = socket(AF_INET, SOCK_STREAM, 0);
+ }
+ }
+ else
+ ar_resfd = socket(AF_INET, SOCK_DGRAM, 0);
+ }
+ if (ar_resfd >= 0)
+ { /* Need one of these two here - and it MUST work!! */
+ int flags;
+
+ if ((flags = fcntl(ar_resfd, F_GETFL, 0)) != -1)
+#ifdef O_NONBLOCK
+ if (fcntl(ar_resfd, F_SETFL, flags|O_NONBLOCK) == -1)
+#else
+# ifdef O_NDELAY
+ if (fcntl(ar_resfd, F_SETFL, flags|O_NDELAY) == -1)
+# else
+# ifdef FNDELAY
+ if (fcntl(ar_resfd, F_SETFL, flags|FNDELAY) == -1)
+# endif
+# endif
+#endif
+ {
+ (void)close(ar_resfd);
+ ar_resfd = -1;
+ }
+ }
+ return ar_resfd;
+}
+
+
+/*
+ * ar_close
+ *
+ * Closes and flags the ARLIB socket as closed.
+ */
+void ar_close()
+{
+ (void)close(ar_resfd);
+ ar_resfd = -1;
+ return;
+}
+
+
+/*
+ * ar_add_request
+ *
+ * Add a new DNS query to the end of the query list.
+ */
+static int ar_add_request(new)
+struct reslist *new;
+{
+ if (!new)
+ return -1;
+ if (!ar_first)
+ ar_first = ar_last = new;
+ else {
+ ar_last->re_next = new;
+ ar_last = new;
+ }
+ new->re_next = NULL;
+ ar_reinfo.re_requests++;
+ return 0;
+}
+
+
+/*
+ * ar_remrequest
+ *
+ * Remove a request from the list. This must also free any memory that has
+ * been allocated for temporary storage of DNS results.
+ *
+ * Returns -1 if there are anyy problems removing the requested structure
+ * or 0 if the remove is successful.
+ */
+static int ar_remrequest(old)
+struct reslist *old;
+{
+ register struct reslist *rptr, *r2ptr;
+ register char **s;
+
+ if (!old)
+ return -1;
+ for (rptr = ar_first, r2ptr = NULL; rptr; rptr = rptr->re_next)
+ {
+ if (rptr == old)
+ break;
+ r2ptr = rptr;
+ }
+
+ if (!rptr)
+ return -1;
+ if (rptr == ar_first)
+ ar_first = ar_first->re_next;
+ else if (rptr == ar_last)
+ {
+ if (ar_last = r2ptr)
+ ar_last->re_next = NULL;
+ }
+ else
+ r2ptr->re_next = rptr->re_next;
+
+ if (!ar_first)
+ ar_last = ar_first;
+
+#ifdef ARLIB_DEBUG
+ ar_dump_hostent("ar_remrequest:", rptr->re_he);
+#endif
+
+ if (rptr->re_he.h_name)
+ (void)free(rptr->re_he.h_name);
+ if (s = rptr->re_he.h_aliases)
+ for (; *s; s++)
+ (void)free(*s);
+ if (rptr->re_rinfo.ri_ptr)
+ (void)free(rptr->re_rinfo.ri_ptr);
+ (void)free(rptr);
+
+ return 0;
+}
+
+
+/*
+ * ar_make_request
+ *
+ * Create a DNS query recorded for the request being made and place it on the
+ * current list awaiting replies. Initialization of the record with set
+ * values should also be done.
+ */
+static struct reslist *ar_make_request(resi)
+register struct resinfo *resi;
+{
+ register struct reslist *rptr;
+ register struct resinfo *rp;
+
+ rptr = (struct reslist *)calloc(1, sizeof(struct reslist));
+ rp = &rptr->re_rinfo;
+
+ rptr->re_next = NULL; /* where NULL is non-zero ;) */
+ rptr->re_sentat = time(NULL);
+ rptr->re_retries = _res.retry;
+ rptr->re_sends = 1;
+ rptr->re_resend = 1;
+ rptr->re_timeout = rptr->re_sentat + _res.retrans;
+ rptr->re_he.h_name = NULL;
+ rptr->re_he.h_addrtype = AF_INET;
+ rptr->re_he.h_aliases[0] = NULL;
+ rp->ri_ptr = resi->ri_ptr;
+ rp->ri_size = resi->ri_size;
+
+ (void)ar_add_request(rptr);
+
+ return rptr;
+}
+
+
+/*
+ * ar_timeout
+ *
+ * Remove queries from the list which have been there too long without
+ * being resolved.
+ */
+long ar_timeout(now, info, size)
+time_t now;
+char *info;
+int size;
+{
+ register struct reslist *rptr, *r2ptr;
+ register long next = 0;
+
+ for (rptr = ar_first, r2ptr = NULL; rptr; rptr = r2ptr)
+ {
+ r2ptr = rptr->re_next;
+ if (now >= rptr->re_timeout)
+ {
+ /*
+ * If the timeout for the query has been exceeded,
+ * then resend the query if we still have some
+ * 'retry credit' and reset the timeout. If we have
+ * used it all up, then remove the request.
+ */
+ if (--rptr->re_retries <= 0)
+ {
+ ar_reinfo.re_timeouts++;
+ if (info && rptr->re_rinfo.ri_ptr)
+ bcopy(rptr->re_rinfo.ri_ptr, info,
+ MIN(rptr->re_rinfo.ri_size,
+ size));
+ (void)ar_remrequest(rptr);
+ return now;
+ }
+ else
+ {
+ rptr->re_sends++;
+ rptr->re_sentat = now;
+ rptr->re_timeout = now + _res.retrans;
+ (void)ar_resend_query(rptr);
+ }
+ }
+ if (!next || rptr->re_timeout < next)
+ next = rptr->re_timeout;
+ }
+ return next;
+}
+
+
+/*
+ * ar_send_res_msg
+ *
+ * When sending queries to nameservers listed in the resolv.conf file,
+ * don't send a query to every one, but increase the number sent linearly
+ * to match the number of resends. This increase only occurs if there are
+ * multiple nameserver entries in the resolv.conf file.
+ * The return value is the number of messages successfully sent to
+ * nameservers or -1 if no successful sends.
+ */
+static int ar_send_res_msg(msg, len, rcount)
+char *msg;
+int len, rcount;
+{
+ register int i;
+ int sent = 0;
+
+ if (!msg)
+ return -1;
+
+ rcount = (_res.nscount > rcount) ? rcount : _res.nscount;
+ if (_res.options & RES_PRIMARY)
+ rcount = 1;
+
+ if (ar_vc)
+ {
+ ar_reinfo.re_sent++;
+ sent++;
+ if (write(ar_resfd, msg, len) == -1)
+ {
+ int errtmp = errno;
+ (void)close(ar_resfd);
+ errno = errtmp;
+ ar_resfd = -1;
+ }
+ }
+ else
+ for (i = 0; i < rcount; i++)
+ {
+ if (sendto(ar_resfd, msg, len, 0,
+ (struct sockaddr *)&(_res.NS_ADDR_LIST[i]),
+ sizeof(struct sockaddr_in)) == len)
+ {
+ ar_reinfo.re_sent++;
+ sent++;
+ }
+ }
+ return (sent) ? sent : -1;
+}
+
+
+/*
+ * ar_find_id
+ *
+ * find a dns query record by the id (id is determined by dn_mkquery)
+ */
+static struct reslist *ar_find_id(id)
+int id;
+{
+ register struct reslist *rptr;
+
+ for (rptr = ar_first; rptr; rptr = rptr->re_next)
+ if (rptr->re_id == id)
+ return rptr;
+ return NULL;
+}
+
+
+/*
+ * ar_delete
+ *
+ * Delete a request from the waiting list if it has a data pointer which
+ * matches the one passed.
+ */
+int ar_delete(ptr, size)
+char *ptr;
+int size;
+{
+ register struct reslist *rptr;
+ register struct reslist *r2ptr;
+ int removed = 0;
+
+ for (rptr = ar_first; rptr; rptr = r2ptr)
+ {
+ r2ptr = rptr->re_next;
+ if (rptr->re_rinfo.ri_ptr && ptr && size &&
+ bcmp(rptr->re_rinfo.ri_ptr, ptr, size) == 0)
+ {
+ (void)ar_remrequest(rptr);
+ removed++;
+ }
+ }
+ return removed;
+}
+
+
+/*
+ * ar_query_name
+ *
+ * generate a query based on class, type and name.
+ */
+static int ar_query_name(name, class, type, rptr)
+char *name;
+int class, type;
+struct reslist *rptr;
+{
+ static char buf[MAXPACKET];
+ int r,s,a;
+ HEADER *hptr;
+
+ bzero(buf, sizeof(buf));
+ r = res_mkquery(QUERY, name, class, type, NULL, 0, NULL,
+ buf, sizeof(buf));
+ if (r <= 0)
+ {
+ h_errno = NO_RECOVERY;
+ return r;
+ }
+ hptr = (HEADER *)buf;
+ rptr->re_id = ntohs(hptr->id);
+
+ s = ar_send_res_msg(buf, r, rptr->re_sends);
+
+ if (s == -1)
+ {
+ h_errno = TRY_AGAIN;
+ return -1;
+ }
+ else
+ rptr->re_sent += s;
+ return 0;
+}
+
+
+/*
+ * ar_gethostbyname
+ *
+ * Replacement library function call to gethostbyname(). This one, however,
+ * doesn't return the record being looked up but just places the query in the
+ * queue to await answers.
+ */
+int ar_gethostbyname(name, info, size)
+char *name;
+char *info;
+int size;
+{
+ char host[65];
+ struct resinfo resi;
+ register struct resinfo *rp = &resi;
+
+ if (size && info)
+ {
+ rp->ri_ptr = (char *)malloc(size);
+ bcopy(info, rp->ri_ptr, size);
+ rp->ri_size = size;
+ }
+ else
+ bzero((char *)rp, sizeof(resi));
+ ar_reinfo.re_na_look++;
+ (void)strncpy(host, name, 64);
+ host[64] = '\0';
+
+ return (do_query_name(rp, host, NULL));
+}
+
+
+static int do_query_name(resi, name, rptr)
+struct resinfo *resi;
+char *name;
+register struct reslist *rptr;
+{
+ char hname[65];
+ int len;
+
+ len = strlen((char *)strncpy(hname, name, sizeof(hname)-1));
+
+ if (rptr && (hname[len-1] != '.'))
+ {
+ (void)strncat(hname, ar_dot, sizeof(hname)-len-1);
+ /*
+ * NOTE: The logical relationship between DNSRCH and DEFNAMES
+ * is implies. ie no DEFNAES, no DNSRCH.
+ */
+ if (_res.options & (RES_DEFNAMES|RES_DNSRCH) ==
+ (RES_DEFNAMES|RES_DNSRCH))
+ {
+ if (_res.dnsrch[rptr->re_srch])
+ (void)strncat(hname, _res.dnsrch[rptr->re_srch],
+ sizeof(hname) - ++len -1);
+ }
+ else if (_res.options & RES_DEFNAMES)
+ (void)strncat(hname, ar_domainname, sizeof(hname) - len -1);
+ }
+
+ /*
+ * Store the name passed as the one to lookup and generate other host
+ * names to pass onto the nameserver(s) for lookups.
+ */
+ if (!rptr)
+ {
+ rptr = ar_make_request(resi);
+ rptr->re_type = T_A;
+ (void)strncpy(rptr->re_name, name, sizeof(rptr->re_name)-1);
+ }
+ return (ar_query_name(hname, C_IN, T_A, rptr));
+}
+
+
+/*
+ * ar_gethostbyaddr
+ *
+ * Generates a query for a given IP address.
+ */
+int ar_gethostbyaddr(addr, info, size)
+char *addr;
+char *info;
+int size;
+{
+ struct resinfo resi;
+ register struct resinfo *rp = &resi;
+
+ if (size && info)
+ {
+ rp->ri_ptr = (char *)malloc(size);
+ bcopy(info, rp->ri_ptr, size);
+ rp->ri_size = size;
+ }
+ else
+ bzero((char *)rp, sizeof(resi));
+ ar_reinfo.re_nu_look++;
+ return (do_query_number(rp, addr, NULL));
+}
+
+
+/*
+ * do_query_number
+ *
+ * Use this to do reverse IP# lookups.
+ */
+static int do_query_number(resi, numb, rptr)
+struct resinfo *resi;
+char *numb;
+register struct reslist *rptr;
+{
+ register unsigned char *cp;
+ static char ipbuf[32];
+
+ /*
+ * Generate name in the "in-addr.arpa" domain. No addings bits to this
+ * name to get more names to query!.
+ */
+ cp = (unsigned char *)numb;
+ (void)sprintf(ipbuf,"%u.%u.%u.%u.in-addr.arpa.",
+ (unsigned int)(cp[3]), (unsigned int)(cp[2]),
+ (unsigned int)(cp[1]), (unsigned int)(cp[0]));
+
+ if (!rptr)
+ {
+ rptr = ar_make_request(resi);
+ rptr->re_type = T_PTR;
+ rptr->re_he.h_length = sizeof(struct in_addr);
+ bcopy(numb, (char *)&rptr->re_addr, rptr->re_he.h_length);
+ bcopy(numb, (char *)&rptr->re_he.h_addr_list[0].s_addr,
+ rptr->re_he.h_length);
+ }
+ return (ar_query_name(ipbuf, C_IN, T_PTR, rptr));
+}
+
+
+/*
+ * ar_resent_query
+ *
+ * resends a query.
+ */
+static int ar_resend_query(rptr)
+struct reslist *rptr;
+{
+ if (!rptr->re_resend)
+ return -1;
+
+ switch(rptr->re_type)
+ {
+ case T_PTR:
+ ar_reinfo.re_resends++;
+ return do_query_number(NULL, &rptr->re_addr, rptr);
+ case T_A:
+ ar_reinfo.re_resends++;
+ return do_query_name(NULL, rptr->re_name, rptr);
+ default:
+ break;
+ }
+
+ return -1;
+}
+
+
+/*
+ * ar_procanswer
+ *
+ * process an answer received from a nameserver.
+ */
+static int ar_procanswer(rptr, hptr, buf, eob)
+struct reslist *rptr;
+char *buf, *eob;
+HEADER *hptr;
+{
+ char *cp, **alias, *s;
+ int class, type, dlen, len, ans = 0, n, i;
+ u_int32_t ttl, dr, *adr;
+ struct hent *hp;
+
+ cp = buf + sizeof(HEADER);
+ adr = (u_int32_t *)rptr->re_he.h_addr_list;
+
+ while (*adr)
+ adr++;
+
+ alias = rptr->re_he.h_aliases;
+ while (*alias)
+ alias++;
+
+ hp = &rptr->re_he;
+
+
+ /*
+ * Skip over the original question.
+ */
+ while (hptr->qdcount-- > 0)
+ cp += dn_skipname(cp, eob) + QFIXEDSZ;
+ /*
+ * proccess each answer sent to us. blech.
+ */
+ while (hptr->ancount-- > 0 && cp < eob) {
+ n = dn_expand(buf, eob, cp, ar_hostbuf, sizeof(ar_hostbuf));
+ cp += n;
+ if (n <= 0)
+ return ans;
+
+ ans++;
+ /*
+ * 'skip' past the general dns crap (ttl, class, etc) to get
+ * the pointer to the right spot. Some of thse are actually
+ * useful so its not a good idea to skip past in one big jump.
+ */
+ type = (int)_getshort(cp);
+ cp += sizeof(short);
+ class = (int)_getshort(cp);
+ cp += sizeof(short);
+ ttl = (u_int32_t)_getlong(cp);
+ cp += sizeof(u_int32_t);
+ dlen = (int)_getshort(cp);
+ cp += sizeof(short);
+ rptr->re_type = type;
+
+ switch(type)
+ {
+ case T_A :
+ rptr->re_he.h_length = dlen;
+ if (ans == 1)
+ rptr->re_he.h_addrtype=(class == C_IN) ?
+ AF_INET : AF_UNSPEC;
+ if (dlen != sizeof(dr))
+ {
+ h_errno = TRY_AGAIN;
+ continue;
+ }
+ bcopy(cp, &dr, dlen);
+ *adr++ = dr;
+ *adr = 0;
+ cp += dlen;
+ len = strlen(ar_hostbuf);
+ if (!rptr->re_he.h_name)
+ {
+ rptr->re_he.h_name = (char *)malloc(len+1);
+ if (!rptr->re_he.h_name)
+ break;
+ (void)strcpy(rptr->re_he.h_name, ar_hostbuf);
+ }
+ break;
+ case T_PTR :
+ if ((n = dn_expand(buf, eob, cp, ar_hostbuf,
+ sizeof(ar_hostbuf) )) < 0)
+ {
+ cp += n;
+ continue;
+ }
+ cp += n;
+ len = strlen(ar_hostbuf)+1;
+ /*
+ * copy the returned hostname into the host name
+ * or alias field if there is a known hostname
+ * already.
+ */
+ if (!rptr->re_he.h_name)
+ {
+ rptr->re_he.h_name = (char *)malloc(len);
+ if (!rptr->re_he.h_name)
+ break;
+ (void)strcpy(rptr->re_he.h_name, ar_hostbuf);
+ }
+ else
+ {
+ *alias = (char *)malloc(len);
+ if (!*alias)
+ return -1;
+ (void)strcpy(*alias++, ar_hostbuf);
+ *alias = NULL;
+ }
+ break;
+ case T_CNAME :
+ cp += dlen;
+ if (alias >= &(rptr->re_he.h_aliases[MAXALIASES-1]))
+ continue;
+ n = strlen(ar_hostbuf)+1;
+ *alias = (char *)malloc(n);
+ if (!*alias)
+ return -1;
+ (void)strcpy(*alias++, ar_hostbuf);
+ *alias = NULL;
+ break;
+ default :
+ break;
+ }
+ }
+
+ return ans;
+}
+
+
+/*
+ * ar_answer
+ *
+ * Get an answer from a DNS server and process it. If a query is found to
+ * which no answer has been given to yet, copy its 'info' structure back
+ * to where "reip" points and return a pointer to the hostent structure.
+ */
+struct hostent *ar_answer(reip, size)
+char *reip;
+int size;
+{
+ static char ar_rcvbuf[sizeof(HEADER) + MAXPACKET];
+ static struct hostent ar_host;
+
+ register HEADER *hptr;
+ register struct reslist *rptr = NULL;
+ register struct hostent *hp;
+ register char **s;
+ unsigned long *adr;
+ int rc, i, n, a;
+
+ rc = recv(ar_resfd, ar_rcvbuf, sizeof(ar_rcvbuf), 0);
+ if (rc <= 0)
+ goto getres_err;
+
+ ar_reinfo.re_replies++;
+ hptr = (HEADER *)ar_rcvbuf;
+ /*
+ * convert things to be in the right order.
+ */
+ hptr->id = ntohs(hptr->id);
+ hptr->ancount = ntohs(hptr->ancount);
+ hptr->arcount = ntohs(hptr->arcount);
+ hptr->nscount = ntohs(hptr->nscount);
+ hptr->qdcount = ntohs(hptr->qdcount);
+ /*
+ * response for an id which we have already received an answer for
+ * just ignore this response.
+ */
+ rptr = ar_find_id(hptr->id);
+ if (!rptr)
+ goto getres_err;
+
+ if ((hptr->rcode != NOERROR) || (hptr->ancount == 0))
+ {
+ switch (hptr->rcode)
+ {
+ case NXDOMAIN:
+ h_errno = HOST_NOT_FOUND;
+ break;
+ case SERVFAIL:
+ h_errno = TRY_AGAIN;
+ break;
+ case NOERROR:
+ h_errno = NO_DATA;
+ break;
+ case FORMERR:
+ case NOTIMP:
+ case REFUSED:
+ default:
+ h_errno = NO_RECOVERY;
+ break;
+ }
+ ar_reinfo.re_errors++;
+ /*
+ ** If a bad error was returned, we stop here and dont send
+ ** send any more (no retries granted).
+ */
+ if (h_errno != TRY_AGAIN)
+ {
+ rptr->re_resend = 0;
+ rptr->re_retries = 0;
+ }
+ goto getres_err;
+ }
+
+ a = ar_procanswer(rptr, hptr, ar_rcvbuf, ar_rcvbuf+rc);
+
+ if ((rptr->re_type == T_PTR) && (_res.options & RES_CHECKPTR))
+ {
+ /*
+ * For reverse lookups on IP#'s, lookup the name that is given
+ * for the ip# and return with that as the official result.
+ * -avalon
+ */
+ rptr->re_type = T_A;
+ /*
+ * Clean out the list of addresses already set, even though
+ * there should only be one :)
+ */
+ adr = (unsigned long *)rptr->re_he.h_addr_list;
+ while (*adr)
+ *adr++ = 0L;
+ /*
+ * Lookup the name that we were given for the ip#
+ */
+ ar_reinfo.re_na_look++;
+ (void)strncpy(rptr->re_name, rptr->re_he.h_name,
+ sizeof(rptr->re_name)-1);
+ rptr->re_he.h_name = NULL;
+ rptr->re_retries = _res.retry;
+ rptr->re_sends = 1;
+ rptr->re_resend = 1;
+ rptr->re_he.h_name = NULL;
+ ar_reinfo.re_na_look++;
+ (void)ar_query_name(rptr->re_name, C_IN, T_A, rptr);
+ return NULL;
+ }
+
+ if (reip && rptr->re_rinfo.ri_ptr && size)
+ bcopy(rptr->re_rinfo.ri_ptr, reip,
+ MIN(rptr->re_rinfo.ri_size, size));
+ /*
+ * Clean up structure from previous usage.
+ */
+ hp = &ar_host;
+#ifdef ARLIB_DEBUG
+ ar_dump_hostent("ar_answer: previous usage", hp);
+#endif
+
+ if (hp->h_name)
+ (void)free(hp->h_name);
+ if (s = hp->h_aliases)
+ {
+ while (*s)
+ (void)free(*s++);
+ (void)free(hp->h_aliases);
+ }
+ if (s = hp->h_addr_list)
+ {
+ /*
+ * Only free once since we allocated space for
+ * address in one big chunk.
+ */
+ (void)free(*s);
+ (void)free(hp->h_addr_list);
+ }
+ bzero((char *)hp, sizeof(*hp));
+
+ /*
+ * Setup and copy details for the structure we return a pointer to.
+ */
+ hp->h_addrtype = AF_INET;
+ hp->h_length = sizeof(struct in_addr);
+ if(rptr->re_he.h_name)
+ {
+ hp->h_name = (char *)malloc(strlen(rptr->re_he.h_name)+1);
+ if(!hp->h_name)
+ {
+#ifdef ARLIB_DEBUG
+ fprintf(stderr, "no memory for hostname\n");
+#endif
+ h_errno = TRY_AGAIN;
+ goto getres_err;
+ }
+ (void)strcpy(hp->h_name, rptr->re_he.h_name);
+ }
+#ifdef ARLIB_DEBUG
+ ar_dump_hostent("ar_answer: (snap) store name", hp);
+#endif
+
+ /*
+ * Count IP#'s.
+ */
+ for (i = 0, n = 0; i < MAXADDRS; i++, n++)
+ if (!rptr->re_he.h_addr_list[i].s_addr)
+ break;
+ s = hp->h_addr_list = (char **)malloc((n + 1) * sizeof(char *));
+ if (n)
+ {
+ *s = (char *)malloc(n * sizeof(struct in_addr));
+ if(!*s)
+ {
+#ifdef ARLIB_DEBUG
+ fprintf(stderr, "no memory for IP#'s (%d)\n", n);
+#endif
+ h_errno = TRY_AGAIN;
+ goto getres_err;
+ }
+ bcopy((char *)&rptr->re_he.h_addr_list[0].s_addr, *s,
+ sizeof(struct in_addr));
+ s++;
+ for (i = 1; i < n; i++, s++)
+ {
+ *s = hp->h_addr + i * sizeof(struct in_addr);
+ bcopy((char *)&rptr->re_he.h_addr_list[i].s_addr, *s,
+ sizeof(struct in_addr));
+ }
+ }
+ *s = NULL;
+#ifdef ARLIB_DEBUG
+ ar_dump_hostent("ar_answer: (snap) store IP#'s", hp);
+#endif
+
+ /*
+ * Count CNAMEs
+ */
+ for (i = 0, n = 0; i < MAXADDRS; i++, n++)
+ if (!rptr->re_he.h_aliases[i])
+ break;
+ s = hp->h_aliases = (char **)malloc((n + 1) * sizeof(char *));
+ if (!s)
+ {
+#ifdef ARLIB_DEBUG
+ fprintf(stderr, "no memory for aliases (%d)\n", n);
+#endif
+ h_errno = TRY_AGAIN;
+ goto getres_err;
+ }
+ for (i = 0; i < n; i++)
+ {
+ *s++ = rptr->re_he.h_aliases[i];
+ rptr->re_he.h_aliases[i] = NULL;
+ }
+ *s = NULL;
+#ifdef ARLIB_DEBUG
+ ar_dump_hostent("ar_answer: (snap) store CNAMEs", hp);
+ ar_dump_hostent("ar_answer: new one", hp);
+#endif
+
+ if (a > 0)
+ (void)ar_remrequest(rptr);
+ else
+ if (!rptr->re_sent)
+ (void)ar_remrequest(rptr);
+ return hp;
+
+getres_err:
+ if (rptr)
+ {
+ if (reip && rptr->re_rinfo.ri_ptr && size)
+ bcopy(rptr->re_rinfo.ri_ptr, reip,
+ MIN(rptr->re_rinfo.ri_size, size));
+ if ((h_errno != TRY_AGAIN) &&
+ (_res.options & (RES_DNSRCH|RES_DEFNAMES) ==
+ (RES_DNSRCH|RES_DEFNAMES) ))
+ if (_res.dnsrch[rptr->re_srch])
+ {
+ rptr->re_retries = _res.retry;
+ rptr->re_sends = 1;
+ rptr->re_resend = 1;
+ (void)ar_resend_query(rptr);
+ rptr->re_srch++;
+ }
+ return NULL;
+ }
+ return NULL;
+}
+
+
+#ifdef ARLIB_DEBUG
+void ar_dump_hostent(prefix, hp)
+char *prefix;
+struct hostent *hp;
+{
+ register char **s;
+
+ fflush(stdout);
+
+ fprintf(stderr, "%s\n", prefix);
+ fprintf(stderr, " hp %p\n", hp);
+ fprintf(stderr, " h_name %p '%s'\n",
+ hp->h_name, hp->h_name);
+ if (s = hp->h_aliases)
+ {
+ fprintf(stderr, " h_aliases %p\n",
+ hp->h_aliases);
+ while (*s)
+ {
+ fprintf(stderr, " element %p\n", *s);
+ s++;
+ }
+ }
+ if (s = hp->h_addr_list)
+ {
+ fprintf(stderr, " h_addr_list %p\n",
+ hp->h_addr_list);
+ while (*s)
+ {
+ fprintf(stderr, " element %p\n", *s);
+ s++;
+ }
+ }
+
+ fflush(stderr);
+}
+
+
+void ar_dump_reslist(FILE* fp)
+{
+ register struct reslist *rptr;
+ int c;
+
+ c = 0;
+ for (rptr = ar_first; rptr; rptr = rptr->re_next)
+ {
+ fprintf(fp, "%4d [%p] %4d [%p]: %s\n", rptr->re_id, rptr,
+ *(rptr->re_rinfo.ri_ptr), rptr->re_rinfo.ri_ptr,
+ rptr->re_name);
+ }
+}
+#endif
diff --git a/contrib/ntp/arlib/arlib.h b/contrib/ntp/arlib/arlib.h
new file mode 100644
index 000000000000..a295b8862a21
--- /dev/null
+++ b/contrib/ntp/arlib/arlib.h
@@ -0,0 +1,29 @@
+/*
+ * arlib.h (C)opyright 1992 Darren Reed.
+ */
+
+#define ARES_INITLIST 1
+#define ARES_CALLINIT 2
+#define ARES_INITSOCK 4
+#define ARES_INITDEBG 8
+#define ARES_INITCACH 16
+
+#ifdef __STDC__
+extern struct hostent *ar_answer(char *, int);
+extern void ar_close();
+extern int ar_delete(char *, int);
+extern int ar_gethostbyname(char *, char *, int);
+extern int ar_gethostbyaddr(char *, char *, int);
+extern int ar_init(int);
+extern int ar_open();
+extern long ar_timeout(time_t, char *, int);
+#else
+extern struct hostent *ar_answer();
+extern void ar_close();
+extern int ar_delete();
+extern int ar_gethostbyname();
+extern int ar_gethostbyaddr();
+extern int ar_init();
+extern int ar_open();
+extern long ar_timeout();
+#endif
diff --git a/contrib/ntp/arlib/arplib.h b/contrib/ntp/arlib/arplib.h
new file mode 100644
index 000000000000..8f905d1049af
--- /dev/null
+++ b/contrib/ntp/arlib/arplib.h
@@ -0,0 +1,45 @@
+/*
+ * arplib.h (C)opyright 1992 Darren Reed.
+ */
+
+#define MAXPACKET 1024
+#define MAXALIASES 35
+#define MAXADDRS 35
+
+#define RES_CHECKPTR 0x0400
+
+struct hent {
+ char *h_name; /* official name of host */
+ char *h_aliases[MAXALIASES]; /* alias list */
+ int h_addrtype; /* host address type */
+ int h_length; /* length of address */
+ /* list of addresses from name server */
+ struct in_addr h_addr_list[MAXADDRS];
+#define h_addr h_addr_list[0] /* address, for backward compatiblity */
+};
+
+struct resinfo {
+ char *ri_ptr;
+ int ri_size;
+};
+
+struct reslist {
+ int re_id;
+ char re_type;
+ char re_retries;
+ char re_resend; /* send flag. 0 == dont resend */
+ char re_sends;
+ char re_srch;
+ int re_sent;
+ u_long re_sentat;
+ u_long re_timeout;
+ struct in_addr re_addr;
+ struct resinfo re_rinfo;
+ struct hent re_he;
+ struct reslist *re_next, *re_prev;
+ char re_name[65];
+};
+
+#ifndef MIN
+#define MIN(a,b) ((a) > (b) ? (b) : (a))
+#endif
diff --git a/contrib/ntp/arlib/configure b/contrib/ntp/arlib/configure
new file mode 100755
index 000000000000..7d85a6054e25
--- /dev/null
+++ b/contrib/ntp/arlib/configure
@@ -0,0 +1,4424 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.57.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="arlib.c"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.7"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=arlib
+ VERSION=1.0
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+
+
+#AM_CONFIG_HEADER([config.h])
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+# Checks for libraries.
+echo "$as_me:$LINENO: checking for gethostent" >&5
+echo $ECHO_N "checking for gethostent... $ECHO_C" >&6
+if test "${ac_cv_func_gethostent+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostent (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostent ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gethostent) || defined (__stub___gethostent)
+choke me
+#else
+char (*f) () = gethostent;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gethostent;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gethostent=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gethostent=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostent" >&5
+echo "${ECHO_T}$ac_cv_func_gethostent" >&6
+if test $ac_cv_func_gethostent = yes; then
+ :
+else
+
+echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5
+echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostent+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl -lsocket $LIBS"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostent ();
+int
+main ()
+{
+gethostent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_gethostent=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostent=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostent" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostent" >&6
+if test $ac_cv_lib_nsl_gethostent = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
+_ACEOF
+
+ LIBS="-lnsl $LIBS"
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for setsockopt" >&5
+echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
+if test "${ac_cv_func_setsockopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char setsockopt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
+choke me
+#else
+char (*f) () = setsockopt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != setsockopt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setsockopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_setsockopt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
+if test $ac_cv_func_setsockopt = yes; then
+ :
+else
+
+echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
+echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt ();
+int
+main ()
+{
+setsockopt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_setsockopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_setsockopt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
+if test $ac_cv_lib_socket_setsockopt = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSOCKET 1
+_ACEOF
+
+ LIBS="-lsocket $LIBS"
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for res_init" >&5
+echo $ECHO_N "checking for res_init... $ECHO_C" >&6
+if test "${ac_cv_func_res_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char res_init (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_init ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_res_init) || defined (__stub___res_init)
+choke me
+#else
+char (*f) () = res_init;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != res_init;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_res_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_res_init=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_res_init" >&5
+echo "${ECHO_T}$ac_cv_func_res_init" >&6
+if test $ac_cv_func_res_init = yes; then
+ :
+else
+
+echo "$as_me:$LINENO: checking for res_init in -lresolv" >&5
+echo $ECHO_N "checking for res_init in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_init ();
+int
+main ()
+{
+res_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_resolv_res_init=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_init" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_init" >&6
+if test $ac_cv_lib_resolv_res_init = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRESOLV 1
+_ACEOF
+
+ LIBS="-lresolv $LIBS"
+
+fi
+
+fi
+
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+echo "$as_me:$LINENO: checking for u_int32_t" >&5
+echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6
+if test "${ac_cv_type_u_int32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <netinet/in.h>
+
+int
+main ()
+{
+if ((u_int32_t *) 0)
+ return 0;
+if (sizeof (u_int32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_u_int32_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_u_int32_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6
+if test $ac_cv_type_u_int32_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define u_int32_t unsigned int
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking for name of NS address list" >&5
+echo $ECHO_N "checking for name of NS address list... $ECHO_C" >&6
+if test "${ac_cv_var_ns_addr_list+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ans=''
+# Normal
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+int
+main ()
+{
+ return sizeof(_res.nsaddr_list);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ans=nsaddr_list
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# Ultrix
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+int
+main ()
+{
+ return sizeof(_res.ns_list);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ans=ns_list
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ case "$ans" in
+ '') echo "$as_me:$LINENO: result: ???" >&5
+echo "${ECHO_T}???" >&6
+ { { echo "$as_me:$LINENO: error: Can't find nameserver address list in _res" >&5
+echo "$as_me: error: Can't find nameserver address list in _res" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+ ac_cv_var_ns_addr_list=$ans
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_ns_addr_list" >&5
+echo "${ECHO_T}$ac_cv_var_ns_addr_list" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define NS_ADDR_LIST $ans
+_ACEOF
+
+
+# Checks for library functions.
+
+ ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.57,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/contrib/ntp/arlib/configure.in b/contrib/ntp/arlib/configure.in
new file mode 100644
index 000000000000..509e23ddb8d1
--- /dev/null
+++ b/contrib/ntp/arlib/configure.in
@@ -0,0 +1,57 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT
+AM_INIT_AUTOMAKE(arlib, 1.0)
+AC_CONFIG_SRCDIR([arlib.c])
+#AM_CONFIG_HEADER([config.h])
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_RANLIB
+
+# Checks for libraries.
+AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket))
+AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
+AC_CHECK_FUNC(res_init, , AC_CHECK_LIB(resolv, res_init))
+
+# Checks for header files.
+dnl AC_CHECK_HEADERS([errno.h fcntl.h netdb.h netinet/in.h strings.h sys/socket.h sys/time.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+dnl AC_HEADER_TIME
+
+AC_CHECK_TYPE(u_int32_t, ,
+ [AC_DEFINE(u_int32_t, [unsigned int], [Unsigned 32-bit type])],[
+#include <sys/types.h>
+#include <netinet/in.h>])
+
+AC_CACHE_CHECK([for name of NS address list], [ac_cv_var_ns_addr_list],
+ [ans=''
+# Normal
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>], [ return sizeof(_res.nsaddr_list);],
+[ans=nsaddr_list],
+[# Ultrix
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>], [ return sizeof(_res.ns_list);],
+[ans=ns_list])])
+ case "$ans" in
+ '') AC_MSG_RESULT([???])
+ AC_MSG_ERROR([Can't find nameserver address list in _res])
+ ;;
+ esac
+ ac_cv_var_ns_addr_list=$ans])
+AC_DEFINE_UNQUOTED(NS_ADDR_LIST, $ans, [The name of the NS address list in _res])
+
+# Checks for library functions.
+dnl AC_HEADER_STDC
+dnl AC_FUNC_MALLOC
+dnl AC_CHECK_FUNCS([bzero inet_ntoa select socket])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/contrib/ntp/arlib/depcomp b/contrib/ntp/arlib/depcomp
new file mode 100755
index 000000000000..aea3d00785da
--- /dev/null
+++ b/contrib/ntp/arlib/depcomp
@@ -0,0 +1,472 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+ base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+ dir=`echo "$object" | sed 's,/.*$,/,'`
+ if test "$dir" = "$object"; then
+ dir=
+ fi
+ # FIXME: should be _deps on DOS.
+ depfile="$dir.deps/$base"
+fi
+
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> $depfile
+ echo >> $depfile
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> $depfile
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. This file always lives in the current directory.
+ # Also, the AIX compiler puts `$object:' at the start of each line;
+ # $object doesn't have directory information.
+ stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+ tmpdepfile="$stripped.u"
+ outname="$stripped.o"
+ if test "$libtool" = yes; then
+ "$@" -Wc,-M
+ else
+ "$@" -M
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+ sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ tmpdepfile1="$dir.libs/$base.lo.d"
+ tmpdepfile2="$dir.libs/$base.d"
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1="$dir$base.o.d"
+ tmpdepfile2="$dir$base.d"
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile1"; then
+ tmpdepfile="$tmpdepfile1"
+ else
+ tmpdepfile="$tmpdepfile2"
+ fi
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a space and a tab in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no
+ for arg in "$@"; do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix="`echo $object | sed 's/^.*\././'`"
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ "$@" || exit $?
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/contrib/ntp/arlib/install-sh b/contrib/ntp/arlib/install-sh
new file mode 100755
index 000000000000..6ce63b9f76bc
--- /dev/null
+++ b/contrib/ntp/arlib/install-sh
@@ -0,0 +1,294 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+#
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd=$cpprog
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "$0: no input file specified" >&2
+ exit 1
+else
+ :
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d "$dst" ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=$mkdirprog
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f "$src" ] || [ -d "$src" ]
+ then
+ :
+ else
+ echo "$0: $src does not exist" >&2
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "$0: no destination specified" >&2
+ exit 1
+ else
+ :
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d "$dst" ]
+ then
+ dst=$dst/`basename "$src"`
+ else
+ :
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+ '
+IFS="${IFS-$defaultIFS}"
+
+oIFS=$IFS
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp=$pathcomp$1
+ shift
+
+ if [ ! -d "$pathcomp" ] ;
+ then
+ $mkdirprog "$pathcomp"
+ else
+ :
+ fi
+
+ pathcomp=$pathcomp/
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd "$dst" &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename "$dst"`
+ else
+ dstfile=`basename "$dst" $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename "$dst"`
+ else
+ :
+ fi
+
+# Make a couple of temp file names in the proper directory.
+
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+# Trap to clean up temp files at exit.
+
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd "$src" "$dsttmp" &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# Now remove or move aside any old file at destination location. We try this
+# two ways since rm can't unlink itself on some systems and the destination
+# file might be busy for other reasons. In this case, the final cleanup
+# might fail but the new file should still install successfully.
+
+{
+ if [ -f "$dstdir/$dstfile" ]
+ then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+ $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+ {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+} &&
+
+# Now rename the file to the real destination.
+
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+
+fi &&
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+
+{
+ (exit 0); exit
+}
diff --git a/contrib/ntp/arlib/missing b/contrib/ntp/arlib/missing
new file mode 100755
index 000000000000..6a37006e8f0a
--- /dev/null
+++ b/contrib/ntp/arlib/missing
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing 0.4 - GNU automake"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/contrib/ntp/arlib/mkinstalldirs b/contrib/ntp/arlib/mkinstalldirs
new file mode 100755
index 000000000000..d2d5f21b6112
--- /dev/null
+++ b/contrib/ntp/arlib/mkinstalldirs
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case $1 in
+ -h | --help | --h*) # -h for help
+ echo "$usage" 1>&2
+ exit 0
+ ;;
+ -m) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --) # stop option processing
+ shift
+ break
+ ;;
+ -*) # unknown option
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *) # first non-opt arg
+ break
+ ;;
+ esac
+done
+
+for file
+do
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+ 0) exit 0 ;;
+esac
+
+case $dirmode in
+ '')
+ if mkdir -p -- . 2>/dev/null; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ fi
+ ;;
+ *)
+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ fi
+ ;;
+esac
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case $pathcomp in
+ -*) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here
diff --git a/contrib/ntp/arlib/sample.c b/contrib/ntp/arlib/sample.c
new file mode 100644
index 000000000000..83db6a842a8f
--- /dev/null
+++ b/contrib/ntp/arlib/sample.c
@@ -0,0 +1,143 @@
+#include <stdio.h>
+#include <strings.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include "arlib.h"
+
+#ifndef lint
+static char sccsid[] = "@(#)sample.c 1.1 12/21/92 (C)1992 Darren Reed. ASYNC DNS";
+#endif
+
+char line[512];
+
+int lookup = 0, seq = 0;
+long expire = 0;
+
+main()
+{
+ struct in_addr adr;
+ struct timeval tv2;
+ fd_set rd;
+ long now;
+ char *s;
+ int afd, nfd, pid = getpid(), del;
+
+ afd = ar_init(ARES_INITLIST|ARES_CALLINIT|ARES_INITSOCK);
+
+ (void)printf("afd = %d pid = %d\n",afd, pid);
+
+ while (1)
+ {
+ (void)printf("Host =>");
+ (void)fflush(stdout);
+ *line = '\0';
+ FD_ZERO(&rd);
+ FD_SET(0,&rd);
+ FD_SET(afd,&rd);
+ now = time(NULL);
+ if (expire >= now)
+ {
+ tv2.tv_usec = 0;
+ tv2.tv_sec = expire - now;
+ nfd = select(FD_SETSIZE, &rd, NULL, NULL, &tv2);
+ }
+ else
+ nfd = select(FD_SETSIZE, &rd, NULL, NULL, NULL);
+
+ if (FD_ISSET(0, &rd))
+ {
+ if (!fgets(line, sizeof(line) - 1, stdin))
+ exit(0);
+ if (s = index(line, '\n'))
+ *s = '\0';
+ }
+
+ if (isalpha(*line))
+ {
+ (void)printf("Asking about [%s] #%d.\n",line, ++seq);
+ (void)ar_gethostbyname(line, (char *)&seq,
+ sizeof(seq));
+ lookup++;
+ }
+ else if (isdigit(*line))
+ {
+ (void)printf("Asking about IP#[%s] #%d.\n",
+ line, ++seq);
+ adr.s_addr = inet_addr(line);
+ (void)ar_gethostbyaddr(&adr, (char *)&seq,
+ sizeof(seq));
+ lookup++;
+ }
+ if (lookup)
+ (void)printf("Waiting for answer:\n");
+ if (FD_ISSET(afd, &rd))
+ (void)waitonlookup(afd);
+ del = 0;
+ expire = ar_timeout(time(NULL), &del, sizeof(del));
+ if (del)
+ {
+ (void)fprintf(stderr,"#%d failed\n", del);
+ lookup--;
+ }
+ }
+}
+
+printhostent(hp)
+struct hostent *hp;
+{
+ struct in_addr ip;
+ int i;
+
+ (void)printf("hname = %s\n", hp->h_name);
+ for (i = 0; hp->h_aliases[i]; i++)
+ (void)printf("alias %d = %s\n", i+1, hp->h_aliases[i]);
+ for (i = 0; hp->h_addr_list[i]; i++)
+ {
+ bcopy(hp->h_addr_list[i], (char *)&ip, sizeof(ip));
+ (void)printf("IP# %d = %s\n", i+1, inet_ntoa(ip));
+ }
+}
+
+int waitonlookup(afd)
+int afd;
+{
+ struct timeval delay;
+ struct hostent *hp;
+ fd_set rd;
+ long now;
+ int nfd, del;
+
+waitloop:
+ FD_ZERO(&rd);
+ now = time(NULL);
+ if (expire >= now)
+ delay.tv_sec = expire - now;
+ else
+ delay.tv_sec = 1;
+ delay.tv_usec = 0;
+ FD_SET(afd, &rd);
+ FD_SET(0, &rd);
+
+ nfd = select(FD_SETSIZE, &rd, 0, 0, &delay);
+ if (nfd == 0)
+ return 0;
+ else if (FD_ISSET(afd, &rd))
+ {
+ del = 0;
+ hp = ar_answer(&del, sizeof(del));
+
+ (void)printf("hp=%x seq=%d\n",hp,del);
+ if (hp)
+ {
+ (void)printhostent(hp);
+ if (!--lookup)
+ return 1;
+ }
+ }
+ if (FD_ISSET(0, &rd))
+ return 2;
+ return 0;
+}
diff --git a/contrib/ntp/build b/contrib/ntp/build
index 22252d325937..58551fdffa02 100755
--- a/contrib/ntp/build
+++ b/contrib/ntp/build
@@ -13,6 +13,9 @@ case "$1" in
$KEY) ;;
*)
echo "Wrong directory for build on host $IAM"
+ echo "This is <`pwd`>"
+ echo "SIG is <$SIG>"
+ echo "KEY is <$KEY>"
exit 1
;;
esac
@@ -51,7 +54,7 @@ case "$CONFIG_ARGS" in
KEYSUF="-autokey"
;;
*--without-crypto*)
- [ -d rsaref2 ] && KEYSUF="-norsaref"
+ KEYSUF="-noopenssl"
;;
esac
diff --git a/contrib/ntp/clockstuff/Makefile.in b/contrib/ntp/clockstuff/Makefile.in
index ff2be9c7a67c..d02dbd4447c4 100644
--- a/contrib/ntp/clockstuff/Makefile.in
+++ b/contrib/ntp/clockstuff/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,21 +94,65 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
EXTRA_PROGRAMS = propdelay chutest clktest
@@ -122,6 +164,7 @@ chutest_LDADD = ../libntp/libntp.a
clktest_LDADD = ../libntp/libntp.a
ETAGS_ARGS = Makefile.am
subdir = clockstuff
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -142,20 +185,17 @@ propdelay_OBJECTS = propdelay$U.$(OBJEXT)
propdelay_DEPENDENCIES =
propdelay_LDFLAGS =
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/chutest$U.Po $(DEPDIR)/clktest$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/propdelay$U.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/chutest$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clktest$U.Po ./$(DEPDIR)/propdelay$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = chutest.c clktest.c propdelay.c
-DIST_COMMON = README Makefile.am Makefile.in
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
SOURCES = chutest.c clktest.c propdelay.c
all: all-am
@@ -166,9 +206,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu clockstuff/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
@@ -187,84 +225,122 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/chutest$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clktest$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/propdelay$U.Po@am__quote@
+ -test "$U" = "" || rm -f *_.c
-distclean-depend:
- -rm -rf $(DEPDIR)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chutest$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clktest$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propdelay$U.Po@am__quote@
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
chutest_.c: chutest.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/chutest.c; then echo $(srcdir)/chutest.c; else echo chutest.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > chutest_.c || rm -f chutest_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/chutest.c; then echo $(srcdir)/chutest.c; else echo chutest.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clktest_.c: clktest.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clktest.c; then echo $(srcdir)/clktest.c; else echo clktest.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clktest_.c || rm -f clktest_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clktest.c; then echo $(srcdir)/clktest.c; else echo clktest.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
propdelay_.c: propdelay.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/propdelay.c; then echo $(srcdir)/propdelay.c; else echo propdelay.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > propdelay_.c || rm -f propdelay_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/propdelay.c; then echo $(srcdir)/propdelay.c; else echo propdelay.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
chutest_.$(OBJEXT) clktest_.$(OBJEXT) propdelay_.$(OBJEXT) : \
$(ANSI2KNR)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -276,7 +352,6 @@ check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -288,6 +363,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -295,7 +371,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -305,9 +381,11 @@ clean: clean-am
clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -328,6 +406,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -335,17 +415,25 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-generic \
- clean-noinstPROGRAMS distclean distclean-compile \
- distclean-depend distclean-generic distclean-tags distdir dvi \
- dvi-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-noinstPROGRAMS ctags distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am info \
+ info-am install install-am install-data install-data-am \
+ install-exec install-exec-am install-info install-info-am \
+ install-man install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-kr pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-info-am
#EXTRA_DIST = TAGS
diff --git a/contrib/ntp/compile b/contrib/ntp/compile
new file mode 100755
index 000000000000..9bb997a6a9b4
--- /dev/null
+++ b/contrib/ntp/compile
@@ -0,0 +1,99 @@
+#! /bin/sh
+
+# Wrapper for compilers which do not understand `-c -o'.
+
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Usage:
+# compile PROGRAM [ARGS]...
+# `-o FOO.o' is removed from the args passed to the actual compile.
+
+prog=$1
+shift
+
+ofile=
+cfile=
+args=
+while test $# -gt 0; do
+ case "$1" in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we do something ugly here.
+ ofile=$2
+ shift
+ case "$ofile" in
+ *.o | *.obj)
+ ;;
+ *)
+ args="$args -o $ofile"
+ ofile=
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ args="$args $1"
+ ;;
+ *)
+ args="$args $1"
+ ;;
+ esac
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$prog" $args
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
+while true; do
+ if mkdir $lockdir > /dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir $lockdir; exit 1" 1 2 15
+
+# Run the compile.
+"$prog" $args
+status=$?
+
+if test -f "$cofile"; then
+ mv "$cofile" "$ofile"
+fi
+
+rmdir $lockdir
+exit $status
diff --git a/contrib/ntp/conf/README b/contrib/ntp/conf/README
index f06e44f5ae7c..327f716ad588 100644
--- a/contrib/ntp/conf/README
+++ b/contrib/ntp/conf/README
@@ -7,11 +7,7 @@ anything good if run on machines other than their native spot, so don't
just blindly copy something and put it up. Additional information can
be found in the ./doc directory of the base directory.
-See the Config.local.dist file in the base directory for an explanation
-of the defines used.
-
-The files Config.* are used to generate fullblown binaries suitable for
-distribution with the systems shown as suffix. While this can result
-in some degree of useless code, the degree is small compared to the
-size of the baseline code. The files *.conf are representative NTP
-run-time configuration files, which normally live in /etc/ntp.conf.
+Included also are example public key and symmetric key files produced
+by the ntp-genkeys program with names prefixed by ntpkey. These are
+ordinarily kept in /usr/local/etc and used by the Autokey scheme. See
+the authopt.htm pnd genkeys.htm ages for further information.
diff --git a/contrib/ntp/conf/baldwin.conf b/contrib/ntp/conf/baldwin.conf
index 0998a9f0f45e..1238ba14294a 100644
--- a/contrib/ntp/conf/baldwin.conf
+++ b/contrib/ntp/conf/baldwin.conf
@@ -1,34 +1,10 @@
#
-# NTP configuration file (ntp.conf)
-# baldwin.udel.edu
+# NTP manycast configuration file (ntp.conf) for DCnet hosts
#
-# This illustrates the use of an external clock with the local clock
-# driver, as well as a multicast server. The prefer keyword on the
-# local clock driver declares an external clock and that the time of
-# this server should not be wiggled by an NTP peer, unless the
-# external source comes unstuck. Note the use of the multicast group
-# ID assigned to NTP, 224.0.1.1, which identifies this as a multicast
-# server rather than a broadcast one. The other NTP peers are known
-# stratum-1 chimes intended as backup should the external clock croak.
+# Note that the .rnd random seed file must pe in the root
+# directory and the public and private keys in /usr/local/etc.
#
-server 127.127.1.0 prefer # local clock driver
-broadcast 224.0.1.1 key 6 ttl 127
-peer rackety.udel.edu
-peer barnstable.udel.edu
-peer mizbeaver.udel.edu
-peer pogo.udel.edu
-#
-# Miscellaneous stuff
-#
-driftfile /etc/ntp.drift # path for drift file
-statsdir /baldwin/ntpstats/ # directory for statistics files
-filegen peerstats file peerstats type day enable
-filegen loopstats file loopstats type day enable
-filegen clockstats file clockstats type day enable
-#
-# Authentication stuff
-#
-keys /usr/local/etc/ntp.keys # path for keys file
-trustedkey 3 4 5 6 14 15 # define trusted keys
-requestkey 15 # key (7) for accessing server variables
-controlkey 15 # key (6) for accessing server variables
+manycastclient 239.1.1.1 autokey maxpoll 12
+manycastserver 239.1.1.1
+crypto randfile /.rnd # enable public key
+driftfile /etc/ntp.drift # path for drift file
diff --git a/contrib/ntp/conf/grundoon.conf b/contrib/ntp/conf/grundoon.conf
index a26522dd62f8..eb18b3f559fc 100644
--- a/contrib/ntp/conf/grundoon.conf
+++ b/contrib/ntp/conf/grundoon.conf
@@ -5,7 +5,7 @@
server 127.127.11.1 prefer # Arbiter 1088 GPS receiver
fudge 127.127.11.1 time1 .00487 flag1 1 flag4 1
server 127.127.22.1 minpoll 4 # PPS quick poll
-fudge 127.127.22.1 # use PLL/FLL loop
+fudge 127.127.22.1 # default use PLL/FLL loop
broadcast 128.4.2.255 key 5 # brpadcast on LAN shared key
broadcast 239.1.1.2 autokey # multicast on WAN autokey
diff --git a/contrib/ntp/conf/malarky.conf b/contrib/ntp/conf/malarky.conf
index adf5eb39d4d4..1475e1e25bf7 100644
--- a/contrib/ntp/conf/malarky.conf
+++ b/contrib/ntp/conf/malarky.conf
@@ -4,7 +4,7 @@
# This is for a broadcast/multicast client. Except for the statistics
# stuff, this can be done with only a commmand line of the form
#
-# /usr/local/bin/xntpd -a -k /usr/local/bin/ntp.keys -m -t 3
+# /usr/local/bin/ntpd -a -k /usr/local/bin/ntp.keys -m -t 3
#
multicastclient # listen on default 224.0.1.1
#
diff --git a/contrib/ntp/conf/pogo.conf b/contrib/ntp/conf/pogo.conf
index 2014fdd4d8de..0dbc58a7351b 100644
--- a/contrib/ntp/conf/pogo.conf
+++ b/contrib/ntp/conf/pogo.conf
@@ -30,18 +30,7 @@ restrict 140.173.0.0 mask 255.255.0.0 # allow DARTnet/CAIRN clients
#
# Authentication stuff
#
-# Local filesystem
-# /etc/ntpkey -> ntpkey.3171396491
-# /etc/ntpkey.3171396491
-#
-# NFS mounted filesystem
-# /usr/local/etc/ntpkey -> /etc/ntpkey
-# /usr/local/etc/ntpkey_dh -> ntpkey_dh.3171396491
-# /usr/local/etc/ntpkey_dh.3171396491
-# /usr/local/etc/ntpkey_pogo.udel.edu -> ntpkey_pogo.udel.edu.3171396491
-# /usr/local/etc/ntpkey_pogo.udel.edu.3171396491
-#
-crypto privatekey /etc/ntpkey # enable public key
+crypto # enable public key
keys /usr/local/etc/ntp.keys # path for keys file
trustedkey 3 4 5 14 # define trusted keys
requestkey 14 # key (7) for accessing server variables
@@ -52,4 +41,4 @@ controlkey 14 # key (6) for accessing server variables
driftfile /etc/ntp.drift # path for drift file
statsdir /var/spool/ntpstats/ # directory for statistics files
filegen loopstats file loopstats type day enable
-
+filegen cryptostats file cryptostats type day enable
diff --git a/contrib/ntp/conf/rackety.conf b/contrib/ntp/conf/rackety.conf
index d3f231ccf64f..684e4b71160e 100644
--- a/contrib/ntp/conf/rackety.conf
+++ b/contrib/ntp/conf/rackety.conf
@@ -2,6 +2,14 @@
# NTP configuration file (ntp.conf)
# SunOS rackety.u 4.1.3 243 sun4c
#
+# This is for a dedicated primary server connected to four reference
+# clocks and providing service via multicast, broadcast, manycast and
+# the usual suspects. It blocks previous versions and limits clients
+# per network to two and returnd a kiss-of-death packet if the
+# sender is blocked. Note that the precise fudge factors were
+# determined using the calibrate feature and that the kernel PPS
+# discipline is selected.
+#
server 127.127.4.0 prefer # Spectracom GPS receiver #1
fudge 127.127.4.0 refid GPS1 time1 -.000097 flag1 1
server 127.127.4.1 # Spectracom GPS receiver #2
@@ -24,7 +32,7 @@ manycastserver 239.1.1.1 # manycast
#
# Access controls
#
-restrict default limited # default limit clients per net
+restrict default limited version kod # default limit clients per net
restrict 127.0.0.1 # allow local host
restrict 128.4.0.0 mask 255.255.0.0 # allow DCnet clients
restrict 128.175.0.0 mask 255.255.0.0 # allow UDELnet clients
diff --git a/contrib/ntp/config.guess b/contrib/ntp/config.guess
index cd430f6d1fae..0e30d56e94e0 100755
--- a/contrib/ntp/config.guess
+++ b/contrib/ntp/config.guess
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2001-08-21'
+timestamp='2003-07-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -24,8 +24,9 @@ timestamp='2001-08-21'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# Written by Per Bothner <bothner@cygnus.com>.
-# Please send patches to <config-patches@gnu.org>.
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
@@ -87,30 +88,42 @@ if test $# != 0; then
exit 1
fi
+trap 'exit 1' 1 2 15
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
-# CC_FOR_BUILD -- compiler used by this script.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int dummy(){}" > $dummy.c ;
- for c in cc gcc c89 ; do
- ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
- if test $? = 0 ; then
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
- rm -f $dummy.c $dummy.o $dummy.rel ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac'
+esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -127,29 +140,30 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
- # Netbsd (nbsd) targets should (where applicable) match one or
+ # NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
- # Determine the machine/vendor (is the vendor relevant).
- case "${UNAME_MACHINE}" in
- amiga) machine=m68k-unknown ;;
- arm32) machine=arm-unknown ;;
- atari*) machine=m68k-atari ;;
- sun3*) machine=m68k-sun ;;
- mac68k) machine=m68k-apple ;;
- macppc) machine=powerpc-apple ;;
- hp3[0-9][05]) machine=m68k-hp ;;
- ibmrt|romp-ibm) machine=romp-ibm ;;
- *) machine=${UNAME_MACHINE}-unknown ;;
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
- case "${UNAME_MACHINE}" in
- i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
@@ -166,75 +180,112 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# The OS release
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- cat <<EOF >$dummy.s
- .data
-\$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
-main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- eval $set_cc_for_build
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- 2-1307)
- UNAME_MACHINE="alphaev68"
- ;;
- esac
- fi
- rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
+ Alpha*:OpenVMS:*:*)
+ echo alpha-hp-vms
+ exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@@ -247,29 +298,11 @@ EOF
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit 0;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
- arc64:OpenBSD:*:*)
- echo mips64el-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hkmips:OpenBSD:*:*)
- echo mips-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mips-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@@ -291,6 +324,13 @@ EOF
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit 0 ;;
+ DRS?6000:UNIX_SV:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7 && exit 0 ;;
+ esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
@@ -319,7 +359,7 @@ EOF
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
@@ -333,12 +373,6 @@ EOF
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
- sparc*:NetBSD:*)
- echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
- exit 0 ;;
- atari*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -365,18 +399,6 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
- sun3*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
@@ -393,6 +415,7 @@ EOF
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
@@ -414,16 +437,20 @@ EOF
exit (-1);
}
EOF
- eval $set_cc_for_build
- $CC_FOR_BUILD $dummy.c -o $dummy \
- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ $CC_FOR_BUILD -o $dummy $dummy.c \
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && exit 0
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit 0 ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
@@ -484,6 +511,7 @@ EOF
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
@@ -495,9 +523,7 @@ EOF
exit(0);
}
EOF
- eval $set_cc_for_build
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@@ -506,7 +532,7 @@ EOF
fi
exit 0 ;;
*:AIX:*:[45])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
@@ -546,10 +572,8 @@ EOF
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
- case "${HPUX_REV}" in
- 11.[0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
@@ -558,12 +582,13 @@ EOF
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
- fi ;;
- esac
- if [ "${HP_ARCH}" = "" ]; then
- sed 's/^ //' << EOF >$dummy.c
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -596,12 +621,21 @@ EOF
exit (0);
}
EOF
- eval $set_cc_for_build
- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
- rm -f $dummy.c $dummy
- fi ;;
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
ia64:HP-UX:*:*)
@@ -609,6 +643,7 @@ EOF
echo ia64-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
+ eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
@@ -634,9 +669,7 @@ EOF
exit (0);
}
EOF
- eval $set_cc_for_build
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -664,9 +697,6 @@ EOF
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
- hppa*:OpenBSD:*:*)
- echo hppa-unknown-openbsd
- exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
@@ -685,9 +715,6 @@ EOF
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
- CRAY*X-MP:*:*:*)
- echo xmp-cray-unicos
- exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
@@ -700,27 +727,21 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
- CRAY*T3D:*:*:*)
- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
- CRAY-2:*:*:*)
- echo cray2-cray-unicos
- exit 0 ;;
+ *:UNICOS/mp:*:*)
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
@@ -730,11 +751,22 @@ EOF
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
- *:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit 0 ;;
- *:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
+ # Determine whether the default compiler uses glibc.
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #if __GLIBC__ >= 2
+ LIBC=gnu
+ #else
+ LIBC=
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ # GNU/FreeBSD systems have a "k" prefix to indicate we are using
+ # FreeBSD's kernel, but not the complete OS.
+ case ${LIBC} in gnu) kernel_only='k' ;; esac
+ echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -745,11 +777,17 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ exit 0 ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
- echo i386-pc-interix
+ echo i586-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
@@ -769,17 +807,52 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit 0 ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
mips:Linux:*:*)
- case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
- big) echo mips-unknown-linux-gnu && exit 0 ;;
- little) echo mipsel-unknown-linux-gnu && exit 0 ;;
- esac
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
@@ -815,6 +888,9 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -828,7 +904,8 @@ EOF
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
- ld_supported_targets=`cd /; ld --help 2>&1 \
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
@@ -840,7 +917,7 @@ EOF
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
+ exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0 ;;
@@ -851,33 +928,29 @@ EOF
exit 0 ;;
esac
# Determine whether the default compiler is a.out or elf
- cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __ELF__
-# ifdef __GLIBC__
-# if __GLIBC__ >= 2
- printf ("%s-pc-linux-gnu\n", argv[1]);
-# else
- printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-# endif
-# else
- printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-# endif
-#else
- printf ("%s-pc-linux-gnuaout\n", argv[1]);
-#endif
- return 0;
-}
-EOF
eval $set_cc_for_build
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #ifdef __INTEL_COMPILER
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
i*86:DYNIX/ptx:4*:*)
@@ -894,6 +967,23 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -915,22 +1005,19 @@ EOF
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
- (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686
- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -954,9 +1041,15 @@ EOF
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit 0 ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -973,9 +1066,6 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1047,6 +1137,9 @@ EOF
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
@@ -1054,18 +1147,24 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
- echo `uname -p`-apple-darwin${UNAME_RELEASE}
+ case `uname -p` in
+ *86) UNAME_PROCESSOR=i686 ;;
+ powerpc) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
- if test "${UNAME_MACHINE}" = "x86pc"; then
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit 0 ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-[KW]:NONSTOP_KERNEL:*:*)
+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1088,11 +1187,6 @@ EOF
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit 0 ;;
@@ -1111,14 +1205,15 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
@@ -1233,9 +1328,7 @@ main ()
}
EOF
-eval $set_cc_for_build
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment.
diff --git a/contrib/ntp/config.h.in b/contrib/ntp/config.h.in
index d26555176679..b7f95a4c1de0 100644
--- a/contrib/ntp/config.h.in
+++ b/contrib/ntp/config.h.in
@@ -1,5 +1,4 @@
/* config.h.in. Generated from configure.in by autoheader. */
-#undef ULONG_CONST
/* Is adjtime() accurate? */
#undef ADJTIME_IS_ACCURATE
@@ -7,9 +6,6 @@
/* CHU audio/decoder? */
#undef AUDIO_CHU
-/* Autokey? */
-#undef AUTOKEY
-
/* Declare char *sys_errlist array */
#undef CHAR_SYS_ERRLIST
@@ -157,7 +153,7 @@
/* TrueTime 560 IRIG-B decoder? */
#undef CLOCK_TT560
-/* Ultralink M320 WWVB receiver */
+/* Ultralink M320 WWVB receiver? */
#undef CLOCK_ULINK
/* USNO modem service */
@@ -283,9 +279,6 @@
/* What is the fallback value for HZ? */
#undef DEFAULT_HZ
-/* Use DES? */
-#undef DES
-
/* synch TODR hourly? */
#undef DOSYNCTODR
@@ -307,6 +300,9 @@
/* Do we have the CIOGETEV ioctl (SunOS, Linux)? */
#undef HAVE_CIOGETEV
+/* [Use], [/dev/clockctl?] */
+#undef HAVE_CLOCKCTL
+
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
@@ -319,6 +315,12 @@
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
+/* Define to 1 if you have the `EVP_md2' function. */
+#undef HAVE_EVP_MD2
+
+/* Define to 1 if you have the `EVP_mdc2' function. */
+#undef HAVE_EVP_MDC2
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -349,6 +351,9 @@
/* Define to 1 if you have the <ieeefp.h> header file. */
#undef HAVE_IEEEFP_H
+/* ISC: Use iflist_sysctl? */
+#undef HAVE_IFLIST_SYSCTL
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -367,6 +372,9 @@
/* Do we have the curses library? */
#undef HAVE_LIBCURSES
+/* Do we have the edit library? */
+#undef HAVE_LIBEDIT
+
/* Define to 1 if you have the `elf' library (-lelf). */
#undef HAVE_LIBELF
@@ -379,6 +387,12 @@
/* Define to 1 if you have the `ld' library (-lld). */
#undef HAVE_LIBLD
+/* Define to 1 if you have the `md' library (-lmd). */
+#undef HAVE_LIBMD
+
+/* Define to 1 if you have the `md5' library (-lmd5). */
+#undef HAVE_LIBMD5
+
/* Define to 1 if you have the `mld' library (-lmld). */
#undef HAVE_LIBMLD
@@ -409,6 +423,12 @@
/* Define to 1 if you have the <math.h> header file. */
#undef HAVE_MATH_H
+/* Define to 1 if you have the `MD5Init' function. */
+#undef HAVE_MD5INIT
+
+/* Define to 1 if you have the <md5.h> header file. */
+#undef HAVE_MD5_H
+
/* Define to 1 if you have the `memcpy' function. */
#undef HAVE_MEMCPY
@@ -457,6 +477,9 @@
/* Define to 1 if you have the <netinfo/ni.h> header file. */
#undef HAVE_NETINFO_NI_H
+/* Define to 1 if you have the <net/if6.h> header file. */
+#undef HAVE_NET_IF6_H
+
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
@@ -532,6 +555,9 @@
/* Define to 1 if you have the `setpriority' function. */
#undef HAVE_SETPRIORITY
+/* Define to 1 if you have the `setrlimit' function. */
+#undef HAVE_SETRLIMIT
+
/* Define to 1 if you have the `setsid' function. */
#undef HAVE_SETSID
@@ -565,6 +591,9 @@
/* Define to 1 if you have the `srand48' function. */
#undef HAVE_SRAND48
+/* Does struct sockaddr_storage have ss_family? */
+#undef HAVE_SS_FAMILY_IN_SS
+
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@@ -622,6 +651,9 @@
/* Define to 1 if you have the <sys/clkdefs.h> header file. */
#undef HAVE_SYS_CLKDEFS_H
+/* Define to 1 if you have the <sys/clockctl.h> header file. */
+#undef HAVE_SYS_CLOCKCTL_H
+
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
@@ -631,6 +663,9 @@
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#undef HAVE_SYS_IPC_H
+
/* Define to 1 if you have the <sys/lock.h> header file. */
#undef HAVE_SYS_LOCK_H
@@ -664,6 +699,9 @@
/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
+/* Define to 1 if you have the <sys/shm.h> header file. */
+#undef HAVE_SYS_SHM_H
+
/* Define to 1 if you have the <sys/signal.h> header file. */
#undef HAVE_SYS_SIGNAL_H
@@ -691,6 +729,9 @@
/* Define to 1 if you have the <sys/syssgi.h> header file. */
#undef HAVE_SYS_SYSSGI_H
+/* Define to 1 if you have the <sys/systune.h> header file. */
+#undef HAVE_SYS_SYSTUNE_H
+
/* Define to 1 if you have the <sys/termios.h> header file. */
#undef HAVE_SYS_TERMIOS_H
@@ -751,6 +792,12 @@
/* Do we have the TIO serial stuff? */
#undef HAVE_TIO_SERIAL_STUFF
+/* Does u_int64_t exist */
+#undef HAVE_TYPE_U_INT64_T
+
+/* Does u_int8_t exist */
+#undef HAVE_TYPE_U_INT8_T
+
/* Define to 1 if you have the `umask' function. */
#undef HAVE_UMASK
@@ -787,6 +834,33 @@
/* Define to 1 if you have the `__ntp_gettime' function. */
#undef HAVE___NTP_GETTIME
+/* Does struct sockaddr_storage have __ss_family? */
+#undef HAVE___SS_FAMILY_IN_SS
+
+/* Should we use the IRIG sawtooth filter? */
+#undef IRIG_SUCKS
+
+/* ISC: have struct if_laddrconf? */
+#undef ISC_PLATFORM_HAVEIF_LADDRCONF
+
+/* ISC: have struct if_laddrreq? */
+#undef ISC_PLATFORM_HAVEIF_LADDRREQ
+
+/* ISC: Have struct in6_pktinfo? */
+#undef ISC_PLATFORM_HAVEIN6PKTINFO
+
+/* ISC: Have IPv6? */
+#undef ISC_PLATFORM_HAVEIPV6
+
+/* ISC: struct sockaddr as sa_len? */
+#undef ISC_PLATFORM_HAVESALEN
+
+/* ISC: Need in6addr_any? */
+#undef ISC_PLATFORM_NEEDIN6ADDRANY
+
+/* ISC: provide inet_ntop() */
+#undef ISC_PLATFORM_NEEDNTOP
+
/* Does the kernel have an FLL bug? */
#undef KERNEL_FLL_BUG
@@ -805,6 +879,9 @@
/* What is the name of TICK in the kernel? */
#undef K_TICK_NAME
+/* Should we align with the NIST lockclock scheme? */
+#undef LOCKCLOCK
+
/* Does the kernel support multicasting IP? */
#undef MCAST
@@ -898,9 +975,6 @@
/* Define if compiler has function prototypes */
#undef PROTOTYPES
-/* Public key? */
-#undef PUBKEY
-
/* Does qsort expect to work on "void *" stuff? */
#undef QSORT_USES_VOID_P
@@ -916,9 +990,6 @@
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
-/* Use RSAREF? */
-#undef RSAREF
-
/* Do we want the SCO clock hacks? */
#undef SCO5_CLOCK
@@ -937,6 +1008,9 @@
/* Slew always? */
#undef SLEWALWAYS
+/* *s*printf() functions are char* */
+#undef SPRINTF_CHAR
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -979,6 +1053,9 @@
/* use UDP Wildcard Delivery? */
#undef UDP_WILDCARD_DELIVERY
+/* How do we create unsigned long constants? */
+#undef ULONG_CONST
+
/* Must we have a CTTY for fsetown? */
#undef USE_FSETOWNCTTY
@@ -991,10 +1068,19 @@
/* Version number of package */
#undef VERSION
+/* ISC: Want IPv6? */
+#undef WANT_IPV6
+
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
+/* Handle ss_family */
+#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
+# define ss_family __ss_family
+# define ss_len __ss_len
+#endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */
+
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
diff --git a/contrib/ntp/config.sub b/contrib/ntp/config.sub
index 12ebc7875a33..c8a01bed986d 100755
--- a/contrib/ntp/config.sub
+++ b/contrib/ntp/config.sub
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2001-08-13'
+timestamp='2003-07-04'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -29,7 +29,8 @@ timestamp='2001-08-13'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# Please send patches to <config-patches@gnu.org>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -117,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
+ nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -226,31 +227,44 @@ case $basic_machine in
1750a | 580 \
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
- | d10v | d30v | dsp16xx \
- | fr30 \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
+ | ip2k \
| m32r | m68000 | m68k | m88k | mcore \
- | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el | mips64vr4300 \
- | mips64vr4300el | mips64vr5000 | mips64vr5000el \
- | mipsbe | mipsel | mipsle | mipstx39 | mipstx39el \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | msp430 \
| ns16k | ns32k \
- | openrisc \
+ | openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | s390 | s390x \
- | sh | sh[34] | sh[34]eb | shbe | shle \
- | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
- | tahoe | thumb | tic80 | tron \
- | v850 \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
| we32k \
- | x86 | xscale \
+ | x86 | xscale | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
@@ -277,38 +291,55 @@ case $basic_machine in
580-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alphapca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armv*-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
| bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c54x-* \
- | clipper-* | cray2-* | cydra-* \
- | d10v-* | d30v-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | fx80-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* \
| m32r-* \
- | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
- | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
- | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipsel-* \
- | mipsle-* | mipstx39-* | mipstx39el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | msp430-* \
+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | s390-* | s390x-* \
- | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
- | sparc-* | sparc64-* | sparc86x-* | sparclite-* \
- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
- | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
- | v850-* | vax-* \
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
| ymp-* \
| z8k-*)
;;
@@ -342,6 +373,9 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -373,6 +407,10 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -393,16 +431,8 @@ case $basic_machine in
basic_machine=c38-convex
os=-bsd
;;
- cray | ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- cray2)
- basic_machine=cray2-cray
- os=-unicos
- ;;
- [cjt]90)
- basic_machine=${basic_machine}-cray
+ cray | j90)
+ basic_machine=j90-cray
os=-unicos
;;
crds | unos)
@@ -417,6 +447,14 @@ case $basic_machine in
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
@@ -597,14 +635,6 @@ case $basic_machine in
basic_machine=m68k-atari
os=-mint
;;
- mipsel*-linux*)
- basic_machine=mipsel-unknown
- os=-linux-gnu
- ;;
- mips*-linux*)
- basic_machine=mips-unknown
- os=-linux-gnu
- ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -619,6 +649,10 @@ case $basic_machine in
basic_machine=m68k-rom68k
os=-coff
;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -691,6 +725,10 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
+ nv1)
+ basic_machine=nv1-cray
+ os=-unicosmp
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -698,6 +736,10 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
+ or32 | or32-*)
+ basic_machine=or32-unknown
+ os=-coff
+ ;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@@ -720,49 +762,55 @@ case $basic_machine in
pbb)
basic_machine=m68k-tti
;;
- pc532 | pc532-*)
+ pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium | p5 | k5 | k6 | nexgen)
+ pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
- pentiumpro | p6 | 6x86 | athlon)
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
- pentiumii | pentium2)
+ pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-*)
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumii-* | pentium2-*)
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
- ;;
+ ;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
- ;;
+ ;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
- ;;
+ ;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
- ;;
+ ;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
@@ -783,10 +831,26 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
sequent)
basic_machine=i386-sequent
;;
@@ -794,7 +858,10 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
- sparclite-wrs)
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -861,19 +928,35 @@ case $basic_machine in
os=-dynix
;;
t3e)
- basic_machine=t3e-cray
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
tower | tower-32)
basic_machine=m68k-ncr
;;
@@ -898,8 +981,8 @@ case $basic_machine in
os=-vms
;;
vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
+ basic_machine=f301-fujitsu
+ ;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
@@ -920,17 +1003,13 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
- windows32)
- basic_machine=i386-pc
- os=-windows32-msvcrt
+ xps | xps100)
+ basic_machine=xps100-honeywell
;;
- xmp)
- basic_machine=xmp-cray
+ ymp)
+ basic_machine=ymp-cray
os=-unicos
;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
@@ -951,13 +1030,6 @@ case $basic_machine in
op60c)
basic_machine=hppa1.1-oki
;;
- mips)
- if [ x$os = x-linux-gnu ]; then
- basic_machine=mips-unknown
- else
- basic_machine=mips-mips
- fi
- ;;
romp)
basic_machine=romp-ibm
;;
@@ -977,13 +1049,16 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh3eb | sh4eb)
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
- cydra)
+ cydra)
basic_machine=cydra-cydrome
;;
orion)
@@ -998,10 +1073,6 @@ case $basic_machine in
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
- c4x*)
- basic_machine=c4x-none
- os=-coff
- ;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
@@ -1057,17 +1128,19 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos*)
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1079,8 +1152,10 @@ case $os in
;;
esac
;;
+ -nto-qnx*)
+ ;;
-nto*)
- os=-nto-qnx
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
@@ -1119,14 +1194,20 @@ case $os in
-acis*)
os=-aos
;;
+ -atheos*)
+ os=-atheos
+ ;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
-ns2 )
- os=-nextstep2
+ os=-nextstep2
;;
-nsk*)
os=-nsk
@@ -1165,8 +1246,14 @@ case $os in
-xenix)
os=-xenix
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
;;
-none)
;;
@@ -1199,10 +1286,14 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
- pdp11-*)
+ pdp11-*)
os=-none
;;
*-dec | vax-*)
@@ -1229,6 +1320,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
+ or32-*)
+ os=-coff
+ ;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
@@ -1292,19 +1386,19 @@ case $basic_machine in
*-next)
os=-nextstep3
;;
- *-gould)
+ *-gould)
os=-sysv
;;
- *-highlevel)
+ *-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
- *-sgi)
+ *-sgi)
os=-irix
;;
- *-siemens)
+ *-siemens)
os=-sysv4
;;
*-masscomp)
@@ -1376,7 +1470,7 @@ case $basic_machine in
-ptx*)
vendor=sequent
;;
- -vxsim* | -vxworks*)
+ -vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
diff --git a/contrib/ntp/configure b/contrib/ntp/configure
index 5dbcde072c92..64f6df86149b 100755
--- a/contrib/ntp/configure
+++ b/contrib/ntp/configure
@@ -1,19 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.53.
+# Generated by GNU Autoconf 2.57.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
@@ -22,11 +14,13 @@ fi
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
-# NLS nuisances.
# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
as_unset=unset
@@ -34,34 +28,42 @@ else
as_unset=false
fi
-(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
- { $as_unset LANG || test "${LANG+set}" != set; } ||
- { LANG=C; export LANG; }
-(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
- { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
- { LC_ALL=C; export LC_ALL; }
-(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
- { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
- { LC_TIME=C; export LC_TIME; }
-(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
- { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
- { LC_CTYPE=C; export LC_CTYPE; }
-(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
- { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
- { LANGUAGE=C; export LANGUAGE; }
-(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
- { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
- { LC_COLLATE=C; export LC_COLLATE; }
-(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
- { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
- { LC_NUMERIC=C; export LC_NUMERIC; }
-(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
- { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
- { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
# Name of the executable.
-as_me=`(basename "$0") 2>/dev/null ||
+as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
@@ -72,6 +74,7 @@ echo X/"$0" |
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
+
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -82,15 +85,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conftest.sh
- echo "exit 0" >>conftest.sh
- chmod +x conftest.sh
- if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
- rm -f conftest.sh
+ rm -f conf$$.sh
fi
@@ -138,6 +141,8 @@ do
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
@@ -210,6 +215,12 @@ else
fi
rm -f conf$$ conf$$.exe conf$$.file
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
@@ -226,7 +237,7 @@ as_nl='
IFS=" $as_nl"
# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+$as_unset CDPATH
# Name of the host.
@@ -240,6 +251,7 @@ exec 6>&1
# Initializations.
#
ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
cross_compiling=no
subdirs=
MFLAGS=
@@ -296,6 +308,10 @@ ac_includes_default="\
# include <unistd.h>
#endif"
+ac_subdirs_all="$ac_subdirs_all arlib"
+ac_subdirs_all="$ac_subdirs_all sntp"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LN_S RANLIB ac_ct_RANLIB PATH_SH PATH_PERL READLINE_LIBS U ANSI2KNR LIBOBJS LIBPARSE MAKE_LIBPARSE MAKE_LIBPARSE_KERNEL MAKE_CHECK_Y2K OPENSSL OPENSSL_INC OPENSSL_LIB MAKE_NTP_KEYGEN LCRYPTO EF_PROGS EF_LIBS MAKE_SNTP TESTDCF DCFD MAKE_PARSEKMODULE PROPDELAY CHUTEST CLKTEST MAKE_ADJTIMED MAKE_NTPTIME MAKE_TICKADJ MAKE_TIMETRIM MAKE_LIBNTPSIM MAKE_NTPDSIM ARLIB_DIR subdirs LTLIBOBJS'
+ac_subst_files=''
# Initialize some variables set by options.
ac_init_help=
@@ -719,6 +735,9 @@ if test ! -r $srcdir/$ac_unique_file; then
{ (exit 1); exit 1; }; }
fi
fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
@@ -834,19 +853,19 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors
+ --enable-clockctl Use /dev/clockctl for non-root time control
--enable-debugging + include debugging code
--enable-dst-minutes=60 + minutes per DST adjustment
--enable-BANCOMM - Datum/Bancomm bc635/VME interface
--enable-GPSVME - TrueTime GPS receiver/VME interface
- --enable-SHM - SHM clock attached thru shared memory
--enable-all-clocks + include all suitable non-PARSE clocks:
- --enable-ACTS + ACTS modem service
+ --enable-ACTS s ACTS modem service
--enable-ARBITER + Arbiter 1088A/B GPS receiver
--enable-ARCRON-MSF + Arcron MSF receiver
--enable-AS2201 + Austron 2200A/2201A GPS receiver
--enable-ATOM s ATOM PPS interface
--enable-CHRONOLOG + Chrono-log K-series WWVB receiver
- --enable-CHU - CHU modem/decoder
+ --enable-CHU + CHU modem/decoder
--enable-AUDIO-CHU s CHU audio/decoder
--enable-DATUM s Datum Programmable Time System
--enable-DUMBCLOCK + Dumb generic hh:mm:ss local clock
@@ -862,14 +881,15 @@ Optional Features:
--enable-LOCAL-CLOCK + local clock reference
--enable-MSFEES + EES M201 MSF receiver
--enable-MX4200 s Magnavox MX4200 GPS receiver
- --enable-NEOCLOCK4X - NeoClock4X DCF77 / TDF receiver
+ --enable-NEOCLOCK4X + NeoClock4X DCF77 / TDF receiver
--enable-NMEA + NMEA GPS receiver
--enable-ONCORE s Motorola VP/UT Oncore GPS receiver
- --enable-PALISADE + Palisade clock
+ --enable-PALISADE s Palisade clock
--enable-PCF + Conrad parallel port radio clock
--enable-PST + PST/Traconex 1020 WWV/WWVH receiver
--enable-PTBACTS s PTB modem service
--enable-RIPENCC - RIPENCC specific Trimble driver
+ --enable-SHM s SHM clock attached thru shared memory
--enable-SPECTRACOM + Spectracom 8170/Netclock/2 WWVB receiver
--enable-TPRO s KSI/Odetics TPRO/S GPS receiver/IRIG interface
--enable-TRAK + TRAK 8810 GPS receiver
@@ -877,7 +897,7 @@ Optional Features:
--enable-TT560 - TrueTime 560 IRIG-B decoder
--enable-ULINK + Ultralink WWVB receiver
--enable-USNO s USNO modem service
- --enable-WWV + WWV Audio receiver
+ --enable-WWV s WWV Audio receiver
--enable-ZYFER + Zyfer GPStarplus receiver
--enable-parse-clocks - include all suitable PARSE clocks:
--enable-COMPUTIME s Diem Computime Radio Clock
@@ -896,6 +916,7 @@ Optional Features:
s the adjtime() call is accurate
--enable-tick=VALUE s force a value for 'tick'
--enable-tickadj=VALUE s force a value for 'tickadj'
+ --enable-simulator - build/install the NTPD simulator?
--enable-udp-wildcard s use UDP wildcard delivery
--enable-slew-always s always slew the time
--enable-step-slew s step and slew the time
@@ -903,14 +924,18 @@ Optional Features:
--enable-hourly-todr-sync
s if we should sync TODR hourly
--enable-kernel-fll-bug s if we should avoid a kernel FLL bug
+ --enable-irig-sawtooth s if we should enable the IRIG sawtooth filter
+ --enable-nist - if we should enable the NIST lockclock scheme
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-openssl-libdir + =/something/reasonable
--with-openssl-incdir + =/something/reasonable
- --with-crypto + ={autokey,rsaref}
+ --with-crypto + =openssl
--with-electricfence - compile with ElectricFence malloc debugger
+ --with-sntp - Build SNTP?
+ --with-arlib - Compile the async resolver library?
Some influential environment variables:
CC C compiler command
@@ -960,7 +985,7 @@ esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
@@ -1000,7 +1025,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.53. Invocation command line was
+generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@
@@ -1052,27 +1077,54 @@ _ACEOF
# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
ac_sep=
-for ac_arg
+ac_must_keep_next=false
+for ac_pass in 1 2
do
- case $ac_arg in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n ) continue ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- ac_sep=" " ;;
- esac
- # Get rid of the leading space.
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
@@ -1083,6 +1135,7 @@ trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
+
cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
@@ -1105,6 +1158,35 @@ _ASBOX
esac;
}
echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
if test -s confdefs.h; then
cat <<\_ASBOX
## ----------- ##
@@ -1112,7 +1194,7 @@ _ASBOX
## ----------- ##
_ASBOX
echo
- sed "/^$/d" confdefs.h
+ sed "/^$/d" confdefs.h | sort
echo
fi
test "$ac_signal" != 0 &&
@@ -1269,6 +1351,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -1381,10 +1464,7 @@ cat >>confdefs.h <<_ACEOF
#define STR_SYSTEM "$host"
_ACEOF
-
-
-
- ac_config_headers="$ac_config_headers config.h"
+ ac_config_headers="$ac_config_headers config.h"
test "$program_prefix" != NONE &&
program_transform_name="s,^,$program_prefix,;$program_transform_name"
@@ -1399,6 +1479,7 @@ _ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed
+am__api_version="1.7"
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -1523,7 +1604,7 @@ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
# expand $ac_aux_dir to an absolute path
-am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+am_aux_dir=`cd $ac_aux_dir && pwd`
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
@@ -1531,9 +1612,8 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
- am_backtick='`'
- { echo "$as_me:$LINENO: WARNING: ${am_backtick}missing' script is too old or missing" >&5
-echo "$as_me: WARNING: ${am_backtick}missing' script is too old or missing" >&2;}
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
for ac_prog in gawk mawk nawk awk
@@ -1576,15 +1656,15 @@ fi
test -n "$AWK" && break
done
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
+ @echo 'ac_maketemp="$(MAKE)"'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
@@ -1605,50 +1685,37 @@ echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
- enableval="$enable_dependency_tracking"
-
-fi;
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
+ am__leading_dot=_
fi
+rmdir .tst 2>/dev/null
-
-
-
-rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
- DEPDIR=.deps
-else
- # MS-DOS does not allow filenames that begin with a dot.
- DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
-
-
-# test to see if srcdir already configured
-if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
{ { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
{ (exit 1); exit 1; }; }
fi
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
# Define the identity of the package.
-PACKAGE=ntp
-VERSION=4.1.1b
+ PACKAGE=ntp
+ VERSION=4.2.0
+
cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
@@ -1659,28 +1726,15 @@ cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
_ACEOF
-
-# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
-# the ones we care about.
-
-# Autoconf 2.50 always computes EXEEXT. However we need to be
-# compatible with 2.13, for now. So we always define EXEEXT, but we
-# don't compute it.
-
-# Similar for OBJEXT -- only we only use OBJEXT if the user actually
-# requests that it be used. This is a bit dumb.
-: ${OBJEXT=o}
-
-
# Some tools Automake needs.
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
@@ -1693,19 +1747,173 @@ AMTAR=${AMTAR-"${am_missing_run}tar"}
install_sh=${install_sh-"$am_aux_dir/install-sh"}
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
- # We need the cross-compile-aware SIZEOF stuff.
+
+
+
ac_cv_var_atom_ok=no
ac_cv_var_oncore_ok=no
ac_cv_var_ripe_ncc_ok=no
+ac_cv_var_jupiter_ok=no
iCFLAGS="$CFLAGS"
+DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -1910,9 +2118,7 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- set dummy "$as_dir/$ac_word" ${1+"$@"}
- shift
- ac_cv_prog_CC="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
@@ -2017,8 +2223,10 @@ fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
@@ -2043,14 +2251,12 @@ ac_compiler=`set X $ac_compile; echo $2`
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2060,7 +2266,7 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe"
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
@@ -2079,26 +2285,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
# Be careful to initialize this variable, since it used to be cached.
# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
ac_cv_exeext=
-for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
- ls a.out conftest 2>/dev/null;
- ls a.* conftest.* 2>/dev/null`; do
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
- a.out ) # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
- export ac_cv_exeext
- break;;
- * ) break;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
esac
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
-echo "$as_me: error: C compiler cannot create executables" >&2;}
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }
fi
@@ -2125,9 +2344,11 @@ if test "$cross_compiling" != yes; then
cross_compiling=yes
else
{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&5
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&2;}
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -2135,7 +2356,7 @@ fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
-rm -f a.out a.exe conftest$ac_cv_exeext
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
@@ -2155,9 +2376,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
-for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
export ac_cv_exeext
break;;
@@ -2165,8 +2387,10 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2184,14 +2408,12 @@ if test "${ac_cv_objext+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2208,16 +2430,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(exit $ac_status); }; then
for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2234,14 +2459,12 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2268,7 +2491,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -2288,14 +2512,12 @@ if test "${ac_cv_prog_cc_g+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2319,7 +2541,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -2341,6 +2564,102 @@ else
CFLAGS=
fi
fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
# Some people use a C++ compiler to compile C. Since we use `exit',
# in C++ we need to declare it. In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
@@ -2373,15 +2692,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
$ac_declaration
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2405,20 +2722,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_declaration
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2442,7 +2758,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
@@ -2455,7 +2772,8 @@ fi
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
@@ -2464,47 +2782,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_config_commands="$ac_config_commands default-1"
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-doit:
- @echo done
-END
-# If we don't find an include directive, just comment out the code.
-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
-am__include='#'
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote='"'
- _am_result=BSD
- fi
-fi
-
-
-echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6
-rm -f confinc confmf
-
-
depcc="$CC" am_compiler_list=
echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
@@ -2523,18 +2800,32 @@ else
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@@ -2552,13 +2843,20 @@ else
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- am_cv_CC_dependencies_compiler_type=$depmode
- break
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
fi
done
@@ -2571,10 +2869,1127 @@ fi
fi
echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
-CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+
+echo "$as_me:$LINENO: checking for AIX" >&5
+echo $ECHO_N "checking for AIX... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef _AIX
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+cat >>confdefs.h <<\_ACEOF
+#define _ALL_SOURCE 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest*
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for minix/config.h" >&5
+echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking minix/config.h usability" >&5
+echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <minix/config.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking minix/config.h presence" >&5
+echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <minix/config.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for minix/config.h" >&5
+echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_minix_config_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
+fi
+if test $ac_cv_header_minix_config_h = yes; then
+ MINIX=yes
+else
+ MINIX=
+fi
+if test "$MINIX" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_SOURCE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_1_SOURCE 2
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _MINIX 1
+_ACEOF
+
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
@@ -2584,7 +3999,11 @@ else
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
@@ -2613,12 +4032,6 @@ struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2653,7 +4066,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext
done
@@ -2672,6 +4086,231 @@ echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2695,18 +4334,28 @@ for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
-#include <assert.h>
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -2723,7 +4372,8 @@ if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
@@ -2733,13 +4383,17 @@ rm -f conftest.err conftest.$ac_ext
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -2757,7 +4411,8 @@ if test -z "$ac_cpp_err"; then
continue
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
@@ -2786,18 +4441,28 @@ for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
-#include <assert.h>
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -2814,7 +4479,8 @@ if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
@@ -2824,13 +4490,17 @@ rm -f conftest.err conftest.$ac_ext
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -2848,7 +4518,8 @@ if test -z "$ac_cpp_err"; then
continue
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
@@ -2861,8 +4532,10 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2887,13 +4560,6 @@ case "$host" in
;;
esac
;;
- alpha*-dec-osf*)
- case "$CC" in
- cc)
- CFLAGS="$CFLAGS -std1"
- ;;
- esac
- ;;
*-*-mpeix*)
CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB"
LDFLAGS="$LDFLAGS -L/SYSLOG/PUB"
@@ -2901,6 +4567,182 @@ case "$host" in
;;
esac
+echo "$as_me:$LINENO: checking if we should use /dev/clockctl" >&5
+echo $ECHO_N "checking if we should use /dev/clockctl... $ECHO_C" >&6
+if test "${ac_clockctl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Check whether --enable-clockctl or --disable-clockctl was given.
+if test "${enable_clockctl+set}" = set; then
+ enableval="$enable_clockctl"
+ ans=$enableval
+else
+ case "$target" in
+ *-*-netbsd*)
+ ans=yes
+ ;;
+ *) ans=no
+ ;;
+ esac
+
+fi;
+ac_clockctl=$ans
+fi
+echo "$as_me:$LINENO: result: $ac_clockctl" >&5
+echo "${ECHO_T}$ac_clockctl" >&6
+# End of AC_CACHE_CHECK for clockctl
+
+for ac_header in sys/clockctl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+case "$ac_clockctl$ac_cv_header_sys_clockctl_h" in
+ yesyes)
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CLOCKCTL
+_ACEOF
+
+ ;;
+esac
+
case "$build" in
$host)
;;
@@ -2959,15 +4801,15 @@ fi
test -n "$AWK" && break
done
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
+ @echo 'ac_maketemp="$(MAKE)"'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
@@ -3005,28 +4847,6 @@ case "$GCC" in
# CFLAGS="$CFLAGS -Wtraditional"
# CFLAGS="$CFLAGS -Wwrite-strings"
- echo "$as_me:$LINENO: checking whether ${CC-cc} -pipe works" >&5
-echo $ECHO_N "checking whether ${CC-cc} -pipe works... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_pipe+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- echo 'void f(){}' > conftest.c
- if test -z "`${CC-cc} -pipe -c conftest.c 2>&1`" -a -s conftest.o; then
- ac_cv_prog_cc_pipe=yes
- else
- ac_cv_prog_cc_pipe=no
- fi
- rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_pipe" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_pipe" >&6
-
- case "$ac_cv_prog_cc_pipe" in
- yes)
- CFLAGS="$CFLAGS -pipe"
- ;;
- esac
;;
esac
@@ -3046,6 +4866,7 @@ case "$host" in
case "$CFLAGS" in
*-n32*) ;;
*-n64*) ;;
+ *-64*) ;;
*) case "$iCFLAGS" in
'') CFLAGS="-O2 -g3 -n32" ;;
*) CFLAGS="$CFLAGS -n32" ;;
@@ -3055,6 +4876,7 @@ case "$host" in
case "$LDFLAGS" in
*-n32*) ;;
*-n64*) ;;
+ *-64*) ;;
*) LDFLAGS="$LDFLAGS -n32" ;;
esac
fi
@@ -3062,6 +4884,9 @@ case "$host" in
*-*-solaris2.5.1)
ac_busted_vpath_in_make=yes
;;
+ *-*-unicosmp*)
+ ac_busted_vpath_in_make=yes
+ ;;
esac
case "$ac_busted_vpath_in_make$srcdir" in
@@ -3090,7 +4915,6 @@ else
echo "${ECHO_T}no, using $LN_S" >&6
fi
-
if test $ac_cv_c_compiler_gnu = yes; then
echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
@@ -3100,12 +4924,16 @@ else
ac_pattern="Autoconf.*'x'"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sgtty.h>
Autoconf TIOCGETP
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
ac_cv_prog_gcc_traditional=yes
else
ac_cv_prog_gcc_traditional=no
@@ -3116,12 +4944,16 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termio.h>
Autoconf TCGETA
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*
@@ -3135,196 +4967,28 @@ echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
fi
fi
-
-echo "$as_me:$LINENO: checking for AIX" >&5
-echo $ECHO_N "checking for AIX... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#ifdef _AIX
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define _ALL_SOURCE 1
-_ACEOF
-
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-rm -f conftest*
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
+echo "$as_me:$LINENO: checking for working volatile" >&5
+echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
+if test "${ac_cv_c_volatile+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
+/* confdefs.h. */
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_stdc=no
-fi
-rm -f conftest.err conftest.$ac_ext
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-$ac_includes_default
-
-#include <$ac_header>
+volatile int x;
+int * volatile y;
+ ;
+ return 0;
+}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -3338,148 +5002,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
+ ac_cv_c_volatile=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+sed 's/^/| /' conftest.$ac_ext >&5
-fi
-
-done
-
-
-if test "${ac_cv_header_minix_config_h+set}" = set; then
- echo "$as_me:$LINENO: checking for minix/config.h" >&5
-echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
-if test "${ac_cv_header_minix_config_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
-echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking minix/config.h usability" >&5
-echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <minix/config.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_c_volatile=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking minix/config.h presence" >&5
-echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <minix/config.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
- { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
- no:yes )
- { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for minix/config.h" >&5
-echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
-if test "${ac_cv_header_minix_config_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_minix_config_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
-echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
-
fi
-if test $ac_cv_header_minix_config_h = yes; then
- MINIX=yes
-else
- MINIX=
-fi
-
-
-if test "$MINIX" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_SOURCE 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_1_SOURCE 2
-_ACEOF
-
+echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
+echo "${ECHO_T}$ac_cv_c_volatile" >&6
+if test $ac_cv_c_volatile = no; then
cat >>confdefs.h <<\_ACEOF
-#define _MINIX 1
+#define volatile
_ACEOF
fi
@@ -3493,7 +5030,11 @@ else
ac_cv_search_strerror=no
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -3502,12 +5043,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char strerror ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3531,7 +5066,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_search_strerror="none required"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_strerror" = no; then
@@ -3539,7 +5075,11 @@ if test "$ac_cv_search_strerror" = no; then
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -3548,12 +5088,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char strerror ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3578,7 +5112,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
done
@@ -3751,15 +5286,21 @@ echo "${ECHO_T}no" >&6
fi
- cat >conftest.$ac_ext <<_ACEOF
+
+
+cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define ACAT(a,b)a ## b
ACAT(Cir,cus)
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "Circus" >/dev/null 2>&1; then
+ $EGREP "Circus" >/dev/null 2>&1; then
cat >>confdefs.h <<\_ACEOF
#define ULONG_CONST(a) a ## UL
_ACEOF
@@ -3767,13 +5308,17 @@ _ACEOF
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define RCAT(a,b)a/**/b
RCAT(Rei,ser)
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "Reiser" >/dev/null 2>&1; then
+ $EGREP "Reiser" >/dev/null 2>&1; then
cat >>confdefs.h <<\_ACEOF
#define ULONG_CONST(a) a/**/L
_ACEOF
@@ -3885,15 +5430,13 @@ else
LIBS="-ladvapi32 $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3917,7 +5460,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_advapi32_main=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_advapi32_main=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3946,7 +5490,11 @@ else
LIBS="-lelf $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -3955,12 +5503,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char nlist ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3984,7 +5526,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_elf_nlist=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_elf_nlist=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4010,15 +5553,13 @@ else
LIBS="-lkvm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4042,7 +5583,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_kvm_main=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_kvm_main=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4068,7 +5610,11 @@ else
LIBS="-lld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4077,12 +5623,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char nlist ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4106,7 +5646,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_ld_nlist=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_ld_nlist=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4133,7 +5674,11 @@ else
LIBS="-lmld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4142,12 +5687,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char nlist ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4171,7 +5710,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_mld_nlist=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_mld_nlist=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4195,37 +5735,44 @@ if test "${ac_cv_func_gethostent+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostent (); below. */
-#include <assert.h>
+ which can conflict with char gethostent (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostent ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_gethostent) || defined (__stub___gethostent)
choke me
#else
-f = gethostent;
+char (*f) () = gethostent;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != gethostent;
;
return 0;
}
@@ -4245,7 +5792,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_func_gethostent=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_gethostent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4265,7 +5813,11 @@ else
LIBS="-lnsl -lsocket $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4274,12 +5826,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostent ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4303,7 +5849,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_nsl_gethostent=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_nsl_gethostent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4329,37 +5876,44 @@ if test "${ac_cv_func_openlog+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char openlog (); below. */
-#include <assert.h>
+ which can conflict with char openlog (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char openlog ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_openlog) || defined (__stub___openlog)
choke me
#else
-f = openlog;
+char (*f) () = openlog;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != openlog;
;
return 0;
}
@@ -4379,7 +5933,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_func_openlog=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_openlog=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4399,7 +5954,11 @@ else
LIBS="-lgen $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4408,12 +5967,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char openlog ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4437,7 +5990,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_gen_openlog=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_gen_openlog=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4463,7 +6017,11 @@ else
LIBS="-lsyslog -lsocket $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4472,12 +6030,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char openlog ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4501,7 +6053,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_syslog_openlog=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_syslog_openlog=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4523,6 +6076,219 @@ fi
fi
+echo "$as_me:$LINENO: checking for MD5Init in -lmd5" >&5
+echo $ECHO_N "checking for MD5Init in -lmd5... $ECHO_C" >&6
+if test "${ac_cv_lib_md5_MD5Init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmd5 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char MD5Init ();
+int
+main ()
+{
+MD5Init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_md5_MD5Init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_md5_MD5Init=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_md5_MD5Init" >&5
+echo "${ECHO_T}$ac_cv_lib_md5_MD5Init" >&6
+if test $ac_cv_lib_md5_MD5Init = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBMD5 1
+_ACEOF
+
+ LIBS="-lmd5 $LIBS"
+
+else
+
+echo "$as_me:$LINENO: checking for MD5Init in -lmd" >&5
+echo $ECHO_N "checking for MD5Init in -lmd... $ECHO_C" >&6
+if test "${ac_cv_lib_md_MD5Init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char MD5Init ();
+int
+main ()
+{
+MD5Init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_md_MD5Init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_md_MD5Init=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_md_MD5Init" >&5
+echo "${ECHO_T}$ac_cv_lib_md_MD5Init" >&6
+if test $ac_cv_lib_md_MD5Init = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBMD 1
+_ACEOF
+
+ LIBS="-lmd $LIBS"
+
+fi
+
+fi
+
+
+for ac_func in MD5Init
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
for ac_header in readline/history.h readline/readline.h
do
@@ -4541,7 +6307,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -4560,7 +6330,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -4572,13 +6343,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -4595,7 +6370,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -4608,14 +6384,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -4639,7 +6433,9 @@ done
case "$ac_cv_header_readline_history_h$ac_cv_header_readline_readline_h" in
*no*) ;;
- *)
+ *) save_LIBS=$LIBS
+ LIBS=
+
echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
if test "${ac_cv_lib_readline_readline+set}" = set; then
@@ -4649,7 +6445,11 @@ else
LIBS="-lreadline $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4658,12 +6458,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char readline ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4687,7 +6481,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_readline_readline=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_readline_readline=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4715,7 +6510,11 @@ else
LIBS="-lreadline -lcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4724,12 +6523,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char readline ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4753,7 +6546,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_readline_readline=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_readline_readline=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4772,11 +6566,84 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBCURSES
_ACEOF
+else
+ echo "$as_me:$LINENO: checking for readline in -ledit" >&5
+echo $ECHO_N "checking for readline in -ledit... $ECHO_C" >&6
+if test "${ac_cv_lib_edit_readline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ledit -lcurses $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char readline ();
+int
+main ()
+{
+readline ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_edit_readline=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_edit_readline=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_edit_readline" >&5
+echo "${ECHO_T}$ac_cv_lib_edit_readline" >&6
+if test $ac_cv_lib_edit_readline = yes; then
+ LIBS="-ledit -lcurses"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBEDIT
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBCURSES
+_ACEOF
+
+
+fi
+
fi
fi
+ READLINE_LIBS=$LIBS
+
+ LIBS=$save_LIBS
;;
esac
@@ -4794,7 +6661,11 @@ else
LIBS="-lrt $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4803,12 +6674,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char sched_setscheduler ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4832,7 +6697,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_rt_sched_setscheduler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_rt_sched_setscheduler=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4858,7 +6724,11 @@ else
LIBS="-lposix4 $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4867,12 +6737,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char sched_setscheduler ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4896,7 +6760,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_posix4_sched_setscheduler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_posix4_sched_setscheduler=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4925,37 +6790,44 @@ if test "${ac_cv_func_setsockopt+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char setsockopt (); below. */
-#include <assert.h>
+ which can conflict with char setsockopt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char setsockopt ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
choke me
#else
-f = setsockopt;
+char (*f) () = setsockopt;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != setsockopt;
;
return 0;
}
@@ -4975,7 +6847,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_func_setsockopt=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_setsockopt=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4995,7 +6868,11 @@ else
LIBS="-lsocket $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5004,12 +6881,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char setsockopt ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5033,7 +6904,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_socket_setsockopt=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_socket_setsockopt=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5060,48 +6932,59 @@ if test "${ac_cv_header_stdc+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
+int
+main ()
+{
+
+ ;
+ return 0;
+}
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_stdc=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <string.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
@@ -5114,12 +6997,16 @@ if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
@@ -5135,13 +7022,18 @@ if test $ac_cv_header_stdc = yes; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
-# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
@@ -5174,11 +7066,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
@@ -5197,9 +7090,154 @@ fi
+for ac_header in bstring.h errno.h fcntl.h ieeefp.h math.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+# HMS: Lame, but fast.
+if test -f /etc/redhat-release
+then
+ :
+else
-for ac_header in bstring.h errno.h fcntl.h ieeefp.h math.h memory.h netdb.h
+for ac_header in md5.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -5216,7 +7254,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -5235,7 +7277,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -5247,13 +7290,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -5270,7 +7317,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -5283,14 +7331,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -5312,14 +7378,157 @@ fi
done
+fi
+for ac_header in memory.h netdb.h poll.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
-for ac_header in poll.h resolv.h sched.h sgtty.h stdlib.h string.h termio.h
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+for ac_header in sched.h sgtty.h stdlib.h string.h termio.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -5336,7 +7545,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -5355,7 +7568,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -5367,13 +7581,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -5390,7 +7608,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -5403,14 +7622,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -5436,9 +7673,151 @@ done
+for ac_header in termios.h timepps.h timex.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+case "$host" in
+ *-*-aix*)
-for ac_header in termios.h timepps.h timex.h unistd.h utmp.h utmpx.h
+for ac_header in utmpx.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -5455,7 +7834,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -5474,7 +7857,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -5486,13 +7870,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -5509,7 +7897,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -5522,14 +7911,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -5551,10 +7958,298 @@ fi
done
+ case "$ac_cv_header_utmpx_h" in
+ yes) ;;
+ *)
+for ac_header in utmp.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+ ;;
+ esac
+ ;;
+ *)
+
+for ac_header in utmp.h utmpx.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-for ac_header in arpa/nameser.h net/if.h netinet/in_system.h
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+ ;;
+esac
+
+for ac_header in arpa/nameser.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -5571,7 +8266,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -5590,7 +8289,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -5602,13 +8302,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -5625,7 +8329,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -5638,14 +8343,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -5668,9 +8391,62 @@ fi
done
+for ac_header in net/if.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
-for ac_header in netinet/in_systm.h netinet/in.h netinet/ip.h
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in net/if6.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -5687,7 +8463,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -5706,7 +8486,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -5718,13 +8499,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -5741,7 +8526,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -5754,14 +8540,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -5784,6 +8588,352 @@ fi
done
+
+for ac_header in netinet/in_system.h netinet/in_systm.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in netinet/in.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in netinet/ip.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif
+
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
for ac_header in netinfo/ni.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -5801,7 +8951,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -5820,7 +8974,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -5832,13 +8987,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -5855,7 +9014,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -5868,14 +9028,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -5920,7 +9098,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -5939,7 +9121,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -5951,13 +9134,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -5974,7 +9161,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -5987,14 +9175,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -6035,7 +9241,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -6054,7 +9264,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -6066,13 +9277,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6089,7 +9304,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -6102,14 +9318,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -6151,7 +9385,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -6170,7 +9408,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -6182,13 +9421,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6205,7 +9448,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -6218,14 +9462,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -6250,6 +9512,148 @@ done
;;
esac
+for ac_header in sys/ipc.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
@@ -6271,7 +9675,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -6290,7 +9698,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -6302,13 +9711,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6325,7 +9738,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -6338,14 +9752,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -6388,7 +9820,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -6407,7 +9843,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -6419,13 +9856,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6442,7 +9883,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -6455,14 +9897,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -6504,7 +9964,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -6523,7 +9987,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -6535,13 +10000,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6558,7 +10027,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -6571,14 +10041,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -6605,7 +10093,8 @@ esac
-for ac_header in sys/select.h sys/signal.h sys/sockio.h
+
+for ac_header in sys/select.h sys/shm.h sys/signal.h sys/sockio.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -6622,7 +10111,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -6641,7 +10134,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -6653,13 +10147,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6676,7 +10174,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -6689,14 +10188,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -6737,7 +10254,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -6756,7 +10277,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -6768,13 +10290,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6791,7 +10317,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -6804,14 +10331,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -6852,7 +10397,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -6871,7 +10420,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -6883,13 +10433,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6906,7 +10460,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -6919,14 +10474,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -6952,7 +10525,7 @@ done
-for ac_header in sys/stropts.h sys/sysctl.h sys/syssgi.h sys/termios.h
+for ac_header in sys/stropts.h sys/sysctl.h sys/syssgi.h sys/systune.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -6969,7 +10542,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -6988,7 +10565,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -7000,13 +10578,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -7023,7 +10605,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -7036,14 +10619,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -7067,7 +10668,8 @@ done
-for ac_header in sys/time.h sys/signal.h
+
+for ac_header in sys/termios.h sys/time.h sys/signal.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -7084,7 +10686,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -7103,7 +10709,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -7115,13 +10722,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -7138,7 +10749,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -7151,14 +10763,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -7182,7 +10812,11 @@ done
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/timepps.h>
#ifdef PPS_API_VERS_1
yes
@@ -7190,7 +10824,7 @@ yes
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
for ac_header in sys/timepps.h
do
@@ -7209,7 +10843,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -7228,7 +10866,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -7240,13 +10879,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -7263,7 +10906,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -7276,14 +10920,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -7330,7 +10992,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -7349,7 +11015,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -7361,13 +11028,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -7384,7 +11055,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -7397,14 +11069,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -7433,17 +11123,15 @@ if test "${ac_cv_header_time+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -7468,7 +11156,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_header_time=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_header_time=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -7504,7 +11193,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -7523,7 +11216,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -7535,13 +11229,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -7558,7 +11256,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -7571,14 +11270,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -7622,7 +11339,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -7641,7 +11362,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -7653,13 +11375,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -7676,7 +11402,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -7689,14 +11416,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -7735,7 +11480,11 @@ echo "$as_me:$LINENO: checking nlist.h usability" >&5
echo $ECHO_N "checking nlist.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <nlist.h>
_ACEOF
@@ -7754,7 +11503,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -7766,13 +11516,17 @@ echo "$as_me:$LINENO: checking nlist.h presence" >&5
echo $ECHO_N "checking nlist.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <nlist.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -7789,7 +11543,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -7802,14 +11557,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: nlist.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: nlist.h: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: nlist.h: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: nlist.h: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for nlist.h" >&5
echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6
@@ -7835,14 +11608,12 @@ if test "${ac_cv_struct_nlist_n_un+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <nlist.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -7866,7 +11637,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_struct_nlist_n_un=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_struct_nlist_n_un=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -7884,6 +11656,69 @@ fi
fi
+
+
+for ac_header in resolv.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
echo "$as_me:$LINENO: checking for basic volatile support" >&5
echo $ECHO_N "checking for basic volatile support... $ECHO_C" >&6
if test "${ac_cv_c_volatile+set}" = set; then
@@ -7891,14 +11726,12 @@ if test "${ac_cv_c_volatile+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -7923,7 +11756,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_c_volatile=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_c_volatile=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -7969,7 +11803,11 @@ do
CC="$ac_save_CC $ac_arg"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
@@ -7999,12 +11837,6 @@ int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, i
int argc;
char **argv;
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8030,7 +11862,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
am_cv_prog_cc_stdc="$ac_arg"; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
@@ -8076,48 +11909,59 @@ if test "${ac_cv_header_stdc+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
+int
+main ()
+{
+
+ ;
+ return 0;
+}
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_stdc=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <string.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
@@ -8130,12 +11974,16 @@ if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
@@ -8151,13 +11999,18 @@ if test $ac_cv_header_stdc = yes; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
-# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
@@ -8190,11 +12043,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
@@ -8226,7 +12080,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -8245,7 +12103,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -8257,13 +12116,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -8280,7 +12143,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -8293,14 +12157,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -8332,16 +12214,14 @@ if test "${ac_cv_have_prototypes+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
extern int foo (short);
int foo(short i) { return i; }
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8366,7 +12246,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_have_prototypes=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_have_prototypes=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -8389,14 +12270,12 @@ if test "${ac_cv_c_const+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8466,7 +12345,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_c_const=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_c_const=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -8481,9 +12361,7 @@ _ACEOF
fi
-case "$build" in
- $host)
- echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
if test "${ac_cv_c_bigendian+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8491,16 +12369,14 @@ else
# See if sys/param.h defines the BYTE_ORDER macro.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8527,16 +12403,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
# It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8563,32 +12437,32 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_c_bigendian=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_c_bigendian=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# It does not; compile a test program.
if test "$cross_compiling" = yes; then
- # try to guess the endianess by grep'ing values into an object file
+ # try to guess the endianness by grepping values into an object file
ac_cv_c_bigendian=unknown
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8609,10 +12483,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
ac_cv_c_bigendian=yes
fi
-if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
if test "$ac_cv_c_bigendian" = unknown; then
ac_cv_c_bigendian=no
else
@@ -8622,13 +12496,18 @@ if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
fi
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
{
@@ -8657,11 +12536,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
ac_cv_c_bigendian=yes
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -8678,31 +12558,13 @@ _ACEOF
no)
;;
*)
- { { echo "$as_me:$LINENO: error: unknown endianess
+ { { echo "$as_me:$LINENO: error: unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianess
+echo "$as_me: error: unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
- ;;
- *) case "$host" in
- i*86-*-*) # Was i*86-*-vxworks*
- # LITTLEENDIAN
- ;;
- *-*-vxworks*)
- cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
-
- ;;
- *) { { echo "$as_me:$LINENO: error: Cross-compiling needs explicit byte order" >&5
-echo "$as_me: error: Cross-compiling needs explicit byte order" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
- ;;
-esac
echo "$as_me:$LINENO: checking return type of signal handlers" >&5
echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
if test "${ac_cv_type_signal+set}" = set; then
@@ -8710,7 +12572,11 @@ if test "${ac_cv_type_signal+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
#ifdef signal
@@ -8722,12 +12588,6 @@ extern "C" void (*signal (int, void (*)(int)))(int);
void (*signal ()) ();
#endif
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8751,7 +12611,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_type_signal=void
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_type_signal=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -8771,14 +12632,12 @@ if test "${ac_cv_type_off_t+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8805,7 +12664,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_type_off_t=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_type_off_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -8829,14 +12689,12 @@ if test "${ac_cv_type_size_t+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8863,7 +12721,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_type_size_t=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_type_size_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -8887,14 +12746,12 @@ if test "${ac_cv_type_time_t+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8921,7 +12778,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_type_time_t=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_type_time_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -8945,16 +12803,14 @@ if test "${ac_cv_struct_tm+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <time.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -8978,7 +12834,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_struct_tm=time.h
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_struct_tm=sys/time.h
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -8994,6 +12851,112 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking for u_int8_t" >&5
+echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6
+if test "${ac_cv_type_u_int8_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+u_int8_t len = 42; return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_u_int8_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_u_int8_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6
+if test $ac_cv_type_u_int8_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TYPE_U_INT8_T 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for u_int64_t" >&5
+echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6
+if test "${ac_cv_type_u_int64_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+u_int64_t len = 42; return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_u_int64_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_u_int64_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6
+if test $ac_cv_type_u_int64_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TYPE_U_INT64_T 1
+_ACEOF
+
+fi
+
echo "$as_me:$LINENO: checking for a fallback value for HZ" >&5
echo $ECHO_N "checking for a fallback value for HZ... $ECHO_C" >&6
if test "${ac_cv_var_default_hz+set}" = set; then
@@ -9060,14 +13023,12 @@ else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <signal.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9091,7 +13052,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_struct_sigaction_has_sa_sigaction=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_struct_sigaction_has_sa_sigaction=no
fi
@@ -9116,7 +13078,11 @@ if test "${ac_cv_struct_ppsclockev+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_TERMIOS_H
@@ -9128,12 +13094,6 @@ else
#ifdef HAVE_SYS_PPSCLOCK_H
# include <sys/ppsclock.h>
#endif
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9159,7 +13119,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_struct_ppsclockev=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_struct_ppsclockev=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -9182,16 +13143,14 @@ if test "${ac_cv_struct_sockaddr_has_sa_len+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/socket.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9217,7 +13176,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_struct_sockaddr_has_sa_len=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_struct_sockaddr_has_sa_len=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -9233,6 +13193,130 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5
+echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6
+if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int
+main ()
+{
+ struct sockaddr_storage s; s.ss_family = 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_ss_family_in_struct_ss="yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_ss_family_in_struct_ss="no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5
+echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6
+if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SS_FAMILY_IN_SS 1
+_ACEOF
+
+else
+ # Hack around a problem...
+ case "$host" in
+ *-*-hpux11.11) CPPFLAGS="$CPPFLAGS -D_NETINET_IN6_H"
+ ;;
+ esac
+fi
+
+echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5
+echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6
+if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int
+main ()
+{
+ struct sockaddr_storage s; s.__ss_family = 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have___ss_family_in_struct_ss="yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have___ss_family_in_struct_ss="no"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5
+echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6
+if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___SS_FAMILY_IN_SS 1
+_ACEOF
+
+fi
+
+
+
+
case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
*yes*)
echo "$as_me:$LINENO: checking for struct snd_size" >&5
@@ -9242,7 +13326,11 @@ if test "${ac_cv_struct_snd_size+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef HAVE_MACHINE_SOUNDCARD_H
# include <machine/soundcard.h>
@@ -9250,12 +13338,6 @@ else
#ifdef HAVE_SYS_SOUNDCARD_H
# include <sys/soundcard.h>
#endif
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9281,7 +13363,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_struct_snd_size=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_struct_snd_size=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -9306,15 +13389,13 @@ if test "${ac_cv_struct_clockinfo_has_hz+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/time.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9340,7 +13421,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_struct_clockinfo_has_hz=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_struct_clockinfo_has_hz=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -9363,15 +13445,13 @@ if test "${ac_cv_struct_clockinfo_has_tickadj+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/time.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9397,7 +13477,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_struct_clockinfo_has_tickadj=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_struct_clockinfo_has_tickadj=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -9420,7 +13501,11 @@ if test "${ac_cv_struct_timespec+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/time.h>
/* Under SunOS, timespec is in sys/timepps.h, which needs errno.h and FRAC */
@@ -9431,12 +13516,6 @@ else
# define FRAC 4294967296
# include <sys/timepps.h>
#endif
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9460,7 +13539,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_struct_timespec=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_struct_timespec=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -9482,16 +13562,14 @@ if test "${ac_cv_struct_ntptimeval+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/time.h>
#include <sys/timex.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9515,7 +13593,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_struct_ntptimeval=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_struct_ntptimeval=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -9537,7 +13616,11 @@ if test "${ac_cv_member_struct_ntptimeval_time_tv_nsec+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
@@ -9553,12 +13636,6 @@ else
# endif
#endif
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9584,11 +13661,63 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_member_struct_ntptimeval_time_tv_nsec=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+# ifdef HAVE_TIME_H
+# include <time.h>
+# endif
+#endif
+#ifdef HAVE_SYS_TIMEX_H
+#include <sys/timex.h>
+#else
+# ifdef HAVE_TIMEX_H
+# include <timex.h>
+# endif
+#endif
+
+int
+main ()
+{
+static struct ntptimeval ac_aggr;
+if (sizeof ac_aggr.time.tv_nsec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_ntptimeval_time_tv_nsec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_member_struct_ntptimeval_time_tv_nsec=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
echo "$as_me:$LINENO: result: $ac_cv_member_struct_ntptimeval_time_tv_nsec" >&5
echo "${ECHO_T}$ac_cv_member_struct_ntptimeval_time_tv_nsec" >&6
if test $ac_cv_member_struct_ntptimeval_time_tv_nsec = yes; then
@@ -9610,10 +13739,15 @@ else
for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifndef __cplusplus
-static $ac_kw int static_foo () {return 0; }
-$ac_kw int foo () {return 0; }
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
#endif
_ACEOF
@@ -9632,7 +13766,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_c_inline=$ac_kw; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
@@ -9661,14 +13796,12 @@ if test "${ac_cv_c_char_unsigned+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9694,7 +13827,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_c_char_unsigned=no
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_c_char_unsigned=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -9714,14 +13848,12 @@ if test "${ac_cv_type_signed_char+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9748,7 +13880,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_type_signed_char=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_type_signed_char=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -9770,14 +13903,12 @@ else
# Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9804,14 +13935,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
while :; do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9837,7 +13966,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo=`expr $ac_mid + 1`
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
@@ -9849,17 +13979,16 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9886,14 +14015,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
while :; do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9919,7 +14046,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_lo=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_hi=`expr '(' $ac_mid ')' - 1`
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
@@ -9931,7 +14059,8 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo= ac_hi=
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -9942,14 +14071,12 @@ while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -9975,37 +14102,40 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=$ac_mid
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_signed_char=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed char), 77" >&5
-echo "$as_me: error: cannot compute sizeof (signed char), 77" >&2;}
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed char), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (signed char), 77
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
long longval () { return (long) (sizeof (signed char)); }
unsigned long ulongval () { return (long) (sizeof (signed char)); }
#include <stdio.h>
#include <stdlib.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10048,13 +14178,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (signed char), 77" >&5
-echo "$as_me: error: cannot compute sizeof (signed char), 77" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (signed char), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (signed char), 77
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
@@ -10076,14 +14209,12 @@ if test "${ac_cv_type_int+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10110,7 +14241,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_type_int=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_type_int=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -10132,14 +14264,12 @@ else
# Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10166,14 +14296,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
while :; do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10199,7 +14327,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo=`expr $ac_mid + 1`
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
@@ -10211,17 +14340,16 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10248,14 +14376,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
while :; do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10281,7 +14407,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_lo=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_hi=`expr '(' $ac_mid ')' - 1`
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
@@ -10293,7 +14420,8 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo= ac_hi=
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -10304,14 +14432,12 @@ while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10337,37 +14463,40 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=$ac_mid
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_int=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
-echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
long longval () { return (long) (sizeof (int)); }
unsigned long ulongval () { return (long) (sizeof (int)); }
#include <stdio.h>
#include <stdlib.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10410,13 +14539,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
-echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
@@ -10438,14 +14570,12 @@ if test "${ac_cv_type_long+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10472,7 +14602,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_type_long=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_type_long=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -10494,14 +14625,12 @@ else
# Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10528,14 +14657,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
while :; do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10561,7 +14688,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo=`expr $ac_mid + 1`
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
@@ -10573,17 +14701,16 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10610,14 +14737,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
while :; do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10643,7 +14768,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_lo=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_hi=`expr '(' $ac_mid ')' - 1`
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
@@ -10655,7 +14781,8 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo= ac_hi=
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -10666,14 +14793,12 @@ while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10699,37 +14824,40 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=$ac_mid
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
-echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
long longval () { return (long) (sizeof (long)); }
unsigned long ulongval () { return (long) (sizeof (long)); }
#include <stdio.h>
#include <stdlib.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10772,13 +14900,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
-echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
@@ -10801,14 +14932,12 @@ if test "${ac_cv_type_s_char+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -10835,7 +14964,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_type_s_char=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_type_s_char=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -10891,12 +15021,16 @@ if test "${ac_cv_type_uid_t+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "uid_t" >/dev/null 2>&1; then
+ $EGREP "uid_t" >/dev/null 2>&1; then
ac_cv_type_uid_t=yes
else
ac_cv_type_uid_t=no
@@ -10934,37 +15068,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -10984,7 +15125,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11002,7 +15144,7 @@ done
;;
esac
case "$host" in
- *-*-aix4*)
+ *-*-aix[45]*)
# (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
# (returning ENOSYS). I didn't check 4.2. If, in the future,
# IBM pulls its thumbs out long enough to implement clock_settime,
@@ -11021,37 +15163,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11071,7 +15220,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11099,37 +15249,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11149,7 +15306,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11175,37 +15333,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11225,7 +15390,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11249,37 +15415,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11299,7 +15472,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11318,14 +15492,12 @@ echo $ECHO_N "checking for isfinite with <math.h>... $ECHO_C" >&6
LIBS="$LIBS -lm"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <math.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -11354,7 +15526,8 @@ _ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -11380,37 +15553,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11430,7 +15610,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11452,37 +15633,44 @@ if test "${ac_cv_func_gettimeofday+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gettimeofday (); below. */
-#include <assert.h>
+ which can conflict with char gettimeofday (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gettimeofday ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
choke me
#else
-f = gettimeofday;
+char (*f) () = gettimeofday;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != gettimeofday;
;
return 0;
}
@@ -11502,7 +15690,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_func_gettimeofday=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_gettimeofday=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11533,37 +15722,130 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+
int
main ()
{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ ;;
+esac
+
+for ac_func in hstrerror
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11583,7 +15865,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11598,15 +15881,94 @@ _ACEOF
fi
done
- ;;
-esac
+echo "$as_me:$LINENO: checking for inet_ntop" >&5
+echo $ECHO_N "checking for inet_ntop... $ECHO_C" >&6
+if test "${ac_cv_func_inet_ntop+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char inet_ntop (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char inet_ntop ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_inet_ntop) || defined (__stub___inet_ntop)
+choke me
+#else
+char (*f) () = inet_ntop;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != inet_ntop;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_inet_ntop=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_inet_ntop=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntop" >&5
+echo "${ECHO_T}$ac_cv_func_inet_ntop" >&6
+if test $ac_cv_func_inet_ntop = yes; then
+ :
+else
+cat >>confdefs.h <<\_ACEOF
+#define ISC_PLATFORM_NEEDNTOP 1
+_ACEOF
+
+fi
-for ac_func in hstrerror K_open kvm_open memcpy memmove memset
+
+for ac_func in K_open kvm_open memcpy memmove memset
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -11616,37 +15978,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11666,7 +16035,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11696,37 +16066,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11746,7 +16123,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11774,37 +16152,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11824,7 +16209,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11840,11 +16226,11 @@ fi
done
case "$host" in
- *-*-aix4*)
+ *-*-aix[45]*)
# Just a stub. Idiots.
;;
- *-*-irix*)
- # Just a stub in Irix. Idiots.
+ *-*-irix[45]*)
+ # Just a stub in "old" Irix. Idiots.
;;
*-*-qnx*)
# Apparently there but not working in QNX. Idiots?
@@ -11866,37 +16252,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11916,7 +16309,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -11942,37 +16336,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -11992,7 +16393,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12019,37 +16421,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12069,7 +16478,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12100,37 +16510,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12150,7 +16567,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12181,37 +16599,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12231,7 +16656,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12263,37 +16689,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12313,7 +16746,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12341,37 +16775,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12391,7 +16832,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12411,7 +16853,7 @@ done
;;
esac
case "$host" in
- *-*-aix4*)
+ *-*-aix[45]*)
# Just a stub in AIX 4. Idiots.
;;
*-*-solaris2.5*)
@@ -12428,37 +16870,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12478,7 +16927,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12509,37 +16959,128 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+
int
main ()
{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in setrlimit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12559,7 +17100,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12585,37 +17127,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12635,7 +17184,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12668,37 +17218,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12718,7 +17275,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12750,37 +17308,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12800,7 +17365,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12829,37 +17395,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12879,7 +17452,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12905,37 +17479,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -12955,7 +17536,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -12971,10 +17553,13 @@ fi
done
case "$host" in
- *-*-aix4*)
+ *-*-aix[45]*)
# Just stubs. Idiots.
;;
- *-*-netbsd*)
+ *-*-netbsd1*)
+ # Just stubs. Idiots.
+ ;;
+ *-*-netbsdelf1*)
# Just stubs. Idiots.
;;
*-*-openbsd*)
@@ -12992,37 +17577,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -13042,7 +17634,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -13074,37 +17667,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -13124,7 +17724,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -13155,37 +17756,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -13205,7 +17813,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -13221,6 +17830,16 @@ fi
done
+case "$host" in
+ *-*-sunos4*)
+
+cat >>confdefs.h <<\_ACEOF
+#define SPRINTF_CHAR 1
+_ACEOF
+
+ ;;
+esac
+
echo "$as_me:$LINENO: checking number of arguments to gettimeofday()" >&5
echo $ECHO_N "checking number of arguments to gettimeofday()... $ECHO_C" >&6
if test "${ac_cv_func_Xettimeofday_nargs+set}" = set; then
@@ -13228,14 +17847,12 @@ if test "${ac_cv_func_Xettimeofday_nargs+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/time.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -13262,7 +17879,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_func_Xettimeofday_nargs=2
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_Xettimeofday_nargs=1
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -13285,7 +17903,11 @@ if test "${ac_cv_func_setpgrp_nargs+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -13294,12 +17916,6 @@ else
# include <unistd.h>
#endif
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -13323,7 +17939,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_func_setpgrp_nargs=2
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_setpgrp_nargs=0
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -13349,7 +17966,11 @@ if test "${ac_cv_func_qsort_argtype+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "l_stdlib.h"
@@ -13365,12 +17986,6 @@ int sortfunc(a, b)
const void *a;
const void *b; { return 0; }
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -13396,7 +18011,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_func_qsort_argtype=void
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_qsort_argtype=char
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -13423,16 +18039,14 @@ if test "${ac_cv_decl_errno+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -13456,7 +18070,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_decl_errno=no
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_decl_errno=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -13478,7 +18093,11 @@ if test "${ac_cv_decl_h_errno+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -13492,12 +18111,6 @@ else
#ifdef HAVE_RESOLV_H
#include <resolv.h>
#endif
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -13521,7 +18134,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_decl_h_errno=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_decl_h_errno=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -13543,17 +18157,15 @@ if test "${ac_cv_decl_sys_errlist+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -13578,7 +18190,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_decl_sys_errlist=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_decl_sys_errlist=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -13600,7 +18213,11 @@ if test "${ac_cv_decl_syscall+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -13614,12 +18231,6 @@ else
#define P(x) ()
#endif
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -13643,7 +18254,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_decl_syscall=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_decl_syscall=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -14050,16 +18662,6 @@ _ACEOF
;;
esac
-echo "$as_me:$LINENO: checking if we should use a streams device for ifconfig" >&5
-echo $ECHO_N "checking if we should use a streams device for ifconfig... $ECHO_C" >&6
-if test "${ac_cv_var_use_streams_device_for_ifconfig+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_var_use_streams_device_for_ifconfig=no
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_use_streams_device_for_ifconfig" >&5
-echo "${ECHO_T}$ac_cv_var_use_streams_device_for_ifconfig" >&6
-
echo "$as_me:$LINENO: checking if we need extra room for SO_RCVBUF" >&5
echo $ECHO_N "checking if we need extra room for SO_RCVBUF... $ECHO_C" >&6
if test "${ac_cv_var_rcvbuf_slop+set}" = set; then
@@ -14093,9 +18695,6 @@ case "$host" in
*-*-domainos)
ans=no
;;
- *-*-linux*)
- ans=no
- ;;
esac
ac_cv_var_open_bcast_socket=$ans
fi
@@ -14298,7 +18897,11 @@ if test "${ac_cv_hdr_def_sigio+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <signal.h>
#ifdef SIGIO
yes
@@ -14306,7 +18909,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ac_cv_hdr_def_sigio=yes
else
ac_cv_hdr_def_sigio=no
@@ -14354,6 +18957,9 @@ case "$ac_cv_hdr_def_sigio" in
*-*-linux*)
ans=no
;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
esac
;;
esac
@@ -14376,7 +18982,11 @@ if test "${ac_cv_hdr_def_sigpoll+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <signal.h>
#ifdef SIGPOLL
yes
@@ -14384,7 +18994,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ac_cv_hdr_def_sigpoll=yes
else
ac_cv_hdr_def_sigpoll=no
@@ -14402,7 +19012,11 @@ if test "${ac_cv_hdr_def_sigsys+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <signal.h>
#ifdef SIGSYS
yes
@@ -14410,7 +19024,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ac_cv_hdr_def_sigsys=yes
else
ac_cv_hdr_def_sigsys=no
@@ -14442,7 +19056,7 @@ case "$ac_cv_hdr_def_sigpoll" in
*-sni-sysv*)
ans=no
;;
- *-*-aix4*)
+ *-*-aix[45]*)
ans=no
;;
*-*-hpux*)
@@ -14463,6 +19077,9 @@ case "$ac_cv_hdr_def_sigpoll" in
*-*-ultrix*)
ans=no
;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
*) ans=yes
;;
esac
@@ -14501,7 +19118,7 @@ case "$ac_cv_hdr_def_sigpoll" in
*-sni-sysv*)
ans=no
;;
- *-*-aix4*)
+ *-*-aix[45]*)
ans=no
;;
*-*-hpux*)
@@ -14522,6 +19139,9 @@ case "$ac_cv_hdr_def_sigpoll" in
*-*-qnx*)
ans=no
;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
*) ans=yes
;;
esac
@@ -14548,7 +19168,11 @@ if test "${ac_cv_hdr_def_tiocdcdtimestamp+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/sio.h>
#ifdef TIOCDCDTIMESTAMP
yes
@@ -14556,7 +19180,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ac_cv_hdr_def_tiocdcdtimestamp=yes
else
ac_cv_hdr_def_tiocdcdtimestamp=no
@@ -14640,6 +19264,9 @@ case "$host" in
i?86-*-freebsd*)
ans=yes
;;
+ *-*-unicosmp*)
+ ans=yes
+ ;;
esac
ac_cv_var_no_parenb_ignpar=$ans
fi
@@ -14735,7 +19362,11 @@ else
i386-sequent-sysv4) ;;
*) cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <netinet/in.h>
#ifdef IP_ADD_MEMBERSHIP
yes
@@ -14743,7 +19374,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ac_cv_var_mcast=yes
fi
rm -f conftest*
@@ -14776,7 +19407,11 @@ else
;;
*) cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/syscall.h>
#if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
yes
@@ -14784,7 +19419,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ac_cv_var_ntp_syscalls=kernel
fi
rm -f conftest*
@@ -14822,7 +19457,11 @@ if test "${ac_cv_var_sta_fll+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/timex.h>
#ifdef STA_FLL
yes
@@ -14830,7 +19469,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ac_cv_var_sta_fll=yes
else
ac_cv_var_sta_fll=no
@@ -14902,7 +19541,11 @@ echo $ECHO_N "checking ioctl TIOCGPPSEV... $ECHO_C" >&6
if test "$ac_cv_header_termios_h" = "yes"; then
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termios.h>
#ifdef TIOCGPPSEV
yes
@@ -14910,7 +19553,7 @@ if test "$ac_cv_header_termios_h" = "yes"; then
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ntp_ok=yes
else
ntp_ok=no
@@ -14937,7 +19580,11 @@ echo $ECHO_N "checking ioctl TIOCSPPS... $ECHO_C" >&6
if test "$ac_cv_header_termios_h" = "yes"; then
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termios.h>
#ifdef TIOCSPPS
yes
@@ -14945,7 +19592,7 @@ if test "$ac_cv_header_termios_h" = "yes"; then
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ntp_ok=yes
else
ntp_ok=no
@@ -14972,7 +19619,11 @@ echo $ECHO_N "checking ioctl CIOGETEV... $ECHO_C" >&6
if test "$ac_cv_header_sys_ppsclock_h" = "yes"; then
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/ppsclock.h>
#ifdef CIOGETEV
yes
@@ -14980,7 +19631,7 @@ if test "$ac_cv_header_sys_ppsclock_h" = "yes"; then
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ntp_ok=yes
else
ntp_ok=no
@@ -15030,6 +19681,7 @@ _ACEOF
ac_cv_var_oncore_ok=yes
ac_cv_var_ripe_ncc_ok=yes
+ ac_cv_var_jupiter_ok=yes
;;
esac
@@ -15048,7 +19700,11 @@ echo "$as_me:$LINENO: checking linux/serial.h usability" >&5
echo $ECHO_N "checking linux/serial.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <linux/serial.h>
_ACEOF
@@ -15067,7 +19723,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -15079,13 +19736,17 @@ echo "$as_me:$LINENO: checking linux/serial.h presence" >&5
echo $ECHO_N "checking linux/serial.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <linux/serial.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -15102,7 +19763,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -15115,14 +19777,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: linux/serial.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: linux/serial.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: linux/serial.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: linux/serial.h: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: linux/serial.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: linux/serial.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: linux/serial.h: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: linux/serial.h: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: linux/serial.h: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: linux/serial.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: linux/serial.h: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: linux/serial.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for linux/serial.h" >&5
echo $ECHO_N "checking for linux/serial.h... $ECHO_C" >&6
@@ -15143,7 +19823,11 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
yesyes)
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/time.h>
typedef int u_int;
@@ -15164,7 +19848,7 @@ typedef int u_int;
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ntp_ok=yes
fi
rm -f conftest*
@@ -15274,26 +19958,6 @@ esac
echo "$as_me:$LINENO: result: $ans" >&5
echo "${ECHO_T}$ans" >&6
-echo "$as_me:$LINENO: checking for SHM clock attached thru shared memory" >&5
-echo $ECHO_N "checking for SHM clock attached thru shared memory... $ECHO_C" >&6
-# Check whether --enable-SHM or --disable-SHM was given.
-if test "${enable_SHM+set}" = set; then
- enableval="$enable_SHM"
- ntp_ok=$enableval
-else
- ntp_ok=no
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_SHM 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
echo "$as_me:$LINENO: checking for default inclusion of all suitable non-PARSE clocks" >&5
echo $ECHO_N "checking for default inclusion of all suitable non-PARSE clocks... $ECHO_C" >&6
# Check whether --enable-all-clocks or --disable-all-clocks was given.
@@ -15320,7 +19984,7 @@ echo "${ECHO_T}$ntp_canparse" >&6
echo "$as_me:$LINENO: checking if we have support for audio clocks" >&5
echo $ECHO_N "checking if we have support for audio clocks... $ECHO_C" >&6
-case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h" in
+case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
*yes*)
ntp_canaudio=yes
@@ -15334,6 +19998,17 @@ esac
echo "$as_me:$LINENO: result: $ntp_canaudio" >&5
echo "${ECHO_T}$ntp_canaudio" >&6
+echo "$as_me:$LINENO: checking if we have support for the SHM refclock interface" >&5
+echo $ECHO_N "checking if we have support for the SHM refclock interface... $ECHO_C" >&6
+case "$ac_cv_header_sys_ipc_h$ac_cv_header_sys_shm_h" in
+ yesyes)
+ ntp_canshm=yes
+ ;;
+ *) ntp_canshm=no ;;
+esac
+echo "$as_me:$LINENO: result: $ntp_canshm" >&5
+echo "${ECHO_T}$ntp_canshm" >&6
+
# Requires modem control
echo "$as_me:$LINENO: checking ACTS modem service" >&5
echo $ECHO_N "checking ACTS modem service... $ECHO_C" >&6
@@ -15344,7 +20019,11 @@ if test "${enable_ACTS+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
@@ -15355,7 +20034,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ntp_ok=$ntp_eac
else
ntp_ok=no
@@ -15602,7 +20281,11 @@ if test "${enable_HEATH+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
@@ -15613,7 +20296,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ntp_ok=$ntp_eac
else
ntp_ok=no
@@ -15739,7 +20422,6 @@ fi
echo "$as_me:$LINENO: result: $ntp_ok" >&5
echo "${ECHO_T}$ntp_ok" >&6
-# Not Ultrix
echo "$as_me:$LINENO: checking Rockwell Jupiter GPS receiver" >&5
echo $ECHO_N "checking Rockwell Jupiter GPS receiver... $ECHO_C" >&6
# Check whether --enable-JUPITER or --disable-JUPITER was given.
@@ -15747,13 +20429,11 @@ if test "${enable_JUPITER+set}" = set; then
enableval="$enable_JUPITER"
ntp_ok=$enableval
else
- case "$ac_cv_var_ppsclock" in
-# yes) ntp_ok=$ntp_eac
-# ;;
- *) ntp_ok=no
- ;;
- esac
+ ntp_ok=$ntp_eac
fi;
+case "$ac_cv_var_jupiter_ok" in
+ no) ntp_ok=no ;;
+esac
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
@@ -15764,10 +20444,6 @@ _ACEOF
fi
echo "$as_me:$LINENO: result: $ntp_ok" >&5
echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$host" in
- yes*-*-ultrix*) { echo "$as_me:$LINENO: WARNING: *** But the expected answer is... no ***" >&5
-echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
-esac
echo "$as_me:$LINENO: checking Leitch CSD 5300 Master Clock System Driver" >&5
echo $ECHO_N "checking Leitch CSD 5300 Master Clock System Driver... $ECHO_C" >&6
@@ -15866,7 +20542,7 @@ if test "${enable_NEOCLOCK4X+set}" = set; then
enableval="$enable_NEOCLOCK4X"
ntp_ok=$enableval
else
- ntp_ok=no
+ ntp_ok=$ntp_eac
fi;
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
@@ -15999,7 +20675,11 @@ if test "${enable_PTBACTS+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
@@ -16010,7 +20690,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ntp_ok=$ntp_eac
else
ntp_ok=no
@@ -16053,6 +20733,31 @@ fi
echo "$as_me:$LINENO: result: $ntp_ok" >&5
echo "${ECHO_T}$ntp_ok" >&6
+# Danny Meyer says SHM compiles (with a few warnings) under Win32.
+# For *IX, we need sys/ipc.h and sys/shm.h.
+echo "$as_me:$LINENO: checking for SHM clock attached thru shared memory" >&5
+echo $ECHO_N "checking for SHM clock attached thru shared memory... $ECHO_C" >&6
+# Check whether --enable-SHM or --disable-SHM was given.
+if test "${enable_SHM+set}" = set; then
+ enableval="$enable_SHM"
+ ntp_ok=$enableval
+else
+ case "$ntp_eac$ntp_canshm" in
+ *no*) ntp_ok=no ;;
+ *) ntp_ok=yes ;;
+esac
+fi;
+if test "$ntp_ok" = "yes"; then
+ ntp_refclock=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define CLOCK_SHM 1
+_ACEOF
+
+fi
+echo "$as_me:$LINENO: result: $ntp_ok" >&5
+echo "${ECHO_T}$ntp_ok" >&6
+
echo "$as_me:$LINENO: checking Spectracom 8170/Netclock/2 WWVB receiver" >&5
echo $ECHO_N "checking Spectracom 8170/Netclock/2 WWVB receiver... $ECHO_C" >&6
# Check whether --enable-SPECTRACOM or --disable-SPECTRACOM was given.
@@ -16205,7 +20910,11 @@ if test "${enable_USNO+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
@@ -16216,7 +20925,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ntp_ok=$ntp_eac
else
ntp_ok=no
@@ -16688,12 +21397,12 @@ esac
echo "$as_me:$LINENO: result: $ans" >&5
echo "${ECHO_T}$ans" >&6
-
-
-
-
-
-
+# AC_SUBST(RSAOBJS)
+# AC_SUBST(RSASRCS)
+# AC_SUBST(RSADIR)
+# AC_SUBST(RSAREF)
+# AC_SUBST(LIBRSAREF)
+# AC_SUBST(MAKE_LIBRSAREF)
@@ -16714,7 +21423,7 @@ fi;
case "$ans" in
no) ;;
yes) # Look in:
- ans="/usr/lib /usr/local/lib /usr/local/ssl/lib"
+ ans="/usr/lib /usr/lib/openssl /usr/local/lib /usr/local/ssl/lib"
;;
*) # Look where they said
;;
@@ -16724,7 +21433,14 @@ case "$ans" in
*) # Look for libcrypto.a and libssl.a:
for i in $ans no
do
- test -f $i/libcrypto.a -a -f $i/libssl.a && break
+ case "$host" in
+ *-*-darwin*)
+ test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
+ ;;
+ *)
+ test -f $i/libcrypto.a -a -f $i/libssl.a && break
+ ;;
+ esac
done
case "$i" in
no)
@@ -16789,106 +21505,109 @@ else
fi;
case "$ans" in
no) ;;
- yes|rsaref|openssl)
- case "$ans" in
- yes|rsaref) # Just "rsaref" when OpenSSL is ready
+ yes|openssl)
+ if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC"
+ then
ans=no
- ;;
- *)
- if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC"
- then
- ans=no
- else
- # We have OpenSSL inc/lib - use them.
- ans=openssl
- CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
- LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
- LIBS="$LIBS -lcrypto"
-
-cat >>confdefs.h <<\_ACEOF
-#define DES 1
-_ACEOF
+ else
+ # We have OpenSSL inc/lib - use them.
+ ans=openssl
+ CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
+ LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
+ LCRYPTO=-lcrypto
+ MAKE_NTP_KEYGEN=ntp-keygen
cat >>confdefs.h <<\_ACEOF
#define OPENSSL
_ACEOF
-cat >>confdefs.h <<\_ACEOF
-#define PUBKEY
-_ACEOF
- fi
- ;;
- esac
-
- case "$ans" in
- no)
- if test -f $srcdir/rsaref2/source/digit.c
- then
- ans=rsaref
- RSAOBJS=digit.o
- RSASRCS="digit.c digit.h"
- RSADIR=rsaref2
- fi
- if test -f $srcdir/rsaeuro1/source/rsaeuro.h
- then
- ans=rsaref
- RSAOBJS="md4c.o shsc.o"
- RSASRCS="md4c.c shsc.c"
- RSADIR=rsaeuro1
- fi
- if test "$ans" = "rsaref"; then
- LIBRSAREF=../librsaref/librsaref.a
- MAKE_LIBRSAREF=librsaref.a
-
-cat >>confdefs.h <<\_ACEOF
-#define DES 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define PUBKEY 1
+for ac_func in EVP_md2 EVP_mdc2
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
-
-cat >>confdefs.h <<\_ACEOF
-#define RSAREF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
_ACEOF
-
- fi
- ;;
- esac
- ;;
-esac
-
-
-if test x$RSADIR = xrsaref2; then
- isRSAREF_TRUE=
- isRSAREF_FALSE='#'
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
else
- isRSAREF_TRUE='#'
- isRSAREF_FALSE=
-fi
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-if test x$RSADIR = xrsaeuro1; then
- isRSAEURO_TRUE=
- isRSAEURO_FALSE='#'
-else
- isRSAEURO_TRUE='#'
- isRSAEURO_FALSE=
+eval "$as_ac_var=no"
fi
-
-case "$ans" in
- no) ;;
- *)
-
-cat >>confdefs.h <<\_ACEOF
-#define AUTOKEY
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
- AUTOKEY=1
+fi
+done
+
+ fi
;;
esac
echo "$as_me:$LINENO: checking for the level of crypto support" >&5
@@ -16920,6 +21639,27 @@ esac
echo "$as_me:$LINENO: result: $ans" >&5
echo "${ECHO_T}$ans" >&6
+echo "$as_me:$LINENO: checking if we want to try SNTP" >&5
+echo $ECHO_N "checking if we want to try SNTP... $ECHO_C" >&6
+
+# Check whether --with-sntp or --without-sntp was given.
+if test "${with_sntp+set}" = set; then
+ withval="$with_sntp"
+ ans=$withval
+else
+ ans=no
+fi;
+case "$ans" in
+ no) ;;
+ *)
+ MAKE_SNTP="sntp"
+
+ ans=yes
+ ;;
+esac
+echo "$as_me:$LINENO: result: $ans" >&5
+echo "${ECHO_T}$ans" >&6
+
@@ -17057,6 +21797,9 @@ else
*-*-winnt3.5)
ans=no
;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
esac
fi;
@@ -17097,18 +21840,21 @@ else
*-fujitsu-uxp*)
ans=yes
;;
- *-ibm-aix4*)
+ *-ibm-aix[45]*)
ans=yes
;;
*-*-linux*)
ans=yes
;;
- *-*-solaris2.[01]*)
+ *-*-solaris2.[01])
ans=no
;;
*-*-solaris2*)
ans=yes
;;
+ *-*-unicosmp*)
+ ans=yes
+ ;;
*) ans=no
;;
esac
@@ -17142,7 +21888,7 @@ case "$host" in
*-hp-hpux*)
ans=old_tick
;;
- *-ibm-aix[34]*)
+ *-ibm-aix[345]*)
ans=no
;;
*-*-mpeix*)
@@ -17421,6 +22167,9 @@ else
*-*-winnt3.5)
ans='(every / 10)'
;;
+ *-*-unicosmp*)
+ ans=10000
+ ;;
*)
ans='1000000L/hz'
;;
@@ -17496,6 +22245,9 @@ else
*-*-winnt3.5)
ans=50
;;
+ *-*-unicosmp*)
+ ans=150
+ ;;
esac
fi;
ac_cv_var_tickadj=$ans
@@ -17607,10 +22359,16 @@ case "$host" in
*-*-solaris2*)
# DLM says tickadj is a no-no starting with solaris2.5
case "$host" in
- *-*-solaris2.0-4*) ;;
+ *-*-solaris2.1[0-9]*)
+ ac_cv_make_tickadj=no
+ ;;
+ *-*-solaris2.[0-4]*) ;;
*) ac_cv_make_tickadj=no ;;
esac
;;
+ *-*-unicosmp*)
+ ac_cv_make_tickadj=no
+ ;;
esac
echo "$as_me:$LINENO: checking if we want and can make the tickadj utility" >&5
echo $ECHO_N "checking if we want and can make the tickadj utility... $ECHO_C" >&6
@@ -17637,6 +22395,9 @@ else
*-*-irix*)
ac_cv_make_timetrim=yes
;;
+ *-*-unicosmp*)
+ ac_cv_make_timetrim=yes
+ ;;
*)
ac_cv_make_timetrim=no
;;
@@ -17650,6 +22411,31 @@ case "$ac_cv_make_timetrim" in
;;
esac
+
+
+echo "$as_me:$LINENO: checking if we want to build the NTPD simulator" >&5
+echo $ECHO_N "checking if we want to build the NTPD simulator... $ECHO_C" >&6
+if test "${ac_cv_var_ntpd_sim+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Check whether --enable-simulator or --disable-simulator was given.
+if test "${enable_simulator+set}" = set; then
+ enableval="$enable_simulator"
+ ans=$enableval
+else
+ ans=no
+fi;
+ac_cv_var_ntpd_sim=$ans
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_ntpd_sim" >&5
+echo "${ECHO_T}$ac_cv_var_ntpd_sim" >&6
+case "$ac_cv_var_ntpd_sim" in
+ yes)
+ MAKE_NTPDSIM=ntpdsim
+ MAKE_LIBNTPSIM=libntpsim.a
+ ;;
+esac
+
echo "$as_me:$LINENO: checking if we want UDP wildcard delivery" >&5
echo $ECHO_N "checking if we want UDP wildcard delivery... $ECHO_C" >&6
if test "${ac_cv_var_udp_wildcard_delivery+set}" = set; then
@@ -17671,7 +22457,7 @@ else
*-*-aix3.2*)
ans=yes
;;
- *-*-aix4*)
+ *-*-aix[45]*)
ans=yes
;;
*-*-bsdi*)
@@ -17707,6 +22493,9 @@ else
*-*-sunos4*)
ans=yes
;;
+ *-*-unicosmp*)
+ ans=yes
+ ;;
esac
fi;
ac_cv_var_udp_wildcard_delivery=$ans
@@ -17792,6 +22581,9 @@ else
*-*-ptx*)
ans=yes
;;
+ *-*-solaris2.1[0-9]*)
+ ans-no
+ ;;
*-*-solaris2.[012]*)
ans=yes
;;
@@ -17947,6 +22739,378 @@ _ACEOF
;;
esac
+echo "$as_me:$LINENO: checking if we should use the IRIG sawtooth filter" >&5
+echo $ECHO_N "checking if we should use the IRIG sawtooth filter... $ECHO_C" >&6
+if test "${ac_cv_var_irig_sucks+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Check whether --enable-irig-sawtooth or --disable-irig-sawtooth was given.
+if test "${enable_irig_sawtooth+set}" = set; then
+ enableval="$enable_irig_sawtooth"
+ ans=$enableval
+else
+ case "$host" in
+ *-*-solaris2.[89])
+ ans=yes
+ ;;
+ *-*-solaris2.1[0-9]*)
+ ans=yes
+ ;;
+ *) ans=no
+ ;;
+ esac
+
+fi;
+ac_cv_var_irig_sucks=$ans
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_irig_sucks" >&5
+echo "${ECHO_T}$ac_cv_var_irig_sucks" >&6
+case "$ac_cv_var_irig_sucks" in
+ yes)
+cat >>confdefs.h <<\_ACEOF
+#define IRIG_SUCKS 1
+_ACEOF
+ ;;
+esac
+
+echo "$as_me:$LINENO: checking if we should enable NIST lockclock scheme" >&5
+echo $ECHO_N "checking if we should enable NIST lockclock scheme... $ECHO_C" >&6
+if test "${ac_cv_var_nist_lockclock+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Check whether --enable-nist or --disable-nist was given.
+if test "${enable_nist+set}" = set; then
+ enableval="$enable_nist"
+ ans=$enableval
+else
+ ans=no
+fi;
+ac_cv_var_nist_lockclock=$ans
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_nist_lockclock" >&5
+echo "${ECHO_T}$ac_cv_var_nist_lockclock" >&6
+case "$ac_cv_var_nist_lockclock" in
+ yes)
+cat >>confdefs.h <<\_ACEOF
+#define LOCKCLOCK 1
+_ACEOF
+ ;;
+esac
+
+#
+# ISC stuff
+#
+
+if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ISC_PLATFORM_HAVESALEN
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for IPv6 structures" >&5
+echo $ECHO_N "checking for IPv6 structures... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int
+main ()
+{
+struct sockaddr_in6 sin6; return (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ found_ipv6=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ found_ipv6=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking for struct if_laddrconf" >&5
+echo $ECHO_N "checking for struct if_laddrconf... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <net/if6.h>
+
+int
+main ()
+{
+ struct if_laddrconf a;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ISC_PLATFORM_HAVEIF_LADDRCONF
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking for struct if_laddrreq" >&5
+echo $ECHO_N "checking for struct if_laddrreq... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <net/if6.h>
+
+int
+main ()
+{
+ struct if_laddrreq a;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ISC_PLATFORM_HAVEIF_LADDRREQ
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+case "$found_ipv6" in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define ISC_PLATFORM_HAVEIPV6
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define WANT_IPV6
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking for in6_pktinfo" >&5
+echo $ECHO_N "checking for in6_pktinfo... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+$isc_netinetin6_hack
+$isc_netinet6in6_hack
+
+int
+main ()
+{
+struct in6_pktinfo xyzzy; return (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ISC_PLATFORM_HAVEIN6PKTINFO
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no -- disabling runtime ipv6 support" >&5
+echo "${ECHO_T}no -- disabling runtime ipv6 support" >&6
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ echo "$as_me:$LINENO: checking for in6addr_any" >&5
+echo $ECHO_N "checking for in6addr_any... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+$isc_netinetin6_hack
+$isc_netinet6in6_hack
+$isc_in_addr6_hack
+
+int
+main ()
+{
+struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ISC_PLATFORM_NEEDIN6ADDRANY
+_ACEOF
+
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ ;;
+esac
+
+#
+# Look for a sysctl call to get the list of network interfaces.
+#
+echo "$as_me:$LINENO: checking for interface list sysctl" >&5
+echo $ECHO_N "checking for interface list sysctl... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/socket.h>
+#ifdef NET_RT_IFLIST
+found_rt_iflist
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "found_rt_iflist" >/dev/null 2>&1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IFLIST_SYSCTL 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest*
+
+
case "$build" in
$host)
;;
@@ -17971,68 +23135,95 @@ _ACEOF
-# HMS: I think we avoid this problem now...
-## This is necessary so that .o files in LIBOBJS are also built via
-## the ANSI2KNR-filtering rules.
-#LIBOBJS=`echo "$LIBOBJS" | sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
-ac_config_files="$ac_config_files Makefile"
+if test -d $srcdir/arlib
+then
+
+# Check whether --with-arlib or --without-arlib was given.
+if test "${with_arlib+set}" = set; then
+ withval="$with_arlib"
+ ans=$withval
+else
+ ans=no
+fi;
+
+ case "$ans" in
+ yes)
+ ARLIB_DIR=arlib
+
+
+subdirs="$subdirs arlib"
+
+ ;;
+ esac
+fi
+
+ ac_config_files="$ac_config_files Makefile"
+
+ ac_config_files="$ac_config_files ElectricFence/Makefile"
+
+ ac_config_files="$ac_config_files adjtimed/Makefile"
+
+ ac_config_files="$ac_config_files clockstuff/Makefile"
-ac_config_files="$ac_config_files ElectricFence/Makefile"
+ ac_config_files="$ac_config_files include/Makefile"
-ac_config_files="$ac_config_files adjtimed/Makefile"
+ ac_config_files="$ac_config_files include/isc/Makefile"
-ac_config_files="$ac_config_files clockstuff/Makefile"
+ ac_config_files="$ac_config_files kernel/Makefile"
-ac_config_files="$ac_config_files include/Makefile"
+ ac_config_files="$ac_config_files kernel/sys/Makefile"
-ac_config_files="$ac_config_files kernel/Makefile"
+ ac_config_files="$ac_config_files libntp/Makefile"
-ac_config_files="$ac_config_files kernel/sys/Makefile"
+ ac_config_files="$ac_config_files libparse/Makefile"
-ac_config_files="$ac_config_files libntp/Makefile"
+ ac_config_files="$ac_config_files ntpd/Makefile"
-ac_config_files="$ac_config_files libparse/Makefile"
+ ac_config_files="$ac_config_files ntpdate/Makefile"
-ac_config_files="$ac_config_files librsaref/Makefile"
+ ac_config_files="$ac_config_files ntpdc/Makefile"
-ac_config_files="$ac_config_files ntpd/Makefile"
+ ac_config_files="$ac_config_files ntpdc/nl.pl"
-ac_config_files="$ac_config_files ntpdate/Makefile"
+ ac_config_files="$ac_config_files ntpq/Makefile"
-ac_config_files="$ac_config_files ntpdc/Makefile"
+ ac_config_files="$ac_config_files parseutil/Makefile"
-ac_config_files="$ac_config_files ntpq/Makefile"
+ ac_config_files="$ac_config_files scripts/Makefile"
-ac_config_files="$ac_config_files ntptrace/Makefile"
+ ac_config_files="$ac_config_files scripts/calc_tickadj"
-ac_config_files="$ac_config_files parseutil/Makefile"
+ ac_config_files="$ac_config_files scripts/checktime"
-ac_config_files="$ac_config_files scripts/Makefile"
+ ac_config_files="$ac_config_files scripts/freq_adj"
-ac_config_files="$ac_config_files scripts/calc_tickadj"
+ ac_config_files="$ac_config_files scripts/mkver"
-ac_config_files="$ac_config_files scripts/checktime"
+ ac_config_files="$ac_config_files scripts/ntp-wait"
-ac_config_files="$ac_config_files scripts/freq_adj"
+ ac_config_files="$ac_config_files scripts/ntpsweep"
-ac_config_files="$ac_config_files scripts/mkver"
+ ac_config_files="$ac_config_files scripts/ntptrace"
-ac_config_files="$ac_config_files scripts/ntp-wait"
+ ac_config_files="$ac_config_files scripts/ntpver"
-ac_config_files="$ac_config_files scripts/ntpsweep"
+ ac_config_files="$ac_config_files scripts/plot_summary"
-ac_config_files="$ac_config_files scripts/ntpver"
+ ac_config_files="$ac_config_files scripts/summary"
-ac_config_files="$ac_config_files scripts/plot_summary"
+ ac_config_files="$ac_config_files util/Makefile"
-ac_config_files="$ac_config_files scripts/summary"
-ac_config_files="$ac_config_files util/Makefile"
+case "$MAKE_SNTP" in
+ '') ;;
+ *)
-ac_config_commands="$ac_config_commands default"
+subdirs="$subdirs sntp"
+ ;;
+esac
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -18044,7 +23235,7 @@ cat >confcache <<\_ACEOF
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
-# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
@@ -18079,7 +23270,7 @@ _ACEOF
t end
/^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
: end' >>confcache
-if cmp -s $cache_file confcache; then :; else
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
cat confcache >$cache_file
@@ -18110,6 +23301,42 @@ fi
DEFS=-DHAVE_CONFIG_H
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -18124,11 +23351,12 @@ cat >$CONFIG_STATUS <<_ACEOF
# configure, is in config.log if it exists.
debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
-
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
@@ -18137,11 +23365,13 @@ cat >>$CONFIG_STATUS <<\_ACEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
-# NLS nuisances.
# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
as_unset=unset
@@ -18149,34 +23379,42 @@ else
as_unset=false
fi
-(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
- { $as_unset LANG || test "${LANG+set}" != set; } ||
- { LANG=C; export LANG; }
-(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
- { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
- { LC_ALL=C; export LC_ALL; }
-(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
- { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
- { LC_TIME=C; export LC_TIME; }
-(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
- { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
- { LC_CTYPE=C; export LC_CTYPE; }
-(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
- { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
- { LANGUAGE=C; export LANGUAGE; }
-(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
- { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
- { LC_COLLATE=C; export LC_COLLATE; }
-(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
- { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
- { LC_NUMERIC=C; export LC_NUMERIC; }
-(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
- { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
- { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
# Name of the executable.
-as_me=`(basename "$0") 2>/dev/null ||
+as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
@@ -18187,6 +23425,7 @@ echo X/"$0" |
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
+
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -18197,15 +23436,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conftest.sh
- echo "exit 0" >>conftest.sh
- chmod +x conftest.sh
- if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
- rm -f conftest.sh
+ rm -f conf$$.sh
fi
@@ -18254,6 +23493,8 @@ do
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
@@ -18327,6 +23568,12 @@ else
fi
rm -f conf$$ conf$$.exe conf$$.file
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
@@ -18343,7 +23590,7 @@ as_nl='
IFS=" $as_nl"
# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+$as_unset CDPATH
exec 6>&1
@@ -18360,7 +23607,7 @@ _ASBOX
cat >&5 <<_CSEOF
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.53. Invocation command line was
+generated by GNU Autoconf 2.57. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -18400,6 +23647,7 @@ Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
-V, --version print version number, then exit
+ -q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
@@ -18422,7 +23670,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.53,
+configured by $0, generated by GNU Autoconf 2.57,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -18443,25 +23691,25 @@ do
--*=*)
ac_option=`expr "x$1" : 'x\([^=]*\)='`
ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- shift
- set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
- shift
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
;;
- -*);;
*) # This is not an option, so the user has probably given explicit
# arguments.
+ ac_option=$1
ac_need_defaults=false;;
esac
- case $1 in
+ case $ac_option in
# Handling of the options.
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
- exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
-_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
@@ -18476,13 +23724,16 @@ Try \`$0 --help' for more information." >&2;}
--debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
- shift
- CONFIG_FILES="$CONFIG_FILES $1"
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
- shift
- CONFIG_HEADERS="$CONFIG_HEADERS $1"
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
# This is an error.
-*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
@@ -18497,6 +23748,20 @@ Try \`$0 --help' for more information." >&2;}
shift
done
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
@@ -18504,8 +23769,7 @@ cat >>$CONFIG_STATUS <<_ACEOF
# INIT-COMMANDS section.
#
-AMDEP_TRUE="$AMDEP_TRUE"
-ac_aux_dir="$ac_aux_dir"
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
_ACEOF
@@ -18521,16 +23785,16 @@ do
"adjtimed/Makefile" ) CONFIG_FILES="$CONFIG_FILES adjtimed/Makefile" ;;
"clockstuff/Makefile" ) CONFIG_FILES="$CONFIG_FILES clockstuff/Makefile" ;;
"include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+ "include/isc/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/isc/Makefile" ;;
"kernel/Makefile" ) CONFIG_FILES="$CONFIG_FILES kernel/Makefile" ;;
"kernel/sys/Makefile" ) CONFIG_FILES="$CONFIG_FILES kernel/sys/Makefile" ;;
"libntp/Makefile" ) CONFIG_FILES="$CONFIG_FILES libntp/Makefile" ;;
"libparse/Makefile" ) CONFIG_FILES="$CONFIG_FILES libparse/Makefile" ;;
- "librsaref/Makefile" ) CONFIG_FILES="$CONFIG_FILES librsaref/Makefile" ;;
"ntpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES ntpd/Makefile" ;;
"ntpdate/Makefile" ) CONFIG_FILES="$CONFIG_FILES ntpdate/Makefile" ;;
"ntpdc/Makefile" ) CONFIG_FILES="$CONFIG_FILES ntpdc/Makefile" ;;
+ "ntpdc/nl.pl" ) CONFIG_FILES="$CONFIG_FILES ntpdc/nl.pl" ;;
"ntpq/Makefile" ) CONFIG_FILES="$CONFIG_FILES ntpq/Makefile" ;;
- "ntptrace/Makefile" ) CONFIG_FILES="$CONFIG_FILES ntptrace/Makefile" ;;
"parseutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES parseutil/Makefile" ;;
"scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
"scripts/calc_tickadj" ) CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj" ;;
@@ -18539,12 +23803,12 @@ do
"scripts/mkver" ) CONFIG_FILES="$CONFIG_FILES scripts/mkver" ;;
"scripts/ntp-wait" ) CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait" ;;
"scripts/ntpsweep" ) CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep" ;;
+ "scripts/ntptrace" ) CONFIG_FILES="$CONFIG_FILES scripts/ntptrace" ;;
"scripts/ntpver" ) CONFIG_FILES="$CONFIG_FILES scripts/ntpver" ;;
"scripts/plot_summary" ) CONFIG_FILES="$CONFIG_FILES scripts/plot_summary" ;;
"scripts/summary" ) CONFIG_FILES="$CONFIG_FILES scripts/summary" ;;
"util/Makefile" ) CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
- "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
- "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -18562,6 +23826,9 @@ if $ac_need_defaults; then
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
@@ -18570,17 +23837,17 @@ $debug ||
}
# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+
{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=$TMPDIR/cs$$-$RANDOM
+ tmp=./confstat$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
@@ -18643,10 +23910,9 @@ s,@target_os@,$target_os,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
s,@PACKAGE@,$PACKAGE,;t t
s,@VERSION@,$VERSION,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
s,@ACLOCAL@,$ACLOCAL,;t t
s,@AUTOCONF@,$AUTOCONF,;t t
s,@AUTOMAKE@,$AUTOMAKE,;t t
@@ -18654,27 +23920,36 @@ s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
s,@AMTAR@,$AMTAR,;t t
s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
-s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
-s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
-s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
-s,@DEPDIR@,$DEPDIR,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
s,@am__include@,$am__include,;t t
s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
s,@LN_S@,$LN_S,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@PATH_SH@,$PATH_SH,;t t
s,@PATH_PERL@,$PATH_PERL,;t t
+s,@READLINE_LIBS@,$READLINE_LIBS,;t t
s,@U@,$U,;t t
s,@ANSI2KNR@,$ANSI2KNR,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
@@ -18682,23 +23957,14 @@ s,@LIBPARSE@,$LIBPARSE,;t t
s,@MAKE_LIBPARSE@,$MAKE_LIBPARSE,;t t
s,@MAKE_LIBPARSE_KERNEL@,$MAKE_LIBPARSE_KERNEL,;t t
s,@MAKE_CHECK_Y2K@,$MAKE_CHECK_Y2K,;t t
-s,@RSAOBJS@,$RSAOBJS,;t t
-s,@RSASRCS@,$RSASRCS,;t t
-s,@RSADIR@,$RSADIR,;t t
-s,@RSAREF@,$RSAREF,;t t
-s,@LIBRSAREF@,$LIBRSAREF,;t t
-s,@MAKE_LIBRSAREF@,$MAKE_LIBRSAREF,;t t
s,@OPENSSL@,$OPENSSL,;t t
s,@OPENSSL_INC@,$OPENSSL_INC,;t t
s,@OPENSSL_LIB@,$OPENSSL_LIB,;t t
-s,@MAKE_NTP_GENKEYS@,$MAKE_NTP_GENKEYS,;t t
-s,@isRSAREF_TRUE@,$isRSAREF_TRUE,;t t
-s,@isRSAREF_FALSE@,$isRSAREF_FALSE,;t t
-s,@isRSAEURO_TRUE@,$isRSAEURO_TRUE,;t t
-s,@isRSAEURO_FALSE@,$isRSAEURO_FALSE,;t t
-s,@AUTOKEY@,$AUTOKEY,;t t
+s,@MAKE_NTP_KEYGEN@,$MAKE_NTP_KEYGEN,;t t
+s,@LCRYPTO@,$LCRYPTO,;t t
s,@EF_PROGS@,$EF_PROGS,;t t
s,@EF_LIBS@,$EF_LIBS,;t t
+s,@MAKE_SNTP@,$MAKE_SNTP,;t t
s,@TESTDCF@,$TESTDCF,;t t
s,@DCFD@,$DCFD,;t t
s,@MAKE_PARSEKMODULE@,$MAKE_PARSEKMODULE,;t t
@@ -18709,6 +23975,11 @@ s,@MAKE_ADJTIMED@,$MAKE_ADJTIMED,;t t
s,@MAKE_NTPTIME@,$MAKE_NTPTIME,;t t
s,@MAKE_TICKADJ@,$MAKE_TICKADJ,;t t
s,@MAKE_TIMETRIM@,$MAKE_TIMETRIM,;t t
+s,@MAKE_LIBNTPSIM@,$MAKE_LIBNTPSIM,;t t
+s,@MAKE_NTPDSIM@,$MAKE_NTPDSIM,;t t
+s,@ARLIB_DIR@,$ARLIB_DIR,;t t
+s,@subdirs@,$subdirs,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
_ACEOF
@@ -18779,25 +24050,30 @@ echo X"$ac_file" |
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
- { case "$ac_dir" in
- [\\/]* | ?:[\\/]* ) as_incr_dir=;;
- *) as_incr_dir=.;;
-esac
-as_dummy="$ac_dir"
-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
- case $as_mkdir_dir in
- # Skip DOS drivespec
- ?:) as_incr_dir=$as_mkdir_dir ;;
- *)
- as_incr_dir=$as_incr_dir/$as_mkdir_dir
- test -d "$as_incr_dir" ||
- mkdir "$as_incr_dir" ||
- { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-done; }
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
ac_builddir=.
@@ -18827,7 +24103,7 @@ esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
@@ -18907,6 +24183,20 @@ s,@INSTALL@,$ac_INSTALL,;t t
rm -f $tmp/out
fi
+ # Run the commands associated with the file.
+ case $ac_file in
+ ntpdc/nl.pl ) chmod +x ntpdc/nl.pl ;;
+ scripts/calc_tickadj ) chmod +x scripts/calc_tickadj ;;
+ scripts/checktime ) chmod +x scripts/checktime ;;
+ scripts/freq_adj ) chmod +x scripts/freq_adj ;;
+ scripts/mkver ) chmod +x scripts/mkver ;;
+ scripts/ntp-wait ) chmod +x scripts/ntp-wait ;;
+ scripts/ntpsweep ) chmod +x scripts/ntpsweep ;;
+ scripts/ntptrace ) chmod +x scripts/ntptrace ;;
+ scripts/ntpver ) chmod +x scripts/ntpver ;;
+ scripts/plot_summary ) chmod +x scripts/plot_summary ;;
+ scripts/summary ) chmod +x scripts/summary ;;
+ esac
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
@@ -19017,7 +24307,7 @@ _ACEOF
# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo ' :' >>$CONFIG_STATUS
rm -f conftest.tail
@@ -19041,7 +24331,7 @@ do
mv conftest.tail conftest.defines
done
rm -f conftest.defines
-echo ' fi # egrep' >>$CONFIG_STATUS
+echo ' fi # grep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS
# Break up conftest.undefs because some shells have a limit on the size
@@ -19081,7 +24371,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF
cat $tmp/in >>$tmp/config.h
rm -f $tmp/in
if test x"$ac_file" != x-; then
- if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
{ echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
@@ -19097,25 +24387,30 @@ echo X"$ac_file" |
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
- { case "$ac_dir" in
- [\\/]* | ?:[\\/]* ) as_incr_dir=;;
- *) as_incr_dir=.;;
-esac
-as_dummy="$ac_dir"
-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
- case $as_mkdir_dir in
- # Skip DOS drivespec
- ?:) as_incr_dir=$as_mkdir_dir ;;
- *)
- as_incr_dir=$as_incr_dir/$as_mkdir_dir
- test -d "$as_incr_dir" ||
- mkdir "$as_incr_dir" ||
- { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-done; }
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
rm -f $ac_file
mv $tmp/config.h $ac_file
@@ -19124,13 +24419,29 @@ done; }
cat $tmp/config.h
rm -f $tmp/config.h
fi
- # Run the commands associated with the file.
- case $ac_file in
- config.h ) # update the timestamp
-echo timestamp >"./stamp-h1"
- ;;
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+ X$ac_file : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
@@ -19180,7 +24491,7 @@ esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
@@ -19188,14 +24499,31 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
{ echo "$as_me:$LINENO: executing $ac_dest commands" >&5
echo "$as_me: executing $ac_dest commands" >&6;}
case $ac_dest in
- default-1 )
-test x"$AMDEP_TRUE" != x"" ||
-for mf in $CONFIG_FILES; do
- case "$mf" in
- Makefile) dirpart=.;;
- */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
- *) continue;;
- esac
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ else
+ continue
+ fi
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
@@ -19220,14 +24548,48 @@ for mf in $CONFIG_FILES; do
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
- fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
- $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+ fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
+
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
;;
- default ) chmod +x scripts/calc_tickadj scripts/checktime scripts/freq_adj scripts/mkver scripts/ntp-wait scripts/ntpsweep scripts/ntpver scripts/plot_summary scripts/summary ;;
esac
done
_ACEOF
@@ -19250,11 +24612,158 @@ ac_clean_files=$ac_clean_files_save
# need to make the FD available again.
if test "$no_create" != yes; then
ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
- $SHELL $CONFIG_STATUS || ac_cs_success=false
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
$ac_cs_success || { (exit 1); exit 1; }
fi
+#
+# CONFIG_SUBDIRS section.
+#
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file and --srcdir arguments so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ for ac_arg in $ac_configure_args; do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case $ac_arg in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+ | --c=*)
+ ;;
+ --config-cache | -C)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ ;;
+ *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+ esac
+ done
+
+ # Always prepend --prefix to ensure using the same prefix
+ # in subdir configurations.
+ ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
+
+ ac_popdir=`pwd`
+ for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ test -d $srcdir/$ac_dir || continue
+
+ { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
+echo "$as_me: configuring in $ac_dir" >&6;}
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ cd $ac_dir
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
+ elif test -f $ac_srcdir/configure; then
+ ac_sub_configure="$SHELL '$ac_srcdir/configure'"
+ elif test -f $ac_srcdir/configure.in; then
+ ac_sub_configure=$ac_configure
+ else
+ { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
+echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+ # Make the cache file name correct relative to the subdirectory.
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+ *) # Relative path.
+ ac_sub_cache_file=$ac_top_builddir$cache_file ;;
+ esac
+
+ { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+ # The eval makes quoting arguments work.
+ eval $ac_sub_configure $ac_sub_configure_args \
+ --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
+ { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
+echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ cd $ac_popdir
+ done
+fi
+
diff --git a/contrib/ntp/configure.in b/contrib/ntp/configure.in
index 7a1cc8c2e197..131d18f7098d 100644
--- a/contrib/ntp/configure.in
+++ b/contrib/ntp/configure.in
@@ -5,16 +5,21 @@ AC_CANONICAL_SYSTEM
AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host", [canonical system (cpu-vendor-os) string])
AM_CONFIG_HEADER(config.h)
AC_ARG_PROGRAM
-AM_INIT_AUTOMAKE(ntp, 4.1.1b)
-AC_PREREQ(2.52) # We need the cross-compile-aware SIZEOF stuff.
+AM_INIT_AUTOMAKE(ntp, 4.2.0)
+AC_PREREQ(2.53)
ac_cv_var_atom_ok=no
ac_cv_var_oncore_ok=no
ac_cv_var_ripe_ncc_ok=no
+ac_cv_var_jupiter_ok=no
dnl Grab any initial CFLAGS so we can pick better defaults.
iCFLAGS="$CFLAGS"
+dnl check these early to avoid autoconf warnings
+AC_AIX
+AC_MINIX
+
dnl we need to check for cross compile tools for vxWorks here
AC_PROG_CC
AC_PROG_CC_STDC
@@ -34,13 +39,6 @@ case "$host" in
;;
esac
;;
- alpha*-dec-osf*)
- case "$CC" in
- cc)
- CFLAGS="$CFLAGS -std1"
- ;;
- esac
- ;;
*-*-mpeix*)
CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB"
LDFLAGS="$LDFLAGS -L/SYSLOG/PUB"
@@ -48,6 +46,27 @@ case "$host" in
;;
esac
+AC_CACHE_CHECK(if we should use /dev/clockctl, ac_clockctl,
+[AC_ARG_ENABLE(clockctl,
+ AC_HELP_STRING([--enable-clockctl], [Use /dev/clockctl for non-root time control]),
+ [ans=$enableval],
+ [case "$target" in
+ *-*-netbsd*)
+ ans=yes
+ ;;
+ *) ans=no
+ ;;
+ esac
+ ])
+ac_clockctl=$ans])
+# End of AC_CACHE_CHECK for clockctl
+AC_CHECK_HEADERS(sys/clockctl.h)
+case "$ac_clockctl$ac_cv_header_sys_clockctl_h" in
+ yesyes)
+ AC_DEFINE(HAVE_CLOCKCTL, ,[[Use /dev/clockctl?]])
+ ;;
+esac
+
case "$build" in
$host)
;;
@@ -84,21 +103,6 @@ case "$GCC" in
# CFLAGS="$CFLAGS -Wtraditional"
# CFLAGS="$CFLAGS -Wwrite-strings"
- AC_CACHE_CHECK(whether ${CC-cc} -pipe works, ac_cv_prog_cc_pipe,
- [echo 'void f(){}' > conftest.c
- if test -z "`${CC-cc} -pipe -c conftest.c 2>&1`" -a -s conftest.o; then
- ac_cv_prog_cc_pipe=yes
- else
- ac_cv_prog_cc_pipe=no
- fi
- rm -f conftest*
- ])
-
- case "$ac_cv_prog_cc_pipe" in
- yes)
- CFLAGS="$CFLAGS -pipe"
- ;;
- esac
;;
esac
@@ -118,6 +122,7 @@ case "$host" in
case "$CFLAGS" in
*-n32*) ;;
*-n64*) ;;
+ *-64*) ;;
*) case "$iCFLAGS" in
'') CFLAGS="-O2 -g3 -n32" ;;
*) CFLAGS="$CFLAGS -n32" ;;
@@ -127,6 +132,7 @@ case "$host" in
case "$LDFLAGS" in
*-n32*) ;;
*-n64*) ;;
+ *-64*) ;;
*) LDFLAGS="$LDFLAGS -n32" ;;
esac
fi
@@ -134,6 +140,9 @@ case "$host" in
*-*-solaris2.5.1)
ac_busted_vpath_in_make=yes
;;
+ *-*-unicosmp*)
+ ac_busted_vpath_in_make=yes
+ ;;
dnl This is currently commented out by bor.
dnl The new versions of ReliantUNIX round adjtime() interval down
dnl to 1/100s (system tick). This makes tickadj actually useless.
@@ -166,8 +175,7 @@ AC_SUBST(LDFLAGS)dnl
AC_PROG_LN_S
AC_PROG_GCC_TRADITIONAL
-AC_AIX
-AC_MINIX
+AC_C_VOLATILE
AC_ISC_POSIX
AC_PROG_RANLIB
AC_PATH_PROG(PATH_SH, sh)
@@ -197,18 +205,31 @@ AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket))
AC_CHECK_FUNC(openlog, ,
AC_CHECK_LIB(gen, openlog, ,
AC_CHECK_LIB(syslog, openlog, , , -lsocket)))
+AC_CHECK_LIB(md5, MD5Init, ,
+ AC_CHECK_LIB(md, MD5Init))
+AC_CHECK_FUNCS(MD5Init)
dnl HMS: What a hack...
AC_CHECK_HEADERS(readline/history.h readline/readline.h)
case "$ac_cv_header_readline_history_h$ac_cv_header_readline_readline_h" in
*no*) ;;
- *) AC_CHECK_LIB(readline, readline, ,
+ *) save_LIBS=$LIBS
+ LIBS=
+ AC_CHECK_LIB(readline, readline, ,
AC_MSG_NOTICE([Trying again with -lcurses])
unset ac_cv_lib_readline_readline
AC_CHECK_LIB(readline, readline,
LIBS="-lreadline -lcurses $LIBS"
AC_DEFINE(HAVE_LIBREADLINE)
- AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?])
- , , -lcurses))
+ AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?]),
+ AC_CHECK_LIB(edit, readline,
+ LIBS="-ledit -lcurses"
+ AC_DEFINE(HAVE_LIBEDIT, , [Do we have the edit library?])
+ AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?])
+ , , -lcurses)
+ , -lcurses))
+ READLINE_LIBS=$LIBS
+ AC_SUBST(READLINE_LIBS)
+ LIBS=$save_LIBS
;;
esac
@@ -229,11 +250,47 @@ esac
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
AC_HEADER_STDC
-AC_CHECK_HEADERS(bstring.h errno.h fcntl.h ieeefp.h math.h memory.h netdb.h)
-AC_CHECK_HEADERS(poll.h resolv.h sched.h sgtty.h stdlib.h string.h termio.h)
-AC_CHECK_HEADERS(termios.h timepps.h timex.h unistd.h utmp.h utmpx.h)
-AC_CHECK_HEADERS(arpa/nameser.h net/if.h netinet/in_system.h)
-AC_CHECK_HEADERS(netinet/in_systm.h netinet/in.h netinet/ip.h)
+AC_CHECK_HEADERS(bstring.h errno.h fcntl.h ieeefp.h math.h)
+# HMS: Lame, but fast.
+if test -f /etc/redhat-release
+then
+ :
+else
+ AC_CHECK_HEADERS(md5.h)
+fi
+AC_CHECK_HEADERS(memory.h netdb.h poll.h)
+AC_CHECK_HEADERS(sched.h sgtty.h stdlib.h string.h termio.h)
+AC_CHECK_HEADERS(termios.h timepps.h timex.h unistd.h)
+case "$host" in
+ *-*-aix*)
+ AC_CHECK_HEADERS(utmpx.h)
+ case "$ac_cv_header_utmpx_h" in
+ yes) ;;
+ *) AC_CHECK_HEADERS(utmp.h) ;;
+ esac
+ ;;
+ *) AC_CHECK_HEADERS(utmp.h utmpx.h) ;;
+esac
+AC_CHECK_HEADERS(arpa/nameser.h)
+AC_CHECK_HEADERS(net/if.h, [], [],
+[#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+])
+AC_CHECK_HEADERS(net/if6.h)
+AC_CHECK_HEADERS(netinet/in_system.h netinet/in_systm.h)
+AC_CHECK_HEADERS(netinet/in.h)
+AC_CHECK_HEADERS(netinet/ip.h, [], [],
+[#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif
+])
AC_CHECK_HEADERS(netinfo/ni.h, [AC_DEFINE(HAVE_NETINFO, 1, [NetInfo support?])])
AC_CHECK_HEADERS(sun/audioio.h sys/audioio.h)
dnl AC_CHECK_HEADERS(sys/chudefs.h)
@@ -243,6 +300,7 @@ case "$host" in
*) AC_CHECK_HEADERS(sys/ioctl.h)
;;
esac
+AC_CHECK_HEADERS(sys/ipc.h)
AC_CHECK_HEADERS(sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h)
AC_CHECK_HEADERS(sys/ppstime.h sys/proc.h sys/resource.h sys/sched.h)
case "$host" in
@@ -250,11 +308,11 @@ case "$host" in
AC_CHECK_HEADERS(sys/sio.h)
;;
esac
-AC_CHECK_HEADERS(sys/select.h sys/signal.h sys/sockio.h)
+AC_CHECK_HEADERS(sys/select.h sys/shm.h sys/signal.h sys/sockio.h)
AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h)
AC_CHECK_HEADERS(sys/stat.h sys/stream.h)
-AC_CHECK_HEADERS(sys/stropts.h sys/sysctl.h sys/syssgi.h sys/termios.h)
-AC_CHECK_HEADERS(sys/time.h sys/signal.h)
+AC_CHECK_HEADERS(sys/stropts.h sys/sysctl.h sys/syssgi.h sys/systune.h)
+AC_CHECK_HEADERS(sys/termios.h sys/time.h sys/signal.h)
AC_EGREP_CPP(yes,
[#include <sys/timepps.h>
#ifdef PPS_API_VERS_1
@@ -283,6 +341,27 @@ if test $ac_cv_struct_nlist_n_un = yes; then
fi
])dnl
+dnl AC_CHECK_HEADERS(net/if.h, [], [],
+dnl [#if HAVE_SYS_TYPES_H
+dnl # include <sys/types.h>
+dnl #endif
+dnl #if HAVE_SYS_SOCKET_H
+dnl # include <sys/socket.h>
+dnl #endif
+dnl ])
+
+AC_CHECK_HEADERS(resolv.h, [], [],
+[#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+])
+
AC_CACHE_CHECK(for basic volatile support, ac_cv_c_volatile,
[AC_TRY_COMPILE([],[
volatile int x;],
@@ -315,28 +394,33 @@ if test "$ac_cv_have_prototypes" = yes; then
fi
AC_C_CONST
-case "$build" in
- $host)
- AC_C_BIGENDIAN
- ;;
- *) case "$host" in
- i*86-*-*) # Was i*86-*-vxworks*
- # LITTLEENDIAN
- ;;
- *-*-vxworks*)
- AC_DEFINE(WORDS_BIGENDIAN)
- ;;
- *) AC_MSG_ERROR(Cross-compiling needs explicit byte order)
- ;;
- esac
- ;;
-esac
+AC_C_BIGENDIAN
AC_TYPE_SIGNAL
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_CHECK_TYPE(time_t, long)
AC_STRUCT_TM
+AC_CACHE_CHECK([for u_int8_t], ac_cv_type_u_int8_t,
+[AC_TRY_COMPILE([#include <sys/types.h>],
+ [u_int8_t len = 42; return 0;],
+ ac_cv_type_u_int8_t=yes,
+ ac_cv_type_u_int8_t=no)
+])
+if test $ac_cv_type_u_int8_t = yes; then
+ AC_DEFINE(HAVE_TYPE_U_INT8_T,1,Does u_int8_t exist)
+fi
+
+AC_CACHE_CHECK([for u_int64_t], ac_cv_type_u_int64_t,
+[AC_TRY_COMPILE([#include <sys/types.h>],
+ [u_int64_t len = 42; return 0;],
+ ac_cv_type_u_int64_t=yes,
+ ac_cv_type_u_int64_t=no)
+])
+if test $ac_cv_type_u_int64_t = yes; then
+ AC_DEFINE(HAVE_TYPE_U_INT64_T,1,Does u_int64_t exist)
+fi
+
AC_CACHE_CHECK(for a fallback value for HZ, ac_cv_var_default_hz,
[ac_cv_var_default_hz=100
case "$host" in
@@ -443,6 +527,51 @@ if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR, 1, [Should be obvious...])
fi
+AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
+ ac_cv_have_ss_family_in_struct_ss, [
+ AC_TRY_COMPILE(
+ [
+#include <sys/types.h>
+#include <sys/socket.h>
+ ],
+ [ struct sockaddr_storage s; s.ss_family = 1; ],
+ [ ac_cv_have_ss_family_in_struct_ss="yes" ],
+ [ ac_cv_have_ss_family_in_struct_ss="no" ],
+ )
+])
+if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
+ AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have ss_family?])
+else
+ # Hack around a problem...
+ case "$host" in
+ *-*-hpux11.11) CPPFLAGS="$CPPFLAGS -D_NETINET_IN6_H"
+ ;;
+ esac
+fi
+
+AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
+ ac_cv_have___ss_family_in_struct_ss, [
+ AC_TRY_COMPILE(
+ [
+#include <sys/types.h>
+#include <sys/socket.h>
+ ],
+ [ struct sockaddr_storage s; s.__ss_family = 1; ],
+ [ ac_cv_have___ss_family_in_struct_ss="yes" ],
+ [ ac_cv_have___ss_family_in_struct_ss="no" ]
+ )
+])
+if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
+ AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have __ss_family?])
+fi
+
+AH_VERBATIM([X_HAVE_SS_FAMILY_IN_SS],
+[/* Handle ss_family */
+#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
+# define ss_family __ss_family
+# define ss_len __ss_len
+#endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */])
+
case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
*yes*)
AC_CACHE_CHECK([for struct snd_size], ac_cv_struct_snd_size,
@@ -567,7 +696,7 @@ case "$host" in
;;
esac
case "$host" in
- *-*-aix4*)
+ *-*-aix[[45]]*)
# (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
# (returning ENOSYS). I didn't check 4.2. If, in the future,
# IBM pulls its thumbs out long enough to implement clock_settime,
@@ -600,7 +729,9 @@ case "$host" in
*) AC_CHECK_FUNCS(getuid)
;;
esac
-AC_CHECK_FUNCS(hstrerror K_open kvm_open memcpy memmove memset)
+AC_CHECK_FUNCS(hstrerror)
+AC_CHECK_FUNC(inet_ntop, [], [AC_DEFINE(ISC_PLATFORM_NEEDNTOP, 1, [ISC: provide inet_ntop()])])
+AC_CHECK_FUNCS(K_open kvm_open memcpy memmove memset)
case "$host" in
*-*-sco3.2v5.0.*)
# Just stubs. Idiots.
@@ -610,11 +741,11 @@ case "$host" in
esac
AC_CHECK_FUNCS(mktime)
case "$host" in
- *-*-aix4*)
+ *-*-aix[[45]]*)
# Just a stub. Idiots.
;;
- *-*-irix*)
- # Just a stub in Irix. Idiots.
+ *-*-irix[[45]]*)
+ # Just a stub in "old" Irix. Idiots.
;;
*-*-qnx*)
# Apparently there but not working in QNX. Idiots?
@@ -645,7 +776,7 @@ case "$ac_cv_func_mrand48" in
*) AC_REPLACE_FUNCS(random) ;;
esac
case "$host" in
- *-*-aix4*)
+ *-*-aix[[45]]*)
# Just a stub in AIX 4. Idiots.
;;
*-*-solaris2.5*)
@@ -655,6 +786,7 @@ case "$host" in
;;
esac
AC_CHECK_FUNCS(setlinebuf setpgid setpriority setsid)
+AC_CHECK_FUNCS(setrlimit)
AC_CHECK_FUNCS(settimeofday, ,[
case "$host" in
*-*-mpeix*) ac_cv_func_settimeofday=yes
@@ -665,10 +797,13 @@ AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl)
AC_CHECK_FUNCS(snprintf strdup strerror strstr)
AC_CHECK_FUNCS(timegm)
case "$host" in
- *-*-aix4*)
+ *-*-aix[[45]]*)
# Just stubs. Idiots.
;;
- *-*-netbsd*)
+ *-*-netbsd1*)
+ # Just stubs. Idiots.
+ ;;
+ *-*-netbsdelf1*)
# Just stubs. Idiots.
;;
*-*-openbsd*)
@@ -686,6 +821,12 @@ case "$host" in
esac
AC_CHECK_FUNCS(uname updwtmp updwtmpx vsprintf)
+case "$host" in
+ *-*-sunos4*)
+ AC_DEFINE(SPRINTF_CHAR, 1, [*s*printf() functions are char*])
+ ;;
+esac
+
AC_CACHE_CHECK(number of arguments to gettimeofday(), ac_cv_func_Xettimeofday_nargs,
[AC_TRY_COMPILE([#include <sys/time.h>],[
gettimeofday((struct timeval*)0,(struct timezone*)0);
@@ -919,10 +1060,6 @@ case "$host" in
;;
esac
-AC_CACHE_CHECK(if we should use a streams device for ifconfig,
- ac_cv_var_use_streams_device_for_ifconfig,
- ac_cv_var_use_streams_device_for_ifconfig=no)
-
AC_CACHE_CHECK(if we need extra room for SO_RCVBUF, ac_cv_var_rcvbuf_slop,
[ans=no
case "$host" in
@@ -941,9 +1078,6 @@ case "$host" in
*-*-domainos)
ans=no
;;
- *-*-linux*)
- ans=no
- ;;
esac
ac_cv_var_open_bcast_socket=$ans])
case "$ac_cv_var_open_bcast_socket" in
@@ -1116,6 +1250,9 @@ case "$ac_cv_hdr_def_sigio" in
*-*-linux*)
ans=no
;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
esac
;;
esac
@@ -1157,7 +1294,7 @@ case "$ac_cv_hdr_def_sigpoll" in
*-sni-sysv*)
ans=no
;;
- *-*-aix4*)
+ *-*-aix[[45]]*)
ans=no
;;
*-*-hpux*)
@@ -1178,6 +1315,9 @@ case "$ac_cv_hdr_def_sigpoll" in
*-*-ultrix*)
ans=no
;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
*) ans=yes
;;
esac
@@ -1205,7 +1345,7 @@ case "$ac_cv_hdr_def_sigpoll" in
*-sni-sysv*)
ans=no
;;
- *-*-aix4*)
+ *-*-aix[[45]]*)
ans=no
;;
*-*-hpux*)
@@ -1226,6 +1366,9 @@ case "$ac_cv_hdr_def_sigpoll" in
*-*-qnx*)
ans=no
;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
*) ans=yes
;;
esac
@@ -1296,6 +1439,9 @@ case "$host" in
i?86-*-freebsd*)
ans=yes
;;
+ *-*-unicosmp*)
+ ans=yes
+ ;;
esac
ac_cv_var_no_parenb_ignpar=$ans])
case "$ac_cv_var_no_parenb_ignpar" in
@@ -1506,6 +1652,7 @@ case "$ac_cv_c_inline$ac_cv_struct_timespec$ac_cv_header_timepps_h$ac_cv_header_
AC_DEFINE(HAVE_PPSAPI, 1, [Do we have the PPS API per the Draft RFC?])
ac_cv_var_oncore_ok=yes
ac_cv_var_ripe_ncc_ok=yes
+ ac_cv_var_jupiter_ok=yes
;;
esac
@@ -1611,16 +1758,6 @@ case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_
esac
AC_MSG_RESULT($ans)
-AC_MSG_CHECKING(for SHM clock attached thru shared memory)
-AC_ARG_ENABLE(SHM,
- AC_HELP_STRING([--enable-SHM], [- SHM clock attached thru shared memory]),
- [ntp_ok=$enableval], [ntp_ok=no])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_SHM, 1, [clock thru shared memory])
-fi
-AC_MSG_RESULT($ntp_ok)
-
AC_MSG_CHECKING(for default inclusion of all suitable non-PARSE clocks)
AC_ARG_ENABLE(all-clocks,
AC_HELP_STRING([--enable-all-clocks], [+ include all suitable non-PARSE clocks:]),
@@ -1638,7 +1775,7 @@ esac
AC_MSG_RESULT($ntp_canparse)
AC_MSG_CHECKING([if we have support for audio clocks])
-case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h" in
+case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
*yes*)
ntp_canaudio=yes
AC_DEFINE(HAVE_AUDIO, , [Do we have audio support?])
@@ -1647,10 +1784,19 @@ case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h" in
esac
AC_MSG_RESULT($ntp_canaudio)
+AC_MSG_CHECKING([if we have support for the SHM refclock interface])
+case "$ac_cv_header_sys_ipc_h$ac_cv_header_sys_shm_h" in
+ yesyes)
+ ntp_canshm=yes
+ ;;
+ *) ntp_canshm=no ;;
+esac
+AC_MSG_RESULT($ntp_canshm)
+
# Requires modem control
AC_MSG_CHECKING(ACTS modem service)
AC_ARG_ENABLE(ACTS,
- AC_HELP_STRING([--enable-ACTS], [+ ACTS modem service]),
+ AC_HELP_STRING([--enable-ACTS], [s ACTS modem service]),
[ntp_ok=$enableval],
[AC_EGREP_CPP(yes,
[#include <termios.h>
@@ -1722,7 +1868,7 @@ AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(CHU modem/decoder)
AC_ARG_ENABLE(CHU,
- AC_HELP_STRING([--enable-CHU], [- CHU modem/decoder]),
+ AC_HELP_STRING([--enable-CHU], [+ CHU modem/decoder]),
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
@@ -1863,25 +2009,18 @@ if test "$ntp_ok" = "yes"; then
fi
AC_MSG_RESULT($ntp_ok)
-# Not Ultrix
AC_MSG_CHECKING(Rockwell Jupiter GPS receiver)
AC_ARG_ENABLE(JUPITER,
AC_HELP_STRING([--enable-JUPITER], [s Rockwell Jupiter GPS receiver]),
- [ntp_ok=$enableval],
- [case "$ac_cv_var_ppsclock" in
-# yes) ntp_ok=$ntp_eac
-# ;;
- *) ntp_ok=no
- ;;
- esac])
+ [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
+case "$ac_cv_var_jupiter_ok" in
+ no) ntp_ok=no ;;
+esac
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
AC_DEFINE(CLOCK_JUPITER, 1, [Rockwell Jupiter GPS clock?])
fi
AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$host" in
- yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
-esac
AC_MSG_CHECKING(Leitch CSD 5300 Master Clock System Driver)
AC_ARG_ENABLE(LEITCH,
@@ -1935,8 +2074,8 @@ esac
AC_MSG_CHECKING(for NeoClock4X receiver)
AC_ARG_ENABLE(NEOCLOCK4X,
- AC_HELP_STRING([--enable-NEOCLOCK4X], [- NeoClock4X DCF77 / TDF receiver]),
- [ntp_ok=$enableval], [ntp_ok=no])
+ AC_HELP_STRING([--enable-NEOCLOCK4X], [+ NeoClock4X DCF77 / TDF receiver]),
+ [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
AC_DEFINE(CLOCK_NEOCLOCK4X, 1, [NeoClock4X])
@@ -1968,7 +2107,7 @@ AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(for Palisade clock)
AC_ARG_ENABLE(PALISADE,
- AC_HELP_STRING([--enable-PALISADE], [+ Palisade clock]),
+ AC_HELP_STRING([--enable-PALISADE], [s Palisade clock]),
[ntp_ok=$enableval],
[case "$ac_cv_header_termios_h" in
yes)
@@ -2038,6 +2177,22 @@ if test "$ntp_ok" = "yes"; then
fi
AC_MSG_RESULT($ntp_ok)
+# Danny Meyer says SHM compiles (with a few warnings) under Win32.
+# For *IX, we need sys/ipc.h and sys/shm.h.
+AC_MSG_CHECKING(for SHM clock attached thru shared memory)
+AC_ARG_ENABLE(SHM,
+ AC_HELP_STRING([--enable-SHM], [s SHM clock attached thru shared memory]),
+ [ntp_ok=$enableval],
+ [case "$ntp_eac$ntp_canshm" in
+ *no*) ntp_ok=no ;;
+ *) ntp_ok=yes ;;
+esac])
+if test "$ntp_ok" = "yes"; then
+ ntp_refclock=yes
+ AC_DEFINE(CLOCK_SHM, 1, [clock thru shared memory])
+fi
+AC_MSG_RESULT($ntp_ok)
+
AC_MSG_CHECKING(Spectracom 8170/Netclock/2 WWVB receiver)
AC_ARG_ENABLE(SPECTRACOM,
AC_HELP_STRING([--enable-SPECTRACOM], [+ Spectracom 8170/Netclock/2 WWVB receiver]),
@@ -2116,7 +2271,7 @@ AC_ARG_ENABLE(ULINK,
[ntp_ok=$enableval], [ntp_ok=$ntp_eac])
if test "$ntp_ok" = "yes"; then
ntp_refclock=yes
- AC_DEFINE(CLOCK_ULINK, 1, [Ultralink M320 WWVB receiver])
+ AC_DEFINE(CLOCK_ULINK, 1, [Ultralink M320 WWVB receiver?])
fi
AC_MSG_RESULT($ntp_ok)
@@ -2142,7 +2297,7 @@ AC_MSG_RESULT($ntp_ok)
AC_MSG_CHECKING(WWV receiver)
AC_ARG_ENABLE(WWV,
- AC_HELP_STRING([--enable-WWV], [+ WWV Audio receiver]),
+ AC_HELP_STRING([--enable-WWV], [s WWV Audio receiver]),
[ntp_ok=$enableval],
[case "$ntp_eac$ntp_canaudio" in
*no*) ntp_ok=no ;;
@@ -2408,18 +2563,18 @@ case "$ntp_libparse" in
esac
AC_MSG_RESULT($ans)
-AC_SUBST(RSAOBJS)
-AC_SUBST(RSASRCS)
-AC_SUBST(RSADIR)
-AC_SUBST(RSAREF)
-AC_SUBST(LIBRSAREF)
-AC_SUBST(MAKE_LIBRSAREF)
+# AC_SUBST(RSAOBJS)
+# AC_SUBST(RSASRCS)
+# AC_SUBST(RSADIR)
+# AC_SUBST(RSAREF)
+# AC_SUBST(LIBRSAREF)
+# AC_SUBST(MAKE_LIBRSAREF)
AC_SUBST(OPENSSL)
AC_SUBST(OPENSSL_INC)
AC_SUBST(OPENSSL_LIB)
-AC_SUBST(MAKE_NTP_GENKEYS)
+AC_SUBST(MAKE_NTP_KEYGEN)
AC_MSG_CHECKING(for openssl library directory)
AC_ARG_WITH(openssl-libdir,
@@ -2428,7 +2583,7 @@ AC_ARG_WITH(openssl-libdir,
case "$ans" in
no) ;;
yes) # Look in:
- ans="/usr/lib /usr/local/lib /usr/local/ssl/lib"
+ ans="/usr/lib /usr/lib/openssl /usr/local/lib /usr/local/ssl/lib"
;;
*) # Look where they said
;;
@@ -2438,7 +2593,14 @@ case "$ans" in
*) # Look for libcrypto.a and libssl.a:
for i in $ans no
do
- test -f $i/libcrypto.a -a -f $i/libssl.a && break
+ case "$host" in
+ *-*-darwin*)
+ test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
+ ;;
+ *)
+ test -f $i/libcrypto.a -a -f $i/libssl.a && break
+ ;;
+ esac
done
case "$i" in
no)
@@ -2486,75 +2648,32 @@ esac
AC_MSG_RESULT($ans)
AC_ARG_WITH(crypto,
- AC_HELP_STRING([--with-crypto], [+ ={autokey,rsaref}]),
-dnl AC_HELP_STRING([--with-crypto], [+ ={autokey,openssl,rsaref}]),
+ AC_HELP_STRING([--with-crypto], [+ =openssl]),
[ans=$withval], [ans=yes])
case "$ans" in
no) ;;
- yes|rsaref|openssl)
- case "$ans" in
- yes|rsaref) # Just "rsaref" when OpenSSL is ready
+ yes|openssl)
+ if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC"
+ then
ans=no
- ;;
- *)
- if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC"
- then
- ans=no
- else
- # We have OpenSSL inc/lib - use them.
- ans=openssl
- CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
- LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
- LIBS="$LIBS -lcrypto"
- AC_DEFINE(DES, 1, [Use DES?])
- AC_DEFINE(OPENSSL, , [Use OpenSSL?])
- AC_DEFINE(PUBKEY, , [Public key?])
- fi
- ;;
- esac
-
- case "$ans" in
- no)
- if test -f $srcdir/rsaref2/source/digit.c
- then
- ans=rsaref
- RSAOBJS=digit.o
- RSASRCS="digit.c digit.h"
- RSADIR=rsaref2
- fi
- if test -f $srcdir/rsaeuro1/source/rsaeuro.h
- then
- ans=rsaref
- RSAOBJS="md4c.o shsc.o"
- RSASRCS="md4c.c shsc.c"
- RSADIR=rsaeuro1
- fi
- if test "$ans" = "rsaref"; then
- LIBRSAREF=../librsaref/librsaref.a
- MAKE_LIBRSAREF=librsaref.a
- AC_DEFINE(DES, 1, [Use DES?])
- AC_DEFINE(PUBKEY)
- AC_DEFINE(RSAREF, , [Use RSAREF?])
- fi
- ;;
- esac
- ;;
-esac
-AM_CONDITIONAL(isRSAREF, test x$RSADIR = xrsaref2)
-AM_CONDITIONAL(isRSAEURO, test x$RSADIR = xrsaeuro1)
-AC_SUBST(AUTOKEY)
-case "$ans" in
- no) ;;
- *)
- AC_DEFINE(AUTOKEY, , [Autokey?])
- AUTOKEY=1
+ else
+ # We have OpenSSL inc/lib - use them.
+ ans=openssl
+ CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
+ LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
+ AC_SUBST(LCRYPTO, [-lcrypto])
+ MAKE_NTP_KEYGEN=ntp-keygen
+ AC_DEFINE(OPENSSL, , [Use OpenSSL?])
+ AC_CHECK_FUNCS(EVP_md2 EVP_mdc2)
+ fi
;;
esac
AC_MSG_CHECKING(for the level of crypto support)
AC_MSG_RESULT($ans)
AC_MSG_CHECKING(if we want to compile with ElectricFence)
-AC_ARG_WITH(electricfence, [ --with-electricfence - compile with ElectricFence malloc debugger],
+AC_ARG_WITH(electricfence,
+ AC_HELP_STRING([--with-electricfence], [- compile with ElectricFence malloc debugger]),
[ans=$withval], [ans=no])
case "$ans" in
no) ;;
@@ -2569,6 +2688,20 @@ case "$ans" in
esac
AC_MSG_RESULT($ans)
+AC_MSG_CHECKING(if we want to try SNTP)
+AC_ARG_WITH(sntp,
+ AC_HELP_STRING([--with-sntp], [- Build SNTP?]),
+[ans=$withval], [ans=no])
+case "$ans" in
+ no) ;;
+ *)
+ MAKE_SNTP="sntp"
+ AC_SUBST(MAKE_SNTP)
+ ans=yes
+ ;;
+esac
+AC_MSG_RESULT($ans)
+
AC_SUBST(TESTDCF)
AC_SUBST(DCFD)
@@ -2677,6 +2810,9 @@ AC_CACHE_CHECK(if we can read kmem, ac_cv_var_can_kmem,
*-*-winnt3.5)
ans=no
;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
esac
])
ac_cv_var_can_kmem=$ans])
@@ -2703,18 +2839,21 @@ AC_CACHE_CHECK(if adjtime is accurate, ac_cv_var_adjtime_is_accurate,
*-fujitsu-uxp*)
ans=yes
;;
- *-ibm-aix4*)
+ *-ibm-aix[[45]]*)
ans=yes
;;
*-*-linux*)
ans=yes
;;
- *-*-solaris2.[[01]]*)
+ *-*-solaris2.[[01]])
ans=no
;;
*-*-solaris2*)
ans=yes
;;
+ *-*-unicosmp*)
+ ans=yes
+ ;;
*) ans=no
;;
esac
@@ -2737,7 +2876,7 @@ case "$host" in
*-hp-hpux*)
ans=old_tick
;;
- *-ibm-aix[[34]]*)
+ *-ibm-aix[[345]]*)
ans=no
;;
*-*-mpeix*)
@@ -2966,6 +3105,9 @@ AC_CACHE_CHECK(for a default value for 'tick', ac_cv_var_tick,
*-*-winnt3.5)
ans='(every / 10)'
;;
+ *-*-unicosmp*)
+ ans=10000
+ ;;
*)
ans='1000000L/hz'
;;
@@ -3026,6 +3168,9 @@ AC_CACHE_CHECK(for a default value for 'tickadj', ac_cv_var_tickadj,
*-*-winnt3.5)
ans=50
;;
+ *-*-unicosmp*)
+ ans=150
+ ;;
esac])
ac_cv_var_tickadj=$ans])
case "$ac_cv_var_tickadj" in
@@ -3108,10 +3253,16 @@ case "$host" in
*-*-solaris2*)
# DLM says tickadj is a no-no starting with solaris2.5
case "$host" in
- *-*-solaris2.[0-4]*) ;;
+ *-*-solaris2.1[[0-9]]*)
+ ac_cv_make_tickadj=no
+ ;;
+ *-*-solaris2.[[0-4]]*) ;;
*) ac_cv_make_tickadj=no ;;
esac
;;
+ *-*-unicosmp*)
+ ac_cv_make_tickadj=no
+ ;;
esac
AC_CACHE_CHECK(if we want and can make the tickadj utility, ac_cv_make_tickadj,
ac_cv_make_tickadj=yes)
@@ -3127,6 +3278,9 @@ AC_CACHE_CHECK(if we want and can make the timetrim utility, ac_cv_make_timetrim
*-*-irix*)
ac_cv_make_timetrim=yes
;;
+ *-*-unicosmp*)
+ ac_cv_make_timetrim=yes
+ ;;
*)
ac_cv_make_timetrim=no
;;
@@ -3137,6 +3291,20 @@ case "$ac_cv_make_timetrim" in
;;
esac
+AC_SUBST(MAKE_LIBNTPSIM)
+AC_SUBST(MAKE_NTPDSIM)
+AC_CACHE_CHECK([if we want to build the NTPD simulator], ac_cv_var_ntpd_sim,
+[AC_ARG_ENABLE(simulator,
+ AC_HELP_STRING([--enable-simulator], [- build/install the NTPD simulator?]),
+ [ans=$enableval], [ans=no])
+ac_cv_var_ntpd_sim=$ans])
+case "$ac_cv_var_ntpd_sim" in
+ yes)
+ MAKE_NTPDSIM=ntpdsim
+ MAKE_LIBNTPSIM=libntpsim.a
+ ;;
+esac
+
AC_CACHE_CHECK(if we want UDP wildcard delivery, ac_cv_var_udp_wildcard_delivery,
[AC_ARG_ENABLE(udp-wildcard, [ --enable-udp-wildcard s use UDP wildcard delivery],
[ans=$enableval],
@@ -3151,7 +3319,7 @@ AC_CACHE_CHECK(if we want UDP wildcard delivery, ac_cv_var_udp_wildcard_delivery
*-*-aix3.2*)
ans=yes
;;
- *-*-aix4*)
+ *-*-aix[[45]]*)
ans=yes
;;
*-*-bsdi*)
@@ -3187,6 +3355,9 @@ AC_CACHE_CHECK(if we want UDP wildcard delivery, ac_cv_var_udp_wildcard_delivery
*-*-sunos4*)
ans=yes
;;
+ *-*-unicosmp*)
+ ans=yes
+ ;;
esac])
ac_cv_var_udp_wildcard_delivery=$ans])
case "$ac_cv_var_udp_wildcard_delivery" in
@@ -3242,6 +3413,9 @@ AC_CACHE_CHECK(if we should step and slew the time, ac_cv_var_step_slew,
*-*-ptx*)
ans=yes
;;
+ *-*-solaris2.1[[0-9]]*)
+ ans-no
+ ;;
*-*-solaris2.[[012]]*)
ans=yes
;;
@@ -3345,6 +3519,127 @@ case "$ac_cv_var_kernel_fll_bug" in
yes) AC_DEFINE(KERNEL_FLL_BUG, 1, [Does the kernel have an FLL bug?]) ;;
esac
+AC_CACHE_CHECK(if we should use the IRIG sawtooth filter, ac_cv_var_irig_sucks,
+[AC_ARG_ENABLE(irig-sawtooth,
+ AC_HELP_STRING([--enable-irig-sawtooth], [s if we should enable the IRIG sawtooth filter]),
+ [ans=$enableval],
+ [case "$host" in
+ *-*-solaris2.[[89]])
+ ans=yes
+ ;;
+ *-*-solaris2.1[[0-9]]*)
+ ans=yes
+ ;;
+ *) ans=no
+ ;;
+ esac
+ ])
+ac_cv_var_irig_sucks=$ans])
+case "$ac_cv_var_irig_sucks" in
+ yes) AC_DEFINE(IRIG_SUCKS, 1, [Should we use the IRIG sawtooth filter?]) ;;
+esac
+
+AC_CACHE_CHECK(if we should enable NIST lockclock scheme, ac_cv_var_nist_lockclock,
+[AC_ARG_ENABLE(nist,
+ AC_HELP_STRING([--enable-nist], [- if we should enable the NIST lockclock scheme]),
+ [ans=$enableval],[ans=no])
+ac_cv_var_nist_lockclock=$ans])
+case "$ac_cv_var_nist_lockclock" in
+ yes) AC_DEFINE(LOCKCLOCK, 1, [Should we align with the NIST lockclock scheme?]) ;;
+esac
+
+#
+# ISC stuff
+#
+
+if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
+ AC_DEFINE(ISC_PLATFORM_HAVESALEN, ,[ISC: struct sockaddr as sa_len?])
+fi
+
+AC_MSG_CHECKING(for IPv6 structures)
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>],
+[struct sockaddr_in6 sin6; return (0);],
+ [AC_MSG_RESULT(yes)
+ found_ipv6=yes],
+ [AC_MSG_RESULT(no)
+ found_ipv6=no])
+
+AC_MSG_CHECKING([for struct if_laddrconf])
+AC_TRY_LINK([
+#include <sys/types.h>
+#include <net/if6.h>
+],[ struct if_laddrconf a; ],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRCONF, ,
+ [ISC: have struct if_laddrconf?])],
+ [AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING([for struct if_laddrreq])
+AC_TRY_LINK([
+#include <sys/types.h>
+#include <net/if6.h>
+],[ struct if_laddrreq a; ],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRREQ, ,
+ [ISC: have struct if_laddrreq?])],
+ [AC_MSG_RESULT(no)])
+
+case "$found_ipv6" in
+ yes)
+ AC_DEFINE(ISC_PLATFORM_HAVEIPV6, ,[ISC: Have IPv6?])
+ AC_DEFINE(WANT_IPV6, ,[ISC: Want IPv6?])
+
+ AC_MSG_CHECKING(for in6_pktinfo)
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+$isc_netinetin6_hack
+$isc_netinet6in6_hack
+],
+ [struct in6_pktinfo xyzzy; return (0);],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(ISC_PLATFORM_HAVEIN6PKTINFO, ,
+ [ISC: Have struct in6_pktinfo?])],
+ [AC_MSG_RESULT(no -- disabling runtime ipv6 support)])
+
+ AC_MSG_CHECKING(for in6addr_any)
+ AC_TRY_LINK([
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+$isc_netinetin6_hack
+$isc_netinet6in6_hack
+$isc_in_addr6_hack
+],
+ [struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+ AC_DEFINE(ISC_PLATFORM_NEEDIN6ADDRANY, ,
+ [ISC: Need in6addr_any?])]
+ )
+ ;;
+esac
+
+#
+# Look for a sysctl call to get the list of network interfaces.
+#
+AC_MSG_CHECKING(for interface list sysctl)
+AC_EGREP_CPP(found_rt_iflist, [
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/socket.h>
+#ifdef NET_RT_IFLIST
+found_rt_iflist
+#endif
+],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_IFLIST_SYSCTL,1,[ISC: Use iflist_sysctl?])],
+ [AC_MSG_RESULT(no)])
+
case "$build" in
$host)
;;
@@ -3358,39 +3653,55 @@ esac
AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info])
-# HMS: I think we avoid this problem now...
-## This is necessary so that .o files in LIBOBJS are also built via
-## the ANSI2KNR-filtering rules.
-#LIB@&t@OBJS=`echo "$LIB@&t@OBJS" | sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
+AC_SUBST(ARLIB_DIR)
+if test -d $srcdir/arlib
+then
+ AC_ARG_WITH(arlib,
+ AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
+ [ans=$withval], [ans=no])
+
+ case "$ans" in
+ yes)
+ ARLIB_DIR=arlib
+ AC_CONFIG_SUBDIRS(arlib)
+ ;;
+ esac
+fi
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(ElectricFence/Makefile)
AC_CONFIG_FILES(adjtimed/Makefile)
AC_CONFIG_FILES(clockstuff/Makefile)
AC_CONFIG_FILES(include/Makefile)
+AC_CONFIG_FILES(include/isc/Makefile)
AC_CONFIG_FILES(kernel/Makefile)
AC_CONFIG_FILES(kernel/sys/Makefile)
AC_CONFIG_FILES(libntp/Makefile)
AC_CONFIG_FILES(libparse/Makefile)
-AC_CONFIG_FILES(librsaref/Makefile)
AC_CONFIG_FILES(ntpd/Makefile)
AC_CONFIG_FILES(ntpdate/Makefile)
AC_CONFIG_FILES(ntpdc/Makefile)
+AC_CONFIG_FILES(ntpdc/nl.pl, [chmod +x ntpdc/nl.pl])
AC_CONFIG_FILES(ntpq/Makefile)
-AC_CONFIG_FILES(ntptrace/Makefile)
AC_CONFIG_FILES(parseutil/Makefile)
AC_CONFIG_FILES(scripts/Makefile)
-AC_CONFIG_FILES(scripts/calc_tickadj)
-AC_CONFIG_FILES(scripts/checktime)
-AC_CONFIG_FILES(scripts/freq_adj)
-AC_CONFIG_FILES(scripts/mkver)
-AC_CONFIG_FILES(scripts/ntp-wait)
-AC_CONFIG_FILES(scripts/ntpsweep)
-AC_CONFIG_FILES(scripts/ntpver)
-AC_CONFIG_FILES(scripts/plot_summary)
-AC_CONFIG_FILES(scripts/summary)
+AC_CONFIG_FILES(scripts/calc_tickadj, [chmod +x scripts/calc_tickadj])
+AC_CONFIG_FILES(scripts/checktime, [chmod +x scripts/checktime])
+AC_CONFIG_FILES(scripts/freq_adj, [chmod +x scripts/freq_adj])
+AC_CONFIG_FILES(scripts/mkver, [chmod +x scripts/mkver])
+AC_CONFIG_FILES(scripts/ntp-wait, [chmod +x scripts/ntp-wait])
+AC_CONFIG_FILES(scripts/ntpsweep, [chmod +x scripts/ntpsweep])
+AC_CONFIG_FILES(scripts/ntptrace, [chmod +x scripts/ntptrace])
+AC_CONFIG_FILES(scripts/ntpver, [chmod +x scripts/ntpver])
+AC_CONFIG_FILES(scripts/plot_summary, [chmod +x scripts/plot_summary])
+AC_CONFIG_FILES(scripts/summary, [chmod +x scripts/summary])
AC_CONFIG_FILES(util/Makefile)
-AC_CONFIG_COMMANDS(default, [[chmod +x scripts/calc_tickadj scripts/checktime scripts/freq_adj scripts/mkver scripts/ntp-wait scripts/ntpsweep scripts/ntpver scripts/plot_summary scripts/summary]], [])
+case "$MAKE_SNTP" in
+ '') ;;
+ *)
+ AC_CONFIG_SUBDIRS(sntp)
+ ;;
+esac
AC_OUTPUT
diff --git a/contrib/ntp/depcomp b/contrib/ntp/depcomp
index 65899658ee7f..aea3d00785da 100755
--- a/contrib/ntp/depcomp
+++ b/contrib/ntp/depcomp
@@ -31,7 +31,16 @@ if test -z "$depmode" || test -z "$source" || test -z "$object"; then
fi
# `libtool' can also be set to `yes' or `no'.
-depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
+if test -z "$depfile"; then
+ base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+ dir=`echo "$object" | sed 's,/.*$,/,'`
+ if test "$dir" = "$object"; then
+ dir=
+ fi
+ # FIXME: should be _deps on DOS.
+ depfile="$dir.deps/$base"
+fi
+
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
@@ -197,18 +206,61 @@ aix)
rm -f "$tmpdepfile"
;;
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
tru64)
- # The Tru64 AIX compiler uses -MD to generate dependencies as a side
+ # The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
- tmpdepfile1="$object.d"
- tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
if test "$libtool" = yes; then
+ tmpdepfile1="$dir.libs/$base.lo.d"
+ tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
+ tmpdepfile1="$dir$base.o.d"
+ tmpdepfile2="$dir$base.d"
"$@" -MD
fi
@@ -240,34 +292,42 @@ tru64)
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
- test -z "$dashmflag" && dashmflag=-M
- ( IFS=" "
- case " $* " in
- *" --mode=compile "*) # this is libtool, let us make it quiet
- for arg
- do # cycle over the arguments
- case "$arg" in
- "--mode=compile")
- # insert --quiet before "--mode=compile"
- set fnord "$@" --quiet
- shift # fnord
- ;;
- esac
- set fnord "$@" "$arg"
- shift # fnord
- shift # "$arg"
- done
+ # always write the proprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
;;
esac
- "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
@@ -285,36 +345,40 @@ dashXmstdout)
;;
makedepend)
- # X makedepend
- (
- shift
- cleared=no
- for arg in "$@"; do
- case $cleared in no)
- set ""; shift
- cleared=yes
- esac
- case "$arg" in
- -D*|-I*)
- set fnord "$@" "$arg"; shift;;
- -*)
- ;;
- *)
- set fnord "$@" "$arg"; shift;;
- esac
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
- touch "$tmpdepfile"
- ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no
+ for arg in "$@"; do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix="`echo $object | sed 's/^.*\././'`"
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tail +3 "$tmpdepfile" | tr ' ' '
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
@@ -324,35 +388,39 @@ makedepend)
cpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
- ( IFS=" "
- case " $* " in
- *" --mode=compile "*)
- for arg
- do # cycle over the arguments
- case $arg in
- "--mode=compile")
- # insert --quiet before "--mode=compile"
- set fnord "$@" --quiet
- shift # fnord
- ;;
- esac
- set fnord "$@" "$arg"
- shift # fnord
- shift # "$arg"
- done
+ # always write the proprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
;;
esac
- "$@" -E |
+ done
+
+ "$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
@@ -364,32 +432,25 @@ msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
- ( IFS=" "
- case " $* " in
- *" --mode=compile "*)
- for arg
- do # cycle over the arguments
- case $arg in
- "--mode=compile")
- # insert --quiet before "--mode=compile"
- set fnord "$@" --quiet
- shift # fnord
- ;;
- esac
+ "$@" || exit $?
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
set fnord "$@" "$arg"
- shift # fnord
- shift # "$arg"
- done
- ;;
+ shift
+ shift
+ ;;
esac
- "$@" -E |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
- ) &
- proc=$!
- "$@"
- stat=$?
- wait "$proc"
- if test "$stat" != 0; then exit $stat; fi
+ done
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
diff --git a/contrib/ntp/flock-build b/contrib/ntp/flock-build
index dc691759a865..80dadc344f00 100755
--- a/contrib/ntp/flock-build
+++ b/contrib/ntp/flock-build
@@ -3,21 +3,30 @@
BUILD_ARGS="$@"
PARSE="--enable-parse-clocks"
#PARSE=
+SNTP="--with-sntp"
-# baldwin sparc-sun-solaris2.7
-# bridgeport sparc-sun-solaris2.6
-# * bunnylou alpha-dec-osf4.0
-# * churchy alpha-dec-osf5.1
-# cowbird alpha-dec-osf4.0
-# grundoon sparc-sun-sunos4.1.3
-# * hepzibah freebsd-4
-# malarky sparc-sun-solaris2.8
-# * pogo sparc-sun-solaris2.8
-# * porkypine mips-dec-ultrix4.4
-# * rackety sparc-sun-sunos4.1.3/cc
+# Backroom:
+# beauregard freebsd-4
+# deacon sparc-sun-solaris2.7
+# grundoon sparc-sun-sunos4.1.3
+# howland freebsd-4
+# mort sparc-sun-solaris2.8
+# whimsy sparc-sun-solaris2.8
+
+# Campus:
+# * albert redhat-8
+# baldwin sparc-sun-solaris2.8
+# bridgeport sparc-sun-solaris2.8
+# * bunnylou alpha-dec-osf4.0
+# * churchy alpha-dec-osf5.1
+# cowbird alpha-dec-osf4.0
+# * hepzibah freebsd-4
+# malarky sparc-sun-solaris2.8
+# * pogo sparc-sun-solaris2.8
+# * porkypine mips-dec-ultrix4.4
+# * rackety sparc-sun-sunos4.1.3/cc
# ? roogey debian
-# * snavely hppa1.1-hp-hpux10.20
-# whimsy sparc-sun-solaris2.8
+# * snavely hppa1.1-hp-hpux10.20
c_d=`pwd`
@@ -25,7 +34,7 @@ SIG=`perl -e 'print rand'`
echo $SIG > .buildkey
case "$LIST" in
- '') LIST="bunnylou churchy hepzibah pogo porkypine rackety snavely" ;;
+ '') LIST="albert bunnylou churchy hepzibah pogo porkypine rackety snavely" ;;
esac
for i in $LIST
@@ -33,14 +42,12 @@ do
echo $i
case "1" in
0)
- ssh $i "cd $c_d ; ./build $SIG $PARSE $BUILD_ARGS" &
- ssh $i "cd $c_d ; ./build $SIG $PARSE --with-crypto=autokey $BUILD_ARGS" &
- ssh $i "cd $c_d ; ./build $SIG $PARSE --without-crypto $BUILD_ARGS" &
+ ssh $i "cd $c_d ; ./build $SIG $PARSE $SNTP $BUILD_ARGS" &
+ ssh $i "cd $c_d ; ./build $SIG $PARSE $SNTP --without-crypto $BUILD_ARGS" &
;;
1) ssh $i "cd $c_d ; \
-./build $SIG $PARSE $BUILD_ARGS ; \
-./build $SIG $PARSE --with-crypto=autokey $BUILD_ARGS ; \
-./build $SIG $PARSE --without-crypto $BUILD_ARGS" &
+./build $SIG $PARSE $SNTP $BUILD_ARGS ; \
+./build $SIG $PARSE $SNTP --without-crypto $BUILD_ARGS" &
;;
esac
done
diff --git a/contrib/ntp/html/accopt.html b/contrib/ntp/html/accopt.html
new file mode 100644
index 000000000000..f54852a0c776
--- /dev/null
+++ b/contrib/ntp/html/accopt.html
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Access Control Options</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Access Control Options</h3>
+ <img src="pic/pogo6.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>The skunk watches for intruders and sprays.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:02 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#acx">Access Control Support</a>
+ <li class="inline"><a href="#kiss">The Kiss-of-Death Packet</a>
+ <li class="inline"><a href="#cmd">Access Control Commands</a>
+ </ul>
+ <hr>
+ <h4 id="acx">Access Control Support</h4>
+ The<tt> ntpd</tt> daemon implements a general purpose address/mask based restriction list. The list contains address/match entries sorted first by increasing address values and and then by increasing mask values. A match occurs when the bitwise AND of the mask and the packet source address is equal to the bitwise AND of the mask and address in the list. The list is searched in order with the last match found defining the restriction flags associated with the entry. Additional information and examples can be found in the <a href="notes.html">Notes on Configuring NTP and Setting up a NTP Subnet</a> page.
+ <p>The restriction facility was implemented in conformance with the access policies for the original NSFnet backbone time servers. Later the facility was expanded to deflect cryptographic and clogging attacks. While this facility may be useful for keeping unwanted or broken or malicious clients from congesting innocent servers, it should not be considered an alternative to the NTP authentication facilities. Source address based restrictions are easily circumvented by a determined cracker.</p>
+ <p>Clients can be denied service because they are explicitly included in the restrict list created by the <tt>restrict</tt> command or implicitly as the result of cryptographic or rate limit violations. Cryptographic violations include certificate or identity verification failure; rate limit violations generally result from defective NTP&nbsp;implementations that send packets at abusive rates. Some violations cause denied service only for the offending packet, others cause denied service for a timed period and others cause the denied service for an indefinate period. When a client or network is denied access for an indefinate period, the only way at present to remove the restrictions is by restarting the server.</p>
+ <h4 id="kiss">The Kiss-of-Death Packet</h4>
+ <p>Ordinarily, packets denied service are simply dropped with no further action except incrementing statistics counters. Sometimes a more proactive response is needed, such as a server message that explicitly requests the client to stop sending and leave a message for the system operator. A special packet format has been created for this purpose called the &quot;kiss-o'-death&quot; (KoD) packet. KoD packets have the leap bits set unsynchronized and stratum set to zero and the reference identifier field set to a four-byte ASCII code. If the <tt>noserve</tt> or <tt>notrust</tt> flag of the matching restrict list entry is set, the code is &quot;DENY&quot;; if the <tt>limited</tt> flag is set and the rate limit is exceeded, the code is &quot;RATE&quot;. Finally, if a cryptographic violation occurs, the code is &quot;CRYP&quot;.</p>
+ <p>A client receiving a KoD performs a set of sanity checks to minimize security exposure, then updates the stratum and reference identifier peer variables, sets the access denied (TEST4) bit in the peer flash variable and sends a message to the log. As long as the TEST4 bit is set, the client will send no further packets to the server. The only way at present to recover from this condition is to restart the protocol at both the client and server. This happens automatically at the client when the association times out. It will happen at the server only if the server operator cooperates.</p>
+ <h4 id="cmd">Access Control Commands</h4>
+ <dl>
+ <dt><tt>discard [ average <i>avg</i> ][ minimum <i>min</i> ] [ monitor <i>prob</i> ]</tt>
+ <dd>Set the parameters of the <tt>limited</tt> facility which protects the server from client abuse. The <tt>average</tt> subcommand specifies the minimum average packet spacing, while the <tt>minimum</tt> subcommand specifies the minimum packet spacing. Packets that violate these minima are discarded and a kiss-o'-death packet returned if enabled. The default minimum average and minimum are 5 and 2, respectively. The monitor subcommand specifies the probability of discard for packets that overflow the rate-control window. <dt><tt>restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt>
+ <dd>The <i><tt>address</tt></i> argument expressed in dotted-quad form is the address of a host or network. Alternatively, the <tt><i>address</i></tt> argument can be a valid host DNS&nbsp;name. The <i><tt>mask</tt></i> argument expressed in dotted-quad form defaults to <tt>255.255.255.255</tt>, meaning that the <i><tt>address</tt></i> is treated as the address of an individual host. A default entry (address <tt>0.0.0.0</tt>, mask <tt>0.0.0.0</tt>) is always included and is always the first entry in the list. Note that text string <tt>default</tt>, with no mask option, may be used to indicate the default entry.
+ <dd>In the current implementation, <i><tt>flag</tt></i> always restricts access, i.e., an entry with no flags indicates that free access to the server is to be given. The flags are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags can generally be classed into two catagories, those which restrict time service and those which restrict informational queries and attempts to do run-time reconfiguration of the server. One or more of the following flags may be specified:
+ <dl>
+ <dt><tt>ignore</tt>
+ <dd>Deny packets of all kinds, including <tt>ntpq</tt> and <tt>ntpdc</tt> queries.
+ <dt><tt>kod</tt>
+ <dd>If this flag is set when an access violation occurs, a kiss-o'-death (KoD) packet is sent. KoD packets are rate limited to no more than one per second. If another KoD packet occurs within one second after the last one, the packet is dropped <dt><tt>limited</tt>
+ <dd>Deny service if the packet spacing violates the lower limits specified in the <tt>discard</tt> command. A history of clients is kept using the monitoring capability of <tt>ntpd</tt>. Thus, monitoring is always active as long as there is a restriction entry with the <tt>limited</tt> flag.
+ <dt><tt>lowpriotrap</tt>
+ <dd>Declare traps set by matching hosts to be low priority. The number of traps a server can maintain is limited (the current limit is 3). Traps are usually assigned on a first come, first served basis, with later trap requestors being denied service. This flag modifies the assignment algorithm by allowing low priority traps to be overridden by later requests for normal priority traps.
+ <dt><tt>nomodify</tt>
+ <dd>Deny <tt>ntpq</tt> and <tt>ntpdc</tt> queries which attempt to modify the state of the server (i.e., run time reconfiguration). Queries which return information are permitted.
+ <dt><tt>noquery</tt>
+ <dd>Deny <tt>ntpq</tt> and <tt>ntpdc</tt> queries. Time service is not affected.
+ <dt><tt>nopeer</tt>
+ <dd>Deny packets which would result in mobilizing a new association. &nbsp;This includes broadcast and symmetric active packets when a configured association does not exist.
+ <dt><tt>noserve</tt>
+ <dd>Deny all packets except <tt>ntpq</tt> and <tt>ntpdc</tt> queries.
+ <dt><tt>notrap</tt>
+ <dd>Decline to provide mode 6 control message trap service to matching hosts. The trap service is a subsystem of the <tt>ntpdq</tt> control message protocol which is intended for use by remote event logging programs.
+ <dt><tt>notrust</tt>
+ <dd>Deny service unless the packet is cryptographically authenticated.
+ <dt><tt>ntpport</tt>
+ <dd>This is actually a match algorithm modifier, rather than a restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). Both <tt>ntpport</tt> and <tt>non-ntpport</tt> may be specified. The <tt>ntpport</tt> is considered more specific and is sorted later in the list.
+ <dt><tt>version</tt>
+ <dd>Deny packets that do not match the current NTP version.
+ </dl>
+ <dd>Default restriction list entries with the flags <tt>ignore, interface, ntpport</tt>, for each of the local host's interface addresses are inserted into the table at startup to prevent the server from attempting to synchronize to its own time. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted).
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/assoc.html b/contrib/ntp/html/assoc.html
new file mode 100644
index 000000000000..b4b8a99d8dfc
--- /dev/null
+++ b/contrib/ntp/html/assoc.html
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Association Management</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Association Management</h3>
+ <img src="pic/alice51.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>Make sure who your friends are.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:03 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#modes">Association Modes</a>
+ <li class="inline"><a href="#client">Client/Server Mode</a>
+ <li class="inline"><a href="#symact">Symmetric Active/Passive Mode</a>
+ <li class="inline"><a href="#broad">Broadcast/Multicast Modes</a>
+ <li class="inline"><a href="#umlt">Multicasting</a>
+ <li class="inline"><a href="#umlt">Multicasting</a>
+ <li class="inline"><a href="#burst">Burst Modes</a>
+ </ul>
+ <hr>
+ <h4 id="modes">Association Modes</h4>
+ <p>NTP Version 4 (NTPv4) incorporates new features and refinements to the NTP Version 3 (NTPv3) algorithms; however, it continues the tradition of backwards compatibility with older versions. A number of new operating modes for automatic server discovery and improved accuracy in occasionally connected networks are provided. Following is an overview of the new features; additional information is available on the <a href="confopt.html">Configuration Options</a> and <a href="authopt.html">Authentication Options</a> pages and in the papers, reports, memoranda and briefings at <a href="http://www.ntp.org">www.ntp.org</a>.</p>
+ <p>There are two types of associations: persistent associations, which result from configuration file commands, and ephemeral associations, which result from protocol operations described below. A persistent association is never demobilized, although it may become dormant when the associated server becomes unreachable. An ephemeral association is mobilized when a message arrives from a server; for instance, a symmetric passive association is mobilized upon arrival of a symmetric active message. A broadcast client association is mobilized upon arrival of a broadcast server message, while a Manycast client association is mobilized upon arrival of a Manycast server message.</p>
+ <p>Ordinarily, successful mobilization of an ephemeral association requires the server to be cryptographically authenticated to the dependent client. This can be done using either symmetric-key or public-key cryptography, as described in the <a href="authopt.html">Authentication Options</a> page. The cryptographic means insure an unbroken chain of trust between the dependent client and the primary servers at the root of the synchronization subnet. We call this chain the <i>provenance</i> of the client and define new vocabulary as to proventicate a client or provide proventic credentials. Once mobilized, ephemeral associations are demobilized when either (a) the server becomes unreachable or (b) the server refreshes the key media without notifying the client.</p>
+ <p>There are three principal modes of operation: client/server, symmetric active/passive and broadcast. In addition, there are two modes using IP multicast support: multicast and manycast. These modes are selected based on the scope of service, intended flow of time and proventic values and means of configuration. Following is a summary of the operations in each mode.</p>
+ <h4 id="client">Client/Server Mode</h4>
+ <p>Client/server mode is probably the most common configuration in the Internet today. It operates in the classic remote-procedure-call (RPC) paradigm with stateless servers. In this mode a client sends a request to the server and expects a reply at some future time. In some contexts this would be described as a &quot;pull&quot; operation, in that the client pulls the time and proventic values from the server. A client is configured in client mode using the <tt>server</tt> (sic) command and specifying the server IPv4 or IPv6 DNS name or address; the server requires no prior configuration. The original NTPv3 authentication scheme is applicable in this mode, as well as the new NTPv4 Autokey proventication scheme. In addition, two burst modes described below can be used in appropriate cases.</p>
+ <h4 id="symact">Symmetric Active/Passive Mode</h4>
+ <p>Symmetric active/passive mode is intended for configurations were a clique of low-stratum peers operate as mutual backups for each other. Each peer operates with one or more primary reference sources, such as a radio clock, or a subset of secondary servers known to be reliable and proventicated. Should one of the peers lose all reference sources or simply cease operation, the other peers will automatically reconfigure so that time and proventication values can flow from the surviving peers to all the others in the clique. In some contexts this would be described as a &quot;push-pull&quot; operation, in that the peer either pulls or pushes the time and proventic values depending on the particular configuration.</p>
+ <p>Symmetric peers operate with their sources in some NTP mode and with each other in symmetric mode. A peer is configured in symmetric active mode using the <tt>peer</tt> command and specifying the other peer IPv4 or IPv6 DNS name or address. The other peer can also be configured in symmetric active mode in a similar way. However, if the other peer is not specifically configured in this way, a symmetric passive association is mobilized upon arrival of a symmetric active message. Since an intruder can impersonate a symmetric active peer and inject false time values, symmetric mode should always be cryptographically validated. The original NTPv3 authentication scheme is applicable in this mode, as well as the new NTPv4 Autokey proventication scheme.</p>
+ <h4 id="broad">Broadcast/Multicast Modes</h4>
+ <p>IPv4 broadcast mode in both NTPv3 and NTPv4 is limited to directly connected subnets such as Ethernets which support broadcast technology. Ordinarily, this technology does not operate beyond the first hop router or gateway. In IPv6 and where service is intended beyond the local subnet, IP multicasting can be used where supported by the operating system and the routers support the Internet Group Management Protocol (IGMP). Most current kernels and available routers do support IP multicast technology, although service providers are sometimes reluctant to deploy it.</p>
+ <p>IPv4 broadcast mode is intended for configurations involving one or a few servers and a possibly very large client population on the same subnet. A broadcast server is configured using the <tt>broadcast</tt> command and a IPv4 local subnet broadcast address. A broadcast client is configured using the <tt>broadcastclient</tt> command, in which case it responds to broadcast messages received on any interface. Since an intruder can impersonate a broadcast server and inject false time values, this mode should always be cryptographically validated. The original NTPv3 authentication scheme is applicable in this mode, as well as the new NTPv4 Autokey proventication scheme.</p>
+ <p>The server generates broadcast messages continuously at intervals specified by the <tt>minpoll</tt> keyword and with a time-to-live span specified by the <tt>ttl</tt> keyword. A broadcast client responds to the first message received by waiting a short interval to avoid implosion at the server. Then, the client polls the server in burst mode in order to quickly set the host clock and validate the source. This normally results in a volley of eight client/server cycles at 2-s intervals during which both the synchronization and cryptographic protocols run concurrently. Following the volley, the client computes the offset between the apparent broadcast time and the (unicast) client time. This offset is used to compensate for the propagation time between the broadcast server and client. Once the offset is computed, the server continues as before and the client sends no further messages. If for some reason the broadcast server does not respond to client messages, the client will time out the volley and continue in listen-only mode with a default propagation delay.</p>
+ <h4 id="umlt">Multicasting</h4>
+ <p>Multicasting can be used to extend the scope of a timekeeping subnet in two ways: multicasting and manycasting. A general discussion of IP multicast technology is beyond the scope of this page. In simple terms a host or router sending to a IPv4 or IPv6 multicast group address expects all hosts or routers listening on this address to receive the message. There is no intrinsic limit on the number of senders or receivers and senders can be receivers and vice versa. The IANA has assigned multicast group address IPv4 224.0.1.1 and IPv6 FF05::101 (site local) to NTP, but these addresses should be used only where the multicast span can be reliably constrained to protect neighbor networks. In general, administratively scoped IPv4 group addresses should be used, as described in RFC-2365, or GLOP group addresses, as described in RFC-2770.</p>
+ <p>A multicast server is configured using the <tt>broadcast</tt> command, but with a multicast group address instead of a broadcast address. A multicast client is configured using the <tt>multicastclient</tt> command with a multicast group address. However, there is a subtle difference between IPv4 broadcasting and multicasting. IPv4 broadcasting is specific to each interface and local subnet address. If more than one interface is attached to a machine, a separate <tt>broadcast</tt> command applies to each one separately. This provides a way to limit exposure in a firewall, for example. For IPv6 the same distinction can be made using link-local prefix FF02 for each interface and site-local FF05 for all interfacesl.</p>
+ <p>IP multicasting is a different paradigm. By design, multicast messages travel from the sender via a shortest-path or shared tree to the receivers, which may require these messages emit from one or all interfaces, but carry a common source address. However, it is possible to configure multiple multicast group addresses using multiple <tt>broadcast</tt> or <tt>multicastclient</tt> commands. Other than these particulars, multicast messages are processed just like broadcast messages. Note that the calibration feature in broadcast mode is extremely important, since IP multicast messages can travel far different paths through the IP routing fabric than ordinary IP unicast messages.</p>
+ <h4 id="many">Manycasting</h4>
+ <p>Manycasting is a automatic discovery and configuration paradigm new to NTPv4. It is intended as a means for a multicast client to troll the nearby network neighborhood to find cooperating manycast servers, validate them using cryptographic means and evaluate their time values with respect to other servers that might be lurking in the vicinity. The intended result is that each manycast client mobilizes client associations with some number of the &quot;best&quot; of the nearby anycast servers, yet automatically reconfigures to sustain this number of servers should one or another fail. Additional information is on the <a href="manyopt.html">Automatic NTP Configuration Options</a> page.</p>
+ <h4 id="burst">Burst Modes</h4>
+ <p>There are two burst modes where a single poll event triggers a burst of eight packets at 2-s intervals instead of the usual one. The <tt>burst</tt> mode sends a burst when the server is reachable, while the <tt>iburst</tt> mode sends a burst when the server is unreachable. Each mode is independently of the other and both can be used if necessary. The <tt>calldelay</tt> command can be used to increase the interval between the first and second packets in the burst in order to allow a modem to complete a call. Received server packets update the clock filter, which selects the best (most accurate) time values. When the last packet in the burst is sent, the next received packet updates the system variables and sets the system clock in the usual manner, as if only a single client/server cycle had occurred. The result is not only a rapid and reliable setting of the system clock, but a considerable reduction in network jitter.</p>
+ <p>The <tt>iburst</tt> keyword is used where it is important to set the clock quickly when an association is first mobilized or first becomes reachable or when the network attachment requires an initial calling or training procedure. The burst is initiated only when the server first becomes reachable and results in good accuracy with intermittent connections typical of PPP and ISDN services. Outlyers due to initial dial-up delays, etc., are avoided and the client sets the clock within a few seconds after the first message.</p>
+ <p>The <tt>burst</tt> keyword can be configured in cases of excessive network jitter or when the network attachment requires an initial calling or training procedure. The burst is initiated at each poll interval when the server is reachable. The burst does produce additional network overhead and can cause trouble if used indiscriminately. It should only be used where the poll interval is expected to settle to values at or above 1024 s.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/audio.html b/contrib/ntp/html/audio.html
new file mode 100644
index 000000000000..64b241227869
--- /dev/null
+++ b/contrib/ntp/html/audio.html
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Reference Clock Audio Drivers</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Reference Clock Audio Drivers</h3>
+ <img src="pic/radio2.jpg" alt="jpg" align="left">ICOM R-72 shortwave receiver and Sure audio mixer
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:04 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links8.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#sound">Sound Card Drivers</a>
+ <li class="inline"><a href="#short">Shortwave Radio Drivers</a>
+ <li class="inline"><a href="#setup">Setup and Debugging Aids</a>
+ </ul>
+ <hr>
+ <h4 id="sound">Sound Card Drivers</h4>
+ <p>There are some applications in which the computer time can be disciplined to an audio signal, rather than a serial timecode and communications port or special purpose bus peripheral. This is useful in such cases where the audio signal is sent over a telephone circuit, for example, or received directly from a shortwave receiver. In such cases the audio signal can be connected via an ordinary sound card or baseboard audio codec. The suite of NTP reference clock drivers currently includes three drivers suitable for these applications. They include a driver for the Inter Range Instrumentation Group (IRIG) signals produced by many radio clocks and timing devices, another for the Canadian time/frequency radio station CHU and a third for the NIST time/frequency radio stations WWV and WWVH. The radio drivers are designed to work with ordinary inexpensive shortwave radios and may be one of the least expensive ways to build a good primary time server.</p>
+ <p>All three drivers make ample use of sophisticated digital signal processing algorithms designed to efficiently extract timing signals from noise and interference. The radio station drivers in particular implement optimum linear demodulation and decoding techniques, including maximum likelihood and soft-decision methods. The documentation page for each driver contains an in-depth discussion on the algorithms and performance expectations. In some cases the algorithms are further analyzed, modelled and evaluated in a technical report.</p>
+ <p>Currently, the audio drivers work with with Sun operating systems and audio codecs, including SunOS 4.1.3 and Solaris from 2.6 and probably all others in between. They also work with FreeBSD from 4.1 with compatible sound card. In fact, the interface is quite generic and support for other systems, in particular the various Unix generics, should not be difficult. Volunteers are solicited.</p>
+ <p>The audio drivers include a number of common features designed to groom input signals, suppress spikes and normalize signal levels. An automatic gain control (AGC) feature provides protection against overdriven or underdriven input signals. It is designed to maintain adequate demodulator signal amplitude while avoiding occasional noise spikes. In order to assure reliable operation, the signal level must be in the range where the audio gain control is effective. In general, this means the input signal level must be such as to cause the AGC to set the gain somewhere in the middle of the range from 0 to 255, as indicated in the timecode displayed by the <tt>ntpq</tt> program.</p>
+ <p>The drivers operate by disciplining a logical clock based on the codec sample clock to the audio signal as received. This is done by stuffing or slipping samples as required to maintain exact frequency to the order of 0.1 PPM. In order for the driver to reliably lock on the audio signal, the sample clock frequency tolerance must be less than 250 PPM (.025 percent) for the IRIG driver and half that for the radio drivers. The largest error observed so far is about 60 PPM, but it is possible some sound cards or codecs may exceed that value.</p>
+ <p>The drivers include provisions to select the input port and to monitor the input signal. The <tt>fudge flag 2</tt> selects the microphone port if set to zero or the line-in port if set to one. It does not seem useful to specify the compact disc player port. The <tt>fudge flag 3</tt> enables the input signal monitor using the previously selected output port and output gain. Both of these flags can be set in the configuration file or remotely using the <tt>ntpdc</tt> utility program.</p>
+ <h4 id="short">Shortwave Radio Drivers</h4>
+ <p>The WWV/H and CHU audio drivers require an external shortwave radio with the radio output - speaker or headphone jack - connected to either the microphone or line-in port on the computer. There is some degree of art in setting up the radio and antenna and getting the setup to work. While the drivers are highly sophisticated and efficient in extracting timing signals from noise and interference, it always helps to have as clear a signal as possible.</p>
+ <p>The most important factor affecting the radio signal is the antenna. It need not be long - even 15 feet is enough if it is located outside of a metal frame building, preferably on the roof, and away from metallic objects. An ordinary CB whip mounted on a PVC pipe and wooden X-frame on the roof should work well with most portable radios, as they are optimized for small antennas.</p>
+ <p>The radio need not be located near the computer; in fact, it generally works better if the radio is outside the near field of computers and other electromagnetic noisemakers. It can be in the elevator penthouse connected by house wiring, which can also be used to power the radio. A couple of center-tapped audio transformers will minimize noise pickup and provide phantom power to the radio with return via the building ground.</p>
+ <p>The WWV/H and CHU transmitters operate on several frequencies simultaneously, so that in most parts of North America at least one frequency supports propagation to the receiver location at any given hour. While both drivers support the ICOM CI-V radio interface and can tune the radio automatically, computer-tunable radios are expensive and probably not cost effective compared to a GPS receiver. So, the radio frequency must usually be fixed and chosen by compromise.</p>
+ <p>Shortwave (3-30 MHz) radio propagation phenomena are well known to shortwave enthusiasts. The phenomena generally obey the following rules:</p>
+ <ul>
+ <li>The optimum frequency is higher in daytime than nighttime, stays high longer on summer days and low longer on winter nights.
+ <li>Transitions between daytime and nightime conditions generally occur somewhat after sunrise and sunset at the midpoint of the path from transmitter to receiver.
+ <li>Ambient noise (static) on the lower frequencies follows the thunderstorm season, so is higher on summer afternoons and evenings.
+ <li>The lower frequency bands are best for shorter distances, while the higher bands are best for longer distances.
+ <li>The optimum frequencies are higher at the peak of the 11-year sunspot cycle and lower at the trough. The current sunspot cycle should peak in the first couple of years beginning the century.
+ </ul>
+ <p>The best way to choose a frequency is to listen at various times over the day and determine the best highest (daytime) and lowest (nighttime) frequencies. Then, assuming one is available, choose the highest frequency between these frequencies. This strategy assumes that the high frequency is more problematic than the low, that the low frequency probably comes with severe multipath and static, and insures that probably twice a day the chosen frequency will work. For instance, on the east coast the best compromise CHU frequency is probably 7335 kHz and the best WWV frequency is probably 15 MHz.</p>
+ <h4 id="setup">Setup and Debugging Aids</h4>
+ <p>The audio drivers include extensive setup and debugging support to help hook up the audio signals and monitor the driver operations. The documentation page for each driver describes the various messages that can be produced either in real time or written to the <tt>clockstats</tt> file for later analysis. Of particular help in verifying signal connections and compatibility is a provision to monitor the signal via headphones or speaker.</p>
+ <p>Connecting radios and IRIG devices to the computer and verifying correct configuration is somewhat of a black art. The signals have to be connected to the correct ports and the signal level maintained within tolerances. Some radios have recorder outputs which produce a line level signal not affected by the volume control. These signals can be connected to the line-in port on the computer. If the level is too low, connect to the microphone-in port instead. If the radio does not have a recorder output, connect the headphone or speaker output to the line-in port and adjust the volume control so the driver indicates comfortably above the minimum specified and the AGC level somewhere in the middle of the range 0-255. IRIG signals are usually much larger than radio outputs, usually in the range to several volts and may even overload the line-in port. In such cases an attenuator must be used to reduce the signal level below the overload point.</p>
+ <p>It is very easy to underdrive or overdrive the audio codec, in which case the drivers will not synchronize to the signal. The drivers use <tt>fudge flag2</tt> to enable audio monitoring of the input signal. This is useful during setup to confirm the signal is actually reaching the audio codec and generally free of hum and interference. This feature is not intended for regular use, since it does increase the processor load on the system. Note that the speaker volume must be set before the driver is started.</p>
+ <p>The drivers write a synthesized timecode to the <tt>clockstats</tt> file each time the clock is set or verified and at other times if verbose monitoring is enabled. The format includes several fixed-length fields defining the UTC time to the millisecond, together with additional variable-length fields specific to each driver. The data include the intervals since the clock was last set or verified, the audio gain and various state variables and counters specific to each driver.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/authopt.html b/contrib/ntp/html/authopt.html
new file mode 100644
index 000000000000..978d60f8d047
--- /dev/null
+++ b/contrib/ntp/html/authopt.html
@@ -0,0 +1,144 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Authentication Options</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Authentication Options</h3>
+ <img src="pic/alice44.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>Our resident cryptographer; now you see him, now you don't.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:05 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links9.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#auth">Authentication Support</a>
+ <li class="inline"><a href="#symm">Symmetric Key Cryptography</a>
+ <li class="inline"><a href="#pub">Public Key Cryptography</a>
+ <li class="inline"><a href="#auto">Autokey Dances</a>
+ <li class="inline"><a href="#inter">Operation</a>
+ <li class="inline"><a href="#key">Key Management</a>
+ <li class="inline"><a href="#cmd">Authentication Commands</a>
+ <li class="inline"><a href="#err">Error Codes</a>
+ <li class="inline"><a href="#file">Files</a>
+ </ul>
+ <hr>
+ <h4 id="auth">Authentication Support</h4>
+ <p>Authentication support allows the NTP client to verify that the server is in fact known and trusted and not an intruder intending accidentally or on purpose to masquerade as that server. The NTPv3 specification RFC-1305 defines a scheme which provides cryptographic authentication of received NTP packets. Originally, this was done using the Data Encryption Standard (DES) algorithm operating in Cipher Block Chaining (CBC) mode, commonly called DES-CBC. Subsequently, this was replaced by the RSA Message Digest 5 (MD5) algorithm using a private key, commonly called keyed-MD5. Either algorithm computes a message digest, or one-way hash, which can be used to verify the server has the correct private key and key identifier.</p>
+ <p>NTPv4 retains the NTPv3 scheme, properly described as symmetric key cryptography and, in addition, provides a new Autokey scheme based on public key cryptography. Public key cryptography is generally considered more secure than symmetric key cryptography, since the security is based on a private value which is generated by each server and never revealed. With Autokey all key distribution and management functions involve only public values, which considerably simplifies key distribution and storage. Public key management is based on X.509 certificates, which can be provided by commercial services or produced by utility programs in the OpenSSL software library or the NTPv4 distribution.</p>
+ <p>While the algorithms for symmetric key cryptography are included in the NTPv4 distribution, public key cryptography requires the OpenSSL software library to be installed before building the NTP distribution. Directions for doing that are on the <a href="build.html">Building and Installing the Distribution</a> page.</p>
+ <p>Authentication is configured separately for each association using the <tt>key</tt> or <tt>autokey</tt> subcommand on the <tt>peer</tt>, <tt>server</tt>, <tt>broadcast</tt> and <tt>manycastclient</tt> configuration commands as described in the <a href="confopt.html">Configuration Options</a> page. The authentication options described below specify the locations of the key files, if other than default, which symmetric keys are trusted and the interval between various operations, if other than default.</p>
+ <p>Authentication is always enabled, although ineffective if not configured as described below. If a NTP packet arrives including a message authentication code (MAC), it is accepted only if it passes all cryptographic checks. The checks require correct key ID, key value and message digest. If the packet has been modified in any way or replayed by an intruder, it will fail one or more of these checks and be discarded. Furthermore, the Autokey scheme requires a preliminary protocol exchange to obtain the server certificate, verify its credentials and initialize the protocol</p>
+ <p>The <tt>auth</tt> flag controls whether new associations or remote configuration commands require cryptographic authentication. This flag can be set or reset by the <tt>enable</tt> and <tt>disable</tt> commands and also by remote configuration commands sent by a <tt>ntpdc</tt> program running on another machine. If this flag is enabled, which is the default case, new broadcast/manycast client and symmetric passive associations and remote configuration commands must be cryptographically authenticated using either symmetric key or public key cryptography. If this flag is disabled, these operations are effective even if not cryptographic authenticated. It should be understood that operating with the <tt>auth</tt> flag disabled invites a significant vulnerability where a rogue hacker can masquerade as a falseticker and seriously disrupt system timekeeping. It is important to note that this flag has no purpose other than to allow or disallow a new association in response to new broadcast and symmetric active messages and remote configuration commands and, in particular, the flag has no effect on the authentication process itself.</p>
+ <p>An attractive alternative where multicast support is available is manycast mode, in which clients periodically troll for servers as described in the <a href="manyopt.html">Automatic NTP Configuration Options</a> page. Either symmetric key or public key cryptographic authentication can be used in this mode. The principle advantage of manycast mode is that potential servers need not be configured in advance, since the client finds them during regular operation, and the configuration files for all clients can be identical.</p>
+ <p>The security model and protocol schemes for both symmetric key and public key cryptography are summarized below; further details are in the briefings, papers and reports at the NTP project page linked from <a href="http://www.ntp.org">www.ntp.org</a>.</p>
+ <h4 id="symm">Symmetric Key Cryptography</h4>
+ The original RFC-1305 specification allows any one of possibly 65,534 keys, each distinguished by a 32-bit key identifier, to authenticate an association. The servers and clients involved must agree on the key and key identifier to authenticate NTP packets. Keys and related information are specified in a key file, usually called <tt>ntp.keys</tt>, which must be distributed and stored using secure means beyond the scope of the NTP protocol itself. Besides the keys used for ordinary NTP associations, additional keys can be used as passwords for the <tt><a href="ntpq.html">ntpq</a></tt> and <tt><a href="ntpdc.html">ntpdc</a></tt> utility programs.
+ <p>When <tt>ntpd</tt> is first started, it reads the key file specified in the <tt>keys</tt> configuration command and installs the keys in the key cache. However, individual keys must be activated with the <tt>trusted</tt> command before use. This allows, for instance, the installation of possibly several batches of keys and then activating or deactivating each batch remotely using <tt>ntpdc</tt>. This also provides a revocation capability that can be used if a key becomes compromised. The <tt>requestkey</tt> command selects the key used as the password for the <tt>ntpdc</tt> utility, while the <tt>controlkey</tt> command selects the key used as the password for the <tt>ntpq</tt> utility.</p>
+ <h4 id="pub">Public Key Cryptography</h4>
+ <p>NTPv4 supports the original NTPv3 symmetric key scheme described in RFC-1305 and in addition the Autokey protocol, which is based on public key cryptography. The Autokey Version 2 protocol described on the <a href="http://www.eecis.udel.edu/~mills/ident.html">Autokey Protocol</a> page verifies packet integrity using MD5 message digests and verifies the source with digital signatures and any of several digest/signature schemes. Optional identity schemes described on the <a href="http://www.eecis.udel.edu/~mills/ident.html">Identity Schemes</a> page and based on cryptographic challenge/response algorithms are also available. Using all of these schemes provides strong security against replay with or without modification, spoofing, masquerade and most forms of clogging attacks.</p>
+ <p>The cryptographic means necessary for all Autokey operations is provided by the OpenSSL software library. This library is available from <a href="http://www.openssl.org">http://www.openssl.org</a> and can be installed using the procedures outlined in the <a href="build.html">Building and Installing the Distribution</a> page. Once installed, the configure and build process automatically detects the library and links the library routines required.</p>
+ <p>The Autokey protocol has several modes of operation corresponding to the various NTP modes supported. Most modes use a special cookie which can be computed independently by the client and server, but encrypted in transmission. All modes use in addition a variant of the S-KEY scheme, in which a pseudo-random key list is generated and used in reverse order. These schemes are described along with an executive summary, current status, briefing slides and reading list on the <a href="http://www.eecis.udel.edu/~mills/autokey.html">Autonomous Authentication</a> page.</p>
+ <p>The specific cryptographic environment used by Autokey servers and clients is determined by a set of files and soft links generated by the <a href="keygen.html"><tt>ntp-keygen</tt></a> program. . This includes a required host key file, required certificate file and optional sign key file, leapsecond file and identity scheme files. The digest/signature scheme is specified in the X.509 certificate along with the matching sign key. There are several schemes available in the OpenSSL software library, each identified by a specific string such as <tt>md5WithRSAEncryption</tt>, which stands for the MD5 message digest with RSA encryption scheme. The current NTP distribution supports all the schemes in the OpenSSL library, including those based on RSA and DSA digital signatures.</p>
+ <p>NTP secure groups can be used to define cryptographic compartments and security hierarchies. It is important that every host in the group be able to construct a certificate trail to one or more trusted hosts in the same group. Each group host runs the Autokey protocol to obtain the certificates for all hosts along the trail to one or more trusted hosts. This requires the configuration file in all hosts to be engineered so that, even under anticipated failure conditions, the NTP&nbsp;subnet will form such that every group host can find a trail to at least one trusted host.</p>
+ <h4>Naming and Addressing</h4>
+ <p>It is important to note that Autokey does not use DNS&nbsp;to resolve addresses, since DNS can't be completely trusted until the name servers have synchronized clocks. The cryptographic name used by Autokey to bind the host identity credentials and cryptographic values must be independent of interface, network and any other naming convention. The name appears in the host certificate in either or both the subject and issuer fields, so protection against DNS&nbsp;compromise is essential.</p>
+ <p>By convention, the name of an Autokey host is the name returned by the Unix <tt>gethostname()</tt> system call or equivalent in other systems. By the system design model, there are no provisions to allow alternate names or aliases. However, this is not to say that DNS&nbsp;aliases, different names for each interface, etc., are constrained in any way.</p>
+ <p>It is also important to note that Autokey verifies authenticity using the host name, network address and public keys, all of which are bound together by the protocol specifically to deflect masquerade attacks. For this reason Autokey includes the source and destinatino IP&nbsp;addresses in message digest computations and so the same addresses must be available at both the server and client. For this reason operation with network address translation schemes is not possible. This reflects the intended robust security model where government and corporate NTP&nbsp;servers are operated outside firewall perimeters.</p>
+ <h4>Operation</h4>
+ <p>A specific combination of authentication scheme (none, symmetric key, public key) and identity scheme is called a cryptotype, although not all combinations are compatible. There may be management configurations where the clients, servers and peers may not all support the same cryptotypes. A secure NTPv4 subnet can be configured in many ways while keeping in mind the principles explained above and in this section. Note however that some cryptotype combinations may successfully interoperate with each other, but may not represent good security practice.</p>
+ <p>The cryptotype of an association is determined at the time of mobilization, either at configuration time or some time later when a message of appropriate cryptotype arrives. When mobilized by a <tt>server</tt> or <tt>peer</tt> configuration command and no <tt>key</tt> or <tt>autokey</tt> subcommands are present, the association is not authenticated; if the <tt>key</tt> subcommand is present, the association is authenticated using the symmetric key ID specified; if the <tt>autokey</tt> subcommand is present, the association is authenticated using Autokey.</p>
+ <p>When multiple identity schemes are supported in the Autokey protocol, the first message exchange determines which one is used. The client request message contains bits corresponding to which schemes it has available. The server response message contains bits corresponding to which schemes it has available. Both server and client match the received bits with their own and select a common scheme.</p>
+ <p>Following the principle that time is a public value, a server responds to any client packet that matches its cryptotype capabilities. Thus, a server receiving an unauthenticated packet will respond with an unauthenticated packet, while the same server receiving a packet of a cryptotype it supports will respond with packets of that cryptotype. However, unconfigured broadcast or manycast client associations or symmetric passive associations will not be mobilized unless the server supports a cryptotype compatible with the first packet received. By default, unauthenticated associations will not be mobilized unless overridden in a decidedly dangerous way.</p>
+ <p>Some examples may help to reduce confusion. Client Alice has no specific cryptotype selected. Server Bob has both a symmetric key file and minimal Autokey files. Alice's unauthenticated messages arrive at Bob, who replies with unauthenticated messages. Cathy has a copy of Bob's symmetric key file and has selected key ID 4 in messages to Bob. Bob verifies the message with his key ID 4. If it's the same key and the message is verified, Bob sends Cathy a reply authenticated with that key. If verification fails, Bob sends Cathy a thing called a crypto-NAK, which tells her something broke. She can see the evidence using the <tt>ntpq</tt> program.</p>
+ <p>Denise has rolled her own host key and certificate. She also uses one of the identity schemes as Bob. She sends the first Autokey message to Bob and they both dance the protocol authentication and identity steps. If all comes out okay, Denise and Bob continue as described above.</p>
+ <p>It should be clear from the above that Bob can support all the girls at the same time, as long as he has compatible authentication and identity credentials. Now, Bob can act just like the girls in his own choice of servers; he can run multiple configured associations with multiple different servers (or the same server, although that might not be useful). But, wise security policy might preclude some cryptotype combinations; for instance, running an identity scheme with one server and no authentication with another might not be wise.</p>
+ <h4 id="key">Key Management</h4>
+ <p>The cryptographic values used by the Autokey protocol are incorporated as a set of files generated by the <a href="keygen.html"><tt>ntp-keygen</tt></a> utility program, including symmetric key, host key and public certificate files, as well as sign key, identity parameters and leapseconds files. Alternatively, host and sign keys and certificate files can be generated by the OpenSSL utilities and certificates can be imported from public certificate authorities. Note that symmetric keys are necessary for the <tt>ntpq</tt> and <tt>ntpdc</tt> utility programs. The remaining files are necessary only for the Autokey protocol.</p>
+ <p>Certificates imported from OpenSSL or public certificate authorities have certian limitations. The certificate should be in ASN.1 syntax, X.509 Version 3 format and encoded in PEM, which is the same format used by OpenSSL. The overall length of the certificate encoded in ASN.1 must not exceed 1024 bytes. The subject distinguished name field (<tt>CN</tt>) is the fully qualified name of the host on which it is used; the remaining subject fields are ignored. The certificate extension fields must not contain either a subject key identifier or a issuer key identifier field; however, an extended key usage field for a trusted host must contain the value <tt>trustRoot</tt>;. Other extension fields are ignored.</p>
+ <h4 id="cmd">Authentication Commands</h4>
+ <dl>
+ <dt><tt>autokey [<i>logsec</i>]</tt>
+ <dd>Specifies the interval between regenerations of the session key list used with the Autokey protocol. Note that the size of the key list for each association depends on this interval and the current poll interval. The default value is 12 (4096 s or about 1.1 hours). For poll intervals above the specified interval, a session key list with a single entry will be regenerated for every message sent.
+ <dt><tt>controlkey <i>key</i></tt>
+ <dd>Specifies the key identifier to use with the <a href="ntpq.html"><tt>ntpq</tt></a> utility, which uses the standard protocol defined in RFC-1305. The <tt><i>key</i></tt> argument is the key identifier for a trusted key, where the value can be in the range 1 to 65,534, inclusive.
+ <dt><tt>crypto [cert <i>file</i>] [leap <i>file</i>] [randfile <i>file</i>] [host <i>file</i>] [sign <i>file</i>] [gq <i>file</i>] [gqpar <i>file</i>] [iffpar <i>file</i>] [mvpar <i>file</i>] [pw <i>password</i>]</tt>
+ <dd>This command requires the OpenSSL library. It activates public key cryptography, selects the message digest and signature encryption scheme and loads the required private and public values described above. If one or more files are left unspecified, the default names are used as described above. Unless the complete path and name of the file are specified, the location of a file is relative to the keys directory specified in the <tt>keysdir</tt> command or default <tt>/usr/local/etc</tt>. Following are the subcommands: <dl>
+ <dt><tt>cert <i>file</i></tt>
+ <dd>Specifies the location of the required host public certificate file. This overrides the link <tt>ntpkey_cert_<i>hostname</i></tt> in the keys directory.
+ <dt><tt>gqpar <i>file</i></tt>
+ <dd>Specifies the location of the optional GQ parameters file. This overrides the link <tt>ntpkey_gq_<i>hostname</i></tt> in the keys directory.
+ <dt><tt>host <i>file</i></tt>
+ <dd>Specifies the location of the required host key file. This overrides the link <tt>ntpkey_key_<i>hostname</i></tt> in the keys directory.
+ <dt><tt>iffpar <i>file</i></tt>
+ <dd>Specifies the location of the optional IFF parameters file.This overrides the link <tt>ntpkey_iff_<i>hostname</i></tt> in the keys directory.
+ <dt><tt>leap <i>file</i></tt>
+ <dd>Specifies the location of the optional leapsecond file. This overrides the link <tt>ntpkey_leap</tt> in the keys directory.
+ <dt><tt>mvpar <i>file</i></tt>
+ <dd>Specifies the location of the optional MV parameters file. This overrides the link <tt>ntpkey_mv_<i>hostname</i></tt> in the keys directory.
+ <dt><tt>pw <i>password</i></tt>
+ <dd>Specifies the password to decrypt files containing private keys and identity parameters. This is required only if these files have been encrypted.
+ <dt><tt>randfile <i>file</i></tt>
+ <dd>Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above.
+ <dt><tt>sign <i>file</i></tt>
+ <dd>Specifies the location of the optional sign key file. This overrides the link <tt>ntpkey_sign_<i>hostname</i></tt> in the keys directory. If this file is not found, the host key is also the sign key.
+ </dl>
+ <dt><tt>keys <i>keyfile</i></tt>
+ <dd>Specifies the complete path and location of the MD5 key file containing the keys and key identifiers used by <tt>ntpd</tt>, <tt>ntpq</tt> and <tt>ntpdc</tt> when operating with symmetric key cryptography. This is the same operation as the <tt>-k </tt>command line option.
+ <dt><tt>keysdir <i>path</i></tt>
+ <dd>This command specifies the default directory path for cryptographic keys, parameters and certificates. The default is <tt>/usr/local/etc/</tt>.
+ <dt><tt>requestkey <i>key</i></tt>
+ <dd>Specifies the key identifier to use with the <a href="ntpdc.html"><tt>ntpdc</tt></a> utility program, which uses a proprietary protocol specific to this implementation of <tt>ntpd</tt>. The <tt><i>key</i></tt> argument is a key identifier for the trusted key, where the value can be in the range 1 to 65,534, inclusive.
+ <dt><tt>revoke [<i>logsec</i>]</tt>
+ <dd>Specifies the interval between re-randomization of certain cryptographic values used by the Autokey scheme, as a power of 2 in seconds. These values need to be updated frequently in order to deflect brute-force attacks on the algorithms of the scheme; however, updating some values is a relatively expensive operation. The default interval is 16 (65,536 s or about 18 hours). For poll intervals above the specified interval, the values will be updated for every message sent.
+ <dt><tt>trustedkey <i>key</i> [...]</tt>
+ <dd>Specifies the key identifiers which are trusted for the purposes of authenticating peers with symmetric key cryptography, as well as keys used by the <tt>ntpq</tt> and <tt>ntpdc</tt> programs. The authentication procedures require that both the local and remote servers share the same key and key identifier for this purpose, although different keys can be used with different servers. The <tt><i>key</i></tt> arguments are 32-bit unsigned integers with values from 1 to 65,534.
+ </dl>
+ <h4 id="err">Error Codes</h4>
+ <p>The following error codes are reported via the NTP control and monitoring protocol trap mechanism.</p>
+ <dl>
+ <dt>101 (bad field format or length)
+ <dd>The packet has invalid version, length or format.
+ <dt>102 (bad timestamp)
+ <dd>The packet timestamp is the same or older than the most recent received. This could be due to a replay or a server clock time step.
+ <dt>103 (bad filestamp)
+ <dd>The packet filestamp is the same or older than the most recent received. This could be due to a replay or a key file generation error.
+ <dt>104 (bad or missing public key)
+ <dd>The public key is missing, has incorrect format or is an unsupported type.
+ <dt>105 (unsupported digest type)
+ <dd>The server requires an unsupported digest/signature scheme.
+ <dt>106 (mismatched digest types)
+ <dd>Not used.
+ <dt>107 (bad signature length)
+ <dd>The signature length does not match the current public key.
+ <dt>108 (signature not verified)
+ <dd>The message fails the signature check. It could be bogus or signed by a different private key.
+ <dt>109 (certificate not verified)
+ <dd>The certificate is invalid or signed with the wrong key.
+ <dt>110 (certificate not verified)
+ <dd>The certificate is not yet valid or has expired or the signature could not be verified.
+ <dt>111 (bad or missing cookie)
+ <dd>The cookie is missing, corrupted or bogus.
+ <dt>112 (bad or missing leapseconds table)
+ <dd>The leapseconds table is missing, corrupted or bogus.
+ <dt>113 (bad or missing certificate)
+ <dd>The certificate is missing, corrupted or bogus.
+ <dt>114 (bad or missing identity)
+ <dd>The identity key is missing, corrupt or bogus.
+ </dl>
+ <h4 id="file">Files</h4>
+ <p>See the <a href="keygen.html"><tt>ntp-keygen</tt></a> page.</p>
+ <h4 id="leap">Leapseconds Table</h4>
+ <p>The NIST provides a file documenting the epoch for all historic occasions of leap second insertion since 1972. The leapsecond table shows each epoch of insertion along with the offset of International Atomic Time (TAI) with respect to Coordinated Universal Time (UTC), as disseminated by NTP. The table can be obtained directly from NIST national time servers using <tt>ftp</tt> as the ASCII file <tt>pub/leap-seconds</tt>.</p>
+ <p>While not strictly a security function, the Autokey protocol provides means to securely retrieve the leapsecond table from a server or peer. Servers load the leapsecond table directly from the file specified in the <tt>crypto</tt> command, with default <tt>ntpkey_leap</tt>, while clients can obtain the table indirectly from the servers using the Autokey protocol. Once loaded, the table can be provided on request to other clients and servers.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/build.html b/contrib/ntp/html/build.html
new file mode 100644
index 000000000000..3e4ccd359662
--- /dev/null
+++ b/contrib/ntp/html/build.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Building and Installing the Distribution</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Building and Installing the Distribution</h3>
+ <img src="pic/beaver.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>For putting out compiler fires.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:06 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#build">Building and Installing the Distribution</a>
+ <li class="inline"><a href="#unix">Building and Installing under Unix</a>
+ <li class="inline"><a href="#comp">Compilation</a>
+ <li class="inline"><a href="#install">Installation</a>
+ <li class="inline"><a href="#config">Configuration</a>
+ <li class="inline"><a href="#prob">If You Have Problems</a>
+ <li class="inline"><a href="#win">Building and Installing under Windows NT</a>
+ </ul>
+ <hr>
+ <h4 id="build">Building and Installing the Distribution</h4>
+ <p>As a practical matter, every computer architecture and operating system version seems to be different than any other. The device drivers may be different, the input/output system may be idiosyncratic and the libraries may have different semantics. It is not possible in a software distribution such as this one to support every individual system with a common set of binaries, even with the same system but different versions. Therefore, it is necessary to individually configure the software build for each system and version, both at compile time and at run time. In almost all cases, these procedures are completely automatic and all the newbie user need do is type &quot;configure&quot;, &quot;make&quot; and &quot;install&quot; in that order and the autoconfigure system does the rest. There are some exceptions, as noted below and on the <a href="hints.html">Hints and Kinks</a> page.</p>
+ <p>If available, the OpenSSL library from <a href="http://www.openssl.org">http://www.openssl.org</a> is used to support public key cryptography. The library must be built and installed prior to building NTPv4. The procedures for doing that are included in the OpenSSL documentation. The library is found during the normal NTPv4 configure phase and the interface routines compiled automatically. Only the <tt>libcrypto.a</tt> library and associated header files are used. If the library is not available or disabled, this step is not required.</p>
+ <h4 id="unix">Building and Installing under Unix</h4>
+ <p>Make sure that you have all necessary tools for building executables. These tools include <tt>cc/gcc, make, awk, sed, tr, sh, grep, egrep</tt> and a few others. Not all of these tools exist in the standard distribution of modern Unix versions (compilers are likely to be an add-on product). If this is the case, consider using the GNU tools and <tt>gcc</tt> compiler. For a successful build, all of these tools should be accessible via the current path.</p>
+ <p>The first thing to do is uncompress the distribution and extract the source tree. In the distribution base directory use the <tt>./configure</tt> command to perform an automatic configuration procedure. This command inspects the hardware and software environment and tests for the presence of system header files and the contents of these files to determine if certain features are present. When one or more of these features are present, the code is compiled to use them; if not, no special code is compiled. However, even if the code is compiled to use these features, the code does a special test at run time to see if one or more are actually present and avoids using them if not present. In such cases a warning message is sent to the system log, but the daemon should still work properly.</p>
+ <p>The default build normally includes the debugging code, which can be useful in diagnosing problems found in initial test, and all reference clock drivers known to work with each machine and operating system. Unless memory space is at a premium, this is a sensible strategy and greatly simplifies debugging and support. If you need to delete either the debugging code or one or all reference clock drivers to save space, see the <a href="config.html">Configuration Options</a> page.</p>
+ <p>If your site supports multiple architectures and uses NFS to share files, you can use a single source tree to compile executables for all architectures. While running on a target architecture machine and in the distribution base directory create a subdirectory using a command like <tt>mkdir A.`config.guess`</tt>, which will create an architecture-specific directory with name peculiar to the architecture and operating system. Then change to this directory and emit a <tt>../configure</tt> command. The remaining steps are the same whether building in the base directory or in the subdirectory.</p>
+ <h4 id="comp">Compilation</h4>
+ <p>Use the <tt>make</tt> command to compile all source modules, construct the libraries and link the distribution. Expect few or no warnings using <tt>cc</tt> and a moderate level of warnings using <tt>gcc</tt>. Note: On some Unix platforms <tt>gcc</tt> may show quite a few complaints about system header files and type inconsistencies, especially with pointer variables. This is usually the case when the system header files are not up to ANSI standards or <tt>gcc </tt>expectations, when <tt>gcc</tt> is not installed properly, or when operating system updates and patches are applied and <tt>gcc</tt> is not reinstalled. While the autoconfigure process is quite thorough, the Unix programming cultures of the various workstation makers still remain idiosyncratic.</p>
+ <h4 id="install">Installation</h4>
+ <p>As root, use the <tt>make install</tt> command to install the binaries in the destination directory. Most commonly, these programs are installed in <tt>/usr/local/bin</tt>, but this can be overridden during configuration. You must of course have write permission on the install in the destination directory. This includes the following programs:</p>
+ <ul>
+ <li><a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a>
+ <li><a href="ntpq.html"><tt>ntpq</tt> - standard NTP query program</a>
+ <li><a href="ntpdc.html"><tt>ntpdc</tt> - special NTP query program</a>
+ <li><a href="ntpdate.html"><tt>ntpdate</tt> - set the date and time via NTP</a>
+ <li><a href="ntptrace.html"><tt>ntptrace</tt> - trace a chain of NTP servers back to the primary source</a>
+ </ul>
+ <p>If the precision time kernel modifications are present, the following program is installed:</p>
+ <ul>
+ <li><a href="ntptime.html"><tt>ntptime</tt> - read kernel time variables</a>
+ </ul>
+ <p>If the public key authentication functions are present, the following program is installed:</p>
+ <ul>
+ <li><a href="keygen.html"><tt>ntp-keygen</tt> - generate public and private keys</a>
+ </ul>
+ <p>In some systems that include the capability to edit kernel variables, the following program is installed:</p>
+ <ul>
+ <li><a href="tickadj.html"><tt>tickadj</tt> - set time-related kernel variables</a>
+ </ul>
+ <p>Cryptographic support, both symmetric and public key, requires one or more key files, commonly installed in <tt>/usr/local/etc</tt>. Public key cryptography requires a random seed file, usually called <tt>.rnd</tt>, installed in a dark place such as the root directory or <tt>/etc</tt>. Directions for generating keys is on the <a href="authopt.html">Authentication Options</a> page.</p>
+ <h4 id="config">Configuration</h4>
+ <p>You are now ready to configure the daemon and start it. You will need to create a NTP configuration file <tt>ntp.conf</tt> and a cryptographic key file <tt>ntp.keys</tt>. The latter file is necessary only for remote configuration support, if needed. Newbies should see the <a href="quick.html">Quick Start</a> page for orientation. Seasoned veterans can start with the <a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a> page and move on to the specific configuration option pages from there. A tutorial on NTP subnet design and configuration options is in the <a href="notes.html">Notes on Configuring NTP and Setting up a NTP Subnet</a> page.</p>
+ <h4 id="prob">If You Have Problems</h4>
+ <p>If you have problems peculiar to the particular hardware and software environment (e.g. operating system-specific issues), browse the <a href="hints.html">Hints and Kinks</a> page. For other problems a tutorial on debugging technique is in the <a href="debug.html">NTP Debugging Technique</a> page. As always, the first line of general assistance is the NTP web site <a href="http://www.ntp.org">www.ntp.org</a> and the FAQ resident there. Requests for assistance of a general nature and of interest to other timekeepers should be sent to the NTP newsgroup comp.protocols.time.ntp. Bug reports of a specific nature should be sent to <a href="mailto:bugs@mail.ntp.org">bugs@ntp.org</a>. Bug reports of a specific nature on features implemented by the programmer corps mentioned in the <a href="copyright.html">Copyright</a> page should be sent directly to the implementor listed in that page, with copy to bugs@ntp.org.</p>
+ <p>Please include the version of the source distribution (e.g., ntp-4.0.70a) in your bug report, as well as billboards from the relevant utility programs and debug trace, if available. Please include the output of <tt>config.guess</tt> in your bug report. It will look something like:</p>
+ <p><tt>pdp11-dec-fuzzos3.4</tt></p>
+ <h4>Additional <tt>make</tt> commands</h4>
+ <dl>
+ <dt><tt>make clean</tt>
+ <dd>Cleans out object files, programs and temporary files.
+ <dt><tt>make distclean</tt>
+ <dd>Does the work of <tt>clean</tt>, but cleans out all directories in preparation for a new distribution release.
+ <dt><tt>make dist</tt>
+ <dd>Does the work of <tt>make distclean</tt>, but constructs compressed tar files for distribution. You must have GNU automake to perform this function.
+ </dl>
+ <h4 id="win">Building and Installing under Windows NT</h4>
+ <p>See <tt><a href="hints/winnt.html">hints/winnt.htm</a></tt> for directions to compile the sources and install the executables.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/clockopt.html b/contrib/ntp/html/clockopt.html
new file mode 100644
index 000000000000..af79b0467f40
--- /dev/null
+++ b/contrib/ntp/html/clockopt.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Reference Clock Options</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Reference Clock Options</h3>
+ <img src="pic/stack1a.jpg" alt="gif" align="left">
+ <p>See the radios, all in a row.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:06 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#ref">Reference Clock Support</a>
+ <li class="inline"><a href="#cmd">Reference Clock Commands</a>
+ </ul>
+ <hr>
+ <h4 id="ref">Reference Clock Support</h4>
+ <p>The NTP Version 4 daemon supports some three dozen different radio, satellite and modem reference clocks plus a special pseudo-clock used for backup or when no other clock source is available. Detailed descriptions of individual device drivers and options can be found in the <a href="refclock.html">Reference Clock Drivers</a> page. Additional information can be found in the pages linked there, including the <a href="rdebug.html">Debugging Hints for Reference Clock Drivers</a> and <a href="howto.html">How To Write a Reference Clock Driver</a> pages. In addition, support for a PPS signal is available as described in <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. Many drivers support special line discipline/streams modules which can significantly improve the accuracy using the driver. These are described in the <a href="ldisc.html">Line Disciplines and Streams Drivers</a> page.</p>
+ <p>A reference clock will generally (though not always) be a radio timecode receiver which is synchronized to a source of standard time such as the services offered by the NRC in Canada and NIST and USNO in the US. The interface between the computer and the timecode receiver is device dependent, but is usually a serial port. A device driver specific to each reference clock must be selected and compiled in the distribution; however, most common radio, satellite and modem clocks are included by default. Note that an attempt to configure a reference clock when the driver has not been compiled or the hardware port has not been appropriately configured results in a scalding remark to the system log file, but is otherwise non hazardous.</p>
+ <p>For the purposes of configuration, <tt>ntpd</tt> treats reference clocks in a manner analogous to normal NTP peers as much as possible. Reference clocks are identified by a syntactically correct but invalid IP address, in order to distinguish them from normal NTP peers. Reference clock addresses are of the form <tt>127.127.<i>t.u</i></tt>, where <i><tt>t</tt></i> is an integer denoting the clock type and <i><tt>u</tt></i> indicates the unit number in the range 0-3. While it may seem overkill, it is in fact sometimes useful to configure multiple reference clocks of the same type, in which case the unit numbers must be unique.</p>
+ <p>The <tt>server</tt> command is used to configure a reference clock, where the <i><tt>address</tt></i> argument in that command is the clock address. The <tt>key</tt>, <tt>version</tt> and <tt>ttl</tt> options are not used for reference clock support. The <tt>mode</tt> option is added for reference clock support, as described below. The <tt>prefer</tt> option can be useful to persuade the server to cherish a reference clock with somewhat more enthusiasm than other reference clocks or peers. Further information on this option can be found in the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The <tt>minpoll</tt> and <tt>maxpoll</tt> options have meaning only for selected clock drivers. See the individual clock driver document pages for additional information.</p>
+ <p>The <tt>fudge</tt> command is used to provide additional information for individual clock drivers and normally follows immediately after the <tt>server</tt> command. The <i><tt>address</tt></i> argument specifies the clock address. The <tt>refid</tt> and <tt>stratum</tt> options control can be used to override the defaults for the device. There are two optional device-dependent time offsets and four flags that can be included in the <tt>fudge</tt> command as well.</p>
+ <p>The stratum number of a reference clock is by default zero. Since the <tt>ntpd</tt> daemon adds one to the stratum of each peer, a primary server ordinarily displays an external stratum of one. In order to provide engineered backups, it is often useful to specify the reference clock stratum as greater than zero. The <tt>stratum</tt> option is used for this purpose. Also, in cases involving both a reference clock and a pulse-per-second (PPS) discipline signal, it is useful to specify the reference clock identifier as other than the default, depending on the driver. The <tt>refid</tt> option is used for this purpose. Except where noted, these options apply to all clock drivers.</p>
+ <h4 id="cmd">Reference Clock Commands</h4>
+ <dl>
+ <dt><tt>server 127.127.<i>t.u</i> [prefer] [mode <i>int</i>] [minpoll <i>int</i>] [maxpoll <i>int</i>]</tt>
+ <dd>This command can be used to configure reference clocks in special ways. The options are interpreted as follows:
+ <dl>
+ <dt><tt>prefer</tt>
+ <dd>Marks the reference clock as preferred. All other things being equal, this host will be chosen for synchronization among a set of correctly operating hosts. See the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page for further information.
+ <dt><tt>mode <i>int</i></tt>
+ <dd>Specifies a mode number which is interpreted in a device-specific fashion. For instance, it selects a dialing protocol in the ACTS driver and a device subtype in the <tt>parse</tt> drivers.
+ <dt><tt>minpoll <i>int</i></tt>
+ <dt><tt>maxpoll <i>int</i></tt>
+ <dd>These options specify the minimum and maximum polling interval for reference clock messages, in seconds to the power of two. For most directly connected reference clocks, both <tt>minpoll</tt> and <tt>maxpoll</tt> default to 6 (64 s). For modem reference clocks, <tt>minpoll</tt> defaults to 10 (17.1 m) and <tt>maxpoll</tt> defaults to 14 (4.5 h). The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
+ </dl>
+ <dt><tt>fudge 127.127.<i>t.u</i> [time1 <i>sec</i>] [time2 <i>sec</i>] [stratum <i>int</i>] [refid <i>string</i>] [mode <i>int</i>] [flag1 0|1] [flag2 0|1] [flag3 0|1] [flag4 0|1]</tt>
+ <dd>This command can be used to configure reference clocks in special ways. It must immediately follow the <tt>server</tt> command which configures the driver. Note that the same capability is possible at run time using the <tt><a href="ntpdc.html">ntpdc</a></tt> program. The options are interpreted as follows:
+ <dl>
+ <dt><tt>time1 <i>sec</i></tt>
+ <dd>Specifies a constant to be added to the time offset produced by the driver, a fixed-point decimal number in seconds. This is used as a calibration constant to adjust the nominal time offset of a particular clock to agree with an external standard, such as a precision PPS signal. It also provides a way to correct a systematic error or bias due to serial port or operating system latencies, different cable lengths or receiver internal delay. The specified offset is in addition to the propagation delay provided by other means, such as internal DIPswitches. Where a calibration for an individual system and driver is available, an approximate correction is noted in the driver documentation pages.
+ <dd>Note: in order to facilitate calibration when more than one radio clock or PPS signal is supported, a special calibration feature is available. It takes the form of an argument to the <tt>enable</tt> command described in the <a href="miscopt.html">Miscellaneous Options</a> page and operates as described in the <a href="refclock.html">Reference Clock Drivers</a> page.
+ <dt><tt>time2 <i>secs</i></tt>
+ <dd>Specifies a fixed-point decimal number in seconds, which is interpreted in a driver-dependent way. See the descriptions of specific drivers in the <a href="refclock.html">reference clock drivers</a> page.
+ <dt><tt>stratum <i>int</i></tt>
+ <dd>Specifies the stratum number assigned to the driver, an integer between 0 and 15. This number overrides the default stratum number ordinarily assigned by the driver itself, usually zero.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies an ASCII string of from one to four characters which defines the reference identifier used by the driver. This string overrides the default identifier ordinarily assigned by the driver itself.
+ <dt><tt>mode <i>int</i></tt>
+ <dd>Specifies a mode number which is interpreted in a device-specific fashion. For instance, it selects a dialing protocol in the ACTS driver and a device subtype in the <tt>parse</tt> drivers.
+ <dt><tt>flag1 flag2 flag3 flag4</tt>
+ <dd>These four flags are used for customizing the clock driver. The interpretation of these values, and whether they are used at all, is a function of the particular clock driver. However, by convention <tt>flag4</tt> is used to enable recording monitoring data to the <tt>clockstats</tt> file configured with the <tt>filegen</tt> command. Further information on the <tt>filegen</tt> command can be found in the <a href="monopt.html">Monitoring Options</a> page.
+ </dl>
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/config.html b/contrib/ntp/html/config.html
new file mode 100644
index 000000000000..463214a28a8d
--- /dev/null
+++ b/contrib/ntp/html/config.html
@@ -0,0 +1,168 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Configuration Options</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Configuration Options</h3>
+ <img src="pic/pogo3a.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>Gnu autoconfigure tools are in the backpack.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:07 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#basic">Basic Configuration Options - the <tt>configure</tt> utility</a>
+ <li class="inline"><a href="#opt">Options</a>
+ <li class="inline"><a href="#dir">Directory and File Names</a>
+ <li class="inline"><a href="#host">Host Type</a>
+ <li class="inline"><a href="#pkg">Optional Packages</a>
+ <li class="inline"><a href="#feat">Optional Features</a>
+ <li class="inline"><a href="#radio">Radio Clocks</a>
+ <li class="inline"><a href="#parse">PARSE Clocks</a>
+ </ul>
+ <hr>
+ <h4 id="basic">Basic Configuration Options - the <tt>configure</tt> utility</h4>
+ <p>The following options are for compiling and installing a working version of the NTP distribution. In most cases, the build process is completely automatic. In some cases where memory space is at a premium, or the binaries are to be installed in a different place, it is possible to tailor the configuration to remove such features as reference clock driver support, debugging support, and so forth.</p>
+ <p>Configuration options are specified as arguments to the <tt>configure</tt> script. Following is a summary of the current options, as of the 4.0.99m version:</p>
+ <p>Usage: <tt>configure [options] [host]</tt><br>
+ </p>
+ <h4 id="opt">Options</h4>
+ <p><tt>[defaults in brackets after descriptions]</tt> Configuration:</p>
+ <pre>
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print `checking...' messages
+ --version print the version of autoconf that created
+configure
+</pre>
+ <h4 id="dir">Directory and File Names</h4>
+ <pre>
+ --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+</pre>
+ <h4 id="host">Host Type</h4>
+ <pre>
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+</pre>
+ <h4 id="pkg">Optional Packages</h4>
+ <pre>
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+
+ openssl-libdir=DIR OpenSSL object code libraries in DIR [/usr/lib/usr/local/lib/usr/local/ssl/lib]
+ openssl-incdir=DIR OpenSSL header files in DIR [/usr/include/usr/local/include/usr/local/ssl/include]
+ crypto=autokey Use autokey cryptography
+ crypto=rsaref Use the RSAREF library
+ electricfence Compile with ElectricFence malloc debugger
+</pre>
+ <h4 id="feat">Optional Features</h4>
+ <pre>
+ --disable-FEATURE do not include FEATURE (same as
+ --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+
+ accurate-adjtime The adjtime() call is accurate
+ clockctl use /dev/clockctl (non root control of system clock)
+ debugging Include debugging code [enable]
+ des Include support for DES keys [enable]
+ dst-minutes=VALUE Minutes per DST adjustment [60]
+ gdt-surveying Include GDT survey code [disable]
+ hourly-todr-sync If we should sync TODR hourly
+ kernel-fll-bug If we should avoid a (Solaris) kernel FLL bug
+ kmem Read /dev/kmem for 'tick' and/or 'tickadj'
+ md5 Include support for MD5 keys [enable]
+ ntpdate-step If ntpdate should step the time
+ slew-always Always slew the time
+ step-slew Step and slew the time
+ tick=VALUE Force a value for 'tick'
+ tickadj=VALUE Force a value for 'tickadj'
+ udp-wildcard Use UDP wildcard delivery
+</pre>
+ <h4 id="radio">Radio Clocks</h4>
+ <p>(these are ordinarily enabled, if supported by the machine and operating system):</p>
+ <pre>
+ all-clocks Include drivers for all suitable non-PARSE clocks [enable]
+ ACTS NIST dialup clock
+ ARBITER Arbiter 1088A/B GPS receiver
+ ARCRON_MSF Arcron MSF receiver
+ AS2201 Austron 2200A or 2201A GPS receiver
+ ATOM ATOM PPS interface
+ AUDIO-CHU CHU audio decoder
+ BANCOMM Datum/Bancomm BC635/VME interface (requires an explicit --enable-BANCOMM request)
+ CHRONOLOG Chrono-log K-series WWVB receiver
+ CHU CHU modem decoder
+ DATUM Datum Programmable Time System
+ DUMBCLOCK Dumb generic hh:mm:ss local clock
+ FG Forum Graphic GPS
+ GPSVME TrueTime GPS receiver with VME interface (requires an explicit --enable-GPSVME request)
+ HEATH HeathKit GC-1000 Most Accurate Clock
+ HOPFPCI HOPF 6039 PCI board
+ HOPFSERIAL HOPF serial clock device
+ HPGPS HP 58503A GPS Time &amp; Frequency receiver
+ IRIG IRIG (Audio) Clock
+ JUPITER Rockwell Jupiter GPS receiver
+ LEITCH Leitch CSD 5300 Master Clock System Driver
+ LOCAL-CLOCK Local clock driver
+ MSFEES EES M201 MSF receiver
+ MX4200 Magnavox MX4200 GPS receiver
+ NMEA NMEA GPS receiver
+ ONCORE Motorola VP/UT Oncore GPS receiver
+ PALISADE Palisade clock
+ PCF Conrad parallel port radio clock
+ PST PST/Traconex 1020 WWV/H receiver
+ PTBACTS PTB dialup clock support
+ SHM Clock attached through shared memory (requires an explicit --enable-SHM request)
+ SPECTRACOM Spectracom 8170/Netclock/2 WWVB receiver
+ TRAK TRAK 8810 GPS station clock
+ TPRO KSI/Odetics TPRO/S IRIG Interface
+ TRUETIME Kinemetrics/TrueTime (generic) receiver
+ ULINK Ultralink WWVB receiver
+ USNO US Naval Observatory dialup clock
+ WWV WWV audio receiver
+</pre>
+ <h4 id="parse">PARSE Clocks</h4>
+ <pre>
+ parse-clocks Include drivers for all suitable PARSE clocks [enable]
+ COMPUTIME Diem Computime Radio Clock
+ DCF7000 ELV/DCF7000 Clock
+ HOPF6021 HOPF 6021 Radio Clock support
+ MEINBERG Meinberg clocks
+ RAWDCF DCF77 raw time code
+ RCC8000 RCC 8000 Radio Clock support
+ SCHMID SCHMID DCF77 clock support
+ TRIMTAIP Trimble GPS/TAIP Protocol
+ TRIMTSIP Trimble GPS/TSIP Protocol
+ VARITEXT VARITEXT clock
+ WHARTON Wharton 400A Series clock
+</pre>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/confopt.html b/contrib/ntp/html/confopt.html
new file mode 100644
index 000000000000..110083acb55e
--- /dev/null
+++ b/contrib/ntp/html/confopt.html
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Server Options</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Server Options</h3>
+ <img src="pic/boom3a.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>The chicken is getting configuration advice.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:08 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#cfg">Configuration Commands</a>
+ <li class="inline"><a href="#opt">Command Options</a>
+ <li class="inline"><a href="#aux">Auxilliary Commands</a>
+ <li class="inline"><a href="#bug">Bugs</a>
+ </ul>
+ <hr>
+ <p>Following is a description of the configuration commands in NTPv4. These commands have the same basic functions as in NTPv3 and in some cases new functions and new arguments. There are two classes of commands, configuration commands that configure a persistent association with a remote server or peer or reference clock, and auxilliary commands that specify environmental variables that control various related operations.</p>
+ <h4 id="cfg">Configuration Commands</h4>
+ <p>The various modes are determined by the command keyword and the type of the required IP address. Addresses are classed by type as (s) a remote server or peer (IPv4 class A, B and C), (b) the broadcast address of a local interface, (m) a multicast address (IPv4 class D), or (r) a reference clock address (127.127.x.x). Note that only those options applicable to each command are listed below. Use of options not listed may not be caught as an error, but may result in some weird and even destructive behavior.</p>
+ <p>If the Basic Socket Interface Extensions for IPv6 (RFC-2553) is detected, support for the IPv6 address family is generated in addition to the default support of the IPv4 address family. In a few cases, including the <tt>reslist</tt> billboard generated by <tt>ntpdc</tt>, IPv6 addresses are automatically generated. IPv6 addresses can be identified by the presence of colons &quot;:&quot; in the address field. IPv6 addresses can be used almost everywhere where IPv4 addresses can be used, with the exception of reference clock addresses, which are always IPv4.</p>
+ <p>Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace. See IPv6 references for the equivalent classes for that address family.</p>
+ <dl>
+ <dt><tt>server <i>address</i> [key <i>key</i> | autokey] [burst] [iburst] [version <i>version</i>] [prefer] [minpoll <i>minpoll</i>] [maxpoll <i>maxpoll</i>]</tt><br>
+ <tt>peer <i>address</i> [key <i>key</i> | autokey] [version <i>version</i>] [prefer] [minpoll <i>minpoll</i>] [maxpoll <i>maxpoll</i>]</tt><br>
+ <tt>broadcast <i>address</i> [key <i>key</i> | autokey] [version <i>version</i>] [minpoll <i>minpoll</i>] [ttl <i>ttl</i>]</tt><br>
+ <tt>manycastclient <i>address</i> [key <i>key</i> | autokey] [version <i>version</i>] [minpoll <i>minpoll</i> [maxpoll <i>maxpoll</i>] [ttl <i>ttl</i>]</tt>
+ <dd>These four commands specify the time server name or address to be used and the mode in which to operate. The <i>address</i> can be either a DNS name or a IP address in dotted-quad notation. Additional information on association behavior can be found in the <a href="assoc.html">Association Management</a> page.
+ <dl>
+ <dt><tt>server</tt>
+ <dd>For type s and r addresses, this command mobilizes a persistent client mode association with the specified remote server or local radio clock. In this mode the local clock can synchronized to the remote server, but the remote server can never be synchronized to the local clock. This command should NOT be used for type <tt>b</tt> or <tt>m</tt> addresses.
+ <dt><tt>peer</tt>
+ <dd>For type s addresses (only), this command mobilizes a persistent symmetric-active mode association with the specified remote peer. In this mode the local clock can be synchronized to the remote peer or the remote peer can be synchronized to the local clock. This is useful in a network of servers where, depending on various failure scenarios, either the local or remote peer may be the better source of time. This command should NOT be used for type <tt>b</tt>, <tt>m</tt> or <tt>r</tt> addresses.
+ <dt><tt>broadcast</tt>
+ <dd>For type <tt>b</tt> and <tt>m</tt> addresses (only), this command mobilizes a persistent broadcast mode association. Multiple commands can be used to specify multiple local broadcast interfaces (subnets) and/or multiple multicast groups. Note that local broadcast messages go only to the interface associated with the subnet specified, but multicast messages go to all interfaces.
+ <dd>In broadcast mode the local server sends periodic broadcast messages to a client population at the <i><tt>address</tt></i> specified, which is usually the broadcast address on (one of) the local network(s) or a multicast address assigned to NTP. The IANA has assigned the multicast group address IPv4 224.0.1.1 and IPv6 ff05::101 (site local) exclusively to NTP, but other nonconflicting addresses can be used to contain the messages within administrative boundaries. Ordinarily, this specification applies only to the local server operating as a sender; for operation as a broadcast client, see the <tt>broadcastclient</tt> or <tt>multicastclient</tt> commands below.
+ <dt><tt>manycastclient</tt>
+ <dd>For type <tt>m</tt> addresses (only), this command mobilizes a manycast client mode association for the multicast address specified. In this case a specific address must be supplied which matches the address used on the <tt>manycastserver</tt> command for the designated manycast servers. The NTP multicast address 224.0.1.1 assigned by the IANA should NOT be used, unless specific means are taken to avoid spraying large areas of the Internet with these messages and causing a possibly massive implosion of replies at the sender.
+ <dd>The <tt>manycast</tt> command specifies that the local server is to operate in client mode with the remote servers that are discovered as the result of broadcast/multicast messages. The client broadcasts a request message to the group address associated with the specified <i><tt>address</tt></i> and specifically enabled servers respond to these messages. The client selects the servers providing the best time and continues as with the <tt>server</tt>command. The remaining servers are discarded as if never heard.
+ </dl>
+ </dl>
+ <h4 id="opt">Command Options</h4>
+ <dl>
+ <dt><tt>autokey</tt>
+ <dd>All packets sent to and received from the server or peer are to include authentication fields encrypted using the autokey scheme described in the <a href="authopt.html">Authentication Options</a> page.
+ <dt><tt>burst</tt>
+ <dd>When the server is reachable, send a burst of eight packets instead of the usual one. The packet spacing is normally 2 s; however, the spacing between the first and second packets can be changed with the <tt>calldelay</tt> command to allow additional time for a modem or ISDN call to complete. This is designed to improve timekeeping quality with the <tt>server</tt> command and <tt>s</tt> addresses.
+ <dt><tt>iburst</tt>
+ <dd>When the server is unreachable, send a burst of eight packets instead of the usual one. The packet spacing is normally 2 s; however, the spacing between the first two packets can be changed with the <tt>calldelay</tt> command to allow additional time for a modem or ISDN call to complete. This is designed to speed the initial synchronization acquisition with the <tt>server</tt> command and <tt>s</tt> addresses and when <tt>ntpd</tt> is started with the <tt>-q</tt> option.
+ <dt><tt>key</tt> <i><tt>key</tt></i>
+ <dd>All packets sent to and received from the server or peer are to include authentication fields encrypted using the specified <i>key</i> identifier with values from 1 to 65534, inclusive. The default is to include no encryption field.
+ <dt><tt>minpoll <i>minpoll</i></tt><br>
+ <tt>maxpoll <i>maxpoll</i></tt>
+ <dd>These options specify the minimum and maximum poll intervals for NTP messages, in seconds as a power of two. The maximum poll interval defaults to 10 (1,024 s), but can be increased by the <tt>maxpoll</tt> option to an upper limit of 17 (36.4 h). The minimum poll interval defaults to 6 (64 s), but can be decreased by the <tt>minpoll</tt> option to a lower limit of 4 (16 s).
+ <dt><tt>noselect</tt>
+ <dd>Marks the server as unused, except for display purposes. The server is discarded by the selection algroithm.
+ <dt><tt>prefer</tt>
+ <dd>Marks the server as preferred. All other things being equal, this host will be chosen for synchronization among a set of correctly operating hosts. See the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page for further information.
+ <dt><tt>ttl <i>ttl</i></tt>
+ <dd>This option is used only with broadcast server and manycast client modes. It specifies the time-to-live <i><tt>ttl</tt></i> to use on broadcast server and multicast server and the maximum <i><tt>ttl</tt></i> for the expanding ring search with manycast client packets. Selection of the proper value, which defaults to 127, is something of a black art and should be coordinated with the network administrator.
+ <dt><tt>version <i>version</i></tt>
+ <dd>Specifies the version number to be used for outgoing NTP packets. Versions 1-4 are the choices, with version 4 the default.
+ </dl>
+ <h4 id="aux">Auxilliary Commands</h4>
+ <dl>
+ <dt><tt>broadcastclient</tt>
+ <dd>This command enables reception of broadcast server messages to any local interface (type b) address. Upon receiving a message for the first time, the broadcast client measures the nominal server propagation delay using a brief client/server exchange with the server, then enters the broadcast client mode, in which it synchronizes to succeeding broadcast messages. Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in the <a href="authopt.html">Authentication Options</a> page.
+ <dt><tt>manycastserver <i>address</i> [...]</tt>
+ <dd>This command enables reception of manycast client messages to the multicast group address(es) (type m) specified. At least one address is required, but The NTP multicast address 224.0.1.1 assigned by the IANA should NOT be used, unless specific means are taken to limit the span of the reply and avoid a possibly massive implosion at the original sender. Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in the <a href="authopt.html">Authentication Options</a> page.
+ <dt><tt>multicastclient [<i>address</i>] [...]</tt>
+ <dd>This command enables reception of multicast server messages to the multicast group address(es) (type m) specified. Upon receiving a message for the first time, the multicast client measures the nominal server propagation delay using a brief client/server exchange with the server, then enters the broadcast client mode, in which it synchronizes to succeeding multicast messages. Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in the <a href="authopt.html">Authentication Options</a> page.
+ </dl>
+ <h4 id="bug">Bugs</h4>
+ <p>The syntax checking is not picky; some combinations of ridiculous and even hilarious options and modes may not be detected.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/copyright.html b/contrib/ntp/html/copyright.html
new file mode 100644
index 000000000000..50ef51a8d0fd
--- /dev/null
+++ b/contrib/ntp/html/copyright.html
@@ -0,0 +1,95 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Copyright Notice</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Copyright Notice</h3>
+ <img src="pic/sheepb.jpg" alt="jpg" align="left"> &quot;Clone me,&quot; says Dolly sheepishly
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">15:44</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="240">Tuesday, July 15, 2003</csobj></p>
+ <br clear="left">
+ <hr>
+ <p>The following copyright notice applies to all files collectively called the Network Time Protocol Version 4 Distribution. Unless specifically declared otherwise in an individual file, this notice applies as if the text was explicitly included in the file.<br>
+ </p>
+ <pre>
+***********************************************************************
+* *
+* Copyright (c) David L. Mills 1992-2003 *
+* *
+* Permission to use, copy, modify, and distribute this software and *
+* its documentation for any purpose and without fee is hereby *
+* granted, provided that the above copyright notice appears in all *
+* copies and that both the copyright notice and this permission *
+* notice appear in supporting documentation, and that the name *
+* University of Delaware not be used in advertising or publicity *
+* pertaining to distribution of the software without specific, *
+* written prior permission. The University of Delaware makes no *
+* representations about the suitability this software for any *
+* purpose. It is provided &quot;as is&quot; without express or implied *
+* warranty. *
+* *
+***********************************************************************
+</pre>
+ <p>The following individuals contributed in part to the Network Time Protocol Distribution Version 4 and are acknowledged as authors of this work.</p>
+ <ol>
+ <li class="inline"><a href="mailto:%20mark_andrews@isc.org">Mark Andrews &lt;mark_andrews@isc.org&gt;</a> Leitch atomic clock controller
+ <li class="inline"><a href="mailto:%20altmeier@atlsoft.de">Bernd Altmeier &lt;altmeier@atlsoft.de&gt;</a> hopf Elektronik serial line and PCI-bus devices
+ <li class="inline"><a href="mailto:%20vbais@mailman1.intel.co">Viraj Bais &lt;vbais@mailman1.intel.com&gt;</a> and <a href="mailto:%20kirkwood@striderfm.intel.com">Clayton Kirkwood &lt;kirkwood@striderfm.intel.com&gt;</a> port to WindowsNT 3.5
+ <li class="inline"><a href="mailto:%20michael.barone@lmco.com">Michael Barone &lt;michael,barone@lmco.com&gt;</a> GPSVME fixes
+ <li class="inline"><a href="mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca">Jean-Francois Boudreault &lt;Jean-Francois.Boudreault@viagenie.qc.ca&gt;</a>IPv6 support
+ <li class="inline"><a href="mailto:%20karl@owl.HQ.ileaf.com">Karl Berry &lt;karl@owl.HQ.ileaf.com&gt;</a> syslog to file option
+ <li class="inline"><a href="mailto:%20greg.brackley@bigfoot.com">Greg Brackley &lt;greg.brackley@bigfoot.com&gt;</a> Major rework of WINNT port. Clean up recvbuf and iosignal code into separate modules.
+ <li class="inline"><a href="mailto:%20Marc.Brett@westgeo.com">Marc Brett &lt;Marc.Brett@westgeo.com&gt;</a> Magnavox GPS clock driver
+ <li class="inline"><a href="mailto:%20Piete.Brooks@cl.cam.ac.uk">Piete Brooks &lt;Piete.Brooks@cl.cam.ac.uk&gt;</a> MSF clock driver, Trimble PARSE support
+ <li class="inline"><a href="mailto:%20reg@dwf.com">Reg Clemens &lt;reg@dwf.com&gt;</a> Oncore driver (Current maintainer)
+ <li class="inline"><a href="mailto:%20clift@ml.csiro.au">Steve Clift &lt;clift@ml.csiro.au&gt;</a> OMEGA clock driver
+ <li class="inline"><a href="mailto:casey@csc.co.za">Casey Crellin &lt;casey@csc.co.za&gt;</a> vxWorks (Tornado) port and help with target configuration
+ <li class="inline"><a href="mailto:%20Sven_Dietrich@trimble.COM">Sven Dietrich &lt;sven_dietrich@trimble.com&gt;</a> Palisade reference clock driver, NT adj. residuals, integrated Greg's Winnt port.
+ <li class="inline"><a href="mailto:%20dundas@salt.jpl.nasa.gov">John A. Dundas III &lt;dundas@salt.jpl.nasa.gov&gt;</a> Apple A/UX port
+ <li class="inline"><a href="mailto:%20duwe@immd4.informatik.uni-erlangen.de">Torsten Duwe &lt;duwe@immd4.informatik.uni-erlangen.de&gt;</a> Linux port
+ <li class="inline"><a href="mailto:%20dennis@mrbill.canet.ca">Dennis Ferguson &lt;dennis@mrbill.canet.ca&gt;</a> foundation code for NTP Version 2 as specified in RFC-1119
+ <li class="inline"><a href="mailto:%20jhay@icomtek.csir.co.za">John Hay &lt;jhay@@icomtek.csir.co.za&gt;</a> IPv6 support and testing
+ <li class="inline"><a href="mailto:%20glenn@herald.usask.ca">Glenn Hollinger &lt;glenn@herald.usask.ca&gt;</a> GOES clock driver
+ <li class="inline"><a href="mailto:%20iglesias@uci.edu">Mike Iglesias &lt;iglesias@uci.edu&gt;</a> DEC Alpha port
+ <li class="inline"><a href="mailto:%20jagubox.gsfc.nasa.gov">Jim Jagielski &lt;jim@jagubox.gsfc.nasa.gov&gt;</a> A/UX port
+ <li class="inline"><a href="mailto:%20jbj@chatham.usdesign.com">Jeff Johnson &lt;jbj@chatham.usdesign.com&gt;</a> massive prototyping overhaul
+ <li class="inline"><a href="mailto:Hans.Lambermont@nl.origin-it.com">Hans Lambermont &lt;Hans.Lambermont@nl.origin-it.com&gt;</a> or <a href="mailto:H.Lambermont@chello.nl">&lt;H.Lambermont@chello.nl&gt;</a> ntpsweep
+ <li class="inline"><a href="mailto:%20phk@FreeBSD.ORG">Poul-Henning Kamp &lt;phk@FreeBSD.ORG&gt;</a> Oncore driver (Original author)
+ <li class="inline"><a href="http://www4.informatik.uni-erlangen.de/%7ekardel">Frank Kardel</a> <a href="mailto:%20Frank.Kardel@informatik.uni-erlangen.de">&lt;Frank.Kardel@informatik.uni-erlangen.de&gt;</a> PARSE &lt;GENERIC&gt; driver (14 reference clocks), STREAMS modules for PARSE, support scripts, syslog cleanup
+ <li class="inline"><a href="mailto:%20jones@hermes.chpc.utexas.edu">William L. Jones &lt;jones@hermes.chpc.utexas.edu&gt;</a> RS/6000 AIX modifications, HPUX modifications
+ <li class="inline"><a href="mailto:%20dkatz@cisco.com">Dave Katz &lt;dkatz@cisco.com&gt;</a> RS/6000 AIX port
+ <li class="inline"><a href="mailto:%20leres@ee.lbl.gov">Craig Leres &lt;leres@ee.lbl.gov&gt;</a> 4.4BSD port, ppsclock, Magnavox GPS clock driver
+ <li class="inline"><a href="mailto:%20lindholm@ucs.ubc.ca">George Lindholm &lt;lindholm@ucs.ubc.ca&gt;</a> SunOS 5.1 port
+ <li class="inline"><a href="mailto:%20louie@ni.umd.edu">Louis A. Mamakos &lt;louie@ni.umd.edu&gt;</a> MD5-based authentication
+ <li class="inline"><a href="mailto:%20thorinn@diku.dk">Lars H. Mathiesen &lt;thorinn@diku.dk&gt;</a> adaptation of foundation code for Version 3 as specified in RFC-1305
+ <li class="inline"><a href="mailto:%20mayer@ntp.org">Danny Mayer &lt;mayer@ntp.org&gt;</a>Network I/O, Windows Port, Code Maintenance
+ <li class="inline"><a href="mailto:%20mills@udel.edu">David L. Mills &lt;mills@udel.edu&gt;</a> Version 4 foundation: clock discipline, authentication, precision kernel; clock drivers: Spectracom, Austron, Arbiter, Heath, ATOM, ACTS, KSI/Odetics; audio clock drivers: CHU, WWV/H, IRIG
+ <li class="inline"><a href="mailto:%20moeller@gwdgv1.dnet.gwdg.de">Wolfgang Moeller &lt;moeller@gwdgv1.dnet.gwdg.de&gt;</a> VMS port
+ <li class="inline"><a href="mailto:%20mogul@pa.dec.com">Jeffrey Mogul &lt;mogul@pa.dec.com&gt;</a> ntptrace utility
+ <li class="inline"><a href="mailto:%20tmoore@fievel.daytonoh.ncr.com">Tom Moore &lt;tmoore@fievel.daytonoh.ncr.com&gt;</a> i386 svr4 port
+ <li class="inline"><a href="mailto:%20kamal@whence.com">Kamal A Mostafa &lt;kamal@whence.com&gt;</a> SCO OpenServer port
+ <li class="inline"><a href="mailto:%20derek@toybox.demon.co.uk">Derek Mulcahy &lt;derek@toybox.demon.co.uk&gt;</a> and <a href="mailto:%20d@hd.org">Damon Hart-Davis &lt;d@hd.org&gt;</a> ARCRON MSF clock driver
+ <li class="inline"><a href="mailto:%20Rainer.Pruy@informatik.uni-erlangen.de">Rainer Pruy &lt;Rainer.Pruy@informatik.uni-erlangen.de&gt;</a> monitoring/trap scripts, statistics file handling
+ <li class="inline"><a href="mailto:%20dirce@zk3.dec.com">Dirce Richards &lt;dirce@zk3.dec.com&gt;</a> Digital UNIX V4.0 port
+ <li class="inline"><a href="mailto:%20wsanchez@apple.com">Wilfredo S&aacute;nchez &lt;wsanchez@apple.com&gt;</a> added support for NetInfo
+ <li class="inline"><a href="mailto:%20mrapple@quack.kfu.com">Nick Sayer &lt;mrapple@quack.kfu.com&gt;</a> SunOS streams modules
+ <li class="inline"><a href="mailto:%20jack@innovativeinternet.com">Jack Sasportas &lt;jack@innovativeinternet.com&gt;</a> Saved a Lot of space on the stuff in the html/pic/ subdirectory
+ <li class="inline"><a href="mailto:%20schnitz@unipress.com">Ray Schnitzler &lt;schnitz@unipress.com&gt;</a> Unixware1 port
+ <li class="inline"><a href="mailto:%20shields@tembel.org">Michael Shields &lt;shields@tembel.org&gt;</a> USNO clock driver
+ <li class="inline"><a href="mailto:%20pebbles.jpl.nasa.gov">Jeff Steinman &lt;jss@pebbles.jpl.nasa.gov&gt;</a> Datum PTS clock driver
+ <li class="inline"><a href="mailto:%20harlan@pfcs.com">Harlan Stenn &lt;harlan@pfcs.com&gt;</a> GNU automake/autoconfigure makeover, various other bits (see the ChangeLog)
+ <li class="inline"><a href="mailto:%20ken@sdd.hp.com">Kenneth Stone &lt;ken@sdd.hp.com&gt;</a> HP-UX port
+ <li class="inline"><a href="mailto:%20ajit@ee.udel.edu">Ajit Thyagarajan &lt;ajit@ee.udel.edu&gt;</a>IP multicast/anycast support
+ <li class="inline"><a href="mailto:%20tsuruoka@nc.fukuoka-u.ac.jp">Tomoaki TSURUOKA &lt;tsuruoka@nc.fukuoka-u.ac.jp&gt;</a>TRAK clock driver
+ <li class="inline"><a href="mailto:%20vixie@vix.com">Paul A Vixie &lt;vixie@vix.com&gt;</a> TrueTime GPS driver, generic TrueTime clock driver
+ <li class="inline"><a href="mailto:%20Ulrich.Windl@rz.uni-regensburg.de">Ulrich Windl &lt;Ulrich.Windl@rz.uni-regensburg.de&gt;</a> corrected and validated HTML documents according to the HTML DTD
+ </ol>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/debug.html b/contrib/ntp/html/debug.html
new file mode 100644
index 000000000000..c5e076628ce8
--- /dev/null
+++ b/contrib/ntp/html/debug.html
@@ -0,0 +1,171 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>NTP Debugging Techniques</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>NTP Debugging Techniques</h3>
+ <img src="pic/pogo.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>We make house calls and bring our own bugs.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="97">10:23 PM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="266">Tuesday, August 05, 2003</csobj></p>
+ <br clear="left">
+ <h4>More Help</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links12.txt"></script>
+ <hr>
+ <p>Once the NTP software distribution has been compiled and installed and the configuration file constructed, the next step is to verify correct operation and fix any bugs that may result. Usually, the command line that starts the daemon is included in the system startup file, so it is executed only at system boot time; however, the daemon can be stopped and restarted from root at any time. Usually, no command-line arguments are required, unless special actions described in the <a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a> page are required. Once started, the daemon will begin sending and receiving messages, as specified in the configuration file.</p>
+ <h4>Initial Startup</h4>
+ <p>When started for the first time, the frequency file, usually called <tt>ntp.drift</tt>, has not yet been created. The daemon switches to a special training routine designed to quickly determine the system clock frequency offset of the particular machine. The routine first measures the current clock offset and sets the clock, then continues for up to twenty minutes before measuring the clock offset, which might involve setting the clock again. The two measurements are used to compute the initial frequency offset and the daemon continues in regular operation, during which the frequency offset is continuously updated. Once each hour the daemon writes the current frequency offset to the <tt>ntp.drift</tt> file. When restarted after that, the daemon reads the frequency offset from the <tt>ntp.drift</tt> file and avoids the training routine.</p>
+ <p>Note that the daemon requires at least four packet exchanges when first started in any case. This is required in order for the mitigation algorithms to insure valid and accurate measurements and defend against network delay spikes and accidental or malicious errors induced by the servers selected in the configuration file. It normally takes less than four minutes to set the clock when first started, but this can be reduced to less than ten seconds with the <tt>iburst</tt> configuration option.</p>
+ <p>The best way to verify correct operation is using the <a href="ntpq.html"><tt>ntpq</tt> - standard NTP query program</a> and <a href="ntpdc.html"><tt>ntpdc</tt> - special NTP query program</a> utility programs, either on the server itself or from another machine elsewhere in the network. The <tt>ntpq</tt> program implements the management functions specified in the NTP specification <a href="http://www.eecis.udel.edu/%7emills/database/rfc/rfc1305/rfc1305c.ps">RFC-1305, Appendix A</a>. The <tt>ntpdc</tt> program implements additional functions not provided in the standard. Both programs can be used to inspect the state variables defined in the specification and, in the case of <tt>ntpdc</tt>, additional ones intended for serious debugging. In addition, the <tt>ntpdc</tt> program can be used to selectively reconfigure and enable or disable some functions while the daemon is running.</p>
+ <p>In extreme cases with elusive bugs, the daemon can operate in two modes, depending on the presence of the <tt>-d</tt> command-line debug switch. If not present, the daemon detaches from the controlling terminal and proceeds autonomously. If one or more <tt>-d</tt> switches are present, the daemon does not detach and generates special output useful for debugging. In general, interpretation of this output requires reference to the sources. However, a single <tt>-d</tt> does produce only mildly cryptic output and can be very useful in finding problems with configuration and network troubles. With a little experience, the volume of output can be reduced by piping the output to <tt>grep</tt> and specifying the keyword of the trace you want to see.</p>
+ <p>Some problems are immediately apparent when the daemon first starts running. The most common of these are the lack of a UDP port for NTP (123) in the Unix <tt>/etc/services</tt> file (or equivalent in some systems). <b>Note that NTP does not use TCP in any form. Also note that NTP&nbsp;requires 123 for both source and destination ports.</b> These facts should be pointed out to firewall administrators.</p>
+ <p>Other problems are apparent in the system log, which ordinarily shows the startup banner, some cryptic initialization data and the computed precision value. Error messages at startup and during regular operation are sent to the system log. In real emergencies the daemon will sent a terminal error message to the system log and then cease operation.</p>
+ <p>The next most common problem is incorrect DNS names. Check that each DNS name used in the configuration file exists and that the address responds to the Unix <tt>ping</tt> command. The Unix <tt>traceroute</tt> or Windows <tt>tracert</tt> utility can be used to verify a partial or complete path exists. Most problems reported to the NTP&nbsp;newsgroup are not NTP&nbsp;problems, but problems with the network or firewall configuration.</p>
+ <p>When first started, the daemon polls the servers listed in the configuration file at 64-s intervals. In order to allow a sufficient number of samples for the NTP algorithms to reliably discriminate between truechimer servers and possible falsetickers, at least four valid messages from at least one server or peer listed in the configuration file is required before the daemon can set the clock. However, if the difference between the client time and server time is greater than the panic threshold, which defaults to 1000 s, the daemon sends a message to the system log and shuts down without setting the clock. It is necessary to set the local clock to within the panic threshold first, either manually by eyeball and wristwatch and the Unix <tt>date</tt> command, or by the <tt>ntpdate</tt> or <tt>ntpd -q</tt> commands. The panic threshold can be changed by the <tt>tinker panic</tt> command discribed on the <a href="miscopt.html">Miscellaneous Options</a> page. The panic threshold can be disabled for the first measurement by the <tt>-g</tt> command line option described on the <a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a> page.</p>
+ <p>If the difference between local time and server time is less than the panic threshold but greater than the step threshold, which defaults to 128 ms, the daemon will perform a step adjustment; otherwise, it will gradually slew the clock to the nominal time. Step adjustments are extremely rare in ordinary operation, usually as the result of reboot or hardware failure. The step threshold can be changed to 300 s using the <tt>-x</tt> command line option described on the <tt>ntpd</tt> page. This is usually sufficient to avoid a step after reboot or when the operator has set the system clock to within five minutes by eyeball-and-wristwatch. In extreme cases the step threshold can be changed by the <tt>tinker step</tt> command discribed on the <a href="miscopt.html">Miscellaneous Options</a> page. If set to zero, the clock will never be stepped; however, users should understand the implications for doing this in a distributed data network where all processing must be tightly synchronized. See the <a href="http://www.eecis.udel.edu/%7emills/leap.html">NTP Timescale and Leap Seconds</a> page for further information. If a step adjustment is made, the clock discipline algorithm will start all over again, requiring another round of at least four messages as before. This is necessary so that all servers and peers operate on the same set of time values.</p>
+ <p>The clock discipline algorithm is designed to avoid large noise spikes that might occur on a congested network or access line. If an offset sample exceeds the step threshold, it is ignored and a timer started. If a later sample is below the step threshold, the counter is reset and operation continues normally. However, if the counter is greater than the stepout interval, which defaults to 900 s, the next sample will step the time as directed. The stepout threshold can be changed by the <tt>tinker stepout</tt> command discribed on the Miscellaneous Options page.</p>
+ <p>If for some reason the hardware clock oscillator frequency error is very large, say over 400 PPM, the time offset when the daemon is started for the first time may increase over time until exceeding the step threshold, which requires a frequency adjustment and another step correction. However, due to provisions that reduce vulnerability to noise spikes, the second correction will not be done until after the stepout threshold. When the frequency error is very large, it may take a number of cycles like this until converging to the nominal frequency correction and writing the <tt>ntp.drift</tt> file. If the frequency error is over 500 PPM, convergence will never occur and occasional step adjustments will occur indefinitely.</p>
+ <h4>Verifying Correct Operation</h4>
+ <p>After starting the daemon, run the <tt>ntpq</tt> program using the <tt>-n</tt> switch, which will avoid possible distractions due to name resolution problems. Use the <tt>pe</tt> command to display a billboard showing the status of configured peers and possibly other clients poking the daemon. After operating for a few minutes, the display should be something like:</p>
+ <pre>
+ntpq&gt; pe
+ remote refid st t when poll reach delay offset jitter
+=====================================================================
+-isipc6.cairn.ne .GPS1. 1 u 18 64 377 65.592 -5.891 0.044
++saicpc-isiepc2. pogo.udel.edu 2 u 241 128 370 10.477 -0.117 0.067
++uclpc.cairn.net pogo.udel.edu 2 u 37 64 177 212.111 -0.551 0.187
+*pogo.udel.edu .GPS1. 1 u 95 128 377 0.607 0.123 0.027
+</pre>
+ <p>The host names or addresses shown in the <tt>remote</tt> column correspond to the server and peer entries listed in the configuration file; however, the DNS names might not agree if the names listed are not the canonical DNS names. IPv4 addresses are shown in dotted quad notation, while IPv6 addresses are shown alarmingly. The <tt>refid</tt> column shows the current source of synchronization, while the <tt>st</tt> column reveals the stratum, <tt>t</tt> the type (<tt>u</tt> = unicast, <tt>m</tt> = multicast, <tt>l</tt> = local, <tt>-</tt> = don't know), and <tt>poll</tt> the poll interval in seconds. The <tt>when</tt> column shows the time since the peer was last heard in seconds, while the <tt>reach</tt> column shows the status of the reachability register (see RFC-1305) in octal. The remaining entries show the latest delay, offset and jitter in milliseconds. Note that in NTP Version 4 what used to be the <tt>dispersion</tt> column has been replaced by the <tt>jitter</tt> column.</p>
+ <p>As per the NTP specification RFC-1305, when the <tt>stratum</tt> is between 0 and 15 for a NTP server, the <tt>refid</tt> field shows the server DNS name or, if not found, the IP address in dotted-quad. When the <tt>stratum</tt> is any value for a reference clock, this field shows the identification string assigned to the clock. However, until the client has synchronized to a server, or when the <tt>stratum</tt> for a NTP server is 0 (appears as 16 in the billboards), the status cannot be determined. As a help in debugging, the <tt>refid</tt> field is set to a four-character string called the kiss code. The current kiss codes are as as follows.</p>
+ <p>Peer Kiss Codes</p>
+ <p><tt>ACST</tt></p>
+ <dl>
+ <dd>The association belongs to a anycast server.
+ <dt><tt>AUTH</tt>
+ <dd>Server authentication failed. Please wait while the association is restarted.
+ <dt><tt>AUTO</tt>
+ <dd>Autokey sequence failed. Please wait while the association is restarted.
+ <dt><tt>BCST</tt>
+ <dd>The association belongs to a broadcast server.
+ <dt><tt>CRYP</tt>
+ <dd>Cryptographic authentication or identification failed. The details should be in the system log file or the <tt>cryptostats</tt> statistics file, if configured. No further messages will be sent to the server.
+ <dt><tt>DENY</tt>
+ <dd>Access denied by remote server. No further messages will be sent to the server.
+ <dt><tt>DROP</tt>
+ <dd>Lost peer in symmetric mode. Please wait while the association is restarted.
+ <dt><tt>RSTR</tt>
+ <dd>Access denied due to local policy. No further messages will be sent to the server.
+ <dt><tt>INIT</tt>
+ <dd>The association has not yet synchronized for the first time.
+ <dt><tt>MCST</tt>
+ <dd>The association belongs to a manycast server.
+ <dt><tt>NKEY</tt>
+ <dd>No key found. Either the key was never installed or is not trusted.
+ <dt><tt>RATE</tt>
+ <dd>Rate exceeded. The server has temporarily denied access because the client exceeded the rate threshold.
+ <dt><tt>RMOT</tt>
+ <dd>Somebody is tinkering with the association from a remote host running <tt>ntpdc</tt>. Not to worry unless some rascal has stolen your keys.
+ <dt><tt>STEP</tt>
+ <dd>A step change in system time has occurred, but the association has not yet resynchronized.
+ </dl>
+ <p>System Kiss Codes</p>
+ <dl>
+ <dt><tt>INIT</tt>
+ <dd>The system clock has not yet synchronized for the first time.
+ <dt><tt>STEP</tt>
+ <dd>A step change in system time has occurred, but the system clock has not yet resynchronized.
+ </dl>
+ <p>The tattletale symbol at the left margin displays the synchronization status of each peer. The currently selected peer is marked <tt>*</tt>, while additional peers designated acceptable for synchronization are marked <tt>+</tt>. Peers marked <tt>*</tt> and <tt>+</tt> are included in the weighted average computation to set the local clock; the data produced by peers marked with other symbols are discarded. See the <tt>ntpq</tt> page for the meaning of these symbols.</p>
+ <p>Additional details for each peer separately can be determined by the following procedure. First, use the <tt>as</tt> command to display an index of association identifiers, such as</p>
+ <pre>
+ntpq&gt; as
+ind assID status conf reach auth condition last_event cnt
+===========================================================
+ 1 50252 f314 yes yes ok outlyer reachable 1
+ 2 50253 f414 yes yes ok candidat reachable 1
+ 3 50254 f414 yes yes ok candidat reachable 1
+ 4 50255 f614 yes yes ok sys.peer reachable 1
+</pre>
+ <p>Each line in this billboard is associated with the corresponding line in the <tt>pe</tt> billboard above. The <tt>assID</tt> shows the unique identifier for each mobilized association, while the <tt>status</tt> column shows the peer status word in hex, as defined in the NTP specification. Next, use the <tt>rv</tt> command and the respective <tt>assID</tt> identifier to display a detailed synopsis for the selected peer, such as</p>
+ <pre>
+ntpq&gt; rv 50253
+status=f414 reach, conf, auth, sel_candidat, 1 event, event_reach,
+srcadr=saicpc-isiepc2.cairn.net, srcport=123, dstadr=140.173.1.46,
+dstport=123, keyid=3816249004, stratum=2, precision=-27,
+rootdelay=10.925, rootdispersion=12.848, refid=pogo.udel.edu,
+reftime=bd11b225.133e1437 Sat, Jul 8 2000 13:59:01.075, delay=10.550,
+offset=-1.357, jitter=0.074, dispersion=1.444, reach=377, valid=7,
+hmode=1, pmode=1, hpoll=6, ppoll=7, leap=00, flash=00 ok,
+org=bd11b23c.01385836 Sat, Jul 8 2000 13:59:24.004,
+rec=bd11b23c.02dc8fb8 Sat, Jul 8 2000 13:59:24.011,
+xmt=bd11b21a.ac34c1a8 Sat, Jul 8 2000 13:58:50.672,
+filtdelay= 10.45 10.50 10.63 10.40 10.48 10.43 10.49 11.26,
+filtoffset= -1.18 -1.26 -1.26 -1.35 -1.35 -1.42 -1.54 -1.81,
+filtdisp= 0.51 1.47 2.46 3.45 4.40 5.34 6.33 7.28,
+hostname=&quot;miro.time.saic.com&quot;, signature=md5WithRSAEncryption, flags=0x83f01, initsequence=61, initkey=0x287b649c,
+timestamp=3172053041
+</pre>
+ <p>A detailed explanation of the fields in this billboard are beyond the scope of this discussion; however, most variables defined in the NTP Version 3 specification RFC-1305 are available along with others defined for NTPv4 on the <tt>ntpq</tt> page. This particular example was chosen to illustrate probably the most complex configuration involving symmetric modes and public-key cryptography. As the result of debugging experience, the names and values of these variables may change from time to time.</p>
+ <p>A useful indicator of miscellaneous problems is the <tt>flash</tt> value, which reveals the state of the various sanity tests on incoming packets. There are currently 12 bits, one for each test, numbered from the right, which is for test 1. If the test fails, the corresponding bit is set to one and zero otherwise. If any bit is set following each processing step, the packet is discarded. The meaning of each test is described on the <tt>ntpq</tt> page.</p>
+ <p>The three lines identified as <tt>filtdelay</tt>, <tt>filtoffset</tt> and <tt>filtdisp</tt> reveal the roundtrip delay, clock offset and dispersion for each of the last eight measurement rounds, all in milliseconds. Note that the dispersion, which is an estimate of the error, increases as the age of the sample increases. From these data, it is usually possible to determine the incidence of severe packet loss, network congestion, and unstable local clock oscillators. There are no hard and fast rules here, since every case is unique; however, if one or more of the rounds show large values or change radically from one round to another, the network is probably congested or lossy.</p>
+ <p>Once the daemon has set the local clock, it will continuously track the discrepancy between local time and NTP time and adjust the local clock accordingly. There are two components of this adjustment, time and frequency. These adjustments are automatically determined by the clock discipline algorithm, which functions as a hybrid phase/frequency feedback loop. The behavior of this algorithm is carefully controlled to minimize residual errors due to network jitter and frequency variations of the local clock hardware oscillator that normally occur in practice. However, when started for the first time, the algorithm may take some time to converge on the intrinsic frequency error of the host machine.</p>
+ <p>The state of the local clock itself can be determined using the <tt>rv</tt> command (without the argument), such as</p>
+ <pre>
+ntpq&gt; rv
+status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
+version=&quot;ntpd 4.0.99j4-r Fri Jul 7 23:38:17 GMT 2000 (1)&quot;,
+processor=&quot;i386&quot;, system=&quot;FreeBSD3.4-RELEASE&quot;, leap=00, stratum=2,
+precision=-27, rootdelay=0.552, rootdispersion=12.532, peer=50255,
+refid=pogo.udel.edu,
+reftime=bd11b220.ac89f40a Sat, Jul 8 2000 13:58:56.673, poll=6,
+clock=bd11b225.ee201472 Sat, Jul 8 2000 13:59:01.930, state=4,
+phase=0.179, frequency=44.298, jitter=0.022, stability=0.001,
+hostname=&quot;barnstable.udel.edu&quot;, signature=md5WithRSAEncryption,
+flags=0x80011, hostkey=3171372095, refresh=3172016539
+cert=&quot;grundoon.udel.edu grundoon.udel.edu 0x3 3233600829&quot;
+cert=&quot;whimsy.udel.edu whimsy.udel.edu 0x5 3233682156&quot;
+</pre>
+ <p>An explanation about most of these variables is in the RFC-1305 specification. The most useful ones include <tt>clock</tt>, which shows when the clock was last adjusted, and <tt>reftime</tt>, which shows when the server clock of <tt>refid</tt> was last adjusted. The <tt>version</tt>, <tt>processor</tt> and <tt>system</tt> values are very helpful when included in bug reports. The mean millisecond time offset (<tt>phase</tt>) and deviation (<tt>jitter</tt>) monitor the clock quality, while the mean PPM frequency offset (<tt>frequency</tt>) and deviation (<tt>stability</tt>) monitor the clock stability and serve as a useful diagnostic tool. It has been the experience of NTP operators over the years that these data represent useful environment and hardware alarms. If the motherboard fan freezes up or some hardware bit sticks, the system clock is usually the first to notice it.</p>
+ <p>Among the new variables added for NTP Version 4 are the <tt>hostname</tt>, <tt>signature</tt>, <tt>flags, hostkey, refresh </tt>and<tt> cert</tt>, which are used for the Autokey public-key cryptography described on the <a href="authopt.html">Authentication Options</a> page. The numeric values show the filestamps, in NTP seconds, that the associated media files were created. These are useful in diagnosing problems with cryptographic key consistency and ordering principles.</p>
+ <p>When nothing seems to happen in the <tt>pe</tt> billboard after some minutes, there may be a network problem. One common network problem is an access controlled router on the path to the selected peer or an access controlled server using methods described on the <a href="accopt.html">Access Control Options</a> page. Another common problem is that the server is down or running in unsynchronized mode due to a local problem. Use the <tt>ntpq</tt> program to spy on the server variables in the same way you can spy on your own.</p>
+ <p>Normally, the daemon will adjust the local clock in small steps in such a way that system and user programs are unaware of its operation. The adjustment process operates continuously unless the apparent clock error exceeds the step threshold for a period longer than the stepout threshold, which for most Internet paths is a very rare event. If the event is simply an outlyer due to an occasional network delay spike, the correction is simply discarded; however, if the apparent time error persists for longer than the stepout threshold of about 17 minutes, the local clock is stepped or slewed to the new value as directed. This behavior is designed to resist errors due to severely congested network paths, as well as errors due to confused radio clocks upon the epoch of a leap second.</p>
+ <h4>Large Frequency Errors</h4>
+ <p>The frequency tolerance of computer clock oscillators can vary widely, which can put a strain on the daemon's ability to compensate for the intrinsic frequency error. While the daemon can handle frequency errors up to 500 parts-per-million (PPM), or 43 seconds per day, values much above 100 PPM reduce the headroom and increase the time to learn the particular value and record it in the <tt>ntp.drift</tt> file. In extreme cases before the particular oscillator frequency error has been determined, the residual system time offsets can sweep from one extreme to the other of the 128-ms tracking window only for the behavior to repeat at 900-s intervals until the measurements have converged.</p>
+ <p>In order to determine if excessive frequency error is a problem, observe the nominal <tt>filtoffset</tt> values for a number of rounds and divide by the poll interval. If the result is something approaching 500 PPM, there is a good chance that NTP will not work properly until the frequency error is reduced by some means. A common cause is the hardware time-of-year (TOY) clock chip, which must be disabled when NTP disciplines the software clock. For some systems this can be done using the <tt><a href="tickadj.html">tickadj</a></tt> utility and the <tt>-s</tt> command line argument. For other systems this can be done using a command in the system startup file.</p>
+ <p>If the TOY chip is not the cause, the problem may be that the hardware clock frequency may simply be too slow or two fast. In some systems this might require tweaking a trimmer capacitor on the motherboard. For other systems the clock frequency can be adjusted in increments of 100 PPM using the <tt>tickadj</tt> utility and the <tt>-t</tt> command line argument. Note that the <tt>tickadj</tt> alters certain kernel variables and, while the utility attempts to figure out an acceptable way to do this, there are many cases where <tt>tickadj</tt> is incompatible with a running kernel.</p>
+ <h4>Access Controls</h4>
+ <p>Provisions are included in <tt>ntpd</tt> for access controls which deflect unwanted traffic from selected hosts or networks. The controls described on the <a href="accopt.html">Access Control Options</a> include detailed packet filter operations based on source address and address mask. Normally, filtered packets are dropped without notice other than to increment tally counters. However, the server can be configured to send a &quot;kiss-o'-death&quot; (KOD) packet to the client either when explicitly configured or when cryptographic authentication fails for some reason. The client association is permanently disabled, the access denied bit (TEST4) is set in the flash variable and a message is sent to the system log.</p>
+ <p>The access control provisions include a limit on the packet rate from a host or network. If an incoming packet exceeds the limit, it is dropped and a KOD sent to the source. If this occurs after the client association has synchronized, the association is not disabled, but a message is sent to the system log. See the <a href="accopt.html">Access Control Options</a> page for further informatin.</p>
+ <h4>Large Delay Variations</h4>
+ <p>In some reported scenarios an access line may show low to moderate network delays during some period of the day and moderate to high delays during other periods. Often the delay on one direction of transmission dominates, which can result in large time offset errors, sometimes in the range up to a few seconds. It is not usually convenient to run <tt>ntpd</tt> throughout the day in such scenarios, since this could result in several time steps, especially if the condition persists for greater than the stepout threshold.</p>
+ <p>Specific provisions have been built into <tt>ntpd</tt> to cope with these problems. The scheme is called &quot;huff-'n-puff and is described on the <a href="miscopt.html">Miscellaneous Options</a> page. An alternative approach in such scenarios is first to calibrate the local clock frequency error by running <tt>ntpd</tt> in continuous mode during the quiet interval and let it write the frequency to the <tt>ntp.drift</tt> file. Then, run <tt>ntpd -q</tt> from a cron job each day at some time in the quiet interval. In systems with the nanokernel or microkernel performance enhancements, including Solaris, Tru64, Linux and FreeBSD, the kernel continuously disciplines the frequency so that the residual correction produced by <tt>ntpd</tt> is usually less than a few milliseconds.</p>
+ <h4>Cryptographic Authentication</h4>
+ <p>Reliable source authentication requires the use of symmetric key or public key cryptography, as described on the <a href="authopt.html">Authentication Options</a> page. In symmetric key cryptography servers and clients share session keys contained in a secret key file In public key cryptography, which requires the OpenSSL software library, the server has a private key, never shared, and a public key with unrestricted distribution. The cryptographic media required are produced by the <a href="keygen.html"><tt>ntp-keygen</tt></a> program.</p>
+ <p>Problems with symmetric key authentication are usually due to mismatched keys or improper use of the <tt>trustedkey</tt> command. A simple way to check for problems is to use the trace facility, which is enabled using the <tt>ntpd -d</tt> command line. As each packet is received a trace line is displayed which shows the authentication status in the <tt>auth</tt> field. A status of 1 indicates the packet was successful authenticated; otherwise it has failed.</p>
+ <p>A common misconception is the implication of the <tt>auth</tt> bit in the <tt>enable</tt> and <tt>disable</tt> commands. <b>This bit does not affect authentication in any way other than to enable or disable mobilization of a new persistent association in broadcast/multicast client, manycast client or symmetric passive modes.</b> If enabled, which is the default, these associations require authentication; if not, an association is mobilized even if not authenticated. Users are cautioned that running with authentication disabled is very dangerous, since an intruder can easily strike up an association and inject false time values.</p>
+ <p>Public key cryptography is supported in NTPv4 using the Autokey protocol, which is described in briefings on the NTP Project page linked from www.ntp.org. Development of this protocol is mature and the <tt>ntpd</tt> implementation is basically complete. Autokey version 2, which is the latest and current version, includes provisions to hike certificate trails, operate as certificate authorities and verify identity using challenge/response identification schemes. Further details of the protocol are on the <a href="authopt.html">Authentication Options</a> page. Common problems with configuration and key generation are mismatched key files, broken links and missing or broken random seed file.</p>
+ <p>As in the symmetric key cryptography case, the trace facility is a good way to verify correct operation. A statistics file <tt>cryptostats</tt> records protocol transactions and error messages. The daemon requires a random seed file, public/private key file and a valid certificate file; otherwise it exits immediately with a message to the system log. As each file is loaded a trace message appears with its filestamp. There are a number of checks to insure that only consistent data are used and that the certificate is valid. When the protocol is in operation a number of checks are done to verify the server has the expected credentials and its filestamps and timestamps are consistent. Errors found are reported using NTP control and monitoring protocol traps with extended trap codes shown in the Authentication Options page.</p>
+ <p>To assist debugging every NTP extension field is displayed in the trace along with the Autokey operation code. Every extension field carrying a verified signature is identified and displayed along with filestamp and timestamp where meaningful. In all except broadcast/multicast client mode, correct operation of the protocol is confirmed by the absence of extension fields and an <tt>auth</tt> value of one. It is normal in broadcast/multicast client mode that the broadcast server use one extension field to show the host name, status word and association ID.</p>
+ <h4>Debugging Checklist</h4>
+ <p>If the <tt>ntpq</tt> or <tt>ntpdc</tt> programs do not show that messages are being received by the daemon or that received messages do not result in correct synchronization, verify the following:</p>
+ <ol>
+ <li>Verify the <tt>/etc/services</tt> file host machine is configured to accept UDP packets on the NTP port 123. NTP is specifically designed to use UDP and does not respond to TCP.
+ <li>Check the system log for <tt>ntpd</tt> messages about configuration errors, name-lookup failures or initialization problems. Common system log messages are summarized on the <a href="msyslog.html"><tt>ntpd</tt> System Log Messages</a> page. Check to be sure that only one copy of <tt>ntpd</tt> is running.
+ <li>Verify using <tt>ping</tt> or other utility that packets actually do make the round trip between the client and server. Verify using <tt>nslookup</tt> or other utility that the DNS server names do exist and resolve to valid Internet addresses.
+
+ <li>Check that the remote NTP&nbsp;server is up and running. The usual evidence that it is not is a <tt>Connection refused</tt> message.
+ <li>Using the <tt>ntpdc</tt> program, verify that the packets received and packets sent counters are incrementing. If the sent counter does not increment and the configuration file includes configured servers, something may be wrong in the host network or interface configuration. If this counter does increment, but the received counter does not increment, something may be wrong in the network or the server NTP daemon may not be running or the server itself may be down or not responding.
+ <li>If both the sent and received counters do increment, but the <tt>reach</tt> values in the <tt>pe</tt> billboard with <tt>ntpq</tt> continues to show zero, received packets are probably being discarded for some reason. If this is the case, the cause should be evident from the <tt>flash</tt> variable as discussed above and on the <tt>ntpq</tt> page. It could be that the server has disabled access for the client address, in which case the refid field in the <tt>ntpq pe</tt> billboard will show a kiss code. See earlier on this page for a list of kiss codes and their meaning. <li>If the <tt>reach</tt> values in the <tt>pe</tt> billboard show the servers are alive and responding, note the tattletale symbols at the left margin, which indicate the status of each server resulting from the various grooming and mitigation algorithms. The interpretation of these symbols is discussed on the <tt>ntpq</tt> page. After a few minutes of operation, one or another of the reachable server candidates should show a * tattletale symbol. If this doesn't happen, the intersection algorithm, which classifies the servers as truechimers or falsetickers, may be unable to find a majority of truechimers among the server population.
+ <li>If all else fails, see the FAQ and/or the discussion and briefings at the NTP Project page.
+ </ol>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/drivers/driver1.html b/contrib/ntp/html/drivers/driver1.html
new file mode 100644
index 000000000000..59334838350b
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver1.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Undisciplined Local Clock</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Undisciplined Local Clock</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.1.<i>u</i><br>
+ Reference ID: <tt>LCL</tt><br>
+ Driver ID: <tt>LOCAL</tt></p>
+ <h4>Description</h4>
+ <p>This driver is intended for use in an isolated network where no external source of synchronization such as a radio clock or modem is available. It allows a designated time server to act as a primary server to provide synchronization to other clients on the network. Pick a machine that has a good clock oscillator (Digital machines are good, Sun machines are not) and configure it with this driver. Set the clock using the best means available, like eyeball-and-wristwatch. Then, point all the other machines at this one or use broadcast (not multicast) mode to distribute time.</p>
+ <p>Another application for this driver is if a particular server clock is to be used as the clock of last resort when all other normal synchronization sources have gone away. This is especially useful if that server has an ovenized oscillator. For this you would configure this driver at a stratum greater than any other likely sources of time (say 3 or 4) to prevent the server taking over when legitimate sources are still available.</p>
+ <p>A third application for this driver is when an external discipline source is available, such as the NIST <tt>lockclock</tt> program, which synchronizes the local clock via a telephone modem and the NIST Automated Computer Time Service (ACTS), or the Digital Time Synchronization Service (DTSS), which runs on DCE machines. In this case the stratum should be set at zero, indicating a bona fide stratum-1 source. In the case of DTSS, the local clock can have a rather large jitter, depending on the interval between corrections and the intrinsic frequency error of the clock oscillator. In extreme cases, this can cause clients to exceed the 128-ms slew window and drop off the NTP subnet.</p>
+ <p>In the case where a NTP time server is synchronized to some device or protocol that is not external to the NTP daemon itself, some means should be provided to pass such things as error and health values to the NTP daemon for dissemination to its clients. If this is not done, there is a very real danger that the device or protocol could fail and with no means to tell NTP clients of the mishap. When ordinary Unix system calls like <tt>adjtime()</tt> are used to discipline the kernel clock, there is no obvious way this can be done without modifying the code for each case. However, when a modified kernel with the <tt>ntp_adjtime()</tt> system call&nbsp; is available, that routine can be used for the same purpose as the <tt>adjtime()</tt> routine and in addition provided with the estimated error, maximum error, and leap-indicator values. This is the preferred way to synchronize the kernel clock and pass information to the NTP clients.</p>
+ <p>In the default mode the behavior of the clock selection algorithm is modified when this driver is in use. The algorithm is designed so that this driver will never be selected unless no other discipline source is available. This can be overridden with the <tt>prefer</tt> keyword of the <tt>server</tt> configuration command, in which case only this driver will be selected for synchronization and all other discipline sources will be ignored. This behavior is intended for use when an external discipline source controls the system clock. See the <a href="../prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page for a detailed description of the exact behavior.</p>
+ <p>The stratum for this driver is set at 5 by default, but can be changed by the <tt>fudge</tt> configuration command and/or the <tt>ntpdc</tt> utility. The reference ID is <tt>LCL</tt> by default, but can be changed using the same mechanisms. <b>*NEVER*</b> configure this driver to operate at a stratum which might possibly disrupt a client with access to a bona fide primary server, unless the local clock oscillator is reliably disciplined by another source. <b>*NEVER NEVER*</b> configure a server which might devolve to an undisciplined local clock to use multicast mode.</p>
+ <p>This driver provides a mechanism to trim the local clock in both time and frequency, as well as a way to manipulate the leap bits. The <tt>fudge time1</tt> parameter adjusts the time (in seconds) and the <tt>fudge time2</tt> parameter adjusts the frequency (in parts per million). Both parameters are additive and operate only once; that is, each command (as from <tt>ntpdc</tt>) adds signed increments in time or frequency to the nominal local clock time and frequency.</p>
+ <h4>Operation with an External Reference Source</h4>
+ <p>There are special provisions for this driver to operate in conjunction with an external reference source, such as the <tt>LOCKCLOCK</tt> scheme used by the NIST&nbsp;time servers. In such schemes the system clock is disciplined by a source external to NTP, in the <tt>LOCKCLOCK</tt> case an ACTS&nbsp;telephone modem. To support <tt>LOCKCLOCK</tt> the NTP&nbsp;distribution should be built with the <tt>--enable-nist</tt> parameter in the configuration phase of the build procedure. This changes the system behavior as follows:</p>
+ <ol>
+ <li>The system clock is not disciplined in any way other than to call the <tt>ntp_adjtime()</tt>&nbsp;system call to obtain the kernel leap code, which becomes the driver leap code and. If the kernel leap code is 11 (not synchronized), the driver stratum is infinity; otherwise the stratum is set by the <tt>stratum</tt> subcommand on the <tt>fudge</tt> command applying to the driver.
+ <li>The NTP&nbsp;algorithms operate in the normal fashion with this driver and possibly other drivers and servers; however, the local clock driver as the <tt>prefer</tt> peer will always be selected, even if declared falseticker by the selection algorithm or fails to survive the clustering algorithm.
+ <li>If the driver leap code is 11, the system leap code is 11, system stratum infinity and system reference identifier <tt>DOWN</tt>. This provides a definitive status condition to dependent clients.
+ </ol>
+ <p>The local clock driver should be configured something like this:</p>
+ <p><tt>server 127.127.1.1 prefer</tt></p>
+ <p><tt>fudge 127.127.1.1 stratum 0 refid NIST</tt></p>
+ <p>The <tt>prefer</tt> keyword forces the driver to discipline the clock, even if other servers are configured and running correctly. This is convenient when a number of servers watch each other for monitoring and statistics gathering. In particular, the <tt>peerstats</tt> data and <tt>sysstats</tt> data can be collected at each server, aggregated for daily or weekly reports and sent by electric mail to a monitoring site. In addition, the full suite of cryptographic authentication algorithms is avialable to other servers and dependent clients.</p>
+ <h4>Monitor Data</h4>
+ <p>No <tt>filegen clockstats</tt> monitor data are produced by this driver.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Specifies the frequency offset calibration factor, in parts per million, with default 0.0.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 3.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>LCL</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/drivers/driver10.html b/contrib/ntp/html/drivers/driver10.html
new file mode 100644
index 000000000000..d5692abb8b0f
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver10.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Austron 2200A/2201A GPS Receivers</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Austron 2200A/2201A GPS Receivers</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.10.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_AS2201</tt><br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the Austron 2200A/2201A GPS/LORAN Synchronized Clock and Timing Receiver connected via a serial port. It supports several special features of the clock, including the Input Buffer Module, Output Buffer Module, IRIG-B Interface Module and LORAN Assist Module. It requires the RS232 Buffered Serial Interface module for communication with the driver. For operation with multiple computers, it requires the <tt>ppsclock</tt> streams module described in the <a href="../ldisc.html">Line Disciplines and Streams Modules</a> page. The streams module requires a gadget box and 1-PPS level converter, such as described in the <a href="../pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page.</p>
+ <p>For use with a single computer, the receiver can be connected directly to the receiver. For use with multiple computers, one of them is connected directly to the receiver and generates the polling messages. The other computers just listen to the receiver output directly or through a buffer amplifier. For computers that just listen, <tt>fudge flag2</tt> must be set and the <tt>ppsclock </tt>streams module configured on each of them.</p>
+ <p>This receiver is capable of a comprehensive and large volume of statistics and operational data. The specific data collection commands and attributes are embedded in the driver source code; however, the collection process can be enabled or disabled using the flag4 flag. If set, collection is enabled; if not, which is the default, it is disabled. A comprehensive suite of data reduction and summary scripts is in the ./scripts/stats directory</p>
+ of the ntp3 distribution.
+ <h4>Monitor Data</h4>
+ <p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Set for computers that listen-only.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver11.html b/contrib/ntp/html/drivers/driver11.html
new file mode 100644
index 000000000000..9f13f6788bcc
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver11.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Arbiter 1088A/B GPS Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Arbiter 1088A/B GPS Receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.11.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_ARBITER</tt><br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt></p>
+ <h4>
+ <p>Description</p>
+ </h4>
+ <p>This driver supports the Arbiter 1088A/B Satellite Controlled Clock. The claimed accuracy of this clock is 100 ns relative to the PPS output when receiving four or more satellites.</p>
+ <p>The receiver should be configured before starting the NTP daemon, in order to establish reliable position and operating conditions. It does not initiate surveying or hold mode. For use with NTP, the daylight savings time feature should be disables (<tt>D0</tt> command) and the broadcast mode set to operate in UTC (<tt>BU</tt> command).</p>
+ <p>The timecode format supported by this driver is selected by the poll sequence <tt>B5</tt>, which initiates a line in the following format to be repeated once per second until turned off by the <tt>B0</tt> command.</p>
+ <p>Format <tt>B5</tt> (24 ASCII printing characters):</p>
+ <pre>&lt;cr&gt;&lt;lf&gt;i yy ddd hh:mm:ss.000bbb
+
+on-time = &lt;cr&gt;
+i = synchronization flag (' ' = locked, '?' = unlocked)
+yy = year of century
+ddd = day of year
+hh:mm:ss = hours, minutes, seconds
+.000 = fraction of second (not used)
+bbb = tailing spaces for fill</pre>
+ <p>The alarm condition is indicated by a '?' at i, which indicates the receiver is not synchronized. In normal operation, a line consisting of the timecode followed by the time quality character (TQ) followed by the receiver status string (SR) is written to the clockstats file.</p>
+ <p>The time quality character is encoded in IEEE P1344 standard:</p>
+ <p>Format <tt>TQ</tt> (IEEE P1344 estimated worst-case time quality)</p>
+ <pre>0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock locked, maximum accuracy
+F&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock failure, time not reliable
+4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 1 us
+5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 10 us
+6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 100 us
+7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 1 ms
+8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 10 ms
+9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 100 ms
+A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 1 s
+B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 10 s</pre>
+ <p>The status string is encoded as follows:</p>
+ <p>Format <tt>SR</tt> (25 ASCII printing characters)</p>
+ <pre>V=vv S=ss T=t P=pdop E=ee
+
+vv = satellites visible
+ss = relative signal strength
+t = satellites tracked
+pdop = position dilution of precision (meters)
+ee = hardware errors</pre>
+ <p>A three-stage median filter is used to reduce jitter and provide a dispersion measure. The driver makes no attempt to correct for the intrinsic jitter of the radio itself.</p>
+ <h4>Monitor Data</h4>
+ <p>When enabled by the <tt>flag4</tt> fudge flag, an additional line containing the latitude, longitude, elevation and optional deviation data is written to the <tt>clockstats</tt> file. The deviation data operates with an external pulse-per-second (PPS) input, such as a cesium oscillator or another radio clock. The PPS input should be connected to the B event channel and the radio initialized for deviation data on that channel. The deviation data consists of the mean offset and standard deviation of the external PPS signal relative the GPS signal, both in microseconds over the last 16 seconds.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver12.html b/contrib/ntp/html/drivers/driver12.html
new file mode 100644
index 000000000000..242e50bab162
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver12.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>KSI/Odetics TPRO/S IRIG Interface</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>KSI/Odetics TPRO/S IRIG Interface</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.12.<i>u</i><br>
+ Reference ID: <tt>IRIG</tt><br>
+ Driver ID: <tt>IRIG_TPRO</tt><br>
+ TPRO Device: <tt>/dev/tpro<i>u</i></tt><br>
+ Requires: KSI/Odetics device driver, <tt>/usr/include/sys/tpro.h</tt> header file</p>
+ <h4>Description</h4>
+ <p>This driver supports the KSI/Odetics TPRO and TPRO-SAT IRIG-B Decoder, which is a module connected directly to the SBus of a Sun workstation. The module works with the IRIG-B signal generated by several radio clocks, including those made by Arbiter, Austron, Odetics, Spectracom and TrueTime, among others, although it is generally an add- on option. In the case of the TPRO-SAT, the module is an integral part of a GPS receiver, which serves as the primary timing source.</p>
+ <p>Using the TPRO interface as a NTP reference clock provides precision time only to ntpd and its clients. With suitable kernel modifications, it is possible to use the TPRO as the CPU system clock, avoiding errors introduced by the CPU clock oscillator wander. See the <a href="../kern.html">A Kernel Model for Precision Timekeeping </a>page for further details.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>IRIG</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver16.html b/contrib/ntp/html/drivers/driver16.html
new file mode 100644
index 000000000000..96ecdb0fefb4
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver16.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.6 [en] (Win95; U) [Netscape]">
+ <meta name="Author" content="Ganesh Ramasivan">
+ <title>Bancomm bc635VME Time and Frequency Processor</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>bc635VME/bc350VXI Time and Frequency Processor</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.16.<i>u</i><br>
+ Reference ID: BTFP<br>
+ Driver ID: GPS_BANCOMM<br>
+ Bancomm Device <tt>/dev/btfp0</tt><br>
+ Requires: Bancomm bc635 TFP device module driver for SunOS 4.x/SunOS 5.x</p>
+ <h4>Description</h4>
+ <p>This is the clock driver for the Bancomm bc635VME Time and Frequency Processor. It requires the BANCOMM bc635VME bc350VXI Time and Frequency Processor Module Driver for SunOS 4.x/SunOS 5.x UNIX Systems.</p>
+ <p>Most of this code is originally from refclock_bancomm.c with thanks. It has been modified and tested on an UltraSparc IIi-cEngine running Solaris 2.6. A port for HPUX is not available henceforth.</p>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver18.html b/contrib/ntp/html/drivers/driver18.html
new file mode 100644
index 000000000000..dcd616aefd71
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver18.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>NIST Modem Time Service</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>NIST Modem Time Service</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.18.<i>u</i><br>
+ Reference ID: <tt>NIST</tt><br>
+ Driver ID: <tt>ACTS_NIST</tt><br>
+ Serial Port: <tt>/dev/acts<i>u</i></tt>; 1200 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt><br>
+ Requires: <tt>/usr/include/sys/termios.h</tt> header file with modem control</p>
+ <h4>Description</h4>
+ <p>This driver supports the NIST Automated Computer Time Service (ACTS). It periodically dials a prespecified telephone number, receives the NIST timecode data and calculates the local clock correction. It designed primarily for use when neither a radio clock nor connectivity to Internet time servers is available. For the best accuracy, the individual telephone line/modem delay needs to be calibrated using outside sources.</p>
+ <p>The ACTS is located at NIST Boulder, CO, telephone 303 494 4774. A toll call from Newark, DE, costs between three and four cents, although it is not clear what carrier and time of day discounts apply. The modem dial string will differ depending on local telephone configuration, etc., and is specified by the phone command in the configuration file. The argument to this command is an AT command for a Hayes compatible modem.</p>
+ <p>The driver can operate in either of two modes, as determined by the mode parameter in the server configuration command. In mode 0 the driver operates continuously at intervals determined by the fudge time1 parameter, as described above. In mode 1 the driver is enabled only when no other sources of synchronization are available and when we have gone more than MAXOUTAGE (3600 s) since last synchronized by other sources of synchronization.</p>
+ <p>The accuracy produced by this driver should be in the range of a millisecond or two, but may need correction due to the delay characteristics of the individual modem involved. For undetermined reasons, some modems work with the ACTS echo-delay measurement scheme and some don't. This driver tries to do the best it can with what it gets. Initial experiments with a Practical Peripherals 9600SA modem here in Delaware suggest an accuracy of a millisecond or two can be achieved without the scheme by using a fudge time1 value of 65.0 ms. In either case, the dispersion for a single call involving ten samples is about 1.3 ms.</p>
+ <p>For reliable call management, this driver requires a 1200-bps modem with a Hayes-compatible command set and control over the modem data terminal ready (DTR) control line. Present restrictions require the use of a POSIX-compatible programming interface, although other interfaces may work as well. The ACTS telephone number and modem setup string are hard-coded in the driver and may require changes for nonstandard modems or special circumstances.</p>
+ <p>The fudge time1 parameter represents a propagation-delay correction factor which is added to the value computed by ACTS when the echo-delay scheme is used. This scheme does not work with all modems; for those that don't, fudge flag2 should be set to disable the feature. In this case the fudge time1 parameter represents the total propagation delay due to all causes and must be determined by external calibration.</p>
+ <p>The ACTS call interval is determined by a counter initially set to the fudge time2 parameter. At each poll interval, minpoll (usually 64 s) is subtracted from the counter. When the counter is equal to or less than zero, the fudge flag1 is set, which causes up to three call attempts to be made to ACTS. The fudge flag1 is reset after a valid clock update has been determined or by a device fault, timeout or manually using <tt>ntpdc</tt>. After a valid clock update, the counter is reset for the next interval. Setting the <tt>fudge time2</tt> parameter to zero disables automatic call attempts. Manual call attempts can be made at any time by setting <tt>fudgeflag1</tt> using ntpdc.</p>
+ <p>The NIST timecode message is transmitted at 1200 bps in the following format:</p>
+ <pre>
+jjjjj yy-mm-dd hh:mm:ss tt l uuu mmmmm UTC(NIST) *
+
+jjjjj = modified Julian day
+yy-mm-dd = year, month, day
+hh:mm:ss = hours, minutes, seconds
+tt = DST indicator (see driver listing)
+l = leap-second warning (see driver listing)
+uuu = DUT1 correction (see driver listing)
+mmmmm = modem calibration (see driver listing)
+on-time = '*'</pre>
+ <p>The timecode message is transmitted continuously after a signon banner, which this driver ignores. The driver also ignores all but the yy-mm-dd, hh:mm:ss and on-time character '*' fields, although it checks the format of all fields of the message. A timestamp is captured at the '*' character, as required by the ACTS specification, and used as the reference time of the timecode. If a message with an on-time character of '#' is received, the driver updates the propagation delay. The driver disconnects when (a) ten valid messages have been received, (b) no message has been received for 15 s, (c) an on-time character of '#' is received. These messages are processed by a trimmed-mean filter to reduce timing noise and then by the usual NTP algorithms to develop the clock correction.</p>
+ <p>Since the accumulated error grows with the interval between calls, it is important that the intrinsic frequency error be minimized. This can be done by observing difference in offsets between two calls placed some hours apart and calculating the uncorrected frequency error. This error, as a fixed-point value in parts-per-million, should be installed in the ntp.drift file before the daemon is started. Some experimentation may be necessary in order to reduce the intrinsic frequency error to the order of 1 ppm.</p>
+ <p>The behavior of the clock selection algorithm is modified when this driver is in use. The algorithm is designed so that this driver will never be selected unless no other discipline source is available. This can be overridden with the prefer keyword of the server configuration command, in which case only this driver will be selected for synchronization and all other discipline sources will be ignored.</p>
+ <p>Unlike other drivers, each ACTS call generates one clock correction and that correction is processed immediately. There is no wait to allow the clock filter to accumulate samples. In addition, the watchdog timeout of the local clock algorithm is disabled, so that a correction received from this driver that exceeds CLOCK_MAX (128 ms) causes an immediate step/slew.</p>
+ <p>Since the interval between updates can be much longer than used with ordinary NTP peers, the local clock procedure has been modified to operate in either of two modes, depending on whether the interval between updates is less than or greater than CLOCK_MAXSEC (1200 s). If less than this value, the local clock procedure operates using the standard NTP phase-lock loop as with other NTP peers. If greater than this value, the procedure operates using a modified frequency-lock loop suggested by Judah Levine in his lockclock algorithm designed specifically for ACTS.</p>
+ <h4>Call Management</h4>
+ <p>Since ACTS will be a toll call in most areas of the country, it is necessary to carefully manage the call frequency. This can be done in two ways, by specifying the interval between calls, or by setting a flag bit manually or via a cron job. The call interval is determined by a counter initially set to the fudge time2 parameter. At each poll interval, minpoll (usually 64 s) is subtracted from the counter. When the counter is equal to or less than zero, the fudge flag1 is set, which causes up to three call attempts to be made. The fudge flag1 is reset after ten offset samples have been determined in a single call or by a device fault, timeout or manually using ntpdc. Upon successful completion of a call, the eight samples have been shifted into the clock filter, the local clock updated and the counter reset for the next interval. Setting the fudge time2 parameter to zero disables automatic call attempts.</p>
+ <p>Manual call attempts can be made at any time by setting fudge flag1 using ntpdc. For example, the ntpdc command</p>
+ <pre>
+fudge 127.127.18.1 flags 1</pre>
+ <p>will ask for a key identifier and password and, if authenticated by the server, will set flag1. There may be a short delay until the expiration of the current poll timeout.</p>
+ <p>The flag1 can be set from a cron job in the following way. Construct a file with contents</p>
+ <pre>keyid 11
+passwd dialup
+fudge 127.127.18.1 flags 1
+quit</pre>
+ <p>Then, run the following program at specified times as required.</p>
+ <pre>/usr/local/bin/ntpdc &lt;file</pre>
+ <h4>Monitor Data</h4>
+ <p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>NIST</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a>&nbsp;</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver19.html b/contrib/ntp/html/drivers/driver19.html
new file mode 100644
index 000000000000..20dae15b1a25
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver19.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Heath WWV/WWVH Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Heath WWV/WWVH Receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.19.<i>u</i><br>
+ Reference ID: <tt>WWV</tt><br>
+ Driver ID: <tt>WWV_HEATH</tt><br>
+ Serial Port: <tt>/dev/heath<i>u</i></tt>; 1200 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt><br>
+ Requires: <tt>/usr/include/sys/termios.h</tt> header file with modem control</p>
+ <h4>Description</h4>
+ <p>This driver supports the Heath GC-1000 Most Accurate Clock, with RS232C Output Accessory. This is a WWV/WWVH receiver somewhat less robust than other supported receivers. Its claimed accuracy is 100 ms when actually synchronized to the broadcast signal, but this doesn't happen even most of the time, due to propagation conditions, ambient noise sources, etc. When not synchronized, the accuracy is at the whim of the internal clock oscillator, which can wander into the sunset without warning. Since the indicated precision is 100 ms, expect a host synchronized only to this thing to wander to and fro, occasionally being rudely stepped when the offset exceeds the default CLOCK_MAX of 128 ms.</p>
+ <p>The internal DIPswitches should be set to operate at 1200 baud in MANUAL mode and the current year. The external DIPswitches should be set to GMT and 24-hour format. It is very important that the year be set correctly in the DIPswitches; otherwise, the day of year will be incorrect after 28 April of a normal or leap year.</p>
+ <p>In MANUAL mode the clock responds to a rising edge of the request to send (RTS) modem control line by sending the timecode. Therefore, it is necessary that the operating system implement the <tt>TIOCMBIC</tt> and <tt>TIOCMBIS</tt> ioctl system calls and <tt>TIOCM_RTS</tt> control bit. Present restrictions require the use of a POSIX-compatible programming interface, although other interfaces may work as well.</p>
+ <p>The clock message consists of 23 ASCII printing characters in the following format:</p>
+ <pre>hh:mm:ss.f&nbsp;&nbsp;&nbsp;&nbsp; dd/mm/yr&lt;cr&gt;
+
+hh:mm:ss.f = hours, minutes, seconds
+f = deciseconds ('?' when out of spec)
+dd/mm/yr = day, month, year</pre>
+ <p>The alarm condition is indicated by '?', rather than a digit, at A. Note that 0?:??:??.? is displayed before synchronization is first established and hh:mm:ss.? once synchronization is established and then lost again for about a day.</p>
+ <p>A fudge time1 value of .07 s appears to center the clock offset residuals.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>WWV</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver
+ </dl>
+ Additional Information
+ <p><a href="../refclock.html">Reference Clock Drivers</a>&nbsp;</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver2.html b/contrib/ntp/html/drivers/driver2.html
new file mode 100644
index 000000000000..453374f89bcc
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver2.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Trak 8820 GPS Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Trak 8820 GPS Receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.2.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_TRAK</tt><br>
+ Serial Port: <tt>/dev/trak<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the Trak 8820 GPS Station Clock. The claimed accuracy at the 1-PPS output is 200-300 ns relative to the broadcast signal; however, in most cases the actual accuracy is limited by the precision of the timecode and the latencies of the serial interface and operating system.</p>
+ <p>For best accuracy, this radio requires the <tt>tty_clk</tt> line discipline, which captures a timestamp at the <tt>*</tt> on-time character of the timecode. Using this discipline the jitter is in the order of 1 ms and systematic error about 0.5 ms. If unavailable, the buffer timestamp is used, which is captured at the <tt>\r</tt> ending the timecode message. This introduces a systematic error of 23 character times, or about 24 ms at 9600 bps, together with a jitter well over 8 ms on Sun IPC-class machines.</p>
+ <p>Using the menus, the radio should be set for 9600 bps, one stop bit and no parity. It should be set to operate in computer (no echo) mode. The timecode format includes neither the year nor leap-second warning.</p>
+ <p>In operation, this driver sends a <tt>RQTS\r</tt> request to the radio at initialization in order to put it in continuous time output mode. The radio then sends the following message once each second:</p>
+ <pre>*RQTS U,ddd:hh:mm:ss.0,q&lt;cr&gt;&lt;lf&gt;
+on-time = '*'
+ddd = day of year
+hh:mm:ss = hours, minutes, seconds
+q = quality indicator (phase error), 0-6:
+&nbsp;&nbsp;&nbsp;&nbsp; 0 &gt; 20 us
+&nbsp;&nbsp;&nbsp;&nbsp; 6 &gt; 10 us
+&nbsp;&nbsp;&nbsp;&nbsp; 5 &gt; 1 us
+&nbsp;&nbsp;&nbsp;&nbsp; 4 &gt; 100 ns
+&nbsp;&nbsp;&nbsp;&nbsp; 3 &gt; 10 ns
+&nbsp;&nbsp;&nbsp;&nbsp; 2 &lt; 10 ns</pre>
+ The alarm condition is indicated by <tt>0</tt> at <tt>Q</tt>, which means the radio has a phase error greater than 20 us relative to the broadcast time. The absence of year, DST and leap-second warning in this format is also alarmed.
+ <p>The continuous time mode is disabled using the <tt>RQTX\r</tt> request, following which the radio sends a <tt>RQTX DONE&lt;cr&gt;&lt;lf&gt;</tt> response. In the normal mode, other control and status requests are effective, including the leap-second status request <tt>RQLS&lt;cr&gt;</tt>. The radio responds with <tt>RQLS yy,mm,dd&lt;cr&gt;&lt;lf&gt;</tt>, where <tt>yy,mm,dd</tt> are the year, month and day. Presumably, this gives the epoch of the next leap second, <tt>RQLS 00,00,00</tt> if none is specified in the GPS message. Specified in this form, the information is generally useless and is ignored by the driver.</p>
+ <h4>Monitor Data</h4>
+ <p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
+ <h4>Fudge Factors</h4>
+ <p></p>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ <p>Additional Information</p>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver20.html b/contrib/ntp/html/drivers/driver20.html
new file mode 100644
index 000000000000..c387002f6047
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver20.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i586) [Netscape]">
+ <title>Generic NMEA GPS Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Generic NMEA GPS Receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.20.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_NMEA</tt><br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt>; 4800 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports GPS receivers with the <tt>$GPRMC</tt> NMEA output string by default.&nbsp; Alternately the <tt>$GPGGA</tt> or <tt>$GPGLL </tt>may be selected.</p>
+ <p>The driver expects the receiver to be set up to transmit a <tt>$GPRMC</tt> message every second.</p>
+ <p>The accuracy depend on the receiver used. Inexpesive GPS models are available with a claimed PPS signal accuracy of 1 <font face="Symbol">m</font>s or better relative to the broadcast signal. However, in most cases the actual accuracy is limited by the precision of the timecode and the latencies of the serial interface and operating system.</p>
+ <p>If the Operating System supports the PPSAPI, RFC-2783, it will be used.<br>
+ &nbsp;</p>
+ <p>The various GPS sentences that this driver recognises look like this:<br>
+ (others quietly ignored)</p>
+ <pre><tt>$GPRMC,POS_UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CC&lt;cr&gt;&lt;lf&gt;
+$GPGLL,LAT,LAT_REF,LONG,LONG_REF,POS_UTC,POS_STAT*CC&lt;cr&gt;&lt;lf&gt;
+$GPGGA,POS_UTC,LAT,LAT_REF,LONG,LONG_REF,FIX_MODE,SAT_USED,HDOP,ALT,ALT_UNIT,GEO,G_UNIT,D_AGE,D_REF*CC&lt;cr&gt;&lt;lf&gt;
+
+&nbsp; POS_UTC&nbsp; - UTC of position. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.fff])
+&nbsp; POS_STAT - Position status. (A = Data valid, V = Data invalid)
+&nbsp; LAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Latitude (llll.ll)
+&nbsp; LAT_REF&nbsp; - Latitude direction. (N = North, S = South)
+&nbsp; LON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Longitude (yyyyy.yy)
+&nbsp; LON_REF&nbsp; - Longitude direction (E = East, W = West)
+&nbsp; SPD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Speed over ground. (knots) (x.x)
+&nbsp; HDG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Heading/track made good (degrees True) (x.x)
+&nbsp; DATE&nbsp;&nbsp;&nbsp;&nbsp; - Date (ddmmyy)
+&nbsp; MAG_VAR&nbsp; - Magnetic variation (degrees) (x.x)
+&nbsp; MAG_REF&nbsp; - Magnetic variation (E = East, W = West)
+&nbsp; FIX_MODE - Position Fix Mode ( 0 = Invalid, &gt;0 = Valid)
+&nbsp; SAT_USED - Number Satellites used in solution
+&nbsp; HDOP&nbsp;&nbsp;&nbsp;&nbsp; - Horizontal Dilution of Precision
+&nbsp; ALT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Antenna Altitude
+&nbsp; ALT_UNIT - Altitude Units (Metres/Feet)
+&nbsp; GEO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Geoid/Elipsoid separation
+&nbsp; G_UNIT&nbsp;&nbsp; - Geoid units (M/F)
+&nbsp; D_AGE&nbsp;&nbsp;&nbsp; - Age of last DGPS Fix
+&nbsp; D_REF&nbsp;&nbsp;&nbsp; - Reference ID of DGPS station
+&nbsp; CC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Checksum (optional)
+&nbsp; &lt;cr&gt;&lt;lf&gt; - Sentence terminator.</tt></pre>
+ Alternate GPS sentences (other than <tt>$GPRMC</tt> - the default) may be enabled by setting the relevent bits of 'mode' in the server configuration line<br>
+ &nbsp;* server 127.127.20.x mode X<br>
+ &nbsp;&nbsp;&nbsp; bit 0 - enables RMC&nbsp;&nbsp;&nbsp; ( value = 1)<br>
+ &nbsp;&nbsp;&nbsp; bit 1 - enables GGA&nbsp;&nbsp;&nbsp; ( value = 2)<br>
+ &nbsp;&nbsp;&nbsp; bit 2 - enables GLL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( value = 4)<br>
+ multiple sentences may be selected<br>
+ <p>The driver will send a <tt>$PMOTG,RMC,0000*1D&lt;cr&gt;&lt;lf&gt;</tt> message each time a <tt>$GPRMC</tt> string is needed. This is not needed on most GPS receivers because they automatically send the <tt>$GPRMC</tt> string every second and will only work on GPS receivers that understand the <tt>$PMOTG</tt> string. Others will just ignore it.</p>
+ <h4>Setting up the Garmin GPS-25XL</h4>
+ Switch off all output with by sending it the following string.
+ <pre>&quot;$PGRMO,,2&lt;cr&gt;&lt;lf&gt;&quot;</pre>
+ <p>Now switch only $GPRMC on by sending it the following string.</p>
+ <pre>&quot;$PGRMO,GPRMC,1&lt;cr&gt;&lt;lf&gt;&quot;</pre>
+ <p>On some systems the PPS signal isn't switched on by default. It can be switched on by sending the following string.</p>
+ <pre>&quot;$PGRMC,,,,,,,,,,,,2&lt;cr&gt;&lt;lf&gt;&quot;</pre>
+ <h4>Monitor Data</h4>
+ <p>The GPS sentence(s) that is used is written to the clockstats file.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Controls the kernel PPS discipline: 0 for disable (default), 1 for enable.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <p>Additional Information</p>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver22.html b/contrib/ntp/html/drivers/driver22.html
new file mode 100644
index 000000000000..2b871c1f6415
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver22.html
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>PPS Clock Discipline</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>PPS Clock Discipline</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.22.<i>u</i><br>
+ Reference ID: <tt>PPS</tt><br>
+ Driver ID: <tt>PPS</tt><br>
+ Serial or Parallel Port: <tt>/dev/pps<i>u</i></tt><br>
+ Requires: PPSAPI interface</p>
+ <p>Note: This driver supersedes an older one of the same name. The older driver operated with several somewhat archaic signal interface devices, required intricate configuration and was poorly documented. This driver operates only with the PPSAPI interface proposed as an IETF standard. Note also that the <tt>pps</tt> configuration command has been obsoleted by this driver.</p>
+ <h4>Description</h4>
+ <p>This driver furnishes an interface for the pulse-per-second (PPS) signal produced by a cesium clock, radio clock or related equipment. It can be used to augment the serial timecode generated by a GPS receiver, for example. It can be used to remove accumulated jitter and re-time a secondary server when synchronized to a primary server over a congested, wide-area network and before redistributing the time to local clients. The driver includes extensive signal sanity checks and grooming algorithms. A range gate and frequency discriminator reject noise and signals with incorrect frequency. A multiple-stage median filter rejects jitter due to hardware interrupt and operating system latencies. A trimmed-mean algorithm determines the best time samples. With typical workstations and processing loads, the incidental jitter can be reduced to less than a microsecond.</p>
+ <p>While this driver can discipline the time and frequency relative to the PPS source, it cannot number the seconds. For this purpose a auxiliary source is required, ordinarily a radio clock operated as a primary reference (stratum 1) source; however, another NTP time server can be used as well. For this purpose, the auxiliary source should be specified as the prefer peer, as described in the <a href="../prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page.</p>
+ <p>The driver requires the PPSAPI interface<sup>1</sup>, which is a proposed IETF standard. The interface consists of the <tt>timepps.h</tt> header file and associated kernel support. Support for this interface is included in current versions of Solaris, FreeBSD and Linux and proprietary versions of Tru64 (Alpha) and SunOS. See the <a href="../pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page for further information.</p>
+ <p>The PPS source can be connected via a serial or parallel port, depending on the hardware and operating system. The port can be dedicated to the PPS source or shared with another device. A radio clock is usually connected via a serial port and the PPS source connected via a level converter to the data carrier detect (DCD) pin (DB-9 pin 1, DB-25 pin 8) of the same connector. In some systems where a parallel port and driver are available, the PPS signal can be connected directly to the ACK pin (pin 10) of the connector. Whether the PPS signal is connected via a dedicated port or shared with another device, the driver opens the device <tt>/dev/pps%d</tt>, where <tt>%d</tt> is the unit number. As with other drivers, links can be used to redirect the logical name to the actual physical device.</p>
+ <p>The driver normally operates like any other driver and uses the same mitigation algorithms and PLL/FLL clock discipline incorporated in the daemon. If kernel PLL/FLL support is available, the kernel PLL/FLL clock discipline can be used instead. The default behavior is not to use the kernel PPS clock discipline, even if present. This driver incorporates a good deal of signal processing to reduce jitter using the median filter and trimmed average algorithms in the driver interface. As the result, performance with minpoll and maxpoll configured at the minimum 4 (16s) is generally better than the kernel PPS clock discipline. However, fudge flag 3 can be used to enable this discipline if necessary.</p>
+ <p>Note that the PPS source is considered valid only if the auxiliary source is the prefer peer, is reachable and is selectable to discipline the system clock. By default the stratum assigned to the PPS source is automatically determined. If the auxiliary source is unreachable or inoperative, the stratum is set to 16. Otherwise it is set to the stratum specified by the <tt>fudge stratum</tt> command, if present, or the auxiliary source stratum if not present. Please note the temptation to masquerade as a primary server by forcing the stratum to zero is decidedly dangerous, as it invites timing loops.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>PPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Controls the kernel PPS discipline: 0 for disable (default), 1 for enable.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <p>Reference</p>
+ <ol>
+ <li>Mogul, J., D. Mills, J. Brittenson, J. Stone and U. Windl. Pulse-per-second API for Unix-like operating systems, version 1. Request for Comments RFC-2783, Internet Engineering Task Force, March 2000, 31 pp.
+ </ol>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver23.html b/contrib/ntp/html/drivers/driver23.html
new file mode 100644
index 000000000000..c8b37be4aa0c
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver23.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="GENERATOR" content="Adobe PageMill 3.0 per Windows">
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>PTB Modem Time Service</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>PTB Modem Time Service and other European Laboratories Time Services</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.23.<i>u</i><br>
+ Reference ID: <tt>PTB</tt><br>
+ Driver ID: <tt>ACTS_PTB</tt><br>
+ Serial Port: <tt>/dev/ptb<i>u</i></tt>; 1200 baud, 8-bits, no parity<br>
+ Requires: <tt>/usr/include/sys/termios.h</tt> header file with modem control</p>
+ <h4>Description</h4>
+ <p>This driver supports the PTB Automated Computer Time Service (ACTS) and it is a modified version of the NIST ACTS driver so see it for more informations..</p>
+ <p>It periodically dials a prespecified telephone number, receives the PTB timecode data and calculates the local clock correction. It designed primarily for use when neither a radio clock nor connectivity to Internet time servers is available. For the best accuracy, the individual telephone line/modem delay needs to be calibrated using outside sources.</p>
+ <p>The only change between this driver and the NIST one is the data format. Infact PTB data format is the following:</p>
+ <p><font size="-1" face="Courier New">Data format<br>
+ 0000000000111111111122222222223333333333444444444455555555556666666666777777777 7<br>
+ 0123456789012345678901234567890123456789012345678901234567890123456789012345678 9<br>
+ 1995-01-23 20:58:51 MEZ 10402303260219950123195849740+40000500 *<br>
+ A B C D EF G H IJ K L M N O P Q R S T U V W XY Z&lt;CR&gt;&lt;LF&gt;<br>
+ A year<br>
+ B month<br>
+ C day<br>
+ D hour<br>
+ E : normally<br>
+ A for DST to ST switch first hour<br>
+ B for DST to ST switch second hour if not marked in H<br>
+ F minute<br>
+ G second<br>
+ H timezone<br>
+ I day of week<br>
+ J week of year<br>
+ K day of year<br>
+ L month for next ST/DST changes<br>
+ M day<br>
+ N hour<br>
+ O UTC year<br>
+ P UTC month<br>
+ Q UTC day<br>
+ R UTC hour<br>
+ S UTC minute<br>
+ T modified julian day (MJD)<br>
+ U DUT1<br>
+ V direction and month if leap second<br>
+ W signal delay (assumed/measured)<br>
+ X sequence number for additional text line in Y<br>
+ Y additional text<br>
+ Z on time marker (* - assumed delay / # measured delay)<br>
+ &lt;CR&gt;!&lt;LF&gt; ! is second change !<br>
+ </font></p>
+ <p>This format is an ITU-R Recommendation (ITU-R TF583.4) and is now available from the primary timing centres of the following countries: Austria, Belgium, Germany, Italy, The Netherlands, Poland, Portugal, Romania, Spain, Sweden, Switzerland, Turkey, United Kingdom. Some examples are:</p>
+ <ul>
+ <li>In Germany by Physikalisch-Technische Bundesanstalt (PTB)'s timecode service. Phone number: +49 5 31 51 20 38.
+ <p>For more detail, see <a href="http://www.ptb.de/english/org/4/43/433/disse.html">http://www.ptb.de/english/org/4/43/433/disse.htm</a></p>
+ <li>In the UK by National Physical Laboratory (NPL)'s TRUETIME service. Phone number: 0891 516 333
+ <p>For more detail, see <a href="http://www.npl.co.uk/npl/ctm/truetime.html">http://www.npl.co.uk/npl/ctm/truetime.html</a></p>
+ <li>In Italy by Istituto Elettrotecnico Nazionale &quot;Galileo Ferrais&quot; (IEN)'s CTD service. Phone number: 166 11 46 15
+ <p>For more detail, see <a href="http://www.ien.it/tf/time/Pagina42.html">http://www.ien.it/tf/time/Pagina42.html</a></p>
+ <li>In Switzerland by Swiss Federal Office of Metrology 's timecode service. Phone number: 031 323 32 25
+ <p>For more detail, see <a href="http://www.ofmet.admin.ch/de/labors/4/Zeitvert.html%20">http://www.ofmet.admin.ch/de/labors/4/Zeitvert.html </a></p>
+ <li>In Sweden by SP Swedish National Testing and Research Institute 's timecode service. Phone number: +46 33 415783.
+ <p>For more detail, see <a href="http://www.sp.se/metrology/timefreq/eng/tandf.htm">http://www.sp.se/metrology/timefreq/eng/tandf.htm</a><br>
+ </p>
+ </ul>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default PTB.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p>A keyword in the ntp.conf file permits a direct connection to a serial port of source of time like IEN CTD signal. It is sufficient to use the string DIRECT in place of the phone number.</p>
+ <p>Example:</p>
+ <p><font face="Courier New">server 127.127.23.1</font></p>
+ <p><font face="Courier New">phone DIRECT</font></p>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver24.html b/contrib/ntp/html/drivers/driver24.html
new file mode 100644
index 000000000000..8bdf837cd1cd
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver24.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>USNO Modem Time Service</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>USNO Modem Time Service</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.24.<i>u</i><br>
+ Reference ID: <tt>USNO</tt><br>
+ Driver ID: <tt>ACTS_USNO</tt><br>
+ Serial Port: <tt>/dev/cua<i>u</i></tt>; 1200 baud, 8-bits, no parity<br>
+ Requires: <tt>/usr/include/sys/termios.h</tt> header file with modem control</p>
+ <h4>Description</h4>
+ <p>No information available.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>USNO</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Enable <tt>clockstats</tt> recording if set.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver26.html b/contrib/ntp/html/drivers/driver26.html
new file mode 100644
index 000000000000..2facea10ae03
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver26.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Hewlett Packard 58503A GPS Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Hewlett Packard 58503A GPS Receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.26.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_HP</tt><br>
+ Serial Port: <tt>/dev/hpgps<i>u</i></tt>; 9600 baud, 8-bits, no parity</p>
+ <h4>Description</h4>
+ <p>This driver supports the HP 58503A Time and Frequency Reference Receiver. It uses HP SmartClock (TM) to implement an Enhanced GPS receiver. The receiver accuracy when locked to GPS in normal operation is better than 1 usec. The accuracy when operating in holdover is typically better than 10 us per day. It receiver should be operated with factory default settings. Initial driver operation: expects the receiver to be already locked to GPS, configured and able to output timecode format 2 messages.</p>
+ <p>The driver uses the poll sequence <tt>:PTIME:TCODE?</tt> to get a response from the receiver. The receiver responds with a timecode string of ASCII printing characters, followed by a &lt;cr&gt;&lt;lf&gt;, followed by a prompt string issued by the receiver, in the following format:</p>
+ <pre>T#yyyymmddhhmmssMFLRVcc&lt;cr&gt;&lt;lf&gt;</pre>
+ The driver processes the response at the &lt;cr&gt; and &lt;lf&gt;&lt;cr&gt; and &lt;lf&gt;, so what the driver sees is the prompt from the previous poll, followed by this timecode. The prompt from the current poll is (usually) left unread until the next poll. So (except on the very first poll) the driver sees this:
+ <pre>T#yyyymmddhhmmssMFLRVcc&lt;cr&gt;&lt;lf&gt;</pre>
+ <p>The T is the on-time character, at 980 msec. before the next 1PPS edge. The # is the timecode format type. We look for format 2. Without any of the CLK or PPS stuff, then, the receiver buffer timestamp at the &lt;cr&gt;y is 24 characters later, which is about 25 msec. at 9600 bps, so the first approximation for fudge time1 is nominally -0.955 seconds. This number probably needs adjusting for each machine / OS type, so far: -0.955000 on an HP 9000 Model 712/80 HP-UX 9.05 -0.953175 on an HP 9000 Model 370 HP-UX 9.10</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver27.html b/contrib/ntp/html/drivers/driver27.html
new file mode 100644
index 000000000000..ab406a65b9ab
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver27.html
@@ -0,0 +1,249 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Arcron MSF Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Arcron MSF Receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.27.<i>u</i><br>
+ Reference ID: <tt>MSFa</tt> / <tt>MSF</tt> / <tt>DCF</tt> / <tt>WWVB</tt><br>
+ Driver ID: <tt>MSF_ARCRON</tt><br>
+ Serial Port: <tt>/dev/arc<i>u</i></tt>; 300 baud, 8-bits, 2-stop, no parity<br>
+ Features: <tt>tty_clk</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the Arcron MSF, DCF and WWVB receivers. The clock reports its ID as ``<tt>MSFa</tt>'', ``<tt>MSF</tt>'', ``<tt>DCF</tt>'' or ``<tt>WWVB</tt>'' to indicate the time source.</p>
+ <p>This documentation describes v1.3 (2003/2/21) of the source and has been tested against ntpd 4.1.0 on linux x86. Changes from v1.1 and v1.2 include patches to work with the new ntp-4 code, clock support for DCF and WWVB configurable via mode flag, an option to ignore resync request (for those of us at the fringes of the WWVB signal, for instance), averaging of the signal quality poll and several bug fixes, code cleanup and standardizations. In all other respects, the driver works as per v1.1 if a mode is not specified.</p>
+ <p>To use the alternate modes, the mode flag must be specified. If the mode flag is 0, or unspecified, the original MSF version is assumed. This should assure backwards compatibility and should not break existing setups.</p>
+
+ <p>The previous documentation described version V1.1 (1997/06/23) of the source and had been tested (amongst others) against ntpd3-5.90 on Solaris-1 (SunOS 4.1.3_U1 on an SS1 serving as a router and firewall) and against ntpd3-5.90 on Solaris-2.5 (on a SS1+ and TurboSPARC 170MHz). That code will claimed increased stability, reduced jitter and more efficiency (fewer context switches) with the <tt>tty_clk</tt> discipline/STREAMS module installed, but this has not been tested. For a to-do list see the comments at the start of the code.</p>
+ <p>This code has been significantly slimmed down since the V1.0 version, roughly halving the memory footprint of its code and data.</p>
+ <p>This driver is designed to allow the unit to run from batteries as designed, for something approaching the 2.5 years expected in the usual stand-alone mode, but no battery-life measurements have been taken.</p>
+ <p>Much of this code is originally from the other refclock driver files with thanks. The code was originally made to work with the clock by <a href="mailto:derek@toybox.demon.co.uk">Derek Mulcahy</a>, with modifications by <a href="mailto:d@hd.org">Damon Hart-Davis</a>. Thanks also to <a href="mailto:lyndond@sentinet.co.uk">Lyndon David</a> for some of the specifications of the clock. <a href="mailto:palfille@partners.org">Paul Alfille</a> added support for the WWVB clock. <a href="mailto:cprice@cs-home.com">Christopher Price</a> added enhanced support for the MSF, DCF and WWVB clocks.</p>
+ <p>There is support for a Tcl/Tk monitor written by Derek Mulcahy that examines the output stats; see the <a href="http://www2.exnet.com/NTP/ARC/ARC.html">ARC Rugby MSF Receiver</a> page for more details and the code. Information on the WWVB version is available from <a href="http://www.arctime.com">Atomic Time</a> as their <a href="http://www.atomictime.com/Product17.html">Atomic Time PC</a>.</p>
+ <p>Look at the notes at the start of the code for further information; some of the more important details follow.</p>
+ <p>The driver interrogates the clock at each poll (ie every 64s by default) for a timestamp. The clock responds at the start of the next second (with the start bit of the first byte being on-time). In the default or original MSF mode, the time is in `local' format, including the daylight savings adjustment when it is in effect. The driver code converts the time back to UTC. In modes 1-3 the driver can be configured for UTC or local time depending on the setting of flag1.</p>
+ <p>The clock claims to be accurate to within about 20ms of the broadcast time, and given the low data transmission speed from clock to host, and the fact that the clock is not in continuous sync with MSF, it seems sensible to set the `precision' of this clock to -5 or -4, -4 being used in this code, which builds in a reported dispersion of over 63ms (ie says ``This clock is not very good.''). You can improve the reported precision to -4 (and thus reduce the base dispersion to about 31ms) by setting the fudge <tt>flag3</tt> to <tt>1</tt>.</p>
+ <p>Even a busy and slow IP link can yield lower dispersions than this from polls of primary time servers on the Internet, which reinforces the idea that this clock should be used as a backup in case of problems with such an IP link, or in the unfortunate event of failure of more accurate sources such as GPS.</p>
+ <p>By default this clock reports itself to be at stratum 2 rather than the usual stratum 0 for a refclock, because it is not really suited to be used as other than a backup source. The stratum reported can be changed with the <tt>stratum</tt> directive to be whatever you like. After careful monitoring of your clock, and appropriate choice of the <tt>time1</tt> fudge factor to remove systematic errors in the clock's reported time, you might fudge the clock to stratum 1 to allow a stratum-2 secondary server to sync to it.</p>
+ <p>In default mode, the driver code arranges to resync the clock to MSF at intervals of a little less than an hour (deliberately avoiding the same time each hour to avoid any systematic problems with the signal or host). Whilst resyncing, the driver supplements the normal polls for time from the clock with polls for the reception signal quality reported by the clock. If the signal quality is too low (0--2 out of a range of 0--5), we chose not to trust the clock until the next resync (which we bring forward by about half an hour). If we don't catch the resync, and so don't know the signal quality, we do trust the clock (because this would generally be when the signal is very good and a resync happens quickly), but we still bring the next resync forward and reduce the reported precision (and thus increase reported dispersion).</p>
+ <p>If we force resyncs to MSF too often we will needlessly exhaust the batteries the unit runs from. During clock resync this driver tries to take enough time samples to avoid <tt>ntpd</tt> losing sync in case this clock is the current peer. By default the clock would only resync to MSF about once per day, which would almost certainly not be acceptable for NTP purposes.</p>
+ <p>The driver does not force an immediate resync of the clock to MSF when it starts up to avoid excessive battery drain in case <tt>ntpd</tt> is going to be repeatedly restarted for any reason, and also to allow enough samples of the clock to be taken for <tt>ntpd</tt> to sync immediately to this clock (and not remain unsynchronised or to sync briefly to another configured peer, only to hop back in a few poll times, causing unnecessary disturbance). This behaviour should not cause problems because the driver will not accept the timestamps from the clock if the status flag delivered with the time code indicates that the last resync attempt was unsuccessful, so the initial timestamps will be close to reality, even if with up to a day's clock drift in the worst case (the clock by default resyncs to MSF once per day).</p>
+ <p>When alternate modes 1-3 are selected, the driver can be configured to ignore the resync requests by setting <tt>flag2</tt> to 1. This allows clocks at the fringe of the signal to resync at night when signals are stronger.</p>
+ <p>The clock has a peculiar RS232 arrangement where the transmit lines are powered from the receive lines, presumably to minimise battery drain. This arrangement has two consequences:</p>
+ <ul>
+ <li>Your RS232 interface must drive both +ve and -ve
+ <li>You must (in theory) wait for an echo and a further 10ms between characters
+ </ul>
+ <p>This driver, running on standard Sun and x86 hardware, seems to work fine; note the use of the <tt>send_slow()</tt> routine to queue up command characters to be sent once every two seconds.</p>
+ <p>Three commands are sent to the clock by this driver. Each command consists of a single letter (of which only the bottom four bits are significant), followed by a CR (ASCII 13). Each character sent to the clock should be followed by a delay to allow the unit to echo the character, and then by a further 10ms. Following the echo of the command string, there may be a response (ie in the case of the <tt>g</tt> and <tt>o</tt> commands below), which in the case of the <tt>o</tt> command may be delayed by up to 1 second so as the start bit of the first byte of the response can arrive on time. The commands and their responses are:</p>
+ <dl>
+ <dt><tt>g</tt> CR
+ <dd>Request for signal quality. Answer only valid during (late part of) resync to MSF signal. The response consists of two characters as follows:
+ <ol>
+ <dl compact>
+ <dt>bit 7
+ <dd>parity
+ <dt>bit 6
+ <dd>always 0
+ <dt>bit 5
+ <dd>always 1
+ <dt>bit 4
+ <dd>always 1
+ <dt>bit 3
+ <dd>always 0
+ <dt>bit 2
+ <dd>always 0
+ <dt>bit 1
+ <dd>always 1
+ <dt>bit 0
+ <dd>= 0 if no reception attempt at the moment, = 1 if reception attempt (ie resync) in progress
+ </dl>
+ <dl compact>
+ <dt>bit 7
+ <dd>parity
+ <dt>bit 6
+ <dd>always 0
+ <dt>bit 5
+ <dd>always 1
+ <dt>bit 4
+ <dd>always 1
+ <dt>bit 3
+ <dd>always 0
+ <dt>bit 2--0
+ <dd>reception signal quality in the range 0--5 (very poor to very good); if in the range 0--2 no successful reception is to be expected. The reported value drops to zero when not resyncing, ie when first returned byte is not `3'.
+ </dl>
+ </ol>
+ <dt><tt>h</tt> CR
+ <dd>Request to resync to signal. Can take up from about 30s to 360s. Drains batteries so should not be used excessively. After this the clock time and date should be correct and the phase within 20ms of time as transmitted from the source signal (remember to allow for propagation time). By default the clock resyncs once per day in the late evening/early morning (presumably to catch transitions to/from daylight saving time quickly). This driver code, by default, resyncs at least once per hour to minimise clock wander.
+ <dt><tt>o</tt> CR
+ <dd>Request timestamp. Start bit of first byte of response is on-time, so may be delayed up to 1 second. Note that the driver will convert time to GMT, if required. The response data is as follows:
+ <ol>
+ <li>hours tens (hours range from 00 to 23)
+ <li>hours units
+ <li>minutes tens (minutes range from 00 to 59)
+ <li>minutes units
+ <li>seconds tens (seconds presumed to range from 00 to 60 to allow for leap second)
+ <li>seconds units
+ <li>day of week 1 (Monday) to 7 (Sunday)
+ <li>day of month tens (day ranges from 01 to 31)
+ <li>day of month units
+ <li>month tens (months range from 01 to 12)
+ <li>month units
+ <li>year tens (years range from 00 to 99)
+ <li>year units
+ <li>BST/UTC status (Ignored in WWVB version)
+ <dl compact>
+ <dt>bit 7
+ <dd>parity
+ <dt>bit 6
+ <dd>always 0
+ <dt>bit 5
+ <dd>always 1
+ <dt>bit 4
+ <dd>always 1
+ <dt>bit 3
+ <dd>(MSF) always 0<br>
+ (WWVB) Leap year indicator bit<br>
+ 0 = non-leap year<br>
+ 1 = leap year
+ <dt>bit 2
+ <dd>= (MSF) 1 if UTC is in effect (reverse of bit 1)<br>
+ (WWVB) Leap second warning bit
+ <dt>bit 1
+ <dd>= (MSF)1 if BST is in effect (reverse of bit 2)<br>
+ = (WWVB) 0 if ST is in effect, 1 if DST is in effect, 1 if transition from ST with bit 0 is set to 0
+ <dt>bit 0
+ <dd>= (MSF)1 if BST/UTC change pending<br>
+ = (WWVB) 0 if ST is in effect, 1 if DST is in effect, 0 if transition from DST with bit 1 is set to 0
+ </dl>
+ <li>clock status
+ <dl compact>
+ <dt>bit 7
+ <dd>parity
+ <dt>bit 6
+ <dd>always 0
+ <dt>bit 5
+ <dd>always 1
+ <dt>bit 4
+ <dd>always 1
+ <dt>bit 3
+ <dd>= 1 if low battery is detected
+ <dt>bit 2
+ <dd>= 1 if last resync failed (though officially undefined for the MSF clock, officially defined for WWVB)
+ <dt>bit 1
+ <dd>= 1 if at least one reception attempt was successful<br>
+ (MSF) since 0230<br>
+ (DCF) since 0300<br>
+ (WWVB) resets if not successful between 0300-0400
+ <dt>bit 0
+ <dd>= 1 if the clock has valid time---reset to zero when clock is reset (eg at power-up), and set to 1 after first successful resync attempt.
+ </dl>
+ </ol>
+ <p>The driver only accepts time from the clock if the bottom three bits of the status byte are <tt>011</tt> or <tt>flag2</tt> is set to 1 to ignore resync requests. For the MSF clock, if the UK parliament decides to move us to +0100/+0200 time as opposed to the current +0000/+0100 time, it is not clear what effect that will have on the time broadcast by MSF, and therefore on this driver's usefulness.</p>
+ </dl>
+ <p>A typical <tt>ntp.conf</tt> configuration file for this driver might be:</p>
+ <pre># hostname(n) means we expect (n) to be the stratum at which hostname runs.
+
+#------------------------------------------------------------------------------
+# SYNCHRONISATION PARTNERS
+# ========================
+
+# Default configuration (Original MSF mode)s...
+server 127.127.27.0 mode 333 # ARCRON MSF radio clock
+# Fudge stratum and other features as required.
+# ADJUST time1 VALUE FOR YOUR HOST, CLOCK AND LOCATION!
+fudge 127.127.27.0 stratum 1 time1 0.016 flag3 1
+# WWVB users should change that line to:
+server 127.127.27.0 mode 3 # ARCRON WWVB radio clock
+fudge 127.127.27.0 stratum 1 time1 0.030 flag1 1 flag3 1
+
+peer 11.22.33.9 # tick(1--2).
+peer 11.22.33.4 # tock(3), boot/NFS server.
+
+# This shouldn't get swept away unless left untouched for a long time.
+driftfile /var/tmp/ntp.drift
+
+#------------------------------------------------------------------------------
+# RESTRICTIONS
+# ============
+
+# By default, don't trust and don't allow modifications.&nbsp; Ignore in fact.
+restrict default ignore notrust nomodify
+
+# Allow others in our subnet to check us out...
+restrict 11.22.33.0 mask 255.255.255.0 nomodify notrust
+
+# Trust our peers for time.&nbsp; Don't trust others in case they are insane.
+restrict 127.127.27.0 nomodify
+restrict 11.22.33.4 nomodify
+restrict 11.22.33.9 nomodify
+
+# Allow anything from the local host.
+restrict 127.0.0.1</pre>
+ There are a few <tt>#define</tt>s in the code that you might wish to play with:
+ <dl>
+ <dt><tt>ARCRON_KEEN</tt>
+ <dd>With this defined, the code is relatively trusting of the clock, and assumes that you will have the clock as one of a few time sources, so will bend over backwards to use the time from the clock when available and avoid <tt>ntpd</tt> dropping sync from the clock where possible. You may wish to undefine this, especially if you have better sources of time or your reception is ropey. However, there are many checks built in even with this flag defined.
+ <dt><tt>ARCRON_MULTIPLE_SAMPLES</tt>
+ <dd>When is defined, we regard each character in the returned timecode as at a known delay from the start of the second, and use the smallest (most negative) offset implied by any such character, ie with the smallest kernel-induced display, and use that. This helps to reduce jitter and spikes.
+ <dt><tt>ARCRON_LEAPSECOND_KEEN</tt>
+ <dd>When is defined, we try to do a resync to MSF as soon as possible in the first hour of the morning of the first day of the first and seventh months, ie just after a leap-second insertion or deletion would happen if it is going to. This should help compensate for the fact that this clock does not continuously sample MSF, which compounds the fact that MSF itself gives no warning of an impending leap-second event. This code did not seem functional at the leap-second insertion of 30th June 1997 so is by default disabled.
+ <dt><tt>PRECISION</tt>
+ <dd>Currently set to <tt>-4</tt>, but you may wish to set it to <tt>-5</tt> if you are more conservative, or to <tt>-6</tt> if you have particularly good experience with the clock and you live on the edge. Note that the <tt>flag3</tt> fudge value will improve the reported dispersion one notch if clock signal quality is known good. So maybe just leave this alone.
+ </dl>
+ <h4>Monitor Data</h4>
+ <p>Each timecode is written to the <tt>clockstats</tt> file with a signal quality value appended (`0'--`5' as reported by the clock, or `6' for unknown).</p>
+ <p>Each resync and result (plus gaining or losing MSF sync) is logged to the system log at level <tt>LOG_NOTICE</tt>; note that each resync drains the unit's batteries, so the syslog entry seems justified.</p>
+ <p>Syslog entries are of the form:</p>
+ <pre>May 10 10:15:24 oolong ntpd[615]: ARCRON: unit 0: sending resync command
+May 10 10:17:32 oolong ntpd[615]: ARCRON: sync finished, signal quality 5: OK, will use clock
+May 10 11:13:01 oolong ntpd[615]: ARCRON: unit 0: sending resync command
+May 10 11:14:06 oolong ntpd[615]: ARCRON: sync finished, signal quality -1: UNKNOWN, will use clock anyway
+May 10 11:41:49 oolong ntpd[615]: ARCRON: unit 0: sending resync command
+May 10 11:43:57 oolong ntpd[615]: ARCRON: sync finished, signal quality 5: OK, will use clock
+May 10 12:39:26 oolong ntpd[615]: ARCRON: unit 0: sending resync command
+May 10 12:41:34 oolong ntpd[615]: ARCRON: sync finished, signal quality 3: OK, will use clock</pre>
+ <h4>Fudge Factors</h4>
+ <p></p>
+ <dl>
+ <dt><tt>mode 0 | 1 | 2 | 3</tt></dt>
+ <dd>Specifies the clock hardware model. This parameter is optional, it defaults to the original mode of operation.
+ <dd>Supported modes of operation:
+ <dd>0 - Default, Original MSF
+ <dd>1 - Updated MSF
+ <dd>2 - New DCF77
+ <dd>3 - New WWVB
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. On a Sun SparcStation 1 running SunOS 4.1.3_U1, with the receiver in London, a value of 0.020 (20ms) seems to be appropriate.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not currently used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 2. It is suggested that the clock be not be fudged higher than stratum 1 so that it is used a backup time source rather than a primary when more accurate sources are available.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>MSFa</tt>. When used in modes 1-3, the driver will report either <tt>MSF</tt>, <tt>DCF</tt>, or <tt>WWVB</tt> respectively.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>(Modes 1-3) If set to 0 (the default), the clock is set to UTC time. If set to 1, the clock is set to localtime.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>(Modes 1-3) If set to 0 (the default), the clock will be forced to resync approximately every hour. If set to 1, the clock will resync per normal operations (approximately midnight).
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>If set to 1, better precision is reported (and thus lower dispersion) while clock's received signal quality is known to be good.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a><br>
+ <a href="http://www2.exnet.com/NTP/ARC/ARC.html">ARC Rugby MSF Receiver</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html>
+
diff --git a/contrib/ntp/html/drivers/driver28.html b/contrib/ntp/html/drivers/driver28.html
new file mode 100644
index 000000000000..5013ae3ffc4f
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver28.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Shared memoy Driver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Shared Memory Driver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.28.<i>u</i><br>
+ Reference ID: <tt>SHM</tt><br>
+ Driver ID: <tt>SHM</tt></p>
+ <h4>Description</h4>
+ <p>This driver receives its reference clock info from a shared memory-segment. The shared memory-segment is created with owner-only access for unit 0 and 1, and world access for unit 2 and 3</p>
+ <h4>Structure of shared memory-segment</h4>
+ <pre>struct shmTime {
+&nbsp; int&nbsp;&nbsp;&nbsp; mode; /* 0 - if valid set
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use values,&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clear valid
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * 1 - if valid set&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if count before and after read of&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; values is equal,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use values&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clear valid
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */
+&nbsp; int&nbsp;&nbsp;&nbsp; count;
+&nbsp; time_t clockTimeStampSec;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* external clock */
+&nbsp; int&nbsp;&nbsp;&nbsp; clockTimeStampUSec;&nbsp;&nbsp;&nbsp;&nbsp; /* external clock */
+&nbsp; time_t receiveTimeStampSec;&nbsp;&nbsp;&nbsp; /* internal clock, when external value was received */
+&nbsp; int&nbsp;&nbsp;&nbsp; receiveTimeStampUSec;&nbsp;&nbsp; /* internal clock, when external value was received */
+&nbsp; int&nbsp;&nbsp;&nbsp; leap;
+&nbsp; int&nbsp;&nbsp;&nbsp; precision;
+&nbsp; int&nbsp;&nbsp;&nbsp; nsamples;
+&nbsp; int&nbsp;&nbsp;&nbsp; valid;
+&nbsp; int&nbsp;&nbsp;&nbsp; dummy[10];&nbsp;
+};</pre>
+ <h4>Operation mode=0</h4>
+ <p>When the poll-method of the driver is called, the valid-flag of the shared memory-segment is checked:</p>
+ <p>If set, the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are passed to ntp, and the valid-flag is cleared.</p>
+ <p>If not set, a timeout is reported to ntp, nothing else happend</p>
+ <h4>Operation mode=1</h4>
+ <p>When the poll-method of the driver is called, the valid-flag of the shared memory-segment is checked:</p>
+ <p>If set, the count-field of the record is remembered, and the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are read. Then, the remembered count is compared to the count now in the record. If both are equal, the values read from the record are passed to ntp. If they differ, another process has modified the record while it was read out (was not able to produce this case), and failure is reported to ntp. The valid flag is cleared.</p>
+ <p>If not set, a timeout is reported to ntp, nothing else happend</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>SHM</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver29.html b/contrib/ntp/html/drivers/driver29.html
new file mode 100644
index 000000000000..65600bf13a0b
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver29.html
@@ -0,0 +1,797 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Trimble Palisade Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+ <h1><font size="+2">Trimble Palisade Receiver</font>
+ <hr>
+ </h1>
+ <h2><img src="../pic/driver29.gif" nosave height="100" width="420"></h2>
+ <h2><font size="+1">Synopsis</font></h2>
+ <table>
+ <tr>
+ <td>
+ <div align="right">
+ <tt>Address:&nbsp;</tt></div>
+ </td>
+ <td><b>127.127.29.<i>u</i></b></td>
+ </tr>
+ <tr>
+ <td>
+ <div align="right">
+ <tt>Reference ID:</tt></div>
+ </td>
+ <td><a name="REFID"></a><b>GPS</b></td>
+ </tr>
+ <tr>
+ <td>
+ <div align="right">
+ <tt>Driver ID:</tt></div>
+ </td>
+ <td><b>GPS_PALISADE</b></td>
+ </tr>
+ <tr>
+ <td>
+ <div align="right">
+ <tt>Serial Port:</tt></div>
+ </td>
+ <td><b>/dev/palisade<i>u</i></b></td>
+ </tr>
+ <tr>
+ <td>
+ <div align="right">
+ <tt><font size="+1">Serial I/O:</font></tt></div>
+ </td>
+ <td><b>9600 baud, 8-bits, 1-stop, odd parity</b></td>
+ </tr>
+ </table>
+ <h2><font size="+1">Description</font></h2>
+ The <b>refclock_palisade</b> driver supports <a href="http://www.trimble.com/products/ntp">Trimble Navigation's Palisade Smart Antenna GPS receiver</a>.<br>
+ Additional software and information about the Palisade GPS is available from: <a href="http://www.trimble.com/oem/ntp">http://www.trimble.com/oem/ntp</a>.<br>
+ Latest NTP driver source, executables and documentation is maintained at: <a href="ftp://ftp.trimble.com/pub/ntp">ftp://ftp.trimble.com/pub/ntp</a>
+ <p>This documentation describes version 7.12 of the GPS Firmware and version 2.46 (July 15, 1999) and later, of the driver source.<br>
+ &nbsp;</p>
+ <h2><font size="+1">Operating System Compatibility</font></h2>
+ The Palisade driver has been tested on the following software and hardware platforms:<br>
+ &nbsp;
+ <center>
+ <table>
+ <tr>
+ <td valign="CENTER" width="23%">Platform</td>
+ <td valign="CENTER">Operating System</td>
+ <td>NTP Sources</td>
+ <td>Accuracy</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="23%">i386 (PC)&nbsp;</td>
+ <td valign="CENTER">Linux</td>
+ <td>NTP Distribution</td>
+ <td>10 us</td>
+ </tr>
+ <tr>
+ <td>i386 (PC)&nbsp;</td>
+ <td>Windows NT</td>
+ <td><a href="ftp://ftp.trimble.com/pub/ntp">ftp://ftp.trimble.com/pub/ntp</a></td>
+ <td>1 ms</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="23%">SUN</td>
+ <td valign="CENTER">Solaris 2.x</td>
+ <td>NTP Distribution</td>
+ <td>50 us</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="23%">Hewlett-Packard</td>
+ <td valign="CENTER">HPUX 9, 10, 11</td>
+ <td><a href="http://us-support.external.hp.com">http://us-support.external.hp.com</a></td>
+ <td>50 us</td>
+ </tr>
+ <tr>
+ <td>Various</td>
+ <td>Free BSD</td>
+ <td>NTP Distribution</td>
+ <td>20 us</td>
+ </tr>
+ </table>
+ </center>
+ <h2><font size="+1">GPS Receiver</font></h2>
+ The Palisade GPS receiver is an 8-channel smart antenna, housing the GPS receiver, antenna and interface in a single unit, and is designed for rooftop deployment in static timing applications.
+ <p>Palisade generates a PPS synchronized to UTC within +/- 100 ns.&nbsp; The Palisade's external event input with 40 nanosecond resolution is utilized by the Palisade NTP driver for asynchronous precision time transfer.</p>
+ <p>No user initialization of the receiver is required. This driver is compatible with the following versions of Palisade:<br>
+ &nbsp;</p>
+ <center>
+ <table>
+ <tr>
+ <td valign="CENTER">
+ <center>
+ Version</center>
+ </td>
+ <td valign="TOP">
+ <center>
+ Event Input</center>
+ </td>
+ <td valign="CENTER">
+ <center>
+ Trimble Part Number</center>
+ </td>
+ </tr>
+ <tr>
+ <td valign="CENTER">
+ <center>
+ 7.02</center>
+ </td>
+ <td valign="TOP">
+ <center>
+ No</center>
+ </td>
+ <td valign="CENTER">
+ <center>
+ 26664-00</center>
+ </td>
+ </tr>
+ <tr>
+ <td align="CENTER" valign="CENTER">
+ <center>
+ 7.02E</center>
+ </td>
+ <td valign="TOP">
+ <center>
+ Yes</center>
+ </td>
+ <td valign="CENTER">
+ <center>
+ 26664-10</center>
+ </td>
+ </tr>
+ <tr>
+ <td valign="CENTER">
+ <center>
+ 7.12</center>
+ </td>
+ <td valign="TOP">
+ <center>
+ Yes</center>
+ </td>
+ <td valign="CENTER">
+ <center>
+ 38158-00</center>
+ </td>
+ </tr>
+ </table>
+ </center>
+ <dl>
+ <dl>
+ Note: When using Palisade 26664-00, you must set fudge flag2 to 1 in <b>ntp.conf</b>. See <a href="#Configuration">configuration</a>.
+ </dl>
+ <dl>
+ <h3><font size="+1">GPS&nbsp;<a name="Installation"></a>Installation</font></h3>
+ A location with unobstructed view of the horizon is recommended. Palisade is designed to be securely mounted atop standard 3/4 inch threaded pipe.
+ <p>The 12 conductor (dia. 10 mm)&nbsp; power and I/O cable must be routed from the rooftop site to the NTP server and properly strain relieved.</p>
+ <h3><font size="+1">GPS&nbsp;<a name="Connection"></a>Connection</font></h3>
+ The Palisade is equipped with dual (A &amp; B) RS-422 serial interfaces and a differential TTL PPS output. An RS-232 / RS-422 Interface Module is supplied with the Palisade NTP Synchronization Kit. Palisade <a href="#PortA">port A</a> must be connected to the NTP host server. Maximum antenna cable length is 500 meters. See the <a href="#Pinouts">pinouts</a> table for detailed connection Information.
+ <p>Palisade's <a href="#PortB">port B</a> provides a TSIP (Trimble Standard Interface Protocol) interface for diagnostics, configuration, and monitoring. Port B and the PPS output are not currently used by the Palisade NTP reference clock driver.<br>
+ &nbsp;</p>
+ </dl>
+ </dl>
+ <h2><font size="+1">O/S Serial Port Configuration</font></h2>
+ The driver attempts to open the device <b><tt><a href="#REFID">/dev/palisade<i>u</i></a></tt></b> where <b><i>u</i></b> is the NTP refclock unit number as defined by the LSB of the refclock address.&nbsp; Valid refclock unit numbers are 0 - 3.
+ <p>The user is expected to provide a symbolic link to an available serial port device.&nbsp; This is typically performed by a command such as:</p>
+ <blockquote>
+ <tt>ln -s /dev/ttyS0 /dev/palisade0</tt></blockquote>
+ Windows NT does not support symbolic links to device files. COM<b>x</b>: is used by the driver, based on the refclock unit number, where unit 1 corresponds to COM<b>1</b>: and unit 3 corresponds to COM3:<br>
+ &nbsp;
+ <h2><a name="Configuration"></a><font size="+1">NTP Configuration</font></h2>
+ Palisade NTP configuration file <b><tt>&quot;ntp.conf&quot;</tt></b> with event polling:<br>
+ <tt>#------------------------------------------------------------------------------</tt><br>
+ <tt># The Primary reference</tt><br>
+ <tt>server 127.127.29.0 # Trimble Palisade GPS Refclock Unit #0</tt><br>
+ <tt>peer terrapin.csc.ncsu.edu # internet server</tt><br>
+ <tt># Drift file for expedient re-synchronization after downtime or reboot.</tt><br>
+ <tt>driftfile /etc/ntp.drift</tt><br>
+ <tt>#------------------------------------------------------------------------------</tt>
+ <p>Configuration without event polling:<br>
+ <tt>#------------------------------------------------------------------------------</tt><br>
+ <tt># The Primary reference</tt><br>
+ <tt>server 127.127.29.0 # Trimble Palisade GPS (Stratum 1).</tt><br>
+ <tt># Set packet delay</tt><br>
+ <tt><a href="#time1">fudge 127.127.29.0 time1 0.020</a></tt><br>
+ <tt># and set flag2 to turn off event polling.</tt><br>
+ <tt><a href="#flag2">fudge 127.127.29.0 flag2 1</a></tt><br>
+ <tt>#------------------------------------------------------------------------------</tt><br>
+ &nbsp;</p>
+ <h2><a name="TimeTransfer"></a><font size="+1">Time Transfer and Polling</font></h2>
+ Time transfer to the NTP host is performed via the Palisade's comprehensive time packet output. The time packets are output once per second, and whenever an event timestamp is requested.
+ <p>The driver requests an event time stamp at the end of each polling interval, by pulsing the RTS (request to send) line on the serial port. The Palisade GPS responds with a time stamped event packet.</p>
+ <p>Time stamps are reported by the Palisade with respect to UTC time. The GPS receiver must download UTC offset information from GPS satellites. After an initial UTC download, the receiver will always start with correct UTC offset information.<br>
+ &nbsp;</p>
+ <h2><font size="+1">Run NTP in Debugging Mode</font></h2>
+ The following procedure is recommended for installing and testing a Palisade NTP driver:
+ <ol>
+ <li>Perform initial checkout procedures. Place the GPS receiver outdoors; with clear view of the sky. Allow the receiver to obtain an UTC almanac.
+ <li>Verify presence of timing packets by observing the 1 Hz (PPS) led on the interface module. It should flash once per second.
+ <li>Connect Palisade's port A to the NTP host.
+ <li>Configure NTP and the serial I/O port on the host system.
+ <li>Initially use <tt><a href="#flag2">fudge flag2</a></tt> in <b><a href="#Configuration">ntp.conf</a>,</b> to disable event polling (see configuration).
+ <li>Run NTP in debug mode (-d -d), to observe Palisade_receive events.
+ <li>The driver reports the <a href="#TrackingStatus">tracking status of the receiver</a>. Make sure it is tracking several satellites.
+ <li>Remove fudge flag2 and restart <b>ntpd</b> in debug mode to observe palisade_receive events.
+ <li>If event polling fails, verify the <a href="#Pinouts">connections</a> and that the host hardware supports RTS control.
+ </ol>
+ <h2><font size="+1">Event Logging</font></h2>
+ System and Event log entries are generated by NTP to report significant system events. Administrators should monitor the system log to observe NTP error messages. Log entries generated by the Palisade NTP reference clock driver will be of the form:
+ <blockquote>
+ <pre>Nov 14 16:16:21 terrapin ntpd[1127]: Palisade #0: <i>message</i></pre>
+ </blockquote>
+ <h2><font size="+1">Fudge Factors</font></h2>
+ <dl>
+ <dt><a name="time1"></a><tt><font size="+1"><a href="#Configuration">time1 <i>time</i></a></font></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. If event capture is not used, time1 should be set to 20 milliseconds to correct serial line and operating system delays incurred in capturing time stamps from the synchronous packets.
+ <dt><tt><font size="+1">stratum <i>number</i></font></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt><font size="+1"><a href="#REFID">refid <i>string</i></a></font></tt>
+ <dd>Specifies the driver reference identifier, <b>GPS</b>.
+ <dt><a name="flag2"></a><tt><font size="+1"><a href="#Configuration">flag2 0 | 1</a></font></tt>
+ <dd>When set to 1, driver does not use hardware event capture. The synchronous packet output by the receiver at the beginning of each second is time stamped by the driver. If triggering the event pulse fails, the driver falls back to this mode automatically.
+ </dl>
+ <h2><font size=+1>Mode Parameter</font></h2>
+ <dl>
+ <dt><tt><font size=+1>mode <i>number</i></font></tt></dt>
+ <dd>The mode parameter to the server command specifies the specific hardware this driver is for. The default is 0 for a normal Trimble Palisade. The only other option at this time is 1 for a Endrun Praecis in Trimble emulation mode.
+ </dl>
+ <h2><font size="+1">DEFINEs</font></h2>
+ The following constants are defined in the driver source code. These defines may be modified to improve performance or adapt to new operating systems.<br>
+ &nbsp;
+ <center>
+ <table border>
+ <tr>
+ <td><b>Label</b></td>
+ <td>Definition</td>
+ <td>Default Value</td>
+ </tr>
+ <tr>
+ <td>DEVICE</td>
+ <td>The serial port device to be used by the driver</td>
+ <td>/dev/palisade<b><i>u</i></b></td>
+ </tr>
+ <tr>
+ <td>PRECISION</td>
+ <td>Accuracy of time transfer</td>
+ <td>1 microsecond</td>
+ </tr>
+ <tr>
+ <td>CURRENT_UTC</td>
+ <td>Valid GPS - UTC offset</td>
+ <td>13</td>
+ </tr>
+ <tr>
+ <td>SPEED232</td>
+ <td>Host RS-232 baud rate</td>
+ <td>B9600</td>
+ </tr>
+ <tr>
+ <td>TRMB_MINPOLL&nbsp;</td>
+ <td>Minimum polling interval</td>
+ <td>5 (32 seconds)</td>
+ </tr>
+ <tr>
+ <td>TRMB_MAXPOLL</td>
+ <td>Maximum interval between polls</td>
+ <td>7 (128 seconds)</td>
+ </tr>
+ </table>
+ </center>
+ <h2><a name="DataFormat"></a><font size="+1">Data Format</font></h2>
+ Palisade port A can output two synchronous time packets. The NTP driver can use either packet for synchronization. Packets are formatted as follows:
+ <h3><b><font size="+0">Packet 8F-AD (Primary NTP Packet)</font></b></h3>
+ <center>
+ <table>
+ <tr>
+ <td>Byte</td>
+ <td>Item</td>
+ <td>Type</td>
+ <td>Meaning</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>Sub-Packet ID</td>
+ <td>BYTE</td>
+ <td>Subcode 0xAD</td>
+ </tr>
+ <tr>
+ <td>1 - 2</td>
+ <td>Event Count</td>
+ <td>INTEGER</td>
+ <td>External event count recorded (0 = PPS)</td>
+ </tr>
+ <tr>
+ <td>3 - 10</td>
+ <td>Fractional Second</td>
+ <td>DOUBLE</td>
+ <td>Time elapsed in current second (s)</td>
+ </tr>
+ <tr>
+ <td>11</td>
+ <td>Hour</td>
+ <td>BYTE</td>
+ <td>Hour (0 - 23)</td>
+ </tr>
+ <tr>
+ <td>12</td>
+ <td>Minute</td>
+ <td>BYTE</td>
+ <td>Minute (0 - 59)</td>
+ </tr>
+ <tr>
+ <td>13</td>
+ <td>Second</td>
+ <td>BYTE</td>
+ <td>Second (0 - 59; 60 = leap)</td>
+ </tr>
+ <tr>
+ <td>14</td>
+ <td>Day</td>
+ <td>BYTE</td>
+ <td>Date (1 - 31)</td>
+ </tr>
+ <tr>
+ <td>15</td>
+ <td>Month</td>
+ <td>BYTE</td>
+ <td>Month (1 - 12)</td>
+ </tr>
+ <tr>
+ <td>16 - 17</td>
+ <td>Year</td>
+ <td>INTEGER</td>
+ <td>Year (4 digit)</td>
+ </tr>
+ <tr>
+ <td>18</td>
+ <td>Receiver Status</td>
+ <td>BYTE</td>
+ <td>Tracking Status</td>
+ </tr>
+ <tr>
+ <td>19</td>
+ <td>UTC Flags</td>
+ <td>BYTE</td>
+ <td>Leap Second Flags</td>
+ </tr>
+ <tr>
+ <td>20</td>
+ <td>Reserved</td>
+ <td>BYTE</td>
+ <td>Contains 0xFF</td>
+ </tr>
+ <tr>
+ <td>21</td>
+ <td>Reserved</td>
+ <td>BYTE</td>
+ <td>Contains 0xFF</td>
+ </tr>
+ </table>
+ </center>
+ <blockquote>
+ <h4>Leap Second Flag Definition:</h4>
+ Bit 0:&nbsp; (1) UTC Time is available<br>
+ Bits 1 - 3: Undefined<br>
+ Bit 4:&nbsp; (1) Leap Scheduled: Leap second pending asserted by GPS control segment.<br>
+ Bit 5:&nbsp; (1) Leap Pending: set 24 hours before, until beginning of leap second.<br>
+ Bit 6:&nbsp; (1) GPS Leap Warning: 6 hours before until 6 hours after leap event<br>
+ Bit 7:&nbsp; (1) Leap In Progress. Only set during the leap second.
+ <h4><a name="TrackingStatus"></a>Tracking Status Flag Definitions:</h4>
+ </blockquote>
+ <center>
+ <table width="712" border="0" cellspacing="0">
+ <tr>
+ <td valign="CENTER" width="5%">Code</td>
+ <td valign="CENTER" width="59%">Meaning</td>
+ <td>Accuracy</td>
+ <td>Receiver Mode</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>Receiver is Navigating</td>
+ <td>+/- 1 us</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">1</td>
+ <td valign="CENTER" width="59%">Static 1 Sat. Timing Mode&nbsp;</td>
+ <td>+/- 1 us</td>
+ <td>1-D Timing</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">2</td>
+ <td valign="CENTER" width="59%">Approximate Time</td>
+ <td>20 - 50 ms</td>
+ <td>Acquisition</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">3</td>
+ <td valign="CENTER" width="59%">Startup</td>
+ <td>N/A</td>
+ <td>Initialization</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">4</td>
+ <td valign="CENTER" width="59%">Startup</td>
+ <td>N/A</td>
+ <td>Initialization</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">5</td>
+ <td valign="CENTER" width="59%">Dilution of Position too High&nbsp;</td>
+ <td>5 ppm</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">6</td>
+ <td valign="CENTER" width="59%">Static 1 Sat. Timing: Sat. not usable</td>
+ <td>5 ppm</td>
+ <td>1-D Timing</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">7</td>
+ <td valign="CENTER" width="59%">No Satellites Usable</td>
+ <td>N/A</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">8</td>
+ <td valign="CENTER" width="59%">Only 1 Satellite Usable</td>
+ <td>20 - 50 ms</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">9</td>
+ <td valign="CENTER" width="59%">Only 2 Satellite Usable</td>
+ <td>20 - 50 ms</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">10</td>
+ <td valign="CENTER" width="59%">Only 3 Satellites Usable</td>
+ <td>20 - 50 ms</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">11</td>
+ <td valign="CENTER" width="59%">Invalid Solution</td>
+ <td>N/A</td>
+ <td>Error</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">12</td>
+ <td valign="CENTER" width="59%">Differential Corrections&nbsp;</td>
+ <td>N/A</td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">13</td>
+ <td valign="CENTER" width="59%">Overdetermined Fixes</td>
+ <td>+/- 100 ns</td>
+ <td>Timing Steady State</td>
+ </tr>
+ </table>
+ </center>
+ <h3><b><font size="+0">Packet 8F-0B (Comprehensive Timing Packet)</font></b></h3>
+ <center>
+ <table border="0" cellspacing="0">
+ <tr>
+ <td valign="CENTER" width="9%">Byte</td>
+ <td valign="CENTER" width="27%">Item</td>
+ <td valign="CENTER" width="16%">Type</td>
+ <td valign="CENTER" width="48%">Meaning</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">0</td>
+ <td valign="CENTER" width="27%">Sub-Packet ID</td>
+ <td valign="CENTER" width="16%">BYTE</td>
+ <td valign="CENTER" width="48%">Subcode 0x0B</td>
+ </tr>
+ <tr>
+ <td valign="TOP" width="9%">1 - 2</td>
+ <td valign="TOP" width="27%">Event Count</td>
+ <td valign="TOP" width="16%">INTEGER</td>
+ <td valign="TOP" width="48%">External event count recorded (0 = PPS)</td>
+ </tr>
+ <tr>
+ <td valign="TOP" width="9%">3 - 10</td>
+ <td valign="TOP" width="27%">UTC / GPS TOW</td>
+ <td valign="TOP" width="16%">DOUBLE</td>
+ <td valign="TOP" width="48%">UTC / GPS time of week (seconds)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">11</td>
+ <td valign="CENTER" width="27%">Date</td>
+ <td valign="CENTER" width="16%">BYTE</td>
+ <td valign="CENTER" width="48%">Day of Month</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">12</td>
+ <td valign="CENTER" width="27%">Month</td>
+ <td valign="CENTER" width="16%">BYTE</td>
+ <td valign="CENTER" width="48%">Month of Event</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">13 - 14</td>
+ <td valign="CENTER" width="27%">Year</td>
+ <td valign="CENTER" width="16%">INT</td>
+ <td valign="CENTER" width="48%">Year of event</td>
+ </tr>
+ <tr>
+ <td valign="TOP" width="9%">15</td>
+ <td valign="TOP" width="27%">Receiver Mode</td>
+ <td valign="TOP" width="16%">BYTE</td>
+ <td valign="TOP" width="48%">Receiver operating dimensions:&nbsp;<br>
+ 0: Horizontal (2D)&nbsp;<br>
+ 1: Full Position (3D)&nbsp;<br>
+ 2: Single Satellite (0D)&nbsp;<br>
+ 3: Automatic (2D / 3D)&nbsp;<br>
+ 4: DGPS reference&nbsp;<br>
+ 5: Clock hold (2D)&nbsp;<br>
+ 6: Over determined Clock</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">15 - 17</td>
+ <td valign="CENTER" width="27%">UTC Offset</td>
+ <td valign="CENTER" width="16%">INTEGER</td>
+ <td valign="CENTER" width="48%">UTC Offset value (seconds)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">18 - 25</td>
+ <td valign="CENTER" width="27%">Oscillator Bias</td>
+ <td valign="CENTER" width="16%">DOUBLE</td>
+ <td valign="CENTER" width="48%">Oscillator BIAS (meters)</td>
+ </tr>
+ <tr>
+ <td valign="TOP" width="9%">26 - 33</td>
+ <td valign="TOP" width="27%">Oscillator Drift Rate</td>
+ <td valign="TOP" width="16%">DOUBLE</td>
+ <td valign="TOP" width="48%">Oscillator Drift (meters / second)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">34 - 37</td>
+ <td valign="CENTER" width="27%">Bias Uncertainty</td>
+ <td valign="CENTER" width="16%">SINGLE</td>
+ <td valign="CENTER" width="48%">Oscillator bias uncertainty (meters)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">38 - 41</td>
+ <td valign="CENTER" width="27%">Drift Uncertainty</td>
+ <td valign="CENTER" width="16%">SINGLE</td>
+ <td valign="CENTER" width="48%">Oscillator bias rate uncertainty (m / sec)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">42 - 49</td>
+ <td valign="CENTER" width="27%">Latitude</td>
+ <td valign="CENTER" width="16%">DOUBLE</td>
+ <td valign="CENTER" width="48%">Latitude in radians</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">50 - 57</td>
+ <td valign="CENTER" width="27%">Longitude</td>
+ <td valign="CENTER" width="16%">DOUBLE</td>
+ <td valign="CENTER" width="48%">Longitude in radians</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">58 - 65</td>
+ <td valign="CENTER" width="27%">Altitude</td>
+ <td valign="CENTER" width="16%">DOUBLE</td>
+ <td valign="CENTER" width="48%">Altitude above mean sea level, in meters</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">66 - 73</td>
+ <td valign="CENTER" width="27%">Satellite ID</td>
+ <td valign="CENTER" width="16%">BYTE</td>
+ <td valign="CENTER" width="48%">SV Id No. of tracked satellites</td>
+ </tr>
+ </table>
+ </center>
+ <h2><a name="Pinouts"></a><font size="+1">Pinouts</font></h2>
+ <a href="#Connection">The following connections are required when connecting Palisade with a host:</a><br>
+ &nbsp;<br>
+ &nbsp;
+ <center>
+ <table>
+ <tr>
+ <td><u>Description</u></td>
+ <td><b>Host</b></td>
+ <td></td>
+ <td></td>
+ <td><b>Palisade&nbsp;</b></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><a name="PortA"></a><b>Port A</b></td>
+ <td><u>DB-9</u></td>
+ <td><u>DB-25</u></td>
+ <td></td>
+ <td><u>RS-232</u></td>
+ <td><u>RS-422</u></td>
+ <td><u>Palisade Pin</u></td>
+ </tr>
+ <tr>
+ <td>Receive Data&nbsp;</td>
+ <td>2</td>
+ <td>3</td>
+ <td>&lt;--&gt;</td>
+ <td>Green</td>
+ <td>Green / Blue</td>
+ <td>8 (T-) &amp; 10 (T+)</td>
+ </tr>
+ <tr>
+ <td>Request to Send</td>
+ <td>7</td>
+ <td>4</td>
+ <td>&lt;--&gt;</td>
+ <td>Gray</td>
+ <td>Gray / White</td>
+ <td>6 (R-) &amp; 7 (R+)</td>
+ </tr>
+ <tr>
+ <td>Signal Ground</td>
+ <td>5</td>
+ <td>7</td>
+ <td>&lt;--&gt;</td>
+ <td>Black</td>
+ <td>Black</td>
+ <td>9 (GND)</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><a name="PortB"></a><b>Port B</b></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>Receive Data&nbsp;</td>
+ <td>2</td>
+ <td>3</td>
+ <td>&lt;--&gt;</td>
+ <td>Brown</td>
+ <td>Brown / Yellow</td>
+ <td>4 (T-) &amp; 5 (T+)</td>
+ </tr>
+ <tr>
+ <td>Transmit Data</td>
+ <td>3</td>
+ <td>2</td>
+ <td>&lt;--&gt;</td>
+ <td>Violet</td>
+ <td>Orange/ Violet</td>
+ <td>2 (R-) &amp; 3 (R+)</td>
+ </tr>
+ <tr>
+ <td>Signal Ground</td>
+ <td>5</td>
+ <td>7</td>
+ <td>&lt;--&gt;</td>
+ <td>Black</td>
+ <td>Black</td>
+ <td>9 (GND)</td>
+ </tr>
+ </table>
+ </center>
+ <blockquote>
+ Note: If driving the RS-422 inputs on the Palisade single ended, i.e. using the Green and Gray connections only, does not work on all serial ports. Use of the Palisade NTP Synchronization Interface Module is recommended.</blockquote>
+ <blockquote>
+ The 12 pin connector pinout definition:<br>
+ Face the round 12 pin connector at the end of the cable, with the notch turned upwards.<br>
+ Pin 1 is to the left of the notch. Pins 2 - 8 wrap around the bottom, counterclockwise to pin 9 on the right of the notch. Pin 10 is just below the notch. Pins 10 (top), 11 (bottom left) and 12 (bottom right) form a triangle in the center of the connector.</blockquote>
+ <blockquote>
+ <a name="SIM"></a>Pinouts for the Palisade NTP host adapter (Trimble PN 37070) DB-25 M connector are as follows:</blockquote>
+ <center>
+ <table width="682" border="0" cellspacing="0">
+ <tr>
+ <td valign="CENTER" width="12%">DB-25M</td>
+ <td valign="CENTER" width="31%">Conductor&nbsp;</td>
+ <td valign="CENTER" width="16%">Palisade</td>
+ <td valign="CENTER" width="41%">Description</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">1&nbsp;</td>
+ <td valign="CENTER" width="31%">Red</td>
+ <td valign="CENTER" width="16%">1</td>
+ <td valign="CENTER" width="41%">Power</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">7&nbsp;</td>
+ <td valign="CENTER" width="31%">Black</td>
+ <td valign="CENTER" width="16%">9</td>
+ <td valign="CENTER" width="41%">Ground</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">9</td>
+ <td valign="CENTER" width="31%">Black/White</td>
+ <td valign="CENTER" width="16%">12</td>
+ <td valign="CENTER" width="41%">PPS -</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">10&nbsp;</td>
+ <td valign="CENTER" width="31%">Green</td>
+ <td valign="CENTER" width="16%">8</td>
+ <td valign="CENTER" width="41%">Transmit Port A (T-)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">11&nbsp;</td>
+ <td valign="CENTER" width="31%">Brown</td>
+ <td valign="CENTER" width="16%">4</td>
+ <td valign="CENTER" width="41%">Transmit Port B (T-)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">12&nbsp;</td>
+ <td valign="CENTER" width="31%">Gray</td>
+ <td valign="CENTER" width="16%">7</td>
+ <td valign="CENTER" width="41%">Receive Port A (R+)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">13</td>
+ <td valign="CENTER" width="31%">Orange</td>
+ <td valign="CENTER" width="16%">3</td>
+ <td valign="CENTER" width="41%">Receive Port B (R+)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">21</td>
+ <td valign="CENTER" width="31%">Orange/White</td>
+ <td valign="CENTER" width="16%">11</td>
+ <td valign="CENTER" width="41%">PPS +</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">22</td>
+ <td valign="CENTER" width="31%">Blue</td>
+ <td valign="CENTER" width="16%">10</td>
+ <td valign="CENTER" width="41%">Transmit Port A (T+)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">23</td>
+ <td valign="CENTER" width="31%">Yellow</td>
+ <td valign="CENTER" width="16%">5</td>
+ <td valign="CENTER" width="41%">Transmit Port B (T+)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">24</td>
+ <td valign="CENTER" width="31%">White</td>
+ <td valign="CENTER" width="16%">6</td>
+ <td valign="CENTER" width="41%">Receive Port A (R-)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">25</td>
+ <td valign="CENTER" width="31%">Violet</td>
+ <td valign="CENTER" width="16%">2</td>
+ <td valign="CENTER" width="41%">Receive Port B (R-)</td>
+ </tr>
+ </table>
+ </center>
+ <p></p>
+ <hr>
+ <p>Questions or Comments:<br>
+ <a href="mailto:sven_dietrich@trimble.com">Sven Dietrich</a><br>
+ <a href="http://www.trimble.com/">Trimble Navigation Ltd.</a></p>
+ <p>(last updated July 29, 1999)</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ ;
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver3.html b/contrib/ntp/html/drivers/driver3.html
new file mode 100644
index 000000000000..7dcc09249350
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver3.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>PSTI/Traconex 1020 WWV/WWVH Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>PSTI/Traconex 1020 WWV/WWVH Receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.3.<i>u</i><br>
+ Reference ID: <tt>WWV</tt><br>
+ Driver ID: <tt>WWV_PST</tt><br>
+ Serial Port: <tt>/dev/wwv<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the PSTI 1010 and Traconex 1020 WWV/WWVH Receivers. No specific claim of accuracy is made for these receiver, but actual experience suggests that 10 ms would be a conservative assumption.</p>
+ <p>The DIP-switches should be set for 9600 bps line speed, 24-hour day-of-year format and UTC time zone. Automatic correction for DST should be disabled. It is very important that the year be set correctly in the DIP-switches; otherwise, the day of year will be incorrect after 28 April of a normal or leap year. The propagation delay DIP-switches should be set according to the distance from the transmitter for both WWV and WWVH, as described in the instructions. While the delay can be set only to within 11 ms, the fudge time1 parameter can be used for vernier corrections.</p>
+ <p>Using the poll sequence <tt>QTQDQM</tt>, the response timecode is in three sections totalling 50 ASCII printing characters, as concatenated by the driver, in the following format:</p>
+ <pre>
+ahh:mm:ss.fffs&lt;cr&gt; yy/dd/mm/ddd&lt;cr&gt;
+frdzycchhSSFTttttuuxx&lt;cr&gt;
+
+on-time = first &lt;cr&gt;
+hh:mm:ss.fff = hours, minutes, seconds, milliseconds
+a = AM/PM indicator (' ' for 24-hour mode)
+yy = year (from DIPswitches)
+dd/mm/ddd = day of month, month, day of year
+s = daylight-saving indicator (' ' for 24-hour mode)
+f = frequency enable (O = all frequencies enabled)
+r = baud rate (3 = 1200, 6 = 9600)
+d = features indicator (@ = month/day display enabled)
+z = time zone (0 = UTC)
+y = year (5 = 91)
+cc = WWV propagation delay (52 = 22 ms)
+hh = WWVH propagation delay (81 = 33 ms)
+SS = status (80 or 82 = operating correctly)
+F = current receive frequency (4 = 15 MHz)
+T = transmitter (C = WWV, H = WWVH)
+tttt = time since last update (0000 = minutes)
+uu = flush character (03 = ^c)
+xx = 94 (unknown)</pre>
+ <p>The alarm condition is indicated by other than <tt>8</tt> at <tt>a</tt>, which occurs during initial synchronization and when received signal is lost for an extended period; unlock condition is indicated by other than <tt>0000</tt> in the <tt>tttt</tt> subfield.</p>
+ <h4>Monitor Data</h4>
+ <p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>WWV</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver30.html b/contrib/ntp/html/drivers/driver30.html
new file mode 100644
index 000000000000..34507f354039
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver30.html
@@ -0,0 +1,84 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859- 1">
+ <meta name="GENERATOR" content="Mozilla/4.06 [en] (X11; I; FreeBSD 3.0-CURRENT i386) [Netscape]">
+ <title>Motorola Oncore GPS Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Motorola Oncore GPS receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.30.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: ONCORE<br>
+ Serial Port: <tt>/dev/oncore.serial.</tt><i>u</i>; &nbsp;9600 baud, 8-bits, no parity.<br>
+ PPS Port: <tt>/dev/oncore.pps.</tt><i>u</i>;&nbsp; <tt>PPS_CAPTUREASSERT</tt> required,&nbsp; <tt>PPS_OFFSETASSERT</tt> supported.<br>
+ Configuration File: <tt>/etc/ntp.oncore</tt>, or <tt>/etc/ntp.oncore.</tt><i>u</i>, or <tt>/etc/ntp.oncore</tt><i>u</i>.</p>
+ <h4>Description</h4>
+ <p>This driver supports most models of the <a href="http://www.mot.com/AECS/PNSB/products">Motorola Oncore GPS receivers</a> (Basic, PVT6, VP, UT, UT+, GT, GT+, SL, M12), as long as they support the <i>Motorola Binary Protocol</i>.</p>
+ <p>The interesting versions of the Oncore are the VP, the UT+, the &quot;Remote&quot; which is a prepackaged UT+, and the M12 Timing. The VP is no longer available new, and the UT, GT, and SL are at end-of-life. The Motorola evaluation kit can be recommended. It interfaces to a PC straightaway, using the serial (DCD) or parallel port for PPS input and packs the receiver in a nice and sturdy box. Less expensive interface kits are available from <a href="http://www.tapr.org">TAPR</a> and <a href="http://www.synergy-gps.com">Synergy</a>.<br>
+ &nbsp;</p>
+ <center>
+ <table>
+ <tr>
+ <td><img src="../pic/oncore_utplusbig.gif" alt="gif" height="124" width="210"></td>
+ <td><img src="../pic/oncore_evalbig.gif" alt="gif" height="124" width="182"></td>
+ <td><img src="../pic/oncore_remoteant.jpg" alt="gif" height="188" width="178"></td>
+ </tr>
+ <tr>
+ <td>
+ <center>
+ UT+ oncore</center>
+ </td>
+ <td>
+ <center>
+ Evaluation kit</center>
+ </td>
+ <td>
+ <center>
+ Oncore Remote</center>
+ </td>
+ </tr>
+ </table>
+ </center>
+ <p>The driver requires a standard <tt>PPS</tt> interface for the pulse-per-second output from the receiver. The serial data stream alone does not provide precision time stamps (0-50msec variance, according to the manual), whereas the PPS output is precise down to 50 nsec (1 sigma) for the VP/UT models and 25 nsec for the M12 Timing. If you do not have the PPS signal available, then you should probably be using the NMEA driver rather than the Oncore driver.</p>
+ <p>The driver will use the &quot;position hold&quot; mode with user provided coordinates, the receivers built-in site-survey, or a similar algorithm implemented in this driver to determine the antenna position.</p>
+ <h4>Monitor Data</h4>
+ The driver always puts a lot of useful information on the clockstats file, and when run with debugging can be quite chatty on stdout. When first starting to use the driver you should definitely review the information written to the clockstats file to verify that the driver is running correctly.
+ <p>In addition, on platforms supporting Shared Memory, all of the messages received from the Oncore receiver are made available in shared memory for use by other programs. See the <a href="oncore-shmem.html">Oncore-SHMEM</a> manual page for information on how to use this option. For either debugging or using the SHMEM option, an Oncore Reference Manual for the specific receiver in use will be required.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Controls the kernel PPS discipline: 0 for disable (default), 1 for enable.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p>The driver was initially developed on FreeBSD, and has since been tested on Linux, SunOS and Solaris.</p>
+ <p><b>Configuration</b></p>
+ <p>There is a driver specific configuration file <tt>/etc/ntp.oncore</tt> (or <tt>/etc/ntp.oncore.</tt><i>u</i> or <tt>/etc/ntp.oncore</tt><i>u</i> if you must distinguish between more than one Oncore receiver) that contains information on the startup mode, the location of the GPS receiver, an offset of the PPS signal from zero, and the cable delay. The offset shifts the PPS signal to avoid interrupt pileups `on' the second, and adjust the timestamp accordingly. See the driver source for information on this file. The default with no file is: no delay, no offset, and a site survey is done to get the location of the gps receiver.</p>
+ <p>The edge of the PPS signal that is `on-time' can be set with either flag2 or in the driver specific configuration file with the keywords [ASSERT/CLEAR]. Flag3 (or the word HARDPPS in the driver specific configuration file) will cause the PPS signal to control the kernel PLL.</p>
+ <p><b>Performance</b></p>
+ <p>Really good. With the VP/UT+, the generated PPS pulse is referenced to UTC(GPS)&nbsp;with better than 50 nsec (1 sigma) accuracy. The limiting factor will be the timebase of the computer and the precision with which you can timestamp the rising flank of the PPS signal. Using FreeBSD, a FPGA&nbsp;based Timecounter/PPS&nbsp;interface, and an ovenized quartz oscillator, that performance has been reproduced. For more details on this aspect: <a href="http://phk.freebsd.dk/rover.html">Sub-Microsecond timekeeping under FreeBSD</a>.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver32.html b/contrib/ntp/html/drivers/driver32.html
new file mode 100644
index 000000000000..18beaaa82e4d
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver32.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1">
+ <title>Chrono-log K-series WWVB receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Chrono-log K-series WWVB receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.32.<i>u</i><br>
+ Reference ID: <tt>CHRONOLOG</tt><br>
+ Driver ID: <tt>CHRONOLOG</tt><br>
+ Serial Port: <tt>/dev/chronolog<i>u</i></tt>; 2400 bps, 8-bits, no parity<br>
+ <br>
+ Features: <tt>(none)</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the Chrono-log K-series WWVB receiver. This is a very old receiver without provisions for leap seconds, quality codes, etc. It assumes output in the local time zone, and that the C library mktime()/localtime() routines will correctly convert back and forth between local and UTC. There is a hack in the driver for permitting UTC, but it has not been tested.</p>
+ <p>Most of this code is originally from refclock_wwvb.c with thanks. It has been so mangled that wwvb is not a recognizable ancestor.</p>
+ <pre>
+Timecode format: Y yy/mm/ddCLZhh:mm:ssCL
+Y - year/month/date line indicator
+yy/mm/dd -- two-digit year/month/day
+C - \r (carriage return)
+L - \n (newline)
+Z - timestamp indicator
+hh:mm:ss - local time
+</pre>
+ <!-- hhmts start -->Last modified: Sun Feb 14 11:57:27 EST 1999 <!-- hhmts end -->
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver33.html b/contrib/ntp/html/drivers/driver33.html
new file mode 100644
index 000000000000..ea7734525186
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver33.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1">
+ <title>Dumb Clock</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Dumb Clock</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.33.<i>u</i><br>
+ Reference ID: <tt>DUMBCLOCK</tt><br>
+ Driver ID: <tt>DUMBCLOCK</tt><br>
+ Serial Port: <tt>/dev/dumbclock<i>u</i></tt>; 9600 bps, 8-bits, no parity<br>
+ Features: <tt>(none)</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports a dumb ASCII clock that only emits localtime at a reliable interval. This has no provisions for leap seconds, quality codes, etc. It assumes output in the local time zone, and that the C library mktime()/localtime() routines will correctly convert back and forth between local and UTC.</p>
+ <p>Most of this code is originally from refclock_wwvb.c with thanks. It has been so mangled that wwvb is not a recognizable ancestor.</p>
+ <pre>
+Timecode format: hh:mm:ssCL
+hh:mm:ss - local time
+C - \r (carriage return)
+L - \n (newline)
+</pre>
+ <hr>
+ <!-- hhmts start -->Last modified: Sun Feb 14 12:07:01 EST 1999 <!-- hhmts end -->
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver34.html b/contrib/ntp/html/drivers/driver34.html
new file mode 100644
index 000000000000..dc37f3b3a9e8
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver34.html
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1">
+ <title>Ultralink Clock</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Ultralink Clock</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.34.<i>u</i><br>
+ Reference ID: <tt>WWVB</tt><br>
+ Driver ID: <tt>ULINK</tt><br>
+ Serial Port: <tt>/dev/wwvb<i>u</i></tt>; 9600 bps, 8-bits, no parity<br>
+ <br>
+ Features: <tt>(none)</tt>
+ <h4>Description</h4>
+ <p>This driver supports the Ultralink Model 320 RS-232 powered WWVB receiver. PDF specs available on <a href="http://www.ulio.com">www.ulio.com</a>. This driver also supports the Model 330,331,332 decoders in both polled or continous time code mode. Leap second and quality are supported.</p>
+ <p>Most of this code is originally from refclock_wwvb.c with thanks. Any mistakes are mine. Any improvements are welcome.</p>
+ <hr>
+ <pre>
+ The Model 320 timecode format is:
+
+ &lt;cr&gt;&lt;lf&gt;SQRYYYYDDD+HH:MM:SS.mmLT&lt;cr&gt;
+
+ where:
+
+ S = 'S' -- sync'd in last hour, '0'-'9' - hours x 10 since last update, else '?'
+ Q = Number of correlating time-frames, from 0 to 5
+ R = 'R' -- reception in progress, 'N' -- Noisy reception, ' ' -- standby mode
+ YYYY = year from 1990 to 2089
+ DDD = current day from 1 to 366
+ + = '+' if current year is a leap year, else ' '
+ HH = UTC hour 0 to 23
+ MM = Minutes of current hour from 0 to 59
+ SS = Seconds of current minute from 0 to 59
+ mm = 10's milliseconds of the current second from 00 to 99
+ L = Leap second pending at end of month -- 'I' = inset, 'D'=delete
+ T = DST &lt;-&gt; STD transition indicators
+ </pre>
+ <p>Note that this driver does not do anything with the T flag.</p>
+ <p>The M320 also has a 'U' command which returns UT1 correction information. It is not used in this driver.</p>
+ <hr>
+ <pre>
+ The Model 33x timecode format is:
+
+ S9+D 00 YYYY+DDDUTCS HH:MM:SSl+5
+
+ Where:
+
+ S = sync indicator S insync N not in sync
+ the sync flag is WWVB decoder sync
+ nothing to do with time being correct
+ 9+ = signal level 0 thru 9+ If over 9 indicated as 9+
+ D = data bit ( fun to watch but useless ;-)
+ space
+ 00 = hours since last GOOD WWVB frame sync
+ space
+ YYYY = current year
+ + = leap year indicator
+ DDD = day of year
+ UTC = timezone (always UTC)
+ S = daylight savings indicator
+ space
+ HH = hours
+ : = This is the REAL in sync indicator (: = insync)
+ MM = minutes
+ : = : = in sync ? = NOT in sync
+ SS = seconds
+ L = leap second flag
+ +5 = UT1 correction (sign + digit ))
+ </pre>
+ <p>This driver ignores UT1 correction,DST indicator,Leap year and signal level.</p>
+ <hr>
+ <h4>Fudge factors</h4>
+ <p>flag1 polling enable (1=poll 0=no poll)</p>
+ <hr>
+ <address><a href="mailto:dstrout@linuxfoundary.com">mail</a></address>
+ <!-- hhmts start -->Last modified: Tue Sep 14 05:53:08 EDT 1999 <!-- hhmts end -->
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver35.html b/contrib/ntp/html/drivers/driver35.html
new file mode 100644
index 000000000000..20ed717b1922
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver35.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Conrad parallel port radio clock</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Conrad parallel port radio clock</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.35.<i>u</i><br>
+ Reference ID: <tt>PCF</tt><br>
+ Driver ID: <tt>PCF</tt><br>
+ Parallel Port: <tt>/dev/pcfclocks/<i>u</i></tt> or <tt>/dev/pcfclock<i>u</i></tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the parallel port radio clock sold by <a href="http://www.conrad-electronic.com/">Conrad Electronic</a> under order numbers 967602 and 642002. This clock is put between a parallel port and your printer. It receives the legal German time, which is either CET or CEST, from the DCF77 transmitter and uses it to set its internal quartz clock. The DCF77 transmitter is located near to Frankfurt/Main and covers a radius of more than 1500 kilometers.</p>
+ <p>The pcfclock device driver is required in order to use this reference clock driver. Currently device drivers for <a href="http://home.pages.de/%7evoegele/pcf.html">Linux</a> and <a href="http://schumann.cx/pcfclock/">FreeBSD</a> are available.</p>
+ <p>This driver uses C library functions to convert the received timecode to UTC and thus requires that the local timezone be CET or CEST. If your server is not located in Central Europe you have to set the environment variable TZ to CET before starting <tt>ntpd</tt>.</p>
+ <h4>Monitor Data</h4>
+ <p>Each timecode is written to the <tt>clockstats</tt> file in the format <tt>YYYY MM DD HH MI SS</tt>.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.1725.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>PCF</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>If set to 1, the radio clock's synchronisation status bit is ignored, ie the timecode is used without a check.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver36.html b/contrib/ntp/html/drivers/driver36.html
new file mode 100644
index 000000000000..2644716ffa53
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver36.html
@@ -0,0 +1,262 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Radio WWV/H Audio Demodulator/Decoder</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Radio WWV/H Audio Demodulator/Decoder</h3>
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="../scripts/links8.txt"></script>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.36.<i>u</i><br>
+ Reference ID: <tt>NONE</tt>, <tt>WV<i>f</i></tt> or <tt>WH<i>f</i></tt><br>
+ Driver ID: <tt>WWV_AUDIO</tt><br>
+ Autotune Port: <tt>/dev/icom</tt>; 1200/9600 baud, 8-bits, no parity<br>
+ Audio Device: <tt>/dev/audio</tt> and <tt>/dev/audioctl</tt>
+ <h4>Description</h4>
+ This driver synchronizes the computer time using data encoded in shortwave radio transmissions from NIST time/frequency stations <a href="http://www.bldrdoc.gov/timefreq/stations/wwv.html">WWV</a> in Ft. Collins, CO, and <a href="http://www.bldrdoc.gov/timefreq/stations/wwvh.htm">WWVH</a> in Kauai, HI. Transmissions are made continuously on 2.5, 5, 10 and 15 MHz from both stations and on 20 MHz from WWV. An ordinary shortwave receiver can be tuned manually to one of these frequencies or, in the case of ICOM receivers, the receiver can be tuned automatically by the driver as propagation conditions change throughout the day and night. The performance of this driver when tracking one of the stations is ordinarily better than 1 ms in time with frequency drift less than 0.5 PPM when not tracking either station.
+ <p>The demodulation and decoding algorithms used by this driver are based on a machine language program developed for the TAPR DSP93 DSP unit, which uses the TI 320C25 DSP chip. The analysis, design and performance of the program running on this unit is described in: Mills, D.L. A precision radio clock for WWV transmissions. Electrical Engineering Report 97-8-1, University of Delaware, August 1997, 25 pp. Available from <a href="http://www.eecis.udel.edu/%7emills/reports.html">www.eecis.udel.edu/~mills/reports.htm</a>. For use in this driver, the original program was rebuilt in the C language and adapted to the NTP driver interface. The algorithms have been modified somewhat to improve performance under weak signal conditions and to provide an automatic station identification feature.</p>
+ <p>This driver incorporates several features in common with other audio drivers such as described in the <a href="driver7.html">Radio CHU Audio Demodulator/Decoder</a> and the <a href="driver6.html">IRIG Audio Decoder</a> pages. They include automatic gain control (AGC), selectable audio codec port and signal monitoring capabilities. For a discussion of these common features, as well as a guide to hookup, debugging and monitoring, see the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
+ <p>The WWV signal format is described in NIST Special Publication 432 (Revised 1990). It consists of three elements, a 5-ms, 1000-Hz pulse, which occurs at the beginning of each second, a 800-ms, 1000-Hz pulse, which occurs at the beginning of each minute, and a pulse-width modulated 100-Hz subcarrier for the data bits, one bit per second. The WWVH format is identical, except that the 1000-Hz pulses are sent at 1200 Hz. Each minute encodes nine BCD digits for the time of century plus seven bits for the daylight savings time (DST) indicator, leap warning indicator and DUT1 correction.</p>
+ <h4>Program Architecture</h4>
+ <p>As in the original program, the clock discipline is modelled as a Markov process, with probabilistic state transitions corresponding to a conventional clock and the probabilities of received decimal digits. The result is a performance level which results in very high accuracy and reliability, even under conditions when the minute beep of the signal, normally its most prominent feature, can barely be detected by ear with a communications receiver.</p>
+ <p>The analog audio signal from the shortwave radio is sampled at 8000 Hz and converted to digital representation. The 1000/1200-Hz pulses and 100-Hz subcarrier are first separated using two IIR filters, a 600-Hz bandpass filter centered on 1100 Hz and a 150-Hz lowpass filter. The minute sync pulse is extracted using a 800-ms synchronous matched filter and pulse grooming logic which discriminates between WWV and WWVH signals and noise. The second sync pulse is extracted using a 5-ms FIR matched filter and 8000-stage comb filter.</p>
+ <p>The phase of the 100-Hz subcarrier relative to the second sync pulse is fixed at the transmitter; however, the audio stage in many radios affects the phase response at 100 Hz in unpredictable ways. The driver adjusts for each radio using two 170-ms synchronous matched filters. The I (in-phase) filter is used to demodulate the subcarrier envelope, while the Q (quadrature-phase) filter is used in a tracking loop to discipline the codec sample clock and thus the demodulator phase.</p>
+ <p>The data bit probabilities are determined from the subcarrier envelope using a threshold-corrected slicer. The averaged envelope amplitude 30 ms from the beginning of the second establishes the minimum (noise floor) value, while the amplitude 200 ms from the beginning establishes the maximum (signal peak) value. The slice level is midway between these two values. The negative-going envelope transition at the slice level establishes the length of the data pulse, which in turn establish probabilities for binary zero (P0) and binary one (P1). The data values are established by linear interpolation between the pulse lengths for P0 (-1) and P1 (+1). If the driver has not synchronized to the minute pulse, or if the data bit amplitude, signal/noise ratio (SNR) or length are below thresholds, the bit is considered invalid and the data value is ignored.</p>
+ <p>The difference between the P1 and P0 data values, or likelihood, for each data bit is exponentially averaged in a set of 60 accumulators, one for each second, to determine the semi-static miscellaneous bits, such as DST indicator, leap second warning and DUT1 correction. In this design a data average value larger than a positive threshold is interpreted as +1 (hit) and a value smaller than a negative threshold as a -1 (miss). Values between the two thresholds, which can occur due to signal fades or loss of signal, are interpreted as an erasure and result in no change of indication.</p>
+ <p>The BCD digit in each digit position of the timecode is represented as four data bits, all of which must be valid for the digit itself to be considered valid. If so, the bits are correlated with the bits corresponding to each of the valid decimal digits in this position. If the digit is invalid, the correlated value for all digits in this position is assumed zero. In either case, the values for all digits are exponentially averaged in a likelihood vector associated with this position. The digit associated with the maximum over all averaged values then becomes the maximum likelihood selection for this position and the ratio of the maximum over the next lower value becomes the likelihood ratio.</p>
+ <p>The decoding matrix contains nine row vectors, one for each digit position. Each row vector includes the maximum likelihood digit, likelihood vector and other related data. The maximum likelihood digit for each of the nine digit positions becomes the maximum likelihood time of the century. A built-in transition function implements a conventional clock with decimal digits that count the minutes, hours, days and years, as corrected for leap seconds and leap years. The counting operation also rotates the likelihood vector corresponding to each digit as it advances. Thus, once the clock is set, each clock digit should correspond to the maximum likelihood digit as transmitted.</p>
+ <p>Each row of the decoding matrix also includes a compare counter and the difference (modulo the radix) between the current clock digit and most recently determined maximum likelihood digit. If a digit likelihood exceeds the decision level and the difference is constant for a number of successive minutes in any row, the maximum likelihood digit replaces the clock digit in that row. When this condition is true for all rows and the second epoch has been reliably determined, the clock is set (or verified if it has already been set) and delivers correct time to the integral second. The fraction within the second is derived from the logical master clock, which runs at 8000 Hz and drives all system timing functions.</p>
+ <p>The logical master clock is derived from the audio codec clock. Its frequency is disciplined by a frequency-lock loop (FLL) which operates independently of the data recovery functions. At averaging intervals determined by the measured jitter, the frequency error is calculated as the difference between the most recent and the current second epoch divided by the interval. The sample clock frequency is then corrected by this amount. When first started, the frequency averaging interval is eight seconds, in order to compensate for intrinsic codec clock frequency offsets up to 125 PPM. Under most conditions, the averaging interval doubles in stages from the initial value to over 1000 seconds, which results in an ultimate frequency precision of 0.125 PPM, or about 11 ms/day.</p>
+ <p>It is important that the logical clock frequency is stable and accurately determined, since in most applications the shortwave radio will be tuned to a fixed frequency where WWV or WWVH signals are not available throughout the day. In addition, in some parts of the US, especially on the west coast, signals from either or both WWV and WWVH may be available at different times or even at the same time. Since the propagation times from either station are almost always different, each station must be reliably identified before attempting to set the clock.</p>
+ <p>Station identification uses the 800-ms minute pulse transmitted by each station. In the acquisition phase the entire minute is searched using both the WWV and WWVH matched filters and a pulse gate discriminator similar to that found in radar acquisition and tracking receivers. The peak amplitude found determines a range gate and window where the next pulse is expected to be found. The minute is scanned again to verify the peak is indeed in the window and with acceptable amplitude, SNR and jitter. At this point the receiver begins to track the second sync pulse and operate as above until the clock is set. Once the minute is synchronized, the range gate is fixed and only energy within the window is considered for the minute sync pulse.</p>
+ <p>It is very important to be able to reliably discriminate between very weak signals in noise and noise alone. The driver very aggresively soaks up every scrap of signal information, but has to be careful to avoid making pseudo-sense of noise alone. The signal quality metric depends on the minute pulse amplitude and SNR together with the data subcarrier amplitude and SNR. If all four values are above defined thresholds a hit is declared, otherwise a miss. The number of hits declared in the last six intervals is the high order bits of the metric value, while the current minute sync pulse amplitude is the low order bits. The metric value is represented on a scale from zero to 100. This is used as a quality indicator and reported in the timecode and also for the autotune function described below.</p>
+ <h4>Performance</h4>
+ <p>It is the intent of the design that the accuracy and stability of the indicated time be limited only by the characteristics of the ionospheric propagation medium. Conventional wisdom is that synchronization via the HF medium is good only to a millisecond under the best propagation conditions. The performance of the NTP daemon disciplined by the driver is clearly better than this, even under marginal conditions. Ordinarily, with marginal to good signals and a frequency averaging interval of 1024 s, the frequency is stabilized within 0.1 PPM and the time within 125 <font face="Symbol">m</font>s. The frequency stability characteristic is highly important, since the clock may have to free-run for several hours before reacquiring the WWV/H signal.</p>
+ <p>The expected accuracy over a typical day was determined using the DSP93 and an oscilloscope and cesium oscillator calibrated with a GPS receiver. With marginal signals and allowing 15 minutes for initial synchronization and frequency compensation, the time accuracy determined from the WWV/H second sync pulse was reliably within 125 <font face="Symbol">m</font>s. In the particular DSP-93 used for program development, the uncorrected CPU clock frequency offset was 45.8&plusmn;0.1 PPM. Over the first hour after initial synchronization, the clock frequency drifted about 1 PPM as the frequency averaging interval increased to the maximum 1024 s. Once reaching the maximum, the frequency wandered over the day up to 1 PPM, but it is not clear whether this is due to the stability of the DSP-93 clock oscillator or the changing height of the ionosphere. Once the frequency had stabilized and after loss of the WWV/H signal, the frequency drift was less than 0.5 PPM, which is equivalent to 1.8 ms/h or 43 ms/d. This resulted in a step phase correction up to several milliseconds when the signal returned.</p>
+ <p>The measured propagation delay from the WWV transmitter at Boulder, CO, to the receiver at Newark, DE, is 23.5&plusmn;0.1 ms. This is measured to the peak of the pulse after the second sync comb filter and includes components due to the ionospheric propagation delay, nominally 8.9 ms, communications receiver delay and program delay. The propagation delay can be expected to change about 0.2 ms over the day, as the result of changing ionosphere height. The DSP93 program delay was measured at 5.5 ms, most of which is due to the 400-Hz bandpass filter and 5-ms matched filter. Similar delays can be expected of this driver.</p>
+ <h4>Program Operation</h4>
+ The driver begins operation immediately upon startup. It first searches for one or both of the stations WWV and WWVH and attempts to acquire minute sync. This may take some fits and starts, as the driver expects to see three consecutive minutes with good signals and low jitter. If the autotune function is active, the driver will rotate over all five frequencies and both WWV and WWVH stations until three good minutes are found.
+ <p>When a minute sync candidate has been found, the driver acquires second sync, which can take up to several minutes, depending on signal quality. At the same time the driver accumulates likelihood values for each of the nine digits of the clock, plus the seven miscellaneous bits included in the WWV/H transmission format. When five repetitions of all nine digits have decoded correctly, which normally takes 15 minutes with good signals and up to an hour when buried in noise, and the second sync alarm has not been raised for two minutes, the clock is set (or verified) and is selectable to discipline the system clock.</p>
+ <p>As long as the clock is set or verified, the system clock offsets are provided once each second to the reference clock interface, where they are saved in a buffer. At the end of each minute the buffer samples are groomed by the median filter and trimmed-mean averaging functions. Using these functions, the system clock can in principle be disciplined to a much finer resolution than the 125-<font face="Symbol">m</font>s sample interval would suggest, although the ultimate accuracy is probably limited by propagation delay variations as the ionspheric height varies throughout the day and night.</p>
+ <p>The codec clock frequency is disciplined during times when WWV/H signals are available. The algorithm refines the frequency offset using increasingly longer averaging intervals to 1024 s, where the precision is about 0.1 PPM. With good signals, it takes well over two hours to reach this degree of precision; however, it can take many more hours than this in case of marginal signals. Once reaching the limit, the algorithm will follow frequency variations due to temperature fluctuations and ionospheric height variations.</p>
+ <p>It may happen as the hours progress around the clock that WWV and WWVH signals may appear alone, together or not at all. When the driver is first started, the NTP reference identifier appears as <tt>NONE</tt>. When the driver has mitigated which station and frequency is best, it sets the reference identifier to the string WV<i>f</i> for WWV and WH<i>f</i> for WWVH, where <i>f</i> is the frequency in megahertz. If the propagation delays have been properly set with the <tt>fudge time1</tt> (WWV) and <tt>fudge time2</tt> (WWVH) commands in the configuration file, handover from one station to the other is seamless.</p>
+ <p>Once the clock has been set for the first time, it will appear reachable and selectable to discipline the system clock, even if the broadcast signal fades to obscurity. A consequence of this design is that, once the clock is set, the time and frequency are disciplined only by the second sync pulse and the clock digits themselves are driven by the clock state machine. If for some reason the state machine drifts to the wrong second, it would never reresynchronize. To protect against this most unlikely situation, if after two days with no signals, the clock is considered unset and resumes the synchronization procedure from the beginning.</p>
+ <p>However, as long as the clock has once been set correctly and allowed to converge on the intrinsic codec clock frequency, it will continue to read correctly after a period of signal loss. Assuming the clock frequency can be disciplined within 1 PPM, it can coast without signals for several days without exceeding that NTP step threshold of 128 ms. During such periods the root dispersion increases at 5 <font face="Symbol">m</font>s per second, which makes the driver appears less likely for selection as time goes on. Eventually, when the dispersion due all causes exceeds 1 s, it is no longer suitable for synchronization at all.</p>
+ <p>To work well, the driver needs a shortwave receiver with good audio response at 100 Hz. Most shortwave and communications receivers roll off the audio response below 250 Hz, so this can be a problem, especially with receivers using DSP technology, since DSP filters can have very fast rolloff outside the passband. Some DSP transceivers, in particular the ICOM 775, have a programmable low frequency cutoff which can be set as low as 80 Hz. However, this particular radio has a strong low frequency buzz at about 10 Hz which appears in the audio output and can affect data recovery under marginal conditions. Although not tested, it would seem very likely that a cheap shortwave receiver could function just as well as an expensive communications receiver.</p>
+ <h4>Autotune</h4>
+ <p>The driver includes provisions to automatically tune the radio in response to changing radio propagation conditions throughout the day and night. The radio interface is compatible with the ICOM CI-V standard, which is a bidirectional serial bus operating at TTL levels. The bus can be connected to a serial port using a level converter such as the CT-17.</p>
+ <p>Each ICOM radio is assigned a unique 8-bit ID select code, usually expressed in hex format. To activate the CI-V interface, the <tt>mode</tt> keyword of the <tt>server</tt> configuration command specifies a nonzero select code in decimal format. A table of ID select codes for the known ICOM radios is given below. Since all ICOM select codes are less than 128, the high order bit of the code is used by the driver to specify the baud rate. If this bit is not set, the rate is 9600 bps for the newer radios; if set, the rate is 1200 bps for the older radios. A missing <tt>mode</tt> keyword or a zero argument leaves the interface disabled.</p>
+ <p>If specified, the driver will attempt to open the device <tt>/dev/icom</tt> and, if successful will activate the autotune function and tune the radio to each operating frequency in turn while attempting to acquire minute sync from either WWV or WWVH. However, the driver is liberal in what it assumes of the configuration. If the <tt>/dev/icom</tt> link is not present or the open fails or the CI-V bus or radio is inoperative, the driver quietly gives up with no harm done.</p>
+ <p>Once acquiring minute sync, the driver operates as described above to set the clock. However, during seconds 59, 0 and 1 of each minute it tunes the radio to one of the five broadcast frequencies to measure the sync pulse and data pulse amplitudes and SNR and update the signal metric. Each of the five frequencies are probed in a five-minute rotation to build a database of current propagation conditions for all signals that can be heard at the time. At the end of each probe a mitigation procedure scans the database and retunes the radio to the best frequency and station found. For this to work well, the radio should be set for a fast AGC recovery time. This is most important while tracking a strong signal, which is normally the case, and then probing another frequency, which may have much weaker signals.</p>
+ <p>Reception conditions for each frequency and station are evaluated according to the signal metric, which uses the minute sync pulse amplitude and SNR and data subcarrier amplitude and SNR. The minute pulse is evaluated at second 0, while the data pulse is evaluated at second 1. In principle, the data pulse in second 58 is usable, but the AGC in most radios is not fast enough for a reliable measurement.</p>
+ <p>The results are summarized in a scoreboard which drives the mitigation function.</p>
+ <dl>
+ <dt><tt>0x0001</tt>
+ <dd>Minute pulse error. For the minute sync pulse in second 0, either the amplitude or SNR is below threshold (2000 and 20 dB, respectively).
+ <dt><tt>0x0002</tt>
+ <dd>Data pulse error. For the data pulse in second 1, either the amplitude or SNR is below threshold (1000 and 10 dB, respectively).
+ <dt><tt>0x0004</tt>
+ <dd>Probe pulse error. Two or more decoding errors have occurred for the data pulses in seconds 58, 59 and 1.
+ </dl>
+ <p>If none of the scoreboard bits are set, a hit is declared, otherwise a miss. At the end of each probe, the frequency and station with the maximum metric is chosen, with ties going first to the highest frequency and then to WWV in order. During the acquisition phase a station is considered valid only if the metric is above 13; after the clock is synchronized a station is valid only if the metric is above 50. If no stations are valid, the driver ignores all signals and sets the reference ID field to NONE.</p>
+ <h4>Diagnostics</h4>
+ <p>The autotune process produces diagnostic information along with the timecode. This is very useful for evaluating the performance of the algorithms, as well as radio propagation conditions in general. The message is produced once each minute for each frequency in turn after minute sync has been acquired.</p>
+ <p><tt>wwv5 port status agc epoch count wwv wwvh</tt></p>
+ <p>where <tt>port</tt> and <tt>agc</tt> are the audio port and gain, respectively, for this frequency and <tt>wwv</tt> and <tt>wwvh</tt> are two sets of fields, one each for WWV and WWVH. Each of the two fields has the format</p>
+ <p><tt>ident score metric sync/snr</tt></p>
+ <p>where <tt>ident </tt>encodes the station (<tt>C</tt> for WWV, <tt>H</tt> for WWVH) and frequency (2, 5, 10, 15 or 20), <tt>score</tt> is a 32-bit shift register recording the hits (1) and misses (0) of the last 32 probes (hits and misses enter from the right), <tt>metric</tt> is as described above, <tt>sync</tt> is the minute sync pulse amplitude and <tt>snr</tt> is the SNR. An example is:</p>
+ <p><tt>wwv5 2 110d 111 5753 2 WV20 bdeff 100 8348/30.0/-3 WH20 0000 1 22/-12.4</tt></p>
+ <p>Here the radio is tuned to 20 MHz and the line-in port AGC is currently 111 at that frequency. The message contains a report for WWV (<tt>WV20</tt>) and WWVH (<tt>WH20</tt>). The WWV report <tt>score</tt> is <tt>bdeff</tt> and the metric is 100, which suggests very good reception conditions, and the minute sync amplitude and SNR are well above thresholds (2000 and 20 dB, respectively). While the message shows solid reception conditions from WWV, this is not the case for WWVH. Both the minute sync amplitude and SNR are below thresholds and the station has not been heard during the last 160 minutes.</p>
+ <h4>Debugging Aids</h4>
+ <p>The most convenient way to track the driver status is using the <tt>ntpq</tt> program and the <tt>clockvar</tt> command. This displays the last determined timecode and related status and error counters, even when the driver is not disciplining the system clock. If the debugging trace feature (<tt>-d</tt> on the <tt>ntpd</tt> command line)is enabled, the driver produces detailed status messages as it operates. If the <tt>fudge flag 4</tt> is set, these messages are written to the <tt>clockstats</tt> file. All messages produced by this driver have the prefix <tt>wwv</tt> for convenient filtering with the Unix <tt>grep</tt> command.</p>
+ <p>In the following descriptions the units of amplitude, phase, probability and likelihood are normalized to the range 0-6000 for convenience. In addition, the signal/noise ratio (SNR) and likelihood ratio are measured in decibels and the words with bit fields are in hex. Most messages begin with a leader in the following format:</p>
+ <p><tt>wwvn ss stat sigl</tt></p>
+ <p>where <tt>wwvn</tt> is the message code, <tt>ss</tt> the second of minute, <tt>stat</tt> the driver status word and <tt>sigl</tt> the second sync pulse amplitude. A full explanation of the status bits is contained in the driver source listing; however, the following are the most useful for debugging.</p>
+ <dl>
+ <dt><tt>0x0001</tt>
+ <dd>Minute sync. Set when the decoder has identified a station and acquired the minute sync pulse.
+ <dt><tt>0x0002</tt>
+ <dd>Second sync. Set when the decoder has acquired the second sync pulse and within 125 <font face="Symbol">m</font>s of the correct phase.
+ <dt><tt>0x0004</tt>
+ <dd>digit sync. Set when the decoder has reliably determined at least one digit of the minute. <dt><tt>0x0008</tt>
+ <dd>Clock set. Set when the decoder has reliably determined all nine digits of the timecode and is selectable to discipline the system clock.
+ </dl>
+ <p>With debugging enabled the driver produces messages in the following formats:</p>
+ <p>Format <tt>wwv8</tt> messages are produced once per minute by the WWV and WWVH station processes before minute sync has been acquired. They show the progress of identifying and tracking the minute pulse of each station.</p>
+ <p><tt>wwv8 port agc ident comp ampl snr epoch jitr offs</tt></p>
+ <p>where <tt>port</tt> and <tt>agc</tt> are the audio port and gain, respectively. The <tt>ident</tt>encodes the station (<tt>C</tt> for WWV, <tt>H</tt> for WWVH) and frequency (2, 5, 10, 15 or 20). For the encoded frequency, <tt>comp</tt> is the hit counter, <tt>ampl</tt> the pulse amplitude, <tt>snr</tt> the SNR, <tt>epoch</tt> the sample number of the minute pulse in the minute, <tt>jitr</tt> the change since the last <tt>epoch</tt> and <tt>offs</tt> the minute pulse offset relative to the second pulse. An example is:</p>
+ <p><tt>wwv8 2 127 WV15 2 9247 30.0 18843 -1 1</tt><br>
+ <tt>wwv8 2 127 WH15 0 134 -2.9 19016 193 174</tt></p>
+ <p>Here the radio is tuned to WWV at 15 MHz, using the line-in port and the AGC is currently 127. The driver has not yet acquired minute sync, the station has been heard for at least two minutes, and WWVH is in the noise. The WWV minute pulse amplitude and SNR are well above the threshold (2000 and 6 dB, respectively) and the minute epoch has been determined -1 sample relative to the last one and 1 sample relative to the second sync pulse. The hit counter has incrmented to two; when it gets to three, minute sync has been acquired.</p>
+ <p>Format <tt>wwv3</tt> messages are produced after minute sync has been acquired and until the seconds unit digit is determined. They show the results of decoding each bit of the transmitted timecode.</p>
+ <p><tt>wwv3 ss stat sigl ssnr ampl dsnr like</tt></p>
+ <p>where <tt>ss</tt>, <tt>stat</tt> and <tt>sigl</tt> are as above, <tt>ssnr</tt> is the seconds sync SNR, <tt>ampl</tt> the subcarrier amplitude, <tt>dsnr</tt> the subcarrier SNR and <tt>like</tt> the bit likelihood. An example is:</p>
+ <p><tt>wwv3 28 0123 4122 30.0 4286 24.8 -5545</tt></p>
+ <p>Here the driver has acquired minute and second sync, but has not yet determined the seconds unit digit. However, it has just decoded bit 28 of the minute. The results show the second sync pulse amplitude well over the threshold (500), subcarrier amplitude well above the threshold (1000), good SNR well above the threshold (10 dB). The bit is almost certainly a zero and the likelihood of a zero in this second is very high.</p>
+ <p>Format <tt>wwv4</tt> messages are produced for each of the nine BCD timecode digits until the clock has been set or verified. They show the results of decoding each digit of the transmitted timecode.</p>
+ <p><tt>wwv4 ss stat sigl radx ckdig mldig diff cnt like snr</tt></p>
+ <p>where <tt>ss</tt>, <tt>stat</tt> and <tt>sigl</tt> are as above, <tt>radx</tt> is the digit radix (3, 4, 6, 10), <tt>ckdig</tt> the current clock digit, <tt>mldig</tt> the maximum likelihood digit, <tt>diff</tt> the difference between these two digits modulo the radix, <tt>cnt</tt> the compare counter, <tt>like</tt> the digit likelihood and <tt>snr</tt> the likelihood ratio. An example is:</p>
+ <p><tt>wwv4 8 010f 5772 10 9 9 0 6 4615 6.1</tt></p>
+ <p>Here the driver has previousl set or verified the clock. It has just decoded the digit preceding second 8 of the minute. The digit radix is 10, the current clock and maximum likelihood digits are both 9, the likelihood is well above the threshold (1000) and the likelihood function well above threshold (3.0 dB). Short of a hugely unlikely probability conspiracy, the clock digit is most certainly a 9.</p>
+ <p>Format <tt>wwv2</tt> messages are produced at each master oscillator frequency update, which starts at 8 s, but eventually climbs to 1024 s. They show the progress of the algorithm as it refines the frequency measurement to a precision of 0.1 PPM.</p>
+ <p><tt>wwv2 ss stat sigl epoch maxrun jitr avinc avint wiggle freq</tt></p>
+ <p>where <tt>ss</tt>, <tt>stat</tt> and <tt>sigl</tt> are as above, <tt>epoch</tt> the codec clock at the seconds epoch, <tt>maxrun </tt>the maximum run length, <tt>jitr</tt> the jitter counter, <tt>avinc</tt> the increment counter, <tt>avint</tt> the averaging interval, <tt>phase</tt> the phase correction and <tt>freq</tt> the current frequency (PPM). An example is:</p>
+ <p><tt>wwv2 22 030f 5795 7433 223 0 3 256 0 49.0</tt></p>
+ <p>Here the driver has acquired minute and second sync and set the clock. The averaging interval has increased to 256 s on the way to 1024 s, has stayed at that interval for 3 averaging intervals and the current frequency is 49.0 PPM.</p>
+ <p>If the CI-V interface for ICOM radios is active, a debug level greater than 1 will produce a trace of the CI-V command and response messages. Interpretation of these messages requires knowledge of the CI-V protocol, which is beyond the scope of this document.</p>
+ <h4>Monitor Data</h4>
+ When enabled by the <tt>filegen</tt> facility, every received timecode is written to the <tt>clockstats</tt> file in the following format:
+ <pre>
+ sq yyyy ddd hh:mm:ss ld du lset agc ident metric errs freq cons
+
+ s sync indicator (?&nbsp;or space)
+ q quality character (see below)
+ yyyy Gregorian year
+ ddd day of year
+ hh hour of day
+ mm minute of hour
+ l leap second warning
+ d DST state
+ dut DUT sign and magnitude
+ lset minutes since last set
+ agc audio gain
+ ident station identifier and frequency
+ metric signal metric (0-100)
+ errs data bit error counter
+ freq frequency offset
+ avgt frequency averaging interval
+</pre>
+ The fields beginning with <tt>year</tt> and extending through <tt>dut</tt> are decoded from the received data and are in fixed-length format. The <tt>agc</tt> and <tt>lset</tt> fields, as well as the following driver-dependent fields, are in variable-length format.
+ <dl>
+ <dt><tt>s</tt>
+ <dd>The sync indicator is initially <tt>?</tt> before the clock is set, but turns to space when all nine digits of the timecode are correctly set and the decoder is synchronized to the station within 125 <font face="Symbol">m</font>s. <dt><tt>q</tt>
+ <dd>The quality character is a four-bit hexadecimal code showing which alarms have been raised. Each bit is associated with a specific alarm condition according to the following: <dl>
+ <dt><tt>0x8</tt>
+ <dd>Sync alarm. The decoder is not synchronized to the station within 125 <font face="Symbol">m</font>s. <dt><tt>0x4</tt>
+ <dd>Error alarm. More than 30 data bit errors occurred in the last minute.
+ <dt><tt>0x2</tt>
+ <dd>Symbol alarm. The probability of correct decoding for a digit or miscellaneous bit has fallen below the threshold.
+ <dt><tt>0x1</tt>
+ <dd>Decoding alarm. A maximum likelihood digit fails to agree with the current associated clock digit.
+ </dl>It is important to note that one or more of the above alarms does not necessarily indicate a clock error, but only that the decoder has detected a condition that may eventually result in an error. <dt><tt>yyyy ddd hh:mm:ss</tt>
+ <dd>The timecode format itself is self explanatory. Since the driver latches the on-time epoch directly from the second sync pulse, the seconds fraction is always zero. Although the transmitted timecode includes only the year of century, the Gregorian year is augmented by 2000. <dt><tt>l</tt>
+ <dd>The leap second warning is normally space, but changes to <tt>L</tt> if a leap second is to occur at the end of the month of June or December.
+ <dt><tt>d</tt>
+ <dd>The DST state is <tt>S</tt> or <tt>D</tt> when standard time or daylight time is in effect, respectively. The state is <tt>I</tt> or <tt>O</tt> when daylight time is about to go into effect or out of effect, respectively.
+ <dt><tt>dut</tt>
+ <dd>The DUT sign and magnitude shows the current UT1 offset relative to the displayed UTC time, in deciseconds.
+ <dt><tt>lset</tt>
+ <dd>Before the clock is set, the interval since last set is the number of minutes since the driver was started; after the clock is set, this is number of minutes since the decoder was last synchronized to the station within 125 <font face="Symbol">m</font>s. <dt><tt>agc</tt>
+ <dd>The audio gain shows the current codec gain setting in the range 0 to 255. Ordinarily, the receiver audio gain control or IRIG level control should be set for a value midway in this range.
+ <dt><tt>ident</tt>
+ <dd>The station identifier shows the station, <tt>C</tt> for WWV or <tt>H</tt> for WWVH, and frequency being tracked. If neither station is heard on any frequency, the reference identifier shows <tt>NONE</tt>.
+ <dt><tt>metric</tt>
+ <dd>The signal metric described above from 0 (no signal) to 100 (best).
+ <dt><tt>errs</tt>
+ <dd>The bit error counter is useful to determine the quality of the data signal received in the most recent minute. It is normal to drop a couple of data bits under good signal conditions and increasing numbers as conditions worsen. While the decoder performs moderately well even with half the bits are in error in any minute, usually by that point the metric drops below threshold and the decoder switches to a different frequency. <dt><tt>freq</tt>
+ <dd>The frequency offset is the current estimate of the codec frequency offset to within 0.1 PPM. This may wander a bit over the day due to local temperature fluctuations and propagation conditions.
+ <dt><tt>avgt</tt>
+ <dd>The averaging time is the interval between frequency updates in powers of two to a maximum of 1024 s. Attainment of the maximum indicates the driver is operating at the best possible resolution in time and frequency.
+ </dl>
+ <p>An example timecode is:</p>
+ <p><tt>0 2000 006 22:36:00 S +3 1 115 WV20 86 5 66.4 1024</tt></p>
+ <p>Here the clock has been set and no alarms are raised. The year, day and time are displayed along with no leap warning, standard time and DUT +0.3 s. The clock was set on the last minute, the AGC is safely in the middle ot the range 0-255, and the receiver is tracking WWV on 20 MHz. Good receiving conditions prevail, as indicated by the metric 86 and 5 bit errors during the last minute. The current frequency is 66.4 PPM and the averaging interval is 1024 s, indicating the maximum precision available.</p>
+ <h4>Modes</h4>
+ <p>The <tt>mode</tt> keyword of the <tt>server</tt> configuration command specifies the ICOM ID select code in decimal. A missing or zero argument disables the CI-V interface. Following are the ID select codes for the known radios. These codes are for 9600 baud rate; for 1200 baud rate add 128.</p>
+ <table width="100%" cols="6">
+ <tr>
+ <td>Radio</td>
+ <td>Hex</td>
+ <td>Decimal</td>
+ <td>Radio</td>
+ <td>Hex</td>
+ <td>Decimal</td>
+ </tr>
+ <tr>
+ <td>IC725</td>
+ <td>0x28</td>
+ <td>40</td>
+ <td>IC781</td>
+ <td>0x26</td>
+ <td>38</td>
+ </tr>
+ <tr>
+ <td>IC726</td>
+ <td>0x30</td>
+ <td>48</td>
+ <td>R7000</td>
+ <td>0x08</td>
+ <td>8</td>
+ </tr>
+ <tr>
+ <td>IC735</td>
+ <td>0x04</td>
+ <td>4</td>
+ <td>R71</td>
+ <td>0x1A</td>
+ <td>26</td>
+ </tr>
+ <tr>
+ <td>IC751</td>
+ <td>0x1c</td>
+ <td>28</td>
+ <td>R7100</td>
+ <td>0x34</td>
+ <td>52</td>
+ </tr>
+ <tr>
+ <td>IC761</td>
+ <td>0x1e</td>
+ <td>30</td>
+ <td>R72</td>
+ <td>0x32</td>
+ <td>50</td>
+ </tr>
+ <tr>
+ <td>IC765</td>
+ <td>0x2c</td>
+ <td>44</td>
+ <td>R8500</td>
+ <td>0x4a</td>
+ <td>74</td>
+ </tr>
+ <tr>
+ <td>IC775</td>
+ <td>0x46</td>
+ <td>68</td>
+ <td>R9000</td>
+ <td>0x2a</td>
+ <td>42</td>
+ </tr>
+ </table>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the propagation delay for WWV (40:40:49.0N 105:02:27.0W), in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Specifies the propagation delay for WWVH (21:59:26.0N 159:46:00.0W), in seconds and fraction, with default 0.0.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Ordinarily, this field specifies the driver reference identifier; however, the driver sets the reference identifier automatically as described above.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Specifies the microphone port if set to zero or the line-in port if set to one. It does not seem useful to specify the compact disc player port.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Enables audio monitoring of the input signal. For this purpose, the speaker volume must be set before the driver is started.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/drivers/driver37.html b/contrib/ntp/html/drivers/driver37.html
new file mode 100644
index 000000000000..26acbc36ecbc
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver37.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Forum Graphic GPS Dating station</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Forum Graphic GPS Dating station</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.37.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS</tt><br>
+ Parallel Port: <tt>/dev/fgclock<i>u</i></tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the Forum Graphic GPS Dating station sold by <a href="http://www.emr.fr/gpsclock.html">EMR company</a>.</p>
+ <p>Unfortunately sometime FG GPS start continues reporting of the same date. The only way to fix this problem is GPS power cycling and ntpd restart after GPS power-up.</p>
+ <p>After Jan,10 2000 my FG GPS unit start send a wrong answer after 10:00am till 11:00am. It repeat hour value in result string twice. I wroite a small code to avoid such problem. Unfortunately I have no second FG GPS unit to evaluate this problem. Please let me know if your GPS has no problems after Y2K.</p>
+ <p></p>
+ <h4>Monitor Data</h4>
+ <p>Each timecode is written to the <tt>clockstats</tt> file in the format <tt>YYYY YD HH MI SS</tt>.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>FG</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <hr>
+ <address>Dmitry Smirnov (das@amt.ru)</address>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver38.html b/contrib/ntp/html/drivers/driver38.html
new file mode 100644
index 000000000000..e32bd71520ec
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver38.html
@@ -0,0 +1,138 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>hopf clock drivers by ATLSoft</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+ <h1><font face="Arial"><i><blink><font size="5">hopf</font></blink></i><font size="+2"> </font><font size="3">Serial Line Receivers (6021 and&nbsp; kompatible)</font></font></h1>
+ <hr>
+ <h2><font size="+1">Synopsis</font></h2>
+ <table width="100%" border="0" cellspacing cellpadding>
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" bgcolor="#C0C0C0">
+ <tr>
+ <td height="21">
+ <div align="right">
+ <tt>Address:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td><b>127.127.38.<i>X</i></b></td>
+ </tr>
+ <tr>
+ <td height="1">
+ <div align="right">
+ <tt>Reference ID:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="1"><a name="REFID"></a><b>.hopf. </b>(default)<b>, GPS, DCF</b></td>
+ </tr>
+ <tr>
+ <td height="21">
+ <div align="right">
+ <tt>Driver ID:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="21"><b>HOPF_S</b></td>
+ </tr>
+ <tr>
+ <td height="16">
+ <div align="right">
+ <tt>Serial Port:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="16"><b>/dev/hopfclock<i>X</i></b></td>
+ </tr>
+ <tr>
+ <td height="23">
+ <div align="right">
+ <tt><font size="+1">Serial I/O</font>:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="23"><b>9600 baud, 8-bits, 1-stop, no parity</b></td>
+ </tr>
+ </table>
+ </td>
+ <td align="center"><img src="../pic/fg6021.gif" height="207" width="238" border="0"></td>
+ </tr>
+ </table>
+ <hr>
+ <h2><font size="+1">Description</font></h2>
+ <p>The <b>refclock_hopf_serial</b> driver supports <a href="http://www.hopf.com">hopf electronic receivers</a> with serial Interface kompatibel 6021.<br>
+ </p>
+ <p>Additional software and information about the software drivers is available from: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a>.<br>
+ </p>
+ <p>Latest NTP driver source, executables and documentation is maintained at: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a></p>
+ <hr>
+ <h2><font size="+1">Operating System Compatibility</font></h2>
+ <p align="left">The hopf clock driver has been tested on the following software and hardware platforms:<br>
+ &nbsp;</p>
+ <table bgcolor="#C0C0C0">
+ <tr>
+ <td valign="CENTER" nowrap width="23%">
+ <p align="left"><b>Platform</b></p>
+ </td>
+ <td valign="CENTER" nowrap>
+ <p align="left"><b>Operating System</b></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="CENTER" nowrap width="23%">
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <td valign="CENTER" nowrap>
+ <p align="left">Linux</p>
+ </td>
+ </tr>
+ <tr>
+ <td nowrap>
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <td nowrap>
+ <p align="left">Windows NT</p>
+ </td>
+ </tr>
+ <tr>
+ <td nowrap>
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <center>
+ <td nowrap>Windows 2000</td>
+ </center>
+ </tr>
+ </table>
+ <hr>
+ <h2><font size="+1">O/S Serial Port Configuration</font></h2>
+ The driver attempts to open the device <b><tt><a href="#REFID">/dev/hopfclock<i>X</i></a></tt></b> where <i><b>X</b></i> is the NTP refclock unit number as defined by the LSB of the refclock address.&nbsp; Valid refclock unit numbers are 0 - 3.
+ <p>The user is expected to provide a symbolic link to an available serial port device.&nbsp; This is typically performed by a command such as:</p>
+ <blockquote>
+ <tt>ln -s /dev/ttyS0 /dev/hopfclock0</tt></blockquote>
+ Windows NT does not support symbolic links to device files.&nbsp;<br>
+ <b>COMx</b>: is used by the driver, based on the refclock unit number, where <b>unit 1</b> corresponds to <b>COM1</b>: and <b>unit 3</b> corresponds to <b>COM3</b>:<br>
+ &nbsp;
+ <hr>
+ <h2><font size="+1">Fudge Factors</font></h2>
+ <dl>
+ <dt><b><a name="time1"></a><tt><font size="+1"><a href="#Configuration">time1 <i>time</i></a></font></tt></b>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. Should be set to 20 milliseconds to correct serial line and operating system delays incurred in capturing time stamps from the synchronous packets.
+ <dt><tt><font size="+1"><a href="#REFID"><b>refid <i>string</i></b></a></font></tt>
+ <dd>Specifies the driver reference identifier, <b>GPS </b><i>or</i> <b>DCF</b>.
+ <dt><tt><font size="+1"><b>flag1 0 | 1</b></font></tt>
+ <dd>When set to 1, driver sync's even if only crystal driven.
+ </dl>
+ <hr>
+ <h2><a name="DataFormat"></a><font size="+1">Data Format</font></h2>
+ <p>as specified in clock manual under pt. <u>[ <span style="font-size:10.0pt;font-family:
+Arial;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;;
+mso-ansi-language:EN-GB;mso-fareast-language:DE;mso-bidi-language:AR-SA" lang="EN-GB"><b>Data String for NTP</b> ( <b><i>Network Time Protocol </i></b>) </span>]</u></p>
+ <hr>
+ <h3>Questions or Comments:</h3>
+ <p><a href="mailto:altmeier@atlsoft.de">Bernd Altmeier</a><a href="http://www.ATLSoft.de"><br>
+ Ing.-B&uuml;ro f&uuml;r Software www.ATLSoft.de</a></p>
+ <p>(last updated 02/28/2001)<br>
+ &nbsp;</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver39.html b/contrib/ntp/html/drivers/driver39.html
new file mode 100644
index 000000000000..10a3d14f9db1
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver39.html
@@ -0,0 +1,116 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>hopf clock drivers by ATLSoft</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+ <h1><font face="Arial"><i><blink><font size="5">hopf</font></blink></i><font size="+2"> </font><font size="3">PCI-Bus Receiver (6039 GPS/DCF77)</font></font></h1>
+ <hr>
+ <div align="center">
+ <center>
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="50%">
+ <h2><font size="+1">Synopsis</font></h2>
+ <table border="0" cellpadding="3" bgcolor="#C0C0C0">
+ <tr>
+ <td height="21">
+ <div align="right">
+ <tt>Address:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="21"><b>127.127.39.<i>X</i></b></td>
+ </tr>
+ <tr>
+ <td height="21">
+ <div align="right">
+ <tt>Reference ID:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="21"><a name="REFID"></a><b>.hopf. </b>(default)<b>, GPS, DCF</b></td>
+ </tr>
+ <tr>
+ <td height="21">
+ <div align="right">
+ <tt>Driver ID:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="21"><b>HOPF_P</b></td>
+ </tr>
+ </table>
+ </td>
+ <td align="center" valign="middle"><font face="Arial"><i><blink><font size="5"><img src="../pic/fg6039.jpg" height="140" width="141" border="0"></font></blink></i></font></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <hr>
+ <h2><font size="+1">Description</font></h2>
+ The <b>refclock_hopf_pci </b>driver supports the <a href="http://www.hopf.com">hopf</a> PCI-bus interface 6039 GPS/DCF77.<br>
+ Additional software and information about the software drivers maybe available from: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a>.<br>
+ Latest NTP driver source, executables and documentation is maintained at: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a>
+ <hr>
+ <h2><font size="+1">Operating System Compatibility</font></h2>
+ <p align="left">The hopf clock driver has been tested on the following software and hardware platforms:<br>
+ &nbsp;</p>
+ <table bgcolor="#C0C0C0">
+ <tr>
+ <td valign="CENTER" nowrap width="23%">
+ <p align="left"><b>Platform</b></p>
+ </td>
+ <td valign="CENTER" nowrap>
+ <p align="left"><b>Operating System</b></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="CENTER" nowrap width="23%">
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <td valign="CENTER" nowrap>
+ <p align="left">Linux</p>
+ </td>
+ </tr>
+ <tr>
+ <td nowrap>
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <td nowrap>
+ <p align="left">Windows NT</p>
+ </td>
+ </tr>
+ <tr>
+ <td nowrap>
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <center>
+ <td nowrap>Windows 2000</td>
+ </center>
+ </tr>
+ </table>
+ <hr>
+ <h2><font size="+1">O/S System Configuration</font></h2>
+ <p><b>UNIX</b></p>
+ The driver attempts to open the device <b><tt><a href="#REFID">/dev/hopf6039</a></tt></b> . The device entry will be made by the installation process of the kernel module for the PCI-bus board. The driver sources belongs to the delivery equipment of the PCI-board.
+ <p><b>Windows NT/2000</b></p>
+ <p>The driver attempts to open the device by calling the function &quot;OpenHopfDevice()&quot;. This function will be installed by the Device Driver for the PCI-bus board. The driver belongs to the delivery equipment of the PCI-board.</p>
+ <hr>
+ <h2><font size="+1">Fudge Factors</font></h2>
+ <dl>
+ <dt><tt><font size="+1"><a href="#REFID"><b>refid <i>string</i></b></a></font></tt>
+ <dd>Specifies the driver reference identifier, <b>GPS </b><i>or</i> <b>DCF</b>.
+ <dt><tt><font size="+1"><b>flag1 0 | 1</b></font></tt>
+ <dd>When set to 1, driver sync's even if only crystal driven.
+ </dl>
+ <hr>
+ <h3>Questions or Comments:</h3>
+ <p><a href="mailto:altmeier@atlsoft.de">Bernd Altmeier</a><a href="http://www.ATLSoft.de"><br>
+ Ing.-B&uuml;ro f&uuml;r Software www.ATLSoft.de</a></p>
+ <p>(last updated 03/02/2001)<br>
+ &nbsp;</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver4.html b/contrib/ntp/html/drivers/driver4.html
new file mode 100644
index 000000000000..2f78eb50cff0
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver4.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Spectracom 8170 and Netclock/2 WWVB Receivers</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Spectracom 8170 and Netclock/2 WWVB Receivers</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.4.<i>u</i><br>
+ Reference ID: <tt>WWVB</tt><br>
+ Driver ID: <tt>WWVB_SPEC</tt><br>
+ Serial Port: <tt>/dev/wwvb<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt>
+ <h4>Description</h4>
+ <p>This driver supports all known Spectracom radio and satellite clocks, including the Model 8170 and Netclock/2 WWVB Synchronized Clocks and the Netclock/GPS GPS Master Clock. The claimed accuracy of the WWVB clocks is 100 usec relative to the broadcast signal. These clocks have proven a reliable source of time, except in some parts of the country with high levels of conducted RF interference. WIth the GPS clock the claimed accuracy is 130 ns. However, in most cases the actual accuracy is limited by the precision of the timecode and the latencies of the serial interface and operating system.</p>
+ <p>The DIPswitches on these clocks should be set to 24-hour display, AUTO DST off, data format 0 or 2 (see below) and baud rate 9600. If this clock is used as the source for the IRIG Audio Decoder (<tt>refclock_irig.c</tt> in this distribution), set the DIPswitches for AM IRIG output and IRIG format 1 (IRIG B with signature control).</p>
+ <p>There are two timecode formats used by these clocks. Format 0, which is available with all clocks, and format 2, which is available with all clocks except the original (unmodified) Model 8170.</p>
+ <p>Format 0 (22 ASCII printing characters):<br>
+ &lt;cr&gt;&lt;lf&gt;i ddd hh:mm:ss TZ=zz&lt;cr&gt;&lt;lf&gt;</p>
+ <p>on-time = first &lt;cr&gt;<br>
+ i = synchronization flag (' ' = in synch, '?' = out synch)<br>
+ hh:mm:ss = hours, minutes, seconds</p>
+ <p>The alarm condition is indicated by other than ' ' at <tt>i</tt>, which occurs during initial synchronization and when received signal is lost for about ten hours.</p>
+ <p>Format 2 (24 ASCII printing characters):<br>
+ lt;cr&gt;lf&gt;iqyy ddd hh:mm:ss.fff ld</p>
+ <p>on-time = &lt;cr&gt;<br>
+ i = synchronization flag (' ' = in synch, '?' = out synch)<br>
+ q = quality indicator (' ' = locked, 'A'...'D' = unlocked)<br>
+ yy = year (as broadcast)<br>
+ ddd = day of year<br>
+ hh:mm:ss.fff = hours, minutes, seconds, milliseconds</p>
+ <p>The alarm condition is indicated by other than ' ' at <tt>i</tt>, which occurs during initial synchronization and when received signal is lost for about ten hours. The unlock condition is indicated by other than ' ' at <tt>q</tt>.</p>
+ <p>The <tt>q</tt> is normally ' ' when the time error is less than 1 ms and a character in the set <tt>A...D</tt> when the time error is less than 10, 100, 500 and greater than 500 ms respectively. The <tt>l</tt> is normally ' ', but is set to <tt>L</tt> early in the month of an upcoming UTC leap second and reset to ' ' on the first day of the following month. The <tt>d</tt> is set to <tt>S</tt> for standard time <tt>S</tt>, <tt>I</tt> on the day preceding a switch to daylight time, <tt>D</tt> for daylight time and <tt>O</tt> on the day preceding a switch to standard time. The start bit of the first &lt;cr&gt; is synchronized to the indicated time as returned.</p>
+ <p>This driver does not need to be told which format is in use - it figures out which one from the length of the message. A three-stage median filter is used to reduce jitter and provide a dispersion measure. The driver makes no attempt to correct for the intrinsic jitter of the radio itself, which is a known problem with the older radios.</p>
+ <h4>Monitor Data</h4>
+ <p>The driver writes each timecode as received to the <tt>clockstats</tt> file. When enabled by the <tt>flag4</tt> fudge flag, a table of quality data maintained internally by the Netclock/2 is retrieved and written to the <tt>clockstats</tt> file when the first timecode message of a new dayis received.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>WWVB</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver40.html b/contrib/ntp/html/drivers/driver40.html
new file mode 100644
index 000000000000..0c68081b3398
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver40.html
@@ -0,0 +1,99 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>JJY Receivers</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>JJY Receivers</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.40.<i>u</i><br>
+ Reference ID: <tt>JJY</tt><br>
+ Driver ID: <tt>JJY</tt><br>
+ Serial Port: <tt>/dev/jjy<i>u</i></tt>; 9600 baud, 8-bits, no parity, 1 stop bit
+ <h4>Description</h4>
+ <p>This driver supports the following JJY receivers sold in Japan.</p>
+ <ul>
+ <li>Tristate Ltd. JJY01 <a href="http://www.tristate.ne.jp/rf-clock.html">http://www.tristate.ne.jp/rf-clock.htm</a> (Japanese only)<br>
+ <dl>
+ <dt>Time code format
+ <dd><br>
+ <table>
+ <tr>
+ <td>Command</td>
+ <td>&nbsp;</td>
+ <td>Reply</td>
+ </tr>
+ <tr>
+ <td><tt>date&lt;CR&gt;&lt;LF&gt;</tt></td>
+ <td>&nbsp;</td>
+ <td><tt>YYYY/MM/DD WWW&lt;CR&gt;&lt;LF&gt;</tt></td>
+ </tr>
+ <tr>
+ <td><tt>stim&lt;CR&gt;&lt;LF&gt;</tt></td>
+ <td>&nbsp;</td>
+ <td><tt>HH:MM:SS&lt;CR&gt;&lt;LF&gt;</tt></td>
+ </tr>
+ </table>
+ <br>
+ <dt>NTP configuration ( ntp.conf )
+ <dd>
+ <p>server 127.127.40.X mode 1</p>
+ </dl>
+ <li>C-DEX Co.,Ltd. JST2000 <a href="http://www.c-dex.co.jp/">http://www.c-dex.co.jp/</a> (Japanese only)<br>
+ <dl>
+ <dt>Time code format
+ <dd><br>
+ <table>
+ <tr>
+ <td>Command</td>
+ <td>&nbsp;</td>
+ <td>Reply</td>
+ </tr>
+ <tr>
+ <td><tt>&lt;ENQ&gt;1J&lt;ETX&gt;</tt></td>
+ <td>&nbsp;</td>
+ <td><tt>&lt;STX&gt;JYYMMDD HHMMSSS&lt;ETX&gt;</tt></td>
+ </tr>
+ </table>
+ <br>
+ <dt>NTP configuration ( ntp.conf )
+ <dd>
+ <p>server 127.127.40.X mode 2</p>
+ </dl>
+ </ul>
+ <p>JJY is the radio station which transmites the JST (Japan Standard Time) in long wave radio. The station JJY is operated by the Communication Research Laboratory. An operating announcement and some information are avaiable from <a href="http://www.crl.go.jp/">http://www.crl.go.jp/</a> (English and Japanese) and <a href="http://jjy.crl.go.jp/">http://jjy.crl.go.jp/</a> (Written in Japanese only)</p>
+ <p>The user is expected to provide a symbolic link to an available serial port device. This is typically performed by a command such as:</p>
+ <p><tt>ln -s /dev/ttyS0 /dev/jjy0</tt></p>
+ <p>Windows NT does not support symbolic links to device files. COM<i>X</i>: is the unit used by the driver, based on the refclock unit number, where unit 1 corresponds to COM1: and unit 3 corresponds to COM3:</p>
+ <h4>Monitor Data</h4>
+ <p>The driver writes each timecode as received to the <tt>clockstats</tt> file.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>WWVB</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver42.html b/contrib/ntp/html/drivers/driver42.html
new file mode 100644
index 000000000000..c509db0f2570
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver42.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Zyfer GPStarplus Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Zyfer GPStarplus Receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.42.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>Zyfer GPStarplus</tt><br>
+ Serial Port: <tt>/dev/zyfer<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>(none)</tt>
+ <h4>Description</h4>
+ <p>This driver supports the <a href="http://www.zyfer.com/">Zyfer GPStarplus</a> receiver.</p>
+ <p>The receiver has a DB15 port on the back which has input TxD and RxD lines for configuration and control, and a separate TxD line for the once-per-second timestamp.</p>
+ <p>Additionally, there are BNC connectors on the back for things like PPS and IRIG output.</p>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver43.html b/contrib/ntp/html/drivers/driver43.html
new file mode 100644
index 000000000000..914693aa88d9
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver43.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>RIPE NCC interface for Trimble Palisade</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>RIPE NCC interface for Trimble Palisade</h3>
+ <hr>
+ <img src="../pic/driver43_2.jpg" alt="Trimble Acutime 2000" align="right">
+ <h4>Synopsis</h4>
+ Address: 127.127.43.<i>u</i><br>
+ Reference ID: <tt>RIPENCC</tt><br>
+ Driver ID: <tt>RIPENCC</tt>
+ <h4>Description</h4>
+ <p>This is a special driver developed to be used in conjuction with the RIPE NCC clock card in the RIPE NCC Test Traffic Measurements project.</p>
+ <h4>Why this driver?</h4>
+ <p>The reason why we created a seperated driver for an antenna for which already a (vendor supplied) driver exist is a design decision. To be more specific, the standard Trimble interface uses a 12 pin connector. The cable sold by Trimble to connect to this wire is a very thick cable. Certainly not something you wish to run for several 100 meters through your building. And if you wanted to run it for 100 meters, you always would have to really run the cable, and didn't have the option to use existing wiring.<br>
+ </p>
+ <p>This is where we wanted more flexibility. We wanted to be able to use existing wiring in buildings. That leaded us to CAT-5(UTP) which only gives us 8 wires. Therefor we decided to redesing the use of the Trimble antenna. The Trimble supports two modes: EVENT driver and PPS mode. The default is to use the EVENT mode which needs all 12 wires. We only use the PPS timestamps for which we have enough with 8 wires. For our purposes this is more than fine.</p>
+ More information about the project can be found on the <a href="http://www.ripe.net/test-traffic" target="_new">Test Traffic Measurements</a> website. <img src="../pic/driver43_1.gif" alt="RIPE NCC clock card" align="right">
+ <h4>RIPE NCC clock card</h4>
+ <p>The card is very a simple PCI card. The only feature on the bus it uses is the power supply. It uses this power supply to power the Trimble GPS antenna.</p>
+ <p>The card basicly just is a RS422 to RS232 converter. It gets the Trimble's RS422 signal on a RJ45 connector and transforms that to RS232 on a DIN9 connector. This connector should be loopbacked on the back of the machine to the serial port. As said, the card doesn't do any PCI data transfers.</p>
+ <p>The schematics of the interface card is available here: <a href="http://www.ripe.net/ripencc/mem-services/ttm/Documents/gps_interface_schematic.pdf">gps_interface_schematic.pdf</a>. You are free to create this card yourself as long as you give some credit or reference to us. Note that we don't sell these cards on a commercial basis, but for interested parties we do have some spares to share.</p>
+ <p></p>
+ <h4>Monitor Data</h4>
+ <p>In the <tt>filegen clockstats</tt> file the following (example) data is collected:</p>
+ <pre>
+52445 41931.275 127.127.40.0 U1 20.6.2002 11:38:51 13 11
+52445 41931.395 127.127.40.0 C1 20062002 113851 6 364785 110.2 450 6.7 13 5222.374737 N 0453.268013 E 48 7 11 0 1 -14 20 0 -25
+52445 41931.465 127.127.40.0 S1 07 1 1 02 59.3 291.5 39.3
+52445 41931.485 127.127.40.0 S1 11 2 1 02 59.9 138.0 60.2
+52445 41931.525 127.127.40.0 S1 01 4 1 02 48.4 185.7 28.3
+52445 41931.555 127.127.40.0 S1 14 5 2 02 32.7 41.0 15.4
+52445 41931.585 127.127.40.0 S1 20 6 1 02 59.9 256.6 78.0
+52445 41931.615 127.127.40.0 S1 25 8 2 00 0.0 86.6 20.1
+</pre>
+ <p>This is in the form of:</p>
+ <pre>
+All output lines consist of a prefix and a message, the prefix is:
+[days since epoch] [sec.ms since start of day] [peer address]
+
+And all individual messages:
+
+*Primary UTC time packet:
+U1 [date] [time] [trackstat] [utcflags]
+
+*Comprehensive time packet:
+C1 [date] [time] [mode] [bias] [biasunc] [rate] [rateunc] [utcoff] [latitude] [longtitude] [alt] [vis sat](x8)
+
+*Tracking status packet:
+S1 [prn] [channel] [aqflag] [ephstat] [snr] [azinuth] [elevation]
+</pre>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver44.html b/contrib/ntp/html/drivers/driver44.html
new file mode 100755
index 000000000000..e5cbf686bdc6
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver44.html
@@ -0,0 +1,92 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>NeoClock4X</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
+ </head>
+
+ <body>
+ <h1>NeoClock4X - DCF77 / TDF serial line receiver<br>
+ </h1>
+ <hr size="2" width="100%">
+ <h2>Synopsis</h2>
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr>
+ <td valign="top">
+ <table width="100%" border="0" cellspacing="0" cellpadding="2">
+ <tbody>
+ <tr>
+ <td valign="top">Adress<br>
+ </td>
+ <td valign="top">127.127.44.u<br>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">Reference ID<br>
+ </td>
+ <td valign="top">neol<br>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">Driver ID<br>
+ </td>
+ <td valign="top">NEOCLK4X<br>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">Serial Port<br>
+ </td>
+ <td valign="top">/dev/neoclock4x-u<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <br>
+ </td>
+ <td align="right" valign="top"><a href="http://www.linum.com"><img src="../pic/neoclock4x.gif" alt="NeoClock4X - DCF77 receiver" height="195" width="150"> </a><br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <hr size="2" width="100%">
+ <h2>Description</h2>
+ The refclock_neoclock4x driver supports the NeoClock4X receiver available from <a href="http://www.linum.com">Linum Software GmbH</a>. The receiver is available as a <a href="http://www.dcf77.de">DCF77</a> or TDF receiver. Both receivers have the same output string. For more information about the NeoClock4X receiver please visit <a href="http://www.linux-funkuhr.de">http://www.linux-funkuhr.de</a>. &nbsp;
+ <hr size="2" width="100%">
+ <h2>Fudge Factors</h2>
+ <dl>
+ <dt><b><a href="../clockopt.html">time1 time</a></b>
+ <dd>Specifies the time offset calibration factor with the default value off 0.16958333 seconds. This offset is used&nbsp; to correct serial line and operating system delays incurred in capturing time stamps. If you want to fudge the time1 offset <b>ALWAYS</b> add a value off 0.16958333. This is neccessary to compensate to delay that is caused by transmit the timestamp at 2400 Baud. If you want to compensate the delay that the DCF77 or TDF radio signal takes to travel to your site simply add the needed millisecond delay to the given value. Note that the time here is given in seconds.
+ <dd>Default setting is 0.16958333 seconds.<br>
+
+ </dl>
+ <dl>
+ <dt><b><a href="../clockopt.html">time2 time</a></b>
+ <dd>Not used by this driver.
+ </dl>
+ <dl>
+ <dt><a href="../clockopt.html"><b>flag1 0 | 1</b></a>
+ <dd>When set to 1 the driver will feed ntp with timestampe even if the radio signal is lost. In this case an internal backup clock generates the timestamps. This is ok as long as the receiver is synced once since the receiver is able to keep time for a long period.
+ <dd>Default setting is 0 = don't synchronize to CMOS clock.
+ <dd>
+ <dt><a href="../clockopt.html"><b>flag2 0 | 1</b></a>
+ <dd>You can allow the NeoClock4X driver to use the quartz clock even if it is never synchronized to a radio clock. This is usally not a good idea if you want preceise timestamps since the CMOS clock is maybe not adjusted to a dst status change. So <b>PLEASE</b> switch this only on if you now what you're doing.
+ <dd>Default setting is 0 = don't synchronize to unsynchronized CMOS clock.
+ <dt>
+ <dt><a href="../clockopt.html"><b>flag3 0 | 1</b></a>
+ <dd>Not used by this driver.<tt><tt><tt><tt><tt><tt> </tt></tt></tt></tt></tt></tt>
+ <dd>
+ <dt><a href="../clockopt.html"><b>flag4 0 | 1</b></a>
+ <dd>It is recommended to allow extensive logging while you setup the NeoClock4X receiver. If you activate flag4 every received data is logged. You should turn off flag4 as soon as the clock works as expected to reduce logfile cluttering.
+ <dd>Default setting is 0 = don't log received data and converted utc time.
+ </dl>
+ <hr size="2" width="100%">
+ Please send any comments or question to <a href="mailto:neoclock4@linum.com">neoclock4x@linum.com</a>.
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver5.html b/contrib/ntp/html/drivers/driver5.html
new file mode 100644
index 000000000000..405c3ab8dabb
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver5.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>TrueTime GPS/GOES/OMEGA Receivers</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>TrueTime GPS/GOES/OMEGA Receivers</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.5.<i>u</i><br>
+ Reference ID: <tt>GPS, OMEGA, GOES</tt><br>
+ Driver ID: <tt>TRUETIME</tt><br>
+ Serial Port: <tt>/dev/true<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt>
+ <h4>Description</h4>
+ <p>This driver supports several models models of Kinemetrics/TrueTime timing receivers, including 468-DC MK III GOES Synchronized Clock, GPS- DC MK III and GPS/TM-TMD GPS Synchronized Clock, XL-DC (a 151-602-210, reported by the driver as a GPS/TM-TMD), GPS-800 TCU (an 805-957 with the RS232 Talker/Listener module), OM-DC OMEGA Synchronized Clock, and very likely others in the same model family that use the same timecode formats.</p>
+ <p>Most of this code is originally from refclock_wwvb.c with thanks. It has been so mangled that wwvb is not a recognizable ancestor.</p>
+ <p>Timcode format: <tt>ADDD:HH:MM:SSQCL</tt> A - control A (this is stripped before we see it) Q - Quality indication (see below) C - Carriage return L - Line feed Quality codes indicate possible error of</p>
+ <dl>
+ <dt>468-DC GOES Receiver<br>
+ GPS-TM/TMD Receiver
+ <dd>? +/- 500 milliseconds # +/- 50 milliseconds<br>
+ * +/- 5 milliseconds . +/- 1 millisecond<br>
+ space less than 1 millisecond
+ <dt>OM-DC OMEGA Receiver:
+ <dd>&gt; +/- 5 seconds<br>
+ ? +/- 500 milliseconds # +/- 50 milliseconds<br>
+ * +/- 5 milliseconds . +/- 1 millisecond<br>
+ A-H less than 1 millisecond. Character indicates which station is being received as follows<br>
+ A = Norway, B = Liberia, C = Hawaii, D = North Dakota, E = La Reunion, F = Argentina, G = Australia, H = Japan<br>
+ The carriage return start bit begins on 0 seconds and extends to 1 bit time.
+ </dl>
+ <h4>Notes on 468-DC and OMEGA receiver:</h4>
+ <p>Send the clock a <tt>R</tt> or <tt>C</tt> and once per second a timestamp will appear. Send a <tt>R</tt> to get the satellite position once (GOES only).</p>
+ <h4>Notes on the 468-DC receiver:</h4>
+ <p>Since the old east/west satellite locations are only historical, you can't set your clock propagation delay settings correctly and still use automatic mode. The manual says to use a compromise when setting the switches. This results in significant errors. The solution; use fudge time1 and time2 to incorporate corrections. If your clock is set for 50 and it should be 58 for using the west and 46 for using the east, use the line</p>
+ <p><tt>fudge 127.127.5.0 time1 +0.008 time2 -0.004</tt></p>
+ <p>This corrects the 4 milliseconds advance and 8 milliseconds retard needed. The software will ask the clock which satellite it sees.</p>
+ <p>The PCL720 from PC Labs has an Intel 8253 look-alike, as well as a bunch of TTL input and output pins, all brought out to the back panel. If you wire a PPS signal (such as the TTL PPS coming out of a GOES or other Kinemetrics/Truetime clock) to the 8253's GATE0, and then also wire the 8253's OUT0 to the PCL720's INPUT3.BIT0, then we can read CTR0 to get the number of microseconds since the last PPS upward edge, mediated by reading OUT0 to find out if the counter has wrapped around (this happens if more than 65535us (65ms) elapses between the PPS event and our being called.)</p>
+ <h4>Monitor Data</h4>
+ <p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, to be used for the West satellite, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>. Specifies the time offset calibration factor, in seconds and fraction, to be used for the East satellite, with default 0.0.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>TRUE</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Silence the clock side of ntpd, just reading the clock without trying to write to it.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Generate a debug file /tmp/true%d.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a> <a href="../index.html"></a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver6.html b/contrib/ntp/html/drivers/driver6.html
new file mode 100644
index 000000000000..8e7cc1e2e3c2
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver6.html
@@ -0,0 +1,89 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>IRIG Audio Decoder</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>IRIG Audio Decoder</h3>
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="../scripts/links8.txt"></script>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.6.<i>u</i><br>
+ Reference ID: <tt>IRIG</tt><br>
+ Driver ID: <tt>IRIG_AUDIO</tt><br>
+ Audio Device: <tt>/dev/audio</tt> and <tt>/dev/audioctl</tt>
+ <p>Note: This driver supersedes an older one of the same name, address and ID which required replacing the original kernel audio driver with another which worked only on older Sun SPARC architectures and SunOS operating systems. The new driver requires no modification of the operating system and works on FreeBSD, SunOS and Solaris. While it is generic and likely portable to other systems, it is somewhat slower than the original, since the extensive signal conditioning, filtering and decoding is done in user space, not kernel space.</p>
+ <h4>Description</h4>
+ <p>This driver supports the Inter-Range Instrumentation Group (IRIG) standard time distribution signal using the audio codec native to some workstations. This signal is generated by several radio clocks, including those made by Arbiter, Austron, Bancomm, Odetics, Spectracom and TrueTime, among others, although it is often an add-on option. The signal is connected via an optional attenuator box and cable to either the microphone or line-in port. The driver receives, demodulates and decodes the IRIG-B and IRIG-E signal formats using internal filters designed to reduce the effects of noise and interference.</p>
+ <p>This driver incorporates several features in common with other audio drivers such as described in the <a href="driver7.html">Radio CHU Audio Demodulator/Decoder</a> and the <a href="driver36.html">Radio WWV/H Audio Demodulator/Decoder</a> pages. They include automatic gain control (AGC), selectable audio codec port and signal monitoring capabilities. For a discussion of these common features, as well as a guide to hookup, debugging and monitoring, see the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
+ <p>The IRIG signal format uses an amplitude-modulated carrier with pulse-width modulated data bits. For IRIG-B, the carrier frequency is 1000 Hz and bit rate 100 b/s; for IRIG-E, the carrier frequenchy is 100 Hz and bit rate 10 b/s. While IRIG-B provides the best accuracy, generally within a few tens of microseconds relative to IRIG time, it can also generate a significant load on the processor with older workstations. Generally, the accuracy with IRIG-E is about ten times worse than IRIG-B, but the processor load is ten times less.</p>
+ <p>The program processes 8000-Hz <font face="symbol">m</font>-law companded samples using separate signal filters for IRIG-B and IRIG-E, a comb filter, envelope detector and automatic threshold corrector. Cycle crossings relative to the corrected slice level determine the width of each pulse and its value - zero, one or position identifier. The data encode 20 BCD digits which determine the second, minute, hour and day of the year and sometimes the year and synchronization condition. The comb filter exponentially averages the corresponding samples of successive baud intervals in order to reliably identify the reference carrier cycle. A type-II phase-lock loop (PLL) performs additional integration and interpolation to accurately determine the zero crossing of that cycle, which determines the reference timestamp. A pulse-width discriminator demodulates the data pulses, which are then encoded as the BCD digits of the timecode. The timecode and reference timestamp are updated once each second with IRIG-B (ten seconds with IRIG-E) and local clock offset samples saved for later processing. At poll intervals of 64 s, the saved samples are processed by a trimmed-mean filter and used to update the system clock.</p>
+ <p>Infinite impulse response (IIR) filters are used with both IRIG-B and IRIG-E formats. An 800-Hz highpass filter is used for IRIG-B and a 130-Hz lowpass filter for IRIG-E. These are intended for use with noisy signals, such as might be received over a telephone line or radio circuit, or when interfering signals may be present in the audio passband. The driver determines which IRIG format is in use by sampling the amplitude of each filter output and selecting the one with maximum signal. An automatic gain control feature provides protection against overdriven or underdriven input signal amplitudes. It is designed to maintain adequate demodulator signal amplitude while avoiding occasional noise spikes. In order to assure reliable capture, the decompanded input signal amplitude must be greater than 100 units and the codec sample frequency error less than 250 PPM (.025 percent).</p>
+ <p>The program performs a number of error checks to protect against overdriven or underdriven input signal levels, incorrect signal format or improper hardware configuration. The specific checks are detailed later in this page. Note that additional checks are done elsewhere in the reference clock interface routines.</p>
+ <p>Unlike other drivers, which can have multiple instantiations, this one supports only one. It does not seem likely that more than one audio codec would be useful in a single machine. More than one would probably chew up too much CPU time anyway.</p>
+ <h4>IRIG-B Timecode Format</h4>
+ <p>The 100 elements of the IRIG timecode are numbered from 0 through 99. Position identifiers occur at elements 0, 9, 19 and every ten thereafter to 99. The control function (CF) elements begin at element 50 (CF 1) and extend to element 78 (CF 27). The straight-binary-seconds (SBS) field, which encodes the seconds of the UTC day, begins at element 80 (CF 28) and extends to element 97 (CF 44). The encoding of elements 50 (CF 1) through 78 (CF 27) is device dependent. This driver presently decodes the CF elements, but does nothing with them.</p>
+ <p>Where feasible, the IRIG signal source should be operated with signature control so that, if the signal is lost or mutilated, the source produces an unmodulated signal, rather than possibly random digits. The driver will automatically reject the data and declare itself unsynchronized in this case. Some devices, in particular Spectracom radio/satellite clocks, provide additional year and status indication in the format:</p>
+ <pre>
+ Element CF Function
+ -------------------------------------
+ 55 6 time sync status
+ 60-63 10-13 BCD year units
+ 65-68 15-18 BCD year tens
+</pre>
+ Other devices set these elements to zero.
+ <h4>Performance and Horror Stories</h4>
+ <p>The <font face="symbol">m</font>-law companded data format allows considerable latitude in signal levels; however, an automatic gain control (AGC) function is implemented to further compensate for varying input signal levels and to avoid signal distortion. For proper operation, the IRIG signal source should be configured for analog signal levels, NOT digital TTL levels.</p>
+ <p>The accuracy of the system clock synchronized to the IRIG-B source with this driver and the <tt>ntpd</tt> daemon is 10-20 <font face="symbol">m</font>s with a Sun UltraSPARC II running Solaris 2.6 and maybe twice that with a Sun SPARC IPC running SunOS 4.1.3. Be however acutely aware that the accuracy with Solaris 2.8 and presumably beyond has seriously degraded to the order of several milliseconds. The Sun kernel driver has a sawtooth modulation with amplitude over 5 ms peak-peak and period 5.5 s. The crafty IRIG&nbsp;driver uses a transverse filter to remove the modulation and something called a botttom-fisher to remove incidental positive spikes especially prevalent with Sun Blade 1000 and possibly other systems. The result is nominal accuracy and jitter something less than 0.5 ms, but the this is still far inferior to the performance with older systems.</p>
+ <p>The processor resources consumed by the daemon can be significant, ranging from about 1.2 percent on the faster UltraSPARC II to 38 percent on the slower SPARC IPC. However, the overall timing accuracy is limited by the resolution and stability of the CPU clock oscillator and the interval between clock corrections, which is 64 s with this driver. This performance, while probably the best that can be achieved by the daemon itself, can be improved with assist from the PPS discipline as described elsewhere in this documentation.</p>
+ <h4>Monitor Data</h4>
+ The timecode format used for debugging and data recording includes data helpful in diagnosing problems with the IRIG signal and codec connections. With debugging enabled (-d on the ntpd command line), the driver produces one line for each timecode in the following format:
+ <p><tt>00 1 98 23 19:26:52 721 143 0.694 47 20 0.083 66.5 3094572411.00027</tt></p>
+ <p>The first field containes the error flags in hex, where the hex bits are interpreted as below. This is followed by the IRIG status indicator, year of century, day of year and time of day. The status indicator and year are not produced by some IRIG devices. Following these fields are the carrier amplitude (0-8100), codec gain (0-255), field phase (0-79), time constant (2-20), modulation index (0-1), carrier phase error (0&plusmn;0.5) and carrier frequency error (PPM). The last field is the on-time timestamp in NTP format. The fraction part is a good indicator of how well the driver is doing. With an UltrSPARC 30, this is normally within a few tens of microseconds relative to the IRIG-B signal and within a few hundred microseconds with IRIG-E.</p>
+ <p>The error flags are defined as follows in hex:</p>
+ <dl>
+ <dt><tt>x01</tt>
+ <dd>Low signal. The carrier amplitude is less than 100 units. This is usually the result of no signal or wrong input port.
+ <dt><tt>x02</tt>
+ <dd>Frequency error. The codec frequency error is greater than 250 PPM. This may be due to wrong signal format or (rarely) defective codec.
+ <dt><tt>x04</tt>
+ <dd>Modulation error. The IRIG modulation index is less than 0.5. This is usually the result of an overdriven codec, wrong signal format or wrong input port.
+ <dt><tt>x08</tt>
+ <dd>Frame synch error. The decoder frame does not match the IRIG frame. This is usually the result of an overdriven codec, wrong signal format or noisy IRIG signal. It may also be the result of an IRIG signature check which indicates a failure of the IRIG signal synchronization source.
+ <dt><tt>x10</tt>
+ <dd>Data bit error. The data bit length is out of tolerance. This is usually the result of an overdriven codec, wrong signal format or noisy IRIG signal.
+ <dt><tt>x20</tt>
+ <dd>Seconds numbering discrepancy. The decoder second does not match the IRIG second. This is usually the result of an overdriven codec, wrong signal format or noisy IRIG signal.
+ <dt><tt>x40</tt>
+ <dd>Codec error (overrun). The machine is not fast enough to keep up with the codec.
+ </dl>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>IRIG</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Specifies the microphone port if set to zero or the line-in port if set to one. It does not seem useful to specify the compact disc player port.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Enables audio monitoring of the input signal. For this purpose, the speaker volume must be set before the driver is started.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver7.html b/contrib/ntp/html/drivers/driver7.html
new file mode 100644
index 000000000000..7c47b11b7061
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver7.html
@@ -0,0 +1,235 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Radio CHU Audio Demodulator/Decoder</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Radio CHU Audio Demodulator/Decoder</h3>
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="../scripts/links8.txt"></script>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.7.<i>u</i><br>
+ Reference ID: <tt>CHU</tt><br>
+ Driver ID: <tt>CHU</tt><br>
+ Modem Port: <tt>/dev/chu<i>u</i></tt>; 300 baud, 8-bits, no parity<br>
+ Autotune Port: <tt>/dev/icom</tt>; 1200/9600 baud, 8-bits, no parity<br>
+ Audio Device: <tt>/dev/chu_audio</tt> and <tt>/dev/audioctl</tt>
+ <h4>Description</h4>
+ <p>This driver synchronizes the computer time using data encoded in radio transmissions from Canadian time/frequency station CHU in Ottawa, Ontario. It replaces an earlier one, built by Dennis Ferguson in 1988, which required a special line discipline to preprocessed the signal. The new driver includes more powerful algorithms implemented directly in the driver and requires no preprocessing.</p>
+ <p>CHU transmissions are made continuously on 3330 kHz, 7335 kHz and 14670 kHz in upper sideband, compatible AM mode. An ordinary shortwave receiver can be tuned manually to one of these frequencies or, in the case of ICOM receivers, the receiver can be tuned automatically as propagation conditions change throughout the day and night. The performance of this driver when tracking the station is ordinarily better than 1 ms in time with frequency drift less than 0.5 PPM when not tracking the station.</p>
+ <p>While there are currently no known commercial CHU receivers, a simple but effective receiver/demodulator can be constructed from an ordinary shortwave receiver and Bell 103 compatible, 300-b/s modem or modem chip, as described on the <a href="../pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. The driver can use the modem to receive the radio signal and demodulate the data or, if available, the driver can use the audio codec of the Sun workstation or another with compatible audio interface. In the latter case, the driver implements the modem using DSP routines, so the radio can be connected directly to either the microphone or line input port.</p>
+ <p>This driver incorporates several features in common with other audio drivers such as described in the <a href="driver36.html">Radio WWV/H Audio Demodulator/Decoder</a> and the <a href="driver6.html">IRIG Audio Decoder</a> pages. They include automatic gain control (AGC), selectable audio codec port and signal monitoring capabilities. For a discussion of these common features, as well as a guide to hookup, debugging and monitoring, see the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
+ <p>Ordinarily, the driver poll interval is set to 14 (about 4.5 h), although this can be changed with configuration commands. As long as the clock is set or verified at least once during this interval, the NTP algorithms will consider the source reachable and selectable to discipline the system clock. However, if this does not happen for eight poll intervals, the algorithms will consider the source unreachable and some other source will be chosen (if available) to discipline the system clock.</p>
+ <p>The decoding algorithms process the data using maximum-likelihood techniques which exploit the considerable degree of redundancy available in each broadcast message or burst. As described below, every character is sent twice and, in the case of format A bursts, the burst is sent eight times every minute. In the case of format B bursts, which are sent once each minute, the burst is considered correct only if every character matches its repetition in the burst. In the case of format A messages, a majority decoder requires at least six repetitions for each digit in the timecode and more than half of the repetitions decode to the same digit. Every character in every burst provides an independent timestamp upon arrival with a potential total of over 60 timestamps for each minute.</p>
+ <p>A timecode in the format described below is assembled when all bursts have been received in the minute. The timecode is considered valid and the clock set when at least one valid format B burst has been decoded and the above requirements are met. The <tt>yyyy</tt> year field in the timecode indicates whether a valid format B burst has been received. Upon startup, this field is initialized at zero; when a valid format B burst is received, it is set to the current Gregorian year. The <tt>q</tt> quality character field in the timecode indicates whether a valid timecode has been determined. If any of the high order three bits of this character are set, the timecode is invalid.</p>
+ <p>Once the clock has been set for the first time, it will appear reachable and selectable to discipline the system clock, even if the broadcast signal is lost. Since the signals are almost always available during some period of the day and the NTP clock discipline algorithms are designed to work well even in this case, it is unlikely that the system clock could drift more than a few tens of milliseconds during periods of signal loss. To protect against this most unlikely situation, if after four days with no signals, the clock is considered unset and resumes the synchronization procedure from the beginning.</p>
+ <p>The last three fields in the timecode are useful in assessing the quality of the radio channel during the most recent minute bursts were received. The <tt>bcnt</tt> field shows the number of format A bursts in the range 1-8. The <tt>dist</tt> field shows the majority decoder distance, or the minimum number of sample repetitions for each digit of the timecode in the range 0-16. The <tt>tsmp</tt> field shows the number of timestamps determined in the range 0-60. For a valid timecode, <tt>bcnt</tt> must be at least 3, <tt>dist</tt> must be greater than <tt>bcnt</tt> and <tt>tsmp</tt> must be at least 20.</p>
+ <h4>Program Operation</h4>
+ <p>The program consists of four major parts: the DSP modem, maximum likelihood UART, burst assembler and majority decoder. The DSP modem demodulates Bell 103 modem answer-frequency signals; that is, frequency-shift keyed (FSK) tones of 2225 Hz (mark) and 2025 Hz (space). This is done using a 4th-order IIR filter and limiter/discriminator with 500-Hz bandpass centered on 2125 Hz and followed by a FIR raised-cosine lowpass filter optimized for the 300-b/s data rate. Alternately, the driver can be compiled to delete the modem and input 300 b/s data directly from an external modem via a serial port.</p>
+ <p>The maximum likelihood UART is implemented using a set of eight 11-stage shift registers, one for each of eight phases of the 300-b/s bit clock. At each phase a new baseband signal value from the DSP modem is shifted into the corresponding register and the maximum and minimum over all 11 samples computed. This establishes a slice level midway between the maximum and minimum over all stages. For each stage, a signal level above this level is a mark (1) and below is a space (0). A quality metric is calculated for each register with respect to the slice level and the a-priori signal consisting of a mark bit (previous stop bit), space (start) bit, eight arbitrary information bits and the first of the two mark (stop) bits.</p>
+ <p>The shift registers are processed in round-robin order as each modem value arrives until one of them shows a valid framing pattern consisting of a mark bit, space bit, eight arbitrary data bits and a mark bit. When found, the data bits from the register with the best metric is chosen as the maximum likelihood character and the UART begins to process the next character.</p>
+ <p>The burst assembler processes characters either from the maximum likelihood UART or directly from the serial port as configured. A burst begins when a character is received and is processed after a timeout interval when no characters are received. If the interval between characters is greater than two characters, but less than the timeout interval, the burst is rejected as a runt and a new burst begun. As each character is received, a timestamp is captured and saved for later processing.</p>
+ <p>A valid burst consists of ten characters in two replicated five-character blocks. A format B block contains the year and other information in ten hexadecimal digits. A format A block contains the timecode in ten decimal digits, the first of which is a framing code (6). The burst assembler must deal with cases where the first character of a format A burst is lost or is noise. This is done using the framing code to correct the phase, either one character early or one character late.</p>
+ <p>The burst distance is incremented by one for each bit in the first block that matches the corresponding bit in the second block and decremented by one otherwise. In a format B burst the second block is bit-inverted relative to the first, so a perfect burst of five 8-bit characters has distance -40. In a format A block the two blocks are identical, so a perfect burst has distance +40. Format B bursts must be perfect to be acceptable; however, format A bursts, which are further processed by the majority decoder, are acceptable if the distance is at least 28.</p>
+ <p>Each minute of transmission includes eight format A bursts containing two timecodes for each second from 31 through 39. The majority decoder uses a decoding matrix of ten rows, one for each digit position in the timecode, and 16 columns, one for each 4-bit code combination that might be decoded at that position. In order to use the character timestamps, it is necessary to reliably determine the second number of each burst. In a valid burst, the last digit of the two timecodes in the block must match and the value must be in the range 2-9 and greater than in the previous burst.</p>
+ <p>As each hex digit of a valid burst is processed, the value at the row corresponding to the digit position in the timecode and column corresponding to the code found at that position is incremented. At the end of each minute of transmission, each row of the decoding matrix encodes the number of occurrences of each code found at the corresponding position of the timecode. However, the first digit (framing code) is always 6, the ninth (second tens) is always 3 and the last (second units) changes for each burst, so are not used.</p>
+ <p>The maximum over all occurrences at each timecode digit position is the distance for that position and the corresponding code is the maximum likelihood candidate. If the distance is zero, the decoder assumes a miss; if the distance is not more than half the total number of occurrences, the decoder assumes a soft error; if two different codes with the same distance are found, the decoder assumes a hard error. In all these cases the decoder encodes a non-decimal character which will later cause a format error when the timecode is reformatted. The decoding distance is defined as the minimum distance over the first nine digits; the tenth digit varies over the seconds and is uncounted.</p>
+ <p>The result of the majority decoder is a nine-digit timecode representing the maximum likelihood candidate for the transmitted timecode in that minute. Note that the second and fraction within the minute are always zero and that the actual reference point to calculate timestamp offsets is backdated to the first second of the minute. At this point the timecode block is reformatted and the year, days, hours and minutes extracted along with other information from the format B burst, including DST state, DUT1 correction and leap warning. The reformatting operation checks the timecode for invalid code combinations that might have been left by the majority decoder and rejects the entire timecode if found.</p>
+ <p>If the timecode is valid, it is passed to the reference clock interface along with the backdated timestamp offsets accumulated over the minute. A perfect set of nine bursts could generate as many as 90 timestamps, but the maximum the interface can handle is 60. These are processed by the interface using a median filter and trimmed-mean average, so the resulting system clock correction is usually much better than would otherwise be the case with radio noise, UART jitter and occasional burst errors.</p>
+ <h4>Autotune</h4>
+ <p>The driver includes provisions to automatically tune the radio in response to changing radio propagation conditions throughout the day and night. The radio interface is compatible with the ICOM CI-V standard, which is a bidirectional serial bus operating at TTL levels. The bus can be connected to a standard serial port using a level converter such as the CT-17.</p>
+ <p>Each ICOM radio is assigned a unique 8-bit ID select code, usually expressed in hex format. To activate the CI-V interface, the <tt>mode</tt> keyword of the <tt>server</tt> configuration command specifies a nonzero select code in decimal format. A table of ID select codes for the known ICOM radios is given below. Since all ICOM select codes are less than 128, the high order bit of the code is used by the driver to specify the baud rate. If this bit is not set, the rate is 9600 bps for the newer radios; if set, the rate is 1200 bps for the older radios. A missing <tt>mode</tt> keyword or a zero argument leaves the interface disabled.</p>
+ <p>If specified, the driver will attempt to open the device <tt>/dev/icom</tt> and, if successful will tune the radio to 3.330 MHz. If after five minutes at this frequency not more than two format A bursts have been received for any minute, the driver will tune to 7.335 MHz, then to 14.670 MHz, then return to 3.330 MHz and continue in this cycle. However, the driver is liberal in what it assumes of the configuration. If the <tt>/dev/icom</tt> link is not present or the open fails or the CI-V bus or radio is inoperative, the driver quietly gives up with no harm done.</p>
+ <h4>Radio Broadcast Format</h4>
+ <p>The CHU time broadcast includes an audio signal compatible with the Bell 103 modem standard (mark = 2225 Hz, space = 2025 Hz). It consist of nine, ten-character bursts transmitted at 300 b/s and beginning each second from second 31 to second 39 of the minute. Each character consists of eight data bits plus one start bit and two stop bits to encode two hex digits. The burst data consist of five characters (ten hex digits) followed by a repeat of these characters. In format A, the characters are repeated in the same polarity; in format B, the characters are repeated in the opposite polarity.</p>
+ <p>Format A bursts are sent at seconds 32 through 39 of the minute in hex digits</p>
+ <p><tt>6dddhhmmss6dddhhmmss</tt></p>
+ <p>The first ten digits encode a frame marker (<tt>6</tt>) followed by the day (<tt>ddd</tt>), hour (<tt>hh</tt>), minute (<tt>mm</tt>) and second (<tt>ss</tt>). Since format A bursts are sent during the third decade of seconds the tens digit of <tt>ss</tt> is always 3. The driver uses this to determine correct burst synchronization. These digits are then repeated with the same polarity.</p>
+ <p>Format B bursts are sent at second 31 of the minute in hex digits</p>
+ <p><tt>xdyyyyttaaxdyyyyttaa</tt></p>
+ <p>The first ten digits encode a code (<tt>x</tt> described below) followed by the DUT1 (<tt>d</tt> in deciseconds), Gregorian year (<tt>yyyy</tt>), difference TAI - UTC (<tt>tt</tt>) and daylight time indicator (<tt>aa</tt>) peculiar to Canada. These digits are then repeated with inverted polarity.</p>
+ <p>The <tt>x</tt> is coded</p>
+ <dl>
+ <dt><tt>1</tt>
+ <dd>Sign of DUT (0 = +)/dd&gt;
+ <dt><tt>2</tt>
+ <dd>Leap second warning. One second will be added.
+ <dt><tt>4</tt>
+ <dd>Leap second warning. One second will be subtracted. This is not likely to happen in our universe.
+ <dt><tt>8</tt>
+ <dd>Even parity bit for this nibble.
+ </dl>
+ <p>By design, the last stop bit of the last character in the burst coincides with 0.5 second. Since characters have 11 bits and are transmitted at 300 b/s, the last stop bit of the first character coincides with 0.5 - 10 * 11/300 = 0.133 second. Depending on the UART, character interrupts can vary somewhere between the beginning of bit 9 and end of bit 11. These eccentricities can be corrected along with the radio propagation delay using the <tt>fudge time1</tt> variable.</p>
+ <h4>Debugging Aids</h4>
+ <p>The most convenient way to track the program status is using the <tt>ntpq</tt> program and the <tt>clockvar</tt> command. This displays the last determined timecode and related status and error counters, even when the program is not discipline the system clock. If the debugging trace feature (<tt>-d</tt> on the <tt>ntpd</tt> command line)is enabled, the program produces detailed status messages as it operates. If the <tt>fudge flag 4</tt> is set, these messages are written to the <tt>clockstats</tt> file. All messages produced by this driver have the prefix <tt>chu</tt> for convenient filtering with the Unix <tt>grep</tt> command.</p>
+ <p>With debugging enabled the driver produces messages in the following formats:</p>
+ <p>A format <tt>chuA</tt> message is produced for each format A burst received in seconds 32 through 39 of the minute:</p>
+ <p><tt>chuA n b s code</tt></p>
+ <p>where <tt>n</tt> is the number of characters in the burst (0-11), <tt>b</tt> the burst distance (0-40), <tt>s</tt> the synchronization distance (0-40) and <tt>code</tt> the burst characters as received. Note that the hex digits in each character are reversed and the last ten digits inverted, so the burst</p>
+ <p><tt>11 40 1091891300ef6e76ecff</tt></p>
+ <p>is interpreted as containing 11 characters with burst distance 40. The nibble-swapped timecode shows DUT1 +0.1 second, year 1998 and TAI -UTC 31 seconds.</p>
+ <p>A format <tt>chuB</tt> message is produced for each format B burst received in second 31 of the minute:</p>
+ <p><tt>chuB n b f s m code</tt></p>
+ <p>where <tt>n</tt> is the number of characters in the burst (0-11), <tt>b</tt> the burst distance (0-40), <tt>f</tt> the field alignment (-1, 0, 1), <tt>s</tt>the synchronization distance (0-16), <tt>m</tt>the burst number (2-9) and <tt>code</tt> the burst characters as received. Note that the hex digits in each character are reversed, so the burst</p>
+ <p><tt>10 38 0 16 9 06851292930685129293</tt></p>
+ <p>is interpreted as containing 11 characters with burst distance 38, field alignment 0, synchronization distance 16 and burst number 9. The nibble-swapped timecode shows day 58, hour 21, minute 29 and second 39.</p>
+ <p>If the CI-V interface for ICOM radios is active, a debug level greater than 1 will produce a trace of the CI-V command and response messages. Interpretation of these messages requires knowledge of the CI-V protocol, which is beyond the scope of this document.</p>
+ <h4>Monitor Data</h4>
+ When enabled by the <tt>filegen</tt> facility, every received timecode is written to the <tt>clockstats</tt> file in the following format:
+ <pre>
+ sq yy ddd hh:mm:ss.fff ld dut lset agc rfrq bcnt dist tsmp
+
+ s sync indicator
+ q quality character
+ yyyy Gregorian year
+ ddd day of year
+ hh hour of day
+ mm minute of hour
+ ss second of minute
+ fff millisecond of second
+ l leap second warning
+ d DST state
+ dut DUT sign and magnitude in deciseconds
+ lset minutes since last set
+ agc audio gain (0-255)
+ rfrq radio frequency
+ bcnt burst count
+ dist decoding distance
+ tsmp timestamps captured
+</pre>
+ The fields beginning with <tt>year</tt> and extending through <tt>dut</tt> are decoded from the received data and are in fixed-length format. The <tt>agc</tt> and <tt>lset</tt> fields, as well as the following driver-dependent fields, are in variable-length format.
+ <dl>
+ <dt><tt>s</tt>
+ <dd>The sync indicator is initially <tt>?</tt> before the clock is set, but turns to space when the clock is correctly set.
+ <dt><tt>q</tt>
+ <dd>The quality character is a four-bit hexadecimal code showing which alarms have been raised during the most recent minute. Each bit is associated with a specific alarm condition according to the following:
+ <dl>
+ <dt><tt>8</tt>
+ <dd>Decoder alarm. A majority of repetitions for at least one digit of the timecode fails to agree.
+ <dt><tt>4</tt>
+ <dd>Timestamp alarm. Fewer than 20 timestamps have been determined.
+ <dt><tt>2</tt>
+ <dd>Format alarm. The majority timecode contains invalid bit combinations.
+ <dt><tt>1</tt>
+ <dd>Frame alarm. A framing or format error occurred on at least one burst during the minute.
+ </dl>
+ <p>It is important to note that one or more of the above alarms does not necessarily indicate a clock error, but only that the decoder has detected a condition that may in future result in an error.</p>
+ <dt><tt>yyyy ddd hh:mm:ss.fff</tt>
+ <dd>The timecode format itself is self explanatory. Note that the Gregorian year is decoded directly from the transmitted timecode.
+ <dt><tt>l</tt>
+ <dd>The leap second warning is normally space, but changes to <tt>L</tt> if a leap second is to occur at the end of the month of June or December.
+ <dt><tt>d</tt>
+ <dd>The DST code for Canada encodes the state for all provinces.
+ <dt><tt>dut</tt>
+ <dd>The DUT sign and magnitude shows the current UT1 offset relative to the displayed UTC time, in deciseconds.
+ <dt><tt>lset</tt>
+ <dd>Before the clock is set, the interval since last set is the number of minutes since the program was started; after the clock is set, this is number of minutes since the time was last verified relative to the broadcast signal.
+ <dt><tt>agc</tt>
+ <dd>The audio gain shows the current codec gain setting in the range 0 to 255. Ordinarily, the receiver audio gain control or IRIG level control should be set for a value midway in this range.
+ <dt><tt>rfrq</tt>
+ <dd>The current radio frequency, if the CI-V interface is active, or 'X' if not.
+ <dt><tt>bcnt</tt>
+ <dd>The number of format A bursts received during the most recent minute bursts were received.
+ <dt><tt>dist</tt>
+ <dd>The minimum decoding distance determined during the most recent minute bursts were received.
+ <dt><tt>tsmp</tt>
+ <dd>The number of timestamps determined during the most recent minute bursts were received.
+ </dl>
+ <h4>Modes</h4>
+ <p>The <tt>mode</tt> keyword of the <tt>server</tt> configuration command specifies the ICOM ID select code. A missing or zero argument disables the CI-V interface. Following are the ID select codes for the known radios.</p>
+ <table width="100%" cols="6">
+ <tr>
+ <td>Radio</td>
+ <td>Hex</td>
+ <td>Decimal</td>
+ <td>Radio</td>
+ <td>Hex</td>
+ <td>Decimal</td>
+ </tr>
+ <tr>
+ <td>IC725</td>
+ <td>0x28</td>
+ <td>40</td>
+ <td>IC781</td>
+ <td>0x26</td>
+ <td>38</td>
+ </tr>
+ <tr>
+ <td>IC726</td>
+ <td>0x30</td>
+ <td>48</td>
+ <td>R7000</td>
+ <td>0x08</td>
+ <td>8</td>
+ </tr>
+ <tr>
+ <td>IC735</td>
+ <td>0x04</td>
+ <td>4</td>
+ <td>R71</td>
+ <td>0x1A</td>
+ <td>26</td>
+ </tr>
+ <tr>
+ <td>IC751</td>
+ <td>0x1c</td>
+ <td>28</td>
+ <td>R7100</td>
+ <td>0x34</td>
+ <td>52</td>
+ </tr>
+ <tr>
+ <td>IC761</td>
+ <td>0x1e</td>
+ <td>30</td>
+ <td>R72</td>
+ <td>0x32</td>
+ <td>50</td>
+ </tr>
+ <tr>
+ <td>IC765</td>
+ <td>0x2c</td>
+ <td>44</td>
+ <td>R8500</td>
+ <td>0x4a</td>
+ <td>74</td>
+ </tr>
+ <tr>
+ <td>IC775</td>
+ <td>0x46</td>
+ <td>68</td>
+ <td>R9000</td>
+ <td>0x2a</td>
+ <td>42</td>
+ </tr>
+ </table>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the propagation delay for CHU (45:18N 75:45N), in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>CHU</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>When the audio driver is compiled, this flag selects the audio input port, where 0 is the mike port (default) and 1 is the line-in port. It does not seem useful to select the compact disc player port.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>When the audio driver is compiled, this flag enables audio monitoring of the input signal. For this purpose, the speaker volume must be set before the driver is started.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/driver8.html b/contrib/ntp/html/drivers/driver8.html
new file mode 100644
index 000000000000..ebc5e25be1df
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver8.html
@@ -0,0 +1,136 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Generic Reference Driver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Generic Reference Driver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.8.<i>u</i><br>
+ Reference ID: <tt>PARSE</tt><br>
+ Driver ID: <tt>GENERIC</tt><br>
+ Serial Port: <tt>/dev/refclock-<i>u</i></tt>; TTY mode according to clock type
+ <h4>Description</h4>
+ <p>The timecode of these receivers is sampled via a STREAMS module in the kernel (The STREAMS module has been designed for use with SUN Systems under SunOS 4.1.x or Solaris 2.3 - 2.6. It can be linked directly into the kernel or loaded via the loadable driver mechanism). This STREAMS module can be adapted to be able to convert different time code formats. If the daemon is compiled without the STREAM definition synchronization will work without the Sun streams module, though accuracy is significantly degraded. This feature allows to use PARSE also on non Sun machines.</p>
+ <p>The actual receiver status is mapped into various synchronization states generally used by receivers. The STREAMS module is configured to interpret the time codes of DCF C51, PZF535, PZF509, GPS166, Trimble SV6 GPS, ELV DCF7000, Schmid, Wharton 400A and low cost receivers (see list below).</p>
+ <p>The reference clock support in ntp contains the necessary configuration tables for those receivers. In addition to supporting several different clock types and 4 devices, the generation a a PPS signal is also provided as an configuration option. The PPS configuration option uses the receiver generated time stamps for feeding the PPS loopfilter control for much finer clock synchronization.</p>
+ <p>CAUTION: The PPS configuration option is different from the hardware PPS signal, which is also supported (see below), as it controls the way ntpd is synchronized to the reference clock, while the hardware PPS signal controls the way time offsets are determined.</p>
+ <p>The use of the PPS option requires receivers with an accuracy of better than 1ms.</p>
+ <p>Fudge factors</p>
+ <p>Only two fudge factors are utilized. The time1 fudge factor defines the phase offset of the synchronization character to the actual time. On the availability of PPS information the time2 fudge factor defines the skew between the PPS time stamp and the receiver timestamp of the PPS signal. This parameter is usually zero, as usually the PPS signal is believed in time and OS delays should be corrected in the machine specific section of the kernel driver. time2 needs only be set when the actual PPS signal is delayed for some reason. The flag1 enables input filtering. This a median filter with continuous sampling. The flag2 selects averaging of the samples remaining after the filtering. Leap second-handling is controlled with the flag3. When set a leap second will be deleted on receipt of a leap second indication from the receiver. Otherwise the leap second will be added, (which is the default). flag3 should never be set. PPS handling is enabled by adding 128 to the mode parameter in the server/peer command.</p>
+ <p>ntpq (8)</p>
+ <p>timecode variable</p>
+ <p>The ntpq program can read clock variables command list several variables. These hold the following information: refclock_time is the local time with the offset to UTC (format HHMM). The currently active receiver flags are listed in refclock_status. Additional feature flags of the receiver are optionally listed in parentheses. The actual time code is listed in timecode. A qualification of the decoded time code format is following in refclock_format. The last piece of information is the overall running time and the accumulated times for the clock event states in refclock_states. When PPS information is present additional variable are available. refclock_ppstime lists then the PPS timestamp and refclock_ppsskew lists the difference between RS232 derived timestamp and the PPS timestamp.</p>
+ <p>Currently, eighteen clock types (devices /dev/refclock-0 - /dev/refclock-3) are supported by the PARSE driver.<br>
+ A note on the implementations:</p>
+ <ul>
+ <li>These implementations where mainly done <b><i>WITHOUT</i></b> actual access to the hardware. Thus not all implementations provide full support. The development was done with the help of many souls who had the hardware and where so kind to borrow me their time an patience during the development and debugging cycle. Thus for continued support and quality direct access to the receivers is a big help. Nevertheless i am not prepared to buy these reference clocks - donations to <a href="http://www4.informatik.uni-erlangen.de/%7ekardel">me</a> (<a href="mailto:%20kardel@acm.org">kardel@acm.org</a>) are welcome as long as they work within Europe 8-).
+ <p>Verified implementations are:</p>
+ <ul>
+ <li>RAWDCF variants
+ <p>These variants are tested for the decoding with my own homegrown receivers. Interfacing with specific commercial products may involve some fiddeling with cables. Especially commericial RAWDCF receivers have a seemingly unlimited number of ways to draw power from the RS232 port and to encode the DCF77 datastream. You are mainly on your own here unless i have a sample of the receiver.</p>
+ <li><a href="http://www.meinberg.de">Meinberg clocks</a>
+ <p>These implementations are verified by the Meinberg people themselves and i have access to one of these clocks.</p>
+ </ul>
+ </ul>
+ <p>The pictures below refer to the respective clock and where taken from the vendors web pages. They are linked to the respective vendors.</p>
+ <ul>
+ <li><b><tt>server 127.127.8.0-3 mode 0</tt></b>
+ <p><b><tt><a href="http://www.meinberg.de">Meinberg </a>PZF535/<a href="http://www.meinberg.de/english/products/pzf509.htm">PZF509 receiver</a> (FM demodulation/TCXO / 50us)</tt></b><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 1</tt></b>
+ <p><b><tt><a href="http://www.meinberg.de">Meinberg </a>PZF535/<a href="http://www.meinberg.de/english/products/pzf509.htm">PZF509 receiver</a> (FM demodulation/OCXO / 50us)</tt></b><br>
+ <a href="http://www.meinberg.de/english/products/pzf509.htm"><img src="../pic/pzf509.jpg" alt="BILD PZF509" height="300" width="260" align="TEXTTOP"></a><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 2</tt></b>
+ <p><b><tt><a href="http://www.meinberg.de">Meinberg </a>DCF U/A 31/<a href="http://www.meinberg.de/english/products/c51.htm">DCF C51 receiver</a> (AM demodulation / 4ms)</tt></b><br>
+ <a href="http://www.meinberg.de/english/products/c51.htm"><img src="../pic/c51.jpg" alt="BILD C51" height="180" width="330" align="TEXTTOP"></a><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 3</tt></b>
+ <p><b><tt><a href="http://www.elv.de">ELV</a> DCF7000 (sloppy AM demodulation / 50ms)</tt></b><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 4</tt></b>
+ <p><b><tt>Walter Schmid DCF receiver Kit (AM demodulation / 1ms)</tt></b><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 5</tt></b>
+ <p><b><tt>RAW DCF77 100/200ms pulses (Conrad DCF77 receiver module / 5ms)</tt></b><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 6</tt></b>
+ <p><b><tt>RAW DCF77 100/200ms pulses (TimeBrick DCF77 receiver module / 5ms)</tt></b><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 7</tt></b>
+ <p><b><tt><a href="http://www.meinberg.de">Meinberg </a><a href="http://www.meinberg.de/english/products/gps167.htm">GPS166/GPS167 receiver</a> (GPS / &lt;&lt;1us)</tt></b><br>
+ <a href="http://www.meinberg.de/english/products/gps167.htm"><img src="../pic/gps167.jpg" alt="BILD GPS167" height="300" width="280" align="TEXTTOP"></a><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 8</tt></b>
+ <p><b><tt><a href="http://www.igel.de">IGEL</a> <a href="http://www.igel.de/eigelmn.html">clock</a></tt></b><br>
+ <a href="http://www.igel.de/eigelmn.html"><img src="../pic/igclock.gif" height="174" width="200"></a><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 9</tt></b>
+ <p><b><tt><a href="http://www.trimble.com">Trimble</a> <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html">SVeeSix GPS receiver</a>TAIP protocol (GPS / &lt;&lt;1us)</tt></b><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 10</tt></b>
+ <p><b><tt><a href="http://www.trimble.com">Trimble</a> <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html">SVeeSix GPS receiver</a> TSIP protocol (GPS / &lt;&lt;1us) (no kernel support yet)</tt></b><br>
+ <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html"><img src="../pic/pd_om011.gif" alt="SVeeSix-CM3" height="100" width="420" align="TEXTTOP" border="0"></a><br>
+ <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om006.html"><img src="../pic/pd_om006.gif" alt="Lassen-SK8" height="100" width="420" border="0"></a><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 11</tt></b>
+ <p><b><tt>Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support </tt></b><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 12</tt></b>
+ <p><b><tt><a href="http://www.hopf-time.com">HOPF</a> <a href="http://www.hopf-time.com/kart6021.html">Funkuhr 6021</a></tt></b><br>
+ <a href="http://www.hopf-time.com/engl/kart6021.html"><img src="../pic/fg6021.gif" alt="DCF77-Interface Board" height="207" width="238" align="TEXTTOP"></a><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 13</tt></b>
+ <p><b><tt>Diem's Computime Radio Clock</tt></b><br>
+ </p>
+ <li><b><tt>server 127.127.8.0-3 mode 14</tt></b>
+ <p><b><tt>RAWDCF receiver (DTR=high/RTS=low)</tt></b></p>
+ <li><b><tt>server 127.127.8.0-3 mode 15</tt></b>
+ <p><b><tt>WHARTON 400A Series Clocks with a 404.2 Serial Interface</tt></b></p>
+ <li><b><tt>server 127.127.8.0-3 mode 16</tt></b>
+ <p><b><tt>RAWDCF receiver (DTR=low/RTS=high) </tt></b></p>
+ <li><b><tt>server 127.127.8.0-3 mode 17</tt></b>
+ <p><b><tt>VARITEXT Receiver (MSF) </tt></b></p>
+ </ul>
+ <p>Actual data formats and set-up requirements of the various clocks can be found in <a href="../parsedata.html">NTP PARSE clock data formats</a>.</p>
+ <p>The reference clock support carefully monitors the state transitions of the receiver. All state changes and exceptional events such as loss of time code transmission are logged via the syslog facility. Every hour a summary of the accumulated times for the clock states is listed via syslog.</p>
+ <p>PPS support is only available when the receiver is completely synchronized. The receiver is believed to deliver correct time for an additional period of time after losing synchronizations, unless a disruption in time code transmission is detected (possible power loss). The trust period is dependent on the receiver oscillator and thus a function of clock type. This is one of the parameters in the clockinfo field of the reference clock implementation. This parameter cannot be configured by ntpdc.</p>
+ <p>In addition to the PPS loopfilter control a true PPS hardware signal can be applied on Sun Sparc stations via the CPU serial ports on the CD pin. This signal is automatically detected and will be used for offset calculation. The input signal must be the time mark for the following time code. (The edge sensitivity can be selected - look into the appropriate kernel/parsestreams.c for details). Meinberg receivers can be connected by feeding the PPS pulse of the receiver via a 1488 level converter to Pin 8 (CD) of a Sun serial zs-port. To select PPS support the STREAMS driver for PARSE must be loaded and the mode parameter ist the mode value of above plus 128. If 128 is not added to the mode value PPS will be detected to be available but it will not be used. For PPS to be used you MUST add 128 to the mode parameter.</p>
+ <p>For the Meinberg GPS166/GPS167 receiver is also a special firmware release available (Uni-Erlangen). This release should be used for proper operation.</p>
+ <p>The raw DCF77 pulses can be fed via a level converter directly into Pin 3 (Rx) of the Sun. The telegrams will be decoded an used for synchronization. AM DCF77 receivers are running as low as $25. The accuracy is dependent on the receiver and is somewhere between 2ms (expensive) to 10ms (cheap). Upon bad signal reception of DCF77 synchronizations will cease as no backup oscillator is available as usually found in other reference clock receivers. So it is important to have a good place for the DCF77 antenna. For transmitter shutdowns you are out of luck unless you have other NTP servers with alternate time sources available.</p>
+ <h4>Monitor Data</h4>
+ <p>Clock states statistics are written hourly the the syslog service. Online information can be found by examining the clock variable via the ntpq cv command.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default depending on clock type.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Specifies the offset if the PPS signal to the actual time. (PPS fine tuning).
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default according to current clock type.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>delete next leap second instead of adding it.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Delete next leap second instead of adding it - flag will be re- defined soon - so don't use it. Statistics are provided by more common means (syslog, clock variable via ntpq)
+ </dl>
+ <h4>Making your own PARSE clocks</h4>
+ <p>The parse clock mechanismis deviated from the way other ntp reference clocks work. For a short description how to build parse reference clocks see <a href="../parsenew.html">making PARSE clocks</a></p>
+ <p>Additional Information</p>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/drivers/driver9.html b/contrib/ntp/html/drivers/driver9.html
new file mode 100644
index 000000000000..8a551de95a22
--- /dev/null
+++ b/contrib/ntp/html/drivers/driver9.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Magnavox MX4200 GPS Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Magnavox MX4200 GPS Receiver</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.9.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_MX4200</tt><br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt>; 4800 baud, 8-bits, no parity<br>
+ Features: <tt>ppsclock</tt> (required)
+ <h4>Description</h4>
+ <p>This driver supports the Magnavox MX4200 Navigation Receiver adapted to precision timing applications. It requires the <tt>ppsclock</tt> line discipline or streams module described in the <a href="../ldisc.html">Line Disciplines and Streams Modules</a> page. It also requires a level converter such as described in the <a href="../pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page.</p>
+ <p>This driver supports all compatible receivers such as the 6-channel MX4200, MX4200D, and the 12-channel MX9212, MX9012R, MX9112.</p>
+ <p><a href="http://www.leica-gps.com/"><img src="../pic/9400n.jpg" alt="Leica MX9400N Navigator" height="143" width="180" align="left"></a> <a href="http://www.leica-gps.com/">Leica Geosystems</a> acquired the Magnavox commercial GPS technology business in February of 1994. They now market and support former Magnavox GPS products such as the MX4200 and its successors.</p>
+ <br clear="LEFT">
+ <p>Leica MX9400N Navigator.</p>
+ <h4>Operating Modes</h4>
+ <p>This driver supports two modes of operation, static and mobile, controlled by clock flag 2.</p>
+ <p>In static mode (the default) the driver assumes that the GPS antenna is in a fixed location. The receiver is initially placed in a &quot;Static, 3D Nav&quot; mode, where latitude, longitude, elevation and time are calculated for a fixed station. An average position is calculated from this data. After 24 hours, the receiver is placed into a &quot;Known Position&quot; mode, initialized with the calculated position, and then solves only for time.</p>
+ <p>In mobile mode, the driver assumes the GPS antenna is mounted on a moving platform such as a car, ship, or aircraft. The receiver is placed in &quot;Dynamic, 3D Nav&quot; mode and solves for position, altitude and time while moving. No position averaging is performed.</p>
+ <h4>Monitor Data</h4>
+ <p>The driver writes each timecode as received to the <tt>clockstats</tt> file. Documentation for the <cite>NMEA-0183</cite> proprietary sentences produced by the MX4200 can be found in <a href="../mx4200data.html">MX4200 Receiver Data Format</a>.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Assume GPS receiver is on a mobile platform if set.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a>&nbsp;</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/drivers/icons/home.gif b/contrib/ntp/html/drivers/icons/home.gif
new file mode 100644
index 000000000000..e1812988fdb6
--- /dev/null
+++ b/contrib/ntp/html/drivers/icons/home.gif
Binary files differ
diff --git a/contrib/ntp/html/drivers/icons/mail2.gif b/contrib/ntp/html/drivers/icons/mail2.gif
new file mode 100644
index 000000000000..21bc1c49ea5f
--- /dev/null
+++ b/contrib/ntp/html/drivers/icons/mail2.gif
Binary files differ
diff --git a/contrib/ntp/html/drivers/oncore-shmem.html b/contrib/ntp/html/drivers/oncore-shmem.html
new file mode 100644
index 000000000000..91402ebc27ea
--- /dev/null
+++ b/contrib/ntp/html/drivers/oncore-shmem.html
@@ -0,0 +1,158 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>ONCORE - SHMEM</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Motorola ONCORE - The Shared Memory Interface</h3>
+ <hr>
+ <h4>Introduction</h4>
+ <p>In NMEA mode, the Oncore GPS receiver provides the user with the same information as other GPS receivers. In BINARY mode, it can provide a lot of additional information.</p>
+ <p>In particular, you can ask for satellite positions, satellite health, signal levels, the ephemeris and the almanac, and you can set many operational parameters. In the case of the VP, you can get the pseudorange corrections necessary to act as a DGPS base station, and you can see the raw satellite data messages themselves.</p>
+ <p>When using the Oncore GPS receiver with NTP, this additional information is usually not available since the receiver is only talking to the oncore driver in NTPD. To make this information available for use in other programs, (say graphic displays of satellites positions, plots of SA, etc.), a shared memory interface (SHMEM) has been added to the refclock_oncore driver on those operating systems that support shared memory.</p>
+ <p>To make use of this information you will need an Oncore Reference Manual for the Oncore GPS receiver that you have. The Manual for the VP only exists as a paper document, the UT+/GT+/M12 manuals are available as a pdf documents at <a href="http://www.synergy-gps.com/Mot_Manuals.html">Synergy</a> .</p>
+ <p>This interface was written by Poul-Henning Kamp (phk@FreeBSD.org), and modified by Reg Clemens (reg@dwf.com). The interface is known to work in FreeBSD, Linux, and Solaris.</p>
+ <h4>Activating the Interface</h4>
+ <p>Although the Shared Memory Interface will be compiled into the Oncore driver on those systems where Shared Memory is supported, to activate this interface you must include a <b>STATUS</b> or <b>SHMEM</b> line in the <tt>/etc/ntp.oncore</tt> data file that looks like</p>
+ <pre>
+ STATUS &lt; file_name &gt;<br>
+ or<br>
+ SHMEM &lt; file_name &gt;
+</pre>
+ Thus a line like
+ <pre>
+ SHMEM /var/adm/ntpstats/ONCORE
+</pre>
+ <p>would be acceptable. This file name will be used to access the Shared Memory.</p>
+ <p>In addition, one the two keywords <b>Posn2D</b> and <b>Posn3D</b> can be added to see @@Ea records containing the 2D or 3D position of the station (see below). Thus to activate the interface, and see 3D positions, something like</p>
+ <pre>
+ SHMEM /var/adm/ntpstats/ONCORE
+ Posn3D
+</pre>
+ <p>would be required.</p>
+ <h4>Storage of Messages in Shared Memory</h4>
+ <p>With the shared memory interface, the oncore driver (refclock_oncore) allocates space for all of the messages that it is configured to receive, and then puts each message in the appropriate slot in shared memory as it arrives from the receiver. Since there is no easy way for a client program to know when the shared memory has been updated, a sequence number is associated with each message, and is incremented when a new message arrives. With the sequence number it is easy to check through the shared memory segment for messages that have changed.</p>
+ <p>The Oncore binary messages are kept in their full length, as described in the Reference manual, that is everything from the @@ prefix thru the &lt;checksum&gt;&lt;CR&gt;&lt;LF&gt;.</p>
+ <p>The data starts at location ONE of SHMEM (NOT location ZERO).</p>
+ <p>The messages are stacked in a series of variable length structures, that look like</p>
+ <pre>
+ struct message {
+ u_int length;
+ u_char sequence;
+ u_char message[length];
+ }
+</pre>
+ <p>if something like that were legal. That is, there are two bytes (caution, these may NOT be aligned with word boundaries, so the field needs to be treated as a pair of u_char), that contains the length of the next message. This is followed by a u_char sequence number, that is incremented whenever a new message of this type is received. This is followed by 'length' characters of the actual message.</p>
+ <p>The next structure starts immediately following the last char of the previous message (no alignment). Thus, each structure starts a distance of 'length+3' from the previous structure.</p>
+ <p>Following the last structure, is a u_int containing a zero length to indicate the end of the data.</p>
+ <p>The messages are recognized by reading the headers in the data itself, viz @@Ea or whatever.</p>
+ <p>There are two special cases.</p>
+ <p>(1) The almanac takes a total of 34 submessages all starting with @@Cb.<br>
+ 35 slots are allocated in shared memory. Each @@Cb message is initially placed in the first of these locations, and then later it is moved to the appropriate location for that submessage. The submessages can be distinguished by the first two characters following the @@Cb header, and new data is received only when the almanac changes.</p>
+ <p>(2) The @@Ea message contains the calculated location of the antenna, and is received once per second. However, when in timekeeping mode, the receiver is normally put in 0D mode, with the position fixed, to get better accuracy. In 0D mode no position is calculated.</p>
+ <p>When the SHMEM option is active, and if one of <b>Posn2D</b> or <b>Posn3D</b> is specified, one @@Ea record is hijacked each 15s, and the receiver is put back in 2D/3D mode so the the current location can be determined (for position determination, or for tracking SA). The timekeeping code is careful NOT to use the time associated with this (less accurate) 2D/3D tick in its timekeeping functions.</p>
+ <p>Following the initial @@Ea message are 3 additional slots for a total of four. As with the almanac, the first gets filled each time a new record becomes available, later in the code, the message is distributed to the appropriate slot. The additional slots are for messages containing 0D, 2D and 3D positions. These messages can be distinguished by different bit patterns in the last data byte of the record.</p>
+ <h4>Opening the Shared Memory File</h4>
+ <p>The shared memory segment is accessed through a file name given on a <b>SHMEM</b> card in the <tt>/etc/ntp.oncore</tt> input file. The following code could be used to open the Shared Memory Segment:</p>
+ <pre>
+ char *Buf, *file;
+ int size, fd;
+ struct stat statbuf;
+
+ file = &quot;/var/adm/ntpstats/ONCORE&quot;; /* the file name on my ACCESS card */
+ if ((fd=open(file, O_RDONLY)) &lt; 0) {
+ fprintf(stderr, &quot;Cant open %s\n&quot;, file);
+ exit(1);
+ }
+
+ if (stat(file, &amp;statbuf) &lt; 0) {
+ fprintf(stderr, &quot;Cant stat %s\n&quot;, file);
+ exit(1);
+ }
+
+ size = statbuf.st_size;
+ if ((Buf=mmap(0, size, PROT_READ, MAP_SHARED, fd, (off_t) 0)) &lt; 0) {
+ fprintf(stderr, &quot;MMAP failed\n&quot;);
+ exit(1);
+ }
+</pre>
+ <h4>Accessing the data</h4>
+ <p>The following code shows how to get to the individual records.</p>
+ <pre>
+ void oncore_msg_Ea(), oncore_msg_As(), oncore_msg_Bb();
+
+ struct Msg {
+ char c[5];
+ unsigned int seq;
+ void (*go_to)(uchar *);
+ };
+
+ struct Msg Hdr[] = { {&quot;@@Bb&quot;, 0, &amp;oncore_msg_Bb},
+ {&quot;@@Ea&quot;, 0, &amp;oncore_msg_Ea},
+ {&quot;@@As&quot;, 0, &amp;oncore_msg_As}};
+
+ void
+ read_data()
+ {
+ int i, j, k, n, iseq, jseq;
+ uchar *cp, *cp1;
+
+
+ for(cp=Buf+1; (n = 256*(*cp) + *(cp+1)) != 0; cp+=(n+3)) {
+ for (k=0; k &lt; sizeof(Hdr)/sizeof(Hdr[0]); k++) {
+ if (!strncmp(cp+3, Hdr[k].c, 4)) { /* am I interested? */
+ iseq = *(cp+2);
+ jseq = Hdr[k].seq;
+ Hdr[k].seq = iseq;
+ if (iseq &gt; jseq) { /* has it changed? */
+ /* verify checksum */
+ j = 0;
+ cp1 = cp+3; /* points to start of oncore response */
+ for (i=2; i &lt; n-3; i++)
+ j ^= cp1[i];
+ if (j == cp1[n-3]) { /* good checksum */
+ Hdr[k].go_to(cp1);
+ } else {
+ fprintf(stderr, &quot;Bad Checksum for %s\n&quot;, Hdr[k].c);
+ break;
+ }
+ }
+ }
+ }
+ if (!strncmp(cp+3, &quot;@@Ea&quot;, 4))
+ cp += 3*(n+3);
+ if (!strncmp(cp+3, &quot;@@Cb&quot;, 4))
+ cp += 34*(n+3);
+ }
+ }
+
+ oncore_msg_Bb(uchar *buf)
+ {
+ /* process Bb messages */
+ }
+
+ oncore_msg_Ea(uchar *buf)
+ {
+ /* process Ea messages */
+ }
+
+ oncore_msg_As(uchar *buf)
+ {
+ /* process As messages */
+ }
+</pre>
+ <p>The structure Hdr contains the Identifying string for each of the messages that we want to examine, and the name of a program to call when a new message of that type is arrives. The loop can be run every few seconds to check for new data.</p>
+ <h4>Examples</h4>
+ <p>There are two complete examples available. The first plots satellite positions and the station position as affected by SA, and keeps track of the mean station position, so you can run it for periods of days to get a better station position. The second shows the effective horizon by watching satellite tracks. The examples will be found in the GNU-zipped tar file <a href="ftp://ftp.udel.edu/pub/ntp/software/OncorePlot.tar.gz">ftp://ftp.udel.edu/pub/ntp/software/OncorePlot.tar.gz</a>.</p>
+ <p>Try the new interface, enjoy.</p>
+ <hr>
+ <address>Reg.Clemens (reg@dwf.com), Poul-Henning Kamp (phk@FreeBSD.org)</address>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/extern.html b/contrib/ntp/html/extern.html
new file mode 100644
index 000000000000..89a1b56d02d8
--- /dev/null
+++ b/contrib/ntp/html/extern.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>External Clock Discipline and the Local Clock Driver</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>External Clock Discipline and the Local Clock Driver</h3>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">15:41</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="240">Sunday, February 02, 2003</csobj></p>
+ <hr>
+ <p>The NTPv4 implementation includes provisions for an external clock, where the system clock is implemented by some external hardware device. One implementation might take the form of a bus peripheral with a high resolution counter disciplined by a GPS receiver, for example. Another implementation might involve another synchronization protocol, such as the Digital Time Synchronization Service (DTSS), where the system time is disciplined to this protocol and NTP clients of the server obtain synchronization indirectly via the server. A third implementation might be a completely separate clock discipline algorithm and synchronization protocol, such as the <tt>Lockclock</tt> algorithm used with NIST Automated Computer Time Service (ACTS) modem synchronized time.</p>
+ <p>When external clocks are used in conjunction with NTP service, some way needs to be provided for the external clock driver and NTP daemon <tt>ntpd</tt> to communicate and determine which discipline is in control. This is necessary in order to provide backup, for instance if the external clock or protocol were to fail and synchronization service fall back to other means, such as a local reference clock or another NTP server. In addition, when the external clock and driver are in control, some means needs to be provided for the clock driver to pass on status information and error statistics to the NTP daemon.</p>
+ <p>Control and monitoring functions for the external clock and driver are implemented using the <a href="drivers/driver1.html">Local Clock (type 1) driver</a> and the <tt>ntp_adjtime()</tt> system call. This system call is implemented by special kernel provisions included in the kernel of several operating systems, including Solaris, Tru64, FreeBSD and Linux, and possibly others. When the external clock is disabled or not implemented, the system call is used to pass time and frequency information, as well as error statistics, to the kernel. Besides disciplining the system time, the same interface can be used by other applications to determine the operating parameters of the discipline.</p>
+ <p>When the external clock is enabled, <tt>ntpd</tt> does not discipline the system clock, nor does it maintain the error statistics. In this case, the external clock and driver do this using mechanisms unknown to <tt>ntpd</tt>; however, in this case the kernel state variables are retrieved at 64-s intervals by the Local Clock driver and used by the clock selection and mitigation algorithms to determine the system variables presented to other NTP clients and peers. In this way, downstream clients and servers in the NTP subnet can make an intelligent choice when more than one server is available.</p>
+ <p>In order to implement a reliable mitigation between ordinary NTP sources and the external clock source, a protocol is necessary between the local clock driver and the external clock driver. This is implemented using Boolean variables and certain bits in the kernel clock status word. The Boolean variables include the following:</p>
+ <p><tt>ntp_enable</tt>. set/reset by the <tt>enable</tt> command. enables ntp clock discipline</p>
+ <p><tt>ntp_contro</tt>l. set during initial configuration if kernel support is available</p>
+ <p><tt>kern_enable</tt> Set/reset by the <tt>enable</tt> command</p>
+ <p>If the <tt>kern_enable</tt> switch is set, the daemon computes the offset, frequency, maximum error, estimated error, time constand and status bits, then provides them to the kernel via <tt>ntp_adjtime()</tt>. If this switch is not set, these values are not passed to the kernel; however, the daemon retrieves their present values and uses them in place of the values computed by the daemon.</p>
+ <p>The <tt>pps_update</tt> bit set in the protocol routine if the prefer peer has survived and has offset less than 128 ms; otherwise set to zero.</p>
+ <p>The <tt>pps_contro</tt>l Updated to the current time by kernel support if the PPS signal is enabled and working correctly. Set to zero in the adjust routine if the interval since the last update exceeds 120 s.</p>
+ <p>The <tt>ntp_enable</tt> and <tt>kern_enable</tt> are set by the configuration module. Normally, both switches default on, so the daemon can control the time and the kernel discipline can be used, if available. The <tt>pps_update</tt> switch is set by the protocol module when it believes the PPS provider source is legitimate and operating within nominals. The <tt>ntp_control</tt> switch is set during configuration by interrogating the kernel. If both the <tt>kern_enable</tt> and <tt>ntp_control</tt> switches are set, the daemon disciplines the clock via the kernel and the internal daemon discipline is disabled.</p>
+ <p>The external clock driver controls the system time and clock selection in the following way. Normally, the driver adjusts the kernel time using the <tt>ntp_adjtime()</tt> system call in the same way as the daemon. In the case where the kernel discipline is to be used intact, the clock offset is provided in this call and the loop operates as specified. In the case where the driver steers only the frequency, the offset is specified as zero.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/hints.html b/contrib/ntp/html/hints.html
new file mode 100644
index 000000000000..cb6275b550a4
--- /dev/null
+++ b/contrib/ntp/html/hints.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Hints and Kinks</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Hints and Kinks</h3>
+ <img src="pic/alice35.gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html"> from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>Mother in law has all the answers.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">20:27</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="257">Monday, December 02, 2002</csobj></p>
+ <br clear="left">
+ <hr>
+ <p>This is an index for a set of troubleshooting notes contained in individual text files in the <tt>./hints</tt> directory. They were supplied by various volunteers in the form of mail messages, patches or just plain word of mouth. Each note applies to a specific computer and operating system and gives information found useful in setting up the NTP distribution or site configuration. The notes are very informal and subject to errors; no attempt has been made to verify the accuracy of the information contained in them.</p>
+ <p>Additions or corrections to this list or the information contained in the notes is solicited. The most useful submissions include the name of the computer manufacturer (and model numbers where appropriate), operating system (specific version(s) where appropriate), problem description, problem solution and submitter's name and electric address. If the submitter is willing to continue debate on the problem, please so advise. See the <a href="hints/">directory listing</a>.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/hints/netbsd b/contrib/ntp/html/hints/netbsd
new file mode 100644
index 000000000000..f5f628db4590
--- /dev/null
+++ b/contrib/ntp/html/hints/netbsd
@@ -0,0 +1,37 @@
+Starting with NetBSD-1.6, it is possible to delegate the system clock
+control to a non root user. This enable running ntpd in a chroot
+jail under a non privilegied UID/GID, using ntpd -i and -u flags.
+
+The delegation is done through the clockctl(4) pseudodevice driver.
+This driver makes privilegied system calls such as ntp_adjtime(2)
+available through ioctl(2) on the /dev/clockctl device. If a user
+is able to write to /dev/clockctl, then (s)he can control the system
+clock.
+
+In order to use this feature, make sure that:
+
+1) Your kernel is compiled with the following option:
+pseudo-device clockctl
+This is true for GENERIC kernels on most ports. Please check
+http://wwW.netbsd.org/Documentation/kernel/
+if you need information about building a kernel.
+
+2) You have a ntpd user on your system. Here is the /etc/master.passwd
+entry for ntpd user on NetBSD-1.6:
+ntpd:*:15:15::0:0:& pseudo-user:/var/chroot/ntpd:/sbin/nologin
+And here is the /etc/group entry for group 15:
+ntpd:*:15:
+
+3) /dev/clockctl exists and is writtable by user ntpd. Default
+NetBSD-1.6 setting is:
+crw-rw---- 1 root ntpd 61, 0 Apr 1 2002 /dev/clockctl
+Major device number and date is likely to be different on your system.
+If you need to create the device, issue the following command:
+cd /dev && ./MAKEDEV clockctl
+
+Here is an example of how to run ntpd chrooted in /var/chroot/ntpd,
+running with ntpd UID and ntpd GID:
+ntpd -i /var/chroot/ntpd -u ntpd:ntpd
+Note that -i and -u options are enabled at configure time if your
+system supports system clock control by an unprivilegied user. If this
+is not the case, then the -i and -u options will not be available.
diff --git a/contrib/ntp/html/hints/sco.html b/contrib/ntp/html/hints/sco.html
new file mode 100644
index 000000000000..bd08e981bcfc
--- /dev/null
+++ b/contrib/ntp/html/hints/sco.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>SCO Unix hints</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h1>SCO Unix hints</h1>
+ <h2>Older SCO Unix versions</h2>
+ <p>NTP 4.0.x does not run on SCO Unix prior to version 3.2.5.0.0. If you need NTP on an older SCO Unix system and don't mind to modify your kernel, use 3.5.91 which has patches for SCO Unix 3.2.4.x. Apply the kernel modifications as described in <a href="http://www.echelon.nl/en/ntp/sco3-recipe.html">XNTP on SCO 3.2.4.2</a>.</p>
+ <h2>Compiling NTP</h2>
+ <p>Delete the old SCO supplied NTP programs using the &quot;custom&quot; utility. Run the NTP configure program with CFLAGS=&quot;-b elf -K <i>processor-type</i>&quot; for best results.</p>
+ <h2>Running NTP</h2>
+ <p>Run &quot;tickadj -As&quot; after every reboot to set the variables &quot;clock_drift&quot; and &quot;track_rtc&quot; to the right values.</p>
+ <p>Run &quot;ntpd&quot; with a high negative nice-value, i.e. &quot;nice --19 ntpd&quot; for best results.</p>
+ <h2>More information</h2>
+ <p>More information on the way SCO Unix and NTP interact can be found in <a href="http://www.echelon.nl/en/ntp/ntp-on-sco.html">NTP on SCO Unix</a>, which includes links to precompiled versions of NTP.</p>
+ <p><a href="mailto:kees@echelon.nl">Kees Hendrikse</a>, January 1999</p>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/hints/solaris-dosynctodr.html b/contrib/ntp/html/hints/solaris-dosynctodr.html
index d6b97a9c1f0c..89a12b27d04a 100644
--- a/contrib/ntp/html/hints/solaris-dosynctodr.html
+++ b/contrib/ntp/html/hints/solaris-dosynctodr.html
@@ -5,7 +5,8 @@
<!-- Sun Template V4.0 9/9/98 -->
<HTML>
<HEAD>
-<TITLE>Symptoms and Resolutions Article 19195</TITLE>
+<TITLE>Symptoms and Resolutions Article 19195</title><link href="scripts/style.css" type="text/css" rel="stylesheet">
+
<META NAME="GENERATOR" CONTENT="Sun Microsystems, Inc.">
<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=iso-8859-1">
diff --git a/contrib/ntp/html/hints/solaris.html b/contrib/ntp/html/hints/solaris.html
index 64b361a14326..7161d5dd3b39 100644
--- a/contrib/ntp/html/hints/solaris.html
+++ b/contrib/ntp/html/hints/solaris.html
@@ -1,6 +1,7 @@
<HTML>
<HEAD>
-<TITLE>Solaris hints and kinks</TITLE>
+<TITLE>Solaris hints and kinks</title><link href="scripts/style.css" type="text/css" rel="stylesheet">
+
</HEAD>
<BODY>
Information on compiling and executing ntpd under Solaris.
@@ -37,7 +38,7 @@ set dosynctodr = 0
<P>
Instead of the <I>tick</I> kernel variable, which many operating
systems use to control microseconds added to the system time every
-clock tick (c.f. <A HREF="../notes.htm#frequency_tolerance">Dealing
+clock tick (c.f. <A HREF="../notes.html#frequency_tolerance">Dealing
with Frequency Tolerance Violations</A>), Solaris has the variables
<I>nsec_per_tick</I> and <I>usec_per_tick</I>.
<P>
diff --git a/contrib/ntp/html/hints/vxworks.html b/contrib/ntp/html/hints/vxworks.html
index 49662ff2948d..cd4c919e9116 100644
--- a/contrib/ntp/html/hints/vxworks.html
+++ b/contrib/ntp/html/hints/vxworks.html
@@ -1,18 +1,82 @@
-<HTML>
-<HEAD>
- <TITLE>vxWorks Port of NTP</TITLE>
-</HEAD>
-<BODY LINK="#00008B" VLINK="#8B0000">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<H1>VxWorks port of NTP </H1>
+<html>
-<P>Please look at the <A HREF="../vxworks.htm">Vxworks file</A> in the html directory.
+ <head>
+ <title>vxWorks Port of NTP</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
-<P>Casey Crellin</A> <BR>
-<A HREF="mailto:casey@csc.co.za">casey@csc.co.za</A> </P>
+ <body link="#00008B" vlink="#8B0000">
+ <h1>VxWorks port of NTP</h1>
+ <p>Creating a port for vxWorks posed some problems. This port may help as a starting point for similar ports to real-time OS's and other embeddable kernels, particularly where main() is not allowed, and where the configure scripts need to be altered.</p>
+ <h1><b>Configuration issues</b></h1>
+ <p>I decided to do as little invasive surgery as possible on the NTP code, so I brought the vxWorks header tree in line with the standard unix tree. The following changes were needed, as a side effect these changes will allow for easy porting of other autoconfigure enabled code.</p>
+ <p>Where I have 386 you will need to put in your target type. The vxWorks tree entry point is /usr/wind. If these are the same for your system, you should be able to cut and paste the changes.</p>
+ <p><blink>WARNING: Check you are not overwriting files, before entering the following: there should be no conflict, but check first... </blink></p>
+ <p>export CC=&quot;cc386 -nostdlib -m486 -DCPU=I80486 -I/usr/wind/target/h&quot;<br>
+ export RANLIB=ranlib386<br>
+ export AR=ar386<br>
+ export VX_KERNEL=/usr/wind/target/config/ims_std_bsp/vxWorks<br>
+ cd /usr/wind/target/sys<br>
+ ln -s ../signal.h<br>
+ ln -s ../time.h<br>
+ ln -s socket.h sockio.h<br>
+ ln -s ../selectLib.h select.h<br>
+ ln -s ../timers.h<br>
+ touch file.h param.h resource.h utsname.h var.h ../netdb.h ../a.out.h ../termios.h<br>
+ echo &quot; ******ADD #include \&quot;sys/times.h\&quot; to sys/time.h &quot;</p>
+ <p>The configure script must be changed in the following way to get the linking tests to work, once in the correct directory issue the following commands:<br>
+ sed -e 's%main.*()%vxmain()%' configure &gt; configure.vxnew<br>
+ mv configure.vxnew configure<br>
+ chmod 755 configure</p>
+ <p>The new version 4 of NTP requires some maths functions so it links in the maths library (-lm) in the ntpd <a href="../ntpd/Makefile.am">Makefile.am</a> change the line &quot;ntpd_LDADD = $(LDADD) -lm&quot; by removing the &quot;-lm&quot;.<br>
+ You are now ready to compile</p>
+ <p><br>
+ The <a href="../configure.in">configure.in </a>file needed to be altered to allow for a host-target configuration to take place.</p>
+ <ul>
+ <li>The define SYS_VXWORKS was added to the compilation flags.
+ <li>Little endianess is set if the target is of type iX86.
+ <li>The size of char, integer, long values are all set. If Wind River ever changes these values they will need to be updated.
+ <li>clock_settime() is defined to be used for setting the clock.
+ <li>The Linking flags have -r added to allow for relinking into the vxWorks kernel
+ </ul>
+ <p>Unfortunately I have had to make use of the <a href="../include/ntp_machine.h">ntp_machine.h </a>file to add in the checks that would have been checked at linking stage by autoconf, a better method should be devised.</p>
+ <ul>
+ <li>There is now a NO_MAIN_ALLOWED define that simulates command line args, this allows the use of the normal startup sysntax.
+ <li>POSIX timers have been added.
+ <li>Structures normally found in netdb.h have been added with, the corresponding code is in <a href="../libntp/machines.c">machines.c </a>. Where possible the defines for these have been kept non-vxWorks specific.
+ </ul>
+ <p>Unfortunately there are still quite a few SYS_VXWORKS type defines in the source, but I have eliminated as many as possible. You have the choice of using the usrtime.a library avaliable from the vxworks archives or forgoing adjtime() and using the clock_[get|set]time().The <a href="../include/ntp_machine.h">ntp_machine.h </a>file clearly marks how to do this.</p>
+ <h1><b>Compilation issues</b></h1>
+ <p>You will need autoconf and automake ... available free from the gnu archives worldwide.</p>
+ <p>The variable arch is the target architecture (e.g. i486)</p>
+ <p>mkdir A.vxworks (or whatever....)<br>
+ cd A.vxworks<br>
+ ../configure --target=arch-wrs-vxworks [any other options]<br>
+ make</p>
+ <p>Options I normally use are the --disable-all-clocks --enable-LOCAL-CLOCK flags. The program should proceed to compile without problem. The daemon ntpd, ntpdate, ntptrace, ntpdc, ntpq programs and of course the libraries are all fully ported. The other utilities are not, but they should be easy to port.</p>
+ <h1>Running the software</h1>
+ <p>Load in the various files, call them in the normal vxWorks function type manner. Here are some examples. Refer to the man pages for further information.</p>
+ <p>ld &lt; ntpdate/ntpdate<br>
+ ld &lt; ntpd/ntpd<br>
+ ld &lt; ntptrace/ntptrace<br>
+ ld &lt; ntpq/ntpq<br>
+ ld &lt; ntpdc/ntpdc<br>
+ ntpdate (&quot;-b&quot;, &quot;192.168.0.245&quot;)<br>
+ sp(ntpd, &quot;-c&quot;, &quot;/export/home/casey/ntp/ntp.conf&quot;)<br>
+ ntpdc(&quot;-c&quot;, &quot;monlist&quot;, &quot;192.168.0.244&quot;)<br>
+ ntpq(&quot;-c&quot;, &quot;peers&quot;, &quot;192.168.0.244&quot;)<br>
+ ntptrace(&quot;192.168.0.244&quot;)<br>
+ </p>
+ <h1>Bugs and such</h1>
+ <p>Should you happen across any bugs, please let me know, or better yet fix them and submit a patch. Remember to make you patch general for Vxworks, not just for your particular architecture. <a href="http://www.ccii.co.za">CCII Systems (Pty) Ltd</a>, my ex employers, sponsored the time to this port. Please let me know how it goes, I would be most interested in offsets and configurations.</p>
+ <p><br>
+ </p>
+ <p>Casey Crellin<br>
+ <a href="mailto:casey@csc.co.za">casey@csc.co.za</a></p>
+ <p><br>
+ </p>
+ </body>
-<P><BR>
-</P>
-
-</BODY>
-</HTML>
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/hints/winnt.html b/contrib/ntp/html/hints/winnt.html
new file mode 100644
index 000000000000..29abc64640e2
--- /dev/null
+++ b/contrib/ntp/html/hints/winnt.html
@@ -0,0 +1,259 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>NTP on Windows NT</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h1>NTP 4.x for Windows NT</h1>
+
+ <h2>Introduction</h2>
+ The NTP 4 distribution runs as service on Windows NT 4.0, Windows 2000, Windows XP,
+ Windows .NET Server 2003. It will NOT run on Windows 95, 98, ME, etc.
+ The binaries work on multi-processor systems. This port has not been tested
+ on the Alpha platform. This release now uses OpenSSL for authentication.
+ IPv6 is not implemented yet for Win32 platforms.
+ <h2>Authentication Keys</h2>
+ With this release ntp-keygen is supported. See the <a href="../keygen.html">
+ ntp keygen documentation</a> for details on how to use ntp-keygen.
+ <p>
+ ntpd can now use the generated keys in the same way as on Unix platforms. Please
+ refer to the <a href="../authopt.html">Authentication Options</a> for details
+ on how to use these.
+ <p><B>NOTE:</B> ntpd and ntp-keygen both use OpenSSL which requires a random
+ character file called .rnd by default. Both of these programs will automatically
+ generate this file if they are not found. The programs will look for an
+ environmental variable called RANDFILE and use that for the name of the
+ random character file if the variable exists. If it does not exist it will look for an environmental
+ variable called HOME and use that directory to search for a filed called .rnd
+ in that directory. Finally, if neither RANDFILE nor HOME exists it will look
+ in C:\ for a .rnd file. In each case it will search for and create the file
+ if the environmental variable exists or in the C:\ directory if it doesn't.
+ Note that ntpd normally runs as a service so that the only way that it will
+ have either RANDFILE or HOME defined is if it is a System environmental
+ variable or if the service is run under a specific account name and that
+ account has one of those variables defined. Otherwise it will use the file
+ "c:\.rnd". This was done so that OpenSSL will work normally on Win32 systems.
+ This obviates the need to ship the OpenSSL.exe file and explain how to
+ generate the .rnd file. A future version may change this behavior.
+
+ <p>Refer to <a href="#Compiling">Compiling Requirements</a> and Instructions for how to compile the program.</p>
+ <h2>Reference Clocks</h2>
+ Reference clock support under Windows NT is tricky because the IO functions are
+ so much different. Some of the clock types have been built into the ntpd executable
+ and should work but have not been tested by the ntp project. If you have a clock
+ that runs on Win32 and the driver is there but not implemented on Win32 you will have
+ make the required configuration changes in config.h and then build ntpd from source
+ and test it. The following reference clocks are known to work and are supported
+ by Windows NT:
+ <p><a href="../driver1.html">Type 1</a> Undisciplined Local Clock (LOCAL)<br>
+ <a href="../driver29.html">Type 29</a> Trimble Navigation Palisade GPS (GPS_PALISADE)</p>
+ <h2>Functions Supported</h2>
+ All NTP functions are supported with some constraints. See the <a href="#ToDo">TODO list</a> below.
+ Note that the ntptrace executable is not supported and you should use the PERL script
+ version instead.
+ <h2>Accuracy</h2>
+ Greg Brackley has implemented a fantastic interpolation scheme that improves the precision of the NTP clock using a realtime thread (is that poetic or what!) which captures a tick count from the 8253 counter after each OS tick. The count is used to interpolate the time between operating system ticks.
+ <p>On a typical 200+ MHz system NTP achieves a precision of about 5 microseconds and synchronizes the clock to +/-500 microseconds using the <a href="http://www.trimble.com/products/ntp">Trimble Palisade</a> as UTC reference. This allows distributed applications to use the 10 milliseconds ticks available to them with high confidence.</p>
+ <h2>Binaries</h2>
+ Recent InstallShield based executable versions of NTP for Windows NT (intel) are available from:
+ <ul>
+ <li><a href="http://www.trimble.com/oem/ntp">http://www.trimble.com/oem/ntp</a>
+ <li><a href="http://www.five-ten-sg.com/">http://www.five-ten-sg.com/</a>
+ </ul>
+ <a name="ToDo"><h2>ToDo</h2></a>
+ These tasks are in no particular order of priority.
+ <ul>
+ <li>Create a proper install/uninstall program
+ <li>Add sntp to the list of supported programs
+ <li>Add support for Visual C++ 7.0 or later (.NET)
+ <li>Add IPv6 support
+ <li>See if precision can be improved by using CPU cycle counter for tick interpolation.
+ <li>Make precision time available to applications using NTP_GETTIME API
+ </ul>
+ <h2>Compiling Requirements</h2>
+ <ul>
+ <li>Windows NT 4.0 Windows 2000, Windows XP, or Windows.NET Server 2003
+ <li>Microsoft Visual C++ 6.0. <B>NOTE</B>VC++ 7.0 (aka .NET) is not yet supported
+ but will probably work fine.
+ <li>Some way of uncompressing and untarring the gzipped tar file.
+ <li>OpenSSL must be built on the box before building NTP. Additional steps would
+ be required to not use OpenSSL.
+ </ul>
+ <a name="Compiling"><h2>Compiling Instructions</h2></a>
+ <ol>
+ <li>Unpack and build OpenSSL according to the OpenSSL instructions for building on
+ Windows. Currently the NTP build requires OpenSSL 0.9.7b as it looks for the path
+ to that build for the include and libeay32.lib files. If you have a different version
+ you will need to adjust both the preprocessor path and the link path to point to
+ the correct locations of the include files and the lib file respectively.
+ <li>Unpack the NTP-4.x.tar.gz using utilities such as WinZip.
+ <li>Open the .\ports\winnt\ntp.dsw Visual C workspace
+ <li>Batch build all projects
+ <li>The built binaries can be found in the port\winnt\bin\Release subdirectory
+ <li>In addition you will need to install the OpenSSL libeay32.dll
+ <li>If you are shipping binaries in a kit it is strongly recommended that you
+ ship this file (winnt.html) along with the binaries.
+ </ol>
+ <h2>Configuration File</h2>
+ The default NTP configuration file path is %SystemRoot%<tt>\system32\drivers\etc\. </tt>(%SystemRoot% is an environmental variable that can be determined by typing &quot;set&quot; at the &quot;Command Prompt&quot; or from the &quot;System&quot; icon in the &quot;Control Panel&quot;).<br>
+ Refer to your system environment and <tt>c</tt>reate your<tt> ntp.conf</tt> file in the directory corresponding to your system&nbsp; installation.<br>
+ <tt>The older &lt;WINDIR&gt;\ntp.conf </tt>is still supported but you will get a log entry reporting that the first file wasn't found.
+ <h2>Installation Instructions</h2>
+ The <tt>instsrv</tt> program in the instsrv subdirectory of the distribution can be used to install 'ntpd' as a service and start automatically at boot time. Instsrv is automatically compiled with the rest of the distribution if you followed the steps above.
+ <ol>
+ <li>Start a command prompt and enter &quot;instsrv.exe &lt;pathname_for_ntpd.exe&gt;&quot;
+ <li>Clicking on the &quot;Services&quot; icon in the &quot;Control Panel&quot; will display the list of currently installed services in a dialog box. The NetworkTimeProtocol service should show up in this list. Select it in the list and hit the &quot;Start&quot; button in the dialog box. The NTP service should start.
+ <li>You can also stop and start the service by typing net start|stop NetworkTimeProtocol at the DOS prompt.
+ <li>View the event log by clicking on the &quot;Event Viewer&quot; icon in the &quot;Administrative Tools&quot; group, there should be several successful startup messages from NTP. NTP will keep running and restart automatically when the machine is rebooted.
+ </ol>
+ You can change the start mode (automatic/manual) and other startup parameters corresponding to the NTP service in the &quot;Services&quot; dialog box if you wish.
+ <h2>Removing NTP</h2>
+ You can also use <tt>instsrv</tt> to delete the NTP service by entering: &quot;instsrv.exe remove&quot;
+ <h2>Command Line Parameters and Registry Entries</h2>
+ Unlike the Unix environment, there is no clean way to run 'ntpdate' and reset the clock before starting 'ntpd' at boot time.<br>
+ NTP will step the clock up to 1000 seconds by default. While there is no reason that the system clock should be that much off during bootup if 'ntpd' was running before, you may wish to override this default and/or pass other command line directives.
+ <p>Use the registry editor to edit the value for the ntpd executable under LocalMachine\System\CurrentControlSet\Services\NTP.</p>
+ <p>Add the -g option to the ImagePath key, behind &quot;%INSTALLDIR&gt;\ntpd.exe&quot;. This will force NTP to accept large time errors (including 1.1.1980 00:00)</p>
+ <h2>Bug Reports</h2>
+ Send questions to <a href="news://comp.protocols.time.ntp">news://comp.protocols.time.ntp</a>
+ and bug reports should be entered in <a href="http://bugzilla.ntp.org/">Bugzilla</a> on the
+ NTP Web site.
+ <h2>Change Log</h2>
+ <h3>Last revision 2 July 2003&nbsp; Version 4.2.0</h3>
+ <b>by Danny Mayer (mayer@ntp.org>)</b>
+ <h3>Significant Changes:</h3>
+ This latest release of NTP constitutes a major upgrade to its ability to build and
+ run on Windows platforms and should now build and run cleanly. More importantly it
+ is now able to support all authentication in the same way as Unix boxes. This does
+ require the usage of OpenSSL which is now a prerequisite for build on Windows.
+ ntp-keygen is now supported and builds on Win32 platforms.
+
+ <h3>Last revision 16 February 1999&nbsp; Version 4.0.99e.</h3>
+ <b>by Sven Dietrich (sven_dietrich@trimble.com)</b>
+ <p><b>Significant Changes:</b></p>
+ <ul>
+ <li>Perl 5 is no longer needed to compile NTP. The configuration script which creates version.c with the current date and time was modified by Frederick Czajka [w2k@austin.rr.com] so that Perl is no longer required.
+ </ul>
+ <h3>Last revision 15 November 1999&nbsp; Version 4.0.98f.</h3>
+ <b>by Sven Dietrich (sven_dietrich@trimble.com)</b>
+ <p><b>Significant Changes:</b></p>
+ <ul>
+ <li>Fixed I/O problem delaying packet responses which resulted in no-replys to NTPQ and others.
+ <li>The default configuration file path is <tt>&lt;WINDIR&gt;\system32\drivers\etc\ntp.conf. The old &lt;WINDIR&gt;\ntp.conf </tt>is still supported but you will get a log entry reporting that the first file wasn't found. The NTP 3.x legacy <tt>ntp.ini</tt> file is no longer supported.
+ </ul>
+ <b>Known Problems / TODO:</b>
+ <ul>
+ <li>MD5 and name resolution do not yet get along. If you define MD5, you cannot use DNS names, only IP numbers.
+ </ul>
+ <h3>Last revision 27 July 1999&nbsp; Version 4.0.95.</h3>
+ This version compiles under WINNT with Visual C 6.0.
+ <p>Greg Brackley and Sven Dietrich</p>
+ <p>Significant changes:<br>
+ -Visual Studio v6.0 support<br>
+ -Winsock 2.0 support<br>
+ -Use of I/O completion ports for sockets and comm port I/O<br>
+ -Removed the use of multimedia timers (from ntpd, others need removing)<br>
+ -Use of waitable timers (with user mode APC) and performance counters to fake getting a better time<br>
+ -Trimble Palisade NTP Reference Clock support<br>
+ -General cleanup, prototyping of functions<br>
+ -Moved receiver buffer code to a separate module (removed unused members from the recvbuff struct)<br>
+ -Moved io signal code to a separate module</p>
+ <h3>Last revision:&nbsp; 20-Oct-1996</h3>
+ This version corrects problems with building the XNTP<br>
+ version 3.5-86 distribution under Windows NT.
+ <p>The following files were modified:<br>
+ &nbsp;blddbg.bat<br>
+ &nbsp;bldrel.bat<br>
+ &nbsp;include\ntp_machine.h<br>
+ &nbsp;xntpd\ntp_unixclock.c<br>
+ &nbsp;xntpd\ntp_refclock.c<br>
+ &nbsp;scripts\wininstall\build.bat<br>
+ &nbsp;scripts\wininstall\setup.rul<br>
+ &nbsp;scripts\wininstall\readme.nt<br>
+ &nbsp;scripts\wininstall\distrib\ntpog.wri<br>
+ &nbsp;html\hints\winnt (this file)</p>
+ <p>In order to build the entire Windows NT distribution you<br>
+ need to modify the file scripts\wininstall\build.bat<br>
+ with the installation directory of the InstallShield<br>
+ software.&nbsp; Then, simply type &quot;bldrel&quot; for non-debug<br>
+ or &quot;blddbg&quot; for debug executables.</p>
+ <p>Greg Schueman<br>
+ &nbsp;&nbsp;&nbsp; &lt;schueman@acm.org&gt;</p>
+ <h3>Last revision:&nbsp; 07-May-1996</h3>
+ This set of changes fixes all known bugs, and it includes<br>
+ several major enhancements.
+ <p>Many changes have been made both to the build environment as<br>
+ well as the code.&nbsp; There is no longer an ntp.mak file, instead<br>
+ there is a buildntall.bat file that will build the entire<br>
+ release in one shot.&nbsp; The batch file requires Perl.&nbsp; Perl<br>
+ is easily available from the NT Resource Kit or on the Net.</p>
+ <p>The multiple interface support was adapted from Larry Kahn's<br>
+ work on the BIND NT port.&nbsp; I have not been able to test it<br>
+ adequately as I only have NT servers with one network<br>
+ interfaces on which to test.</p>
+ <p>Enhancements:<br>
+ * Event Logging now works correctly.<br>
+ * Version numbers now work (requires Perl during build)<br>
+ * Support for multiple network interface cards (untested)<br>
+ * NTP.CONF now default, but supports ntp.ini if not found<br>
+ * Installation procedure automated.<br>
+ * All paths now allow environment variables such as %windir%</p>
+ <p>Bug fixes:<br>
+ * INSTSRV replaced, works correctly<br>
+ * Cleaned up many warnings<br>
+ * Corrected use of an uninitialized variable in XNTPD<br>
+ * Fixed ntpdate -b option<br>
+ * Fixed ntpdate to accept names as well as IP addresses<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Winsock WSAStartup was called after a gethostbyname())<br>
+ * Fixed problem with &quot;longjmp&quot; in xntpdc/ntpdc.c that<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caused a software exception on doing a Control-C in xntpdc.<br>
+ &nbsp;A Cntrl-C now terminates the program.</p>
+ <p>See below for more detail:</p>
+ <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Note: SIGINT is not supported for any Win32 application including<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Windows NT and Windows 95. When a CTRL+C interrupt occurs, Win32<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; operating systems generate a new thread to specifically handle that<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; interrupt. This can cause a single-thread application such as UNIX,<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to become multithreaded, resulting in unexpected behavior.<br>
+ &nbsp;</p>
+ <p>Possible enhancements and things left to do:<br>
+ * Reference clock drivers for NT (at least Local Clock support)<br>
+ * Control Panel Applet<br>
+ * InstallShield based installation, like NT BIND has<br>
+ * Integration with NT Performance Monitor<br>
+ * SNMP integration<br>
+ * Fully test multiple interface support<br>
+ &nbsp;</p>
+ <p>Known problems:<br>
+ *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bug in ntptrace - if no Stratum 1 servers are available,<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; such as on an IntraNet, the application crashes.</p>
+ <h3>Last revision:&nbsp; 12-Apr-1995</h3>
+ This NTPv3 distribution includes a sample configuration file and the project<br>
+ makefiles for WindowsNT 3.5 platform using Microsoft Visual C++ 2.0 compiler.<br>
+ Also included is a small routine to install the NTP daemon as a &quot;service&quot;<br>
+ on a WindowsNT box. Besides xntpd, the utilities that have been ported are<br>
+ ntpdate and xntpdc. The port to WindowsNT 3.5 has been tested using a Bancomm<br>
+ TimeServe2000 GPS receiver clock that acts as a strata 1 NTP server with no<br>
+ authentication (it has not been tested with any refclock drivers compiled in).<br>
+ Following are the known flaws in this port:<br>
+ 1) currently, I do not know of a way in NT to get information about multiple<br>
+ &nbsp;&nbsp; network interface cards. The current port uses just one socket bound to<br>
+ &nbsp;&nbsp; INADDR_ANY address. Therefore when dealing with a multihomed NT time server,<br>
+ &nbsp;&nbsp; clients should point to the default address on the server (otherwise the<br>
+ &nbsp;&nbsp; reply is not guaranteed to come from the same interface to which the<br>
+ &nbsp;&nbsp; request was sent). Working with Microsoft to get this resolved.<br>
+ 2) There is some problem with &quot;longjmp&quot; in xntpdc/ntpdc.c that causes a<br>
+ &nbsp;&nbsp; software exception on doing a Control-C in xntpdc. Be patient!<br>
+ 3) The error messages logged by xntpd currently contain only the numerical<br>
+ &nbsp;&nbsp; error code. Corresponding error message string has to be looked up in<br>
+ &nbsp;&nbsp; &quot;Books Online&quot; on Visual C++ 2.0 under the topic &quot;Numerical List of Error<br>
+ &nbsp;&nbsp; Codes&quot;.
+ <p>Last HTML Update: November 17, 1999<br>
+ <a href="mailto://sven_dietrich@trimble.com">Sven_Dietrich@Trimble.COM</a></p>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/howto.html b/contrib/ntp/html/howto.html
new file mode 100644
index 000000000000..2390d1206195
--- /dev/null
+++ b/contrib/ntp/html/howto.html
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>How to Write a Reference Clock Driver</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>How to Write a Reference Clock Driver</h3>
+ <img src="pic/pogo4.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>You need a little magic.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:11 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links10.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#desc">Description</a>
+ <li class="inline"><a href="#file">Files Which Need to be Changed</a>
+ <li class="inline"><a href="#intf">Interface Routine Overview</a>
+ </ul>
+ <hr>
+ <h4 id="desc">Description</h4>
+ <p>NTP reference clock support maintains the fiction that the clock is actually an ordinary peer in the NTP tradition, but operating at a synthetic stratum of zero. The entire suite of algorithms used to filter the received data, select the best clocks or peers and combine them to produce a system clock correction operate just like ordinary NTP peers. In this way, defective clocks can be detected and removed from the peer population. As no packets are exchanged with a reference clock; however, the transmit, receive and packet procedures are replaced with separate code to simulate them.</p>
+ <p>It is important to understand how the NTP clock driver interface works. The driver assumes three timescales: standard time maintained by a distant laboratory such as USNO or NIST, reference time maintained by the external radio and the system time maintained by NTP. The radio synchronizes reference time and frequency to standard time via radio, satellite or modem. As the transmission means may not always be reliable, most radios continue to provide clock updates for some time after signal loss using an internal reference oscillator. In such cases the radio may or may not reveal the time since last synchronized and/or the estimated time error.</p>
+ <p>All three timescales run <i>only</i> in Coordinated Universal Time (UTC), 24-hour format, and are not adjusted for local timezone or standard/daylight time. The local timezone, standard/daylight indicator and year, if provided, are ignored. However, it is important to determine whether a leap second is to be inserted in the UTC timescale in the near future so NTP can insert it in the system timescale at the appropriate epoch.</p>
+ <p>The NTP clock driver synchronizes the system time and frequency to the radio via serial or parallel port, PPS signal or other means. The driver routinely checks the radio timecode string or status indicators to determine whether it is operating correctly or not. If it is, the driver decodes the radio timecode in days, hours, minutes, seconds and nanoseconds and provides these data with the NTP receive timestamp corresponding to the on-time epoch of the timecode. The driver interface computes the difference between the timecode time and NTP timestamp and saves the difference in a circular buffer for later processing. Once each poll interval, usually 64 s, the driver provides ancillary data including leap bits and last reference time to the interface. The interface processes the circular buffer using a median/trimmed mean algorithm to extract the best estimate and provides this and the ancillary data to the clock filter as with ordinary NTP peers.</p>
+ <p>The audio drivers are designed to look like a typical external radio in that the reference oscillator is derived from the audio codec oscillator and separate from the system clock oscillator. In the WWV and IRIG drivers, the codec oscillator is disciplined in frequency to the standard timescale via radio or local sources and can be assumed to have the same reliability and accuracy as an external radio. In these cases the driver continues to provide updates to the clock filter even if the WWV or IRIG signals are lost. However, the interface is provided the last reference time when the signals were received and increases the dispersion as expected with an ordinary peer.</p>
+ <p>The best way to understand how the clock drivers work is to study the <tt>ntp_refclock.c</tt> module and one of the drivers already implemented, such as <tt>refclock_wwvb.c</tt>. Routines <tt>refclock_transmit()</tt> and <tt>refclock_receive()</tt> maintain the peer variables in a state analogous to a network peer and pass received data on through the clock filters. Routines <tt>refclock_peer()</tt> and <tt>refclock_unpeer()</tt> initialize and terminate reference clock associations, should this ever be necessary. A set of utility routines is included to open serial devices, process sample data, edit input lines to extract embedded timestamps and to perform various debugging functions.</p>
+ <p>The main interface used by these routines is the <tt>refclockproc</tt> structure, which contains for most drivers the decimal equivalents of the year, day, month, hour, second and nanosecond decoded from the radio timecode. Additional information includes the receive timestamp, reference timestamp, exception reports, statistics tallies, etc. The support routines are passed a pointer to the <tt>peer</tt> structure, which is used for all peer-specific processing and contains a pointer to the <tt>refclockproc</tt> structure, which in turn contains a pointer to the unit structure, if used. For legacy purposes, a table <tt>typeunit[type][unit]</tt> contains the peer structure pointer for each configured clock type and unit. This structure should not be used for new implementations.</p>
+ <p>The reference clock interface supports auxiliary functions to support in-stream timestamping, pulse-per-second (PPS) interfacing and precision time kernel support. In most cases the drivers do not need to be aware of them, since they are detected at autoconfigure time and loaded automatically when the device is opened. These include the <tt>tty_clk</tt> STREAMS module and <tt>ppsapi</tt> PPS interface described in the <a href="ldisc.html">Line Disciplines and Streams Modules</a> page. The <tt>tty_clk</tt> module reduces latency errors due to the operating system and serial port code in slower systems. The <tt>ppsapi</tt> PPS interface replaces the <tt>ppsclock</tt> STREAMS module and is expected to become the IETF standard cross-platform interface for PPS signals. In either case, the PPS signal can be connected via a level converter/pulse generator described in the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page.</p>
+ <p>Radio and modem reference clocks by convention have addresses in the form <tt>127.127.<i>t</i>.<i>u</i></tt>, where <i>t</i> is the clock type and <i>u</i> in the range 0-3 is used to distinguish multiple instances of clocks of the same type. Most clocks require a serial or parallel port or special bus peripheral. The particular device is normally specified by adding a soft link <tt>/dev/device<i>d</i>d</tt> to the particular hardware device involved, where <tt><i>d</i></tt> corresponds to the unit number.</p>
+ <p>By convention, reference clock drivers are named in the form <tt>refclock_<i>xxxx</i>.c</tt>, where <i>xxxx</i> is a unique string. Each driver is assigned a unique type number, long-form driver name, short-form driver name and device name. The existing assignments are in the <a href="refclock.html">Reference Clock Drivers</a> page and its dependencies. All drivers supported by the particular hardware and operating system are automatically detected in the autoconfigure phase and conditionally compiled. They are configured when the daemon is started according to the configuration file, as described in the <a href="config.html">Configuration Options</a> page.</p>
+ <p>The standard clock driver interface includes a set of common support routines some of which do such things as start and stop the device, open the serial port, and establish special functions such as PPS signal support. Other routines read and write data to the device and process time values. Most drivers need only a little customizing code to, for instance, transform idiosyncratic timecode formats to standard form, poll the device as necessary, and handle exception conditions. A standard interface is available for remote debugging and monitoring programs, such as <tt>ntpq</tt> and <tt>ntpdc</tt>, as well as the <tt>filegen</tt> facility, which can be used to record device status on a continuous basis.</p>
+ <p>The general organization of a typical clock driver includes a receive-interrupt routine to read a timecode from the I/O buffer and convert to internal format, generally in days, hours, minutes, seconds and fraction. Some timecode formats include provisions for leap-second warning and determine the clock hardware and software health. The interrupt routine then calls <tt>refclock_process()</tt> with these data and the timestamp captured at the on-time character of the timecode. This routine saves each sample as received in a circular buffer, which can store from a few up to 60 samples, in cases where the timecodes arrive one per second.</p>
+ <p>The <tt>refclock_transmit()</tt> routine in the interface is called by the system at intervals defined by the poll interval in the peer structure, generally 64 s. This routine in turn calls the transmit poll routine in the driver. In the intended design, the driver calls the <tt>refclock_receive()</tt> to process the offset samples that have accumulated since the last poll and produce the final offset and variance. The samples are processed by recursively discarding median outlyers until about 60 percent of samples remain, then averaging the surviving samples. When a reference clock must be explicitly polled to produce a timecode, the driver can reset the poll interval so that the poll routine is called a specified number of times at 1-s intervals.</p>
+ <p>The interface code and this documentation have been developed over some time and required not a little hard work converting old drivers, etc. Should you find success writing a driver for a new radio or modem service, please consider contributing it to the common good. Send the driver file itself and patches for the other files to Dave Mills (mills@udel.edu).</p>
+ <h4>Conventions, Fudge Factors and Flags</h4>
+ <p>Most drivers support manual or automatic calibration for systematic offset bias using values encoded in the <tt>fudge</tt> configuration command. By convention, the <tt>time1</tt> value defines the calibration offset in seconds. For those drivers that support statistics collection using the <tt>filegen</tt> utility and the <tt>clockstats</tt> file, the <tt>flag4</tt> switch enables the utility. When a PPS signal is available, a special automatic calibration facility is provided. If the <tt>flag1</tt> switch is set and the PPS signal is actively disciplining the system time, the calibration value is automatically adjusted to maintain a residual offset of zero. Should the PPS signal or the prefer peer fail, the adjustment is frozen and the remaining drivers continue to discipline the system clock with a minimum of residual error.</p>
+ <h4 id="file">Files Which Need to be Changed</h4>
+ <p>A new reference clock implementation needs to supply, in addition to the driver itself, several changes to existing files.</p>
+ <dl>
+ <dt><tt>./include/ntp.h</tt>
+ <dd>The reference clock type defines are used in many places. Each driver is assigned a unique type number. Unused numbers are clearly marked in the list. A unique <tt>REFCLK_<i>xxxx</i></tt> identification code should be recorded in the list opposite its assigned type number.
+ <dt><tt>./libntp/clocktypes.c</tt>
+ <dd>The <tt>./libntp/clktype</tt> array is used by certain display functions. A unique short-form name of the driver should be entered together with its assigned identification code.
+ <dt><tt>./ntpd/ntp_control.c</tt>
+ <dd>The <tt>clocktypes</tt> array is used for certain control message displays functions. It should be initialized with the reference clock class assigned to the driver, as per the NTP specification RFC-1305. See the <tt>./include/ntp_control.h</tt> header file for the assigned classes.
+ <dt><tt>./ntpd/refclock_conf.c</tt>
+ <dd>This file contains a list of external structure definitions which are conditionally defined. A new set of entries should be installed similar to those already in the table. The <tt>refclock_conf</tt> array is a set of pointers to transfer vectors in the individual drivers. The external name of the transfer vector should be initialized in correspondence with the type number.
+ <dt><tt>./configure.in</tt>
+ <dd>This is a configuration file used by the autoconfigure scheme. Add lines similar to the following:
+ <pre>
+ AC_MSG_CHECKING(FOO clock_description)
+ AC_ARG_ENABLE(FOO,
+ AC_HELP_STRING([--enable-FOO], [x clock_description]),
+ [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
+ if test &quot;$ntp_ok&quot; = &quot;yes&quot;; then
+ ntp_refclock=yes
+ AC_DEFINE(CLOCK_FOO, 1, [Foo clock?])
+ fi
+ AC_MSG_RESULT($ntp_ok)
+</pre>
+ <dd>(Note that <tt>$ntp_eac</tt> is the value from <tt>--{dis,en}able-all-clocks</tt> for non-PARSE clocks and <tt>$ntp_eacp</tt> is the value from <tt>--{dis,en}able-parse-clocks</tt> for PARSE clocks. See the documentation on the autoconf and automake tools from the GNU distributions.)
+ <dt><tt>./ntpd/Makefile.am</tt>
+ <dd>This is the makefile prototype used by the autoconfigure scheme. Add the driver file name to the entries already in the <tt>ntpd_SOURCES</tt> list.
+ <dd>Do the following sequence of commands:
+ <pre>
+ autoreconf
+ configure
+</pre>
+ <dd>or simply run <tt>make</tt>, which will do this command sequence automatically.
+ </dl>
+ <h4 id="intf">Interface Routine Overview</h4>
+ <dl>
+ <dt><tt>refclock_newpeer</tt> - initialize and start a reference clock
+ <dd>This routine allocates and initializes the interface structure which supports a reference clock in the form of an ordinary NTP peer. A driver-specific support routine completes the initialization, if used. Default peer variables which identify the clock and establish its reference ID and stratum are set here. It returns one if success and zero if the clock address is invalid or already running, insufficient resources are available or the driver declares a bum rap.
+ <dt><tt>refclock_unpeer</tt> - shut down a clock
+ <dd>This routine is used to shut down a clock and return its resources to the system.
+ <dt><tt>refclock_transmit</tt> - simulate the transmit procedure
+ <dd>This routine implements the NTP transmit procedure for a reference clock. This provides a mechanism to call the driver at the NTP poll interval, as well as provides a reachability mechanism to detect a broken radio or other madness.
+ <dt><tt>refclock_sample</tt> - process a pile of samples from the clock
+ <dd>This routine converts the timecode in the form days, hours, minutes, seconds, milliseconds/microseconds to internal timestamp format. It then calculates the difference from the receive timestamp and assembles the samples in a shift register. It implements a recursive median filter to suppress spikes in the data, as well as determine a rough dispersion estimate. A configuration constant time adjustment <tt>fudgetime1</tt> can be added to the final offset to compensate for various systematic errors. The routine returns one if success and zero if failure due to invalid timecode data or very noisy offsets.
+ <dd>Note that no provision is included for the year, as provided by some (but not all) radio clocks. Ordinarily, the year is implicit in the Unix file system and hardware/software clock support, so this is ordinarily not a problem. Nevertheless, the absence of the year should be considered more a bug than a feature and may be supported in future.
+ <dt><tt>refclock_receive</tt> - simulate the receive and packet procedures
+ <dd>This routine simulates the NTP receive and packet procedures for a reference clock. This provides a mechanism in which the ordinary NTP filter, selection and combining algorithms can be used to suppress misbehaving radios and to mitigate between them when more than one is available for backup.
+ <dt><tt>refclock_gtlin</tt> - groom next input line and extract timestamp
+ <dd>This routine processes the timecode received from the clock and removes the parity bit and control characters. If a timestamp is present in the timecode, as produced by the <tt>tty_clk</tt> line discipline/streams module, it returns that as the timestamp; otherwise, it returns the buffer timestamp. The routine return code is the number of characters in the line.
+ <dt><tt>refclock_open</tt> - open serial port for reference clock
+ <dd>This routine opens a serial port for I/O and sets default options. It returns the file descriptor if success and zero if failure.
+ <dt><tt>refclock_ioctl</tt> - set serial port control functions
+ <dd>This routine attempts to hide the internal, system-specific details of serial ports. It can handle POSIX (<tt>termios</tt>), SYSV (<tt>termio</tt>) and BSD (<tt>sgtty</tt>) interfaces with varying degrees of success. The routine sets up the <tt>tty_clk, chu_clk</tt> and <tt>ppsclock</tt> streams module/line discipline, if compiled in the daemon and requested in the call. The routine returns one if success and zero if failure.
+ <dt><tt>refclock_control</tt> - set and/or return clock values
+ <dd>This routine is used mainly for debugging. It returns designated values from the interface structure that can be displayed using ntpdc and the clockstat command. It can also be used to initialize configuration variables, such as <tt>fudgetimes, fudgevalues,</tt> reference ID and stratum.
+ <dt><tt>refclock_buginfo</tt> - return debugging info
+ <dd>This routine is used mainly for debugging. It returns designated values from the interface structure that can be displayed using <tt>ntpdc</tt> and the <tt>clkbug</tt> command.
+ </dl>
+ <hr>
+ <center>
+ <img src="pic/pogo1a.gif" alt="gif"></center>
+ <br>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/icons/home.gif b/contrib/ntp/html/icons/home.gif
new file mode 100644
index 000000000000..e1812988fdb6
--- /dev/null
+++ b/contrib/ntp/html/icons/home.gif
Binary files differ
diff --git a/contrib/ntp/html/icons/mail2.gif b/contrib/ntp/html/icons/mail2.gif
new file mode 100644
index 000000000000..21bc1c49ea5f
--- /dev/null
+++ b/contrib/ntp/html/icons/mail2.gif
Binary files differ
diff --git a/contrib/ntp/html/index.html b/contrib/ntp/html/index.html
new file mode 100644
index 000000000000..57fd25a24fe5
--- /dev/null
+++ b/contrib/ntp/html/index.html
@@ -0,0 +1,101 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>The Network Time Protocol (NTP) Distribution</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>The Network Time Protocol (NTP) Distribution</h3>
+ <img src="pic/barnstable.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html"><i>P.T. Bridgeport Bear</i>; from <i>Pogo</i>, Walt Kelly</a>
+ <p>Pleased to meet you.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:12 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ <br clear="left">
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#intro">Introduction</a>
+ <li class="inline"><a href="#build">Building and Installing NTP</a>
+ <li class="inline"><a href="#conf">Configuring Clients and Servers</a>
+ <li class="inline"><a href="#conf">Configuring Clients and Servers</a>
+ <li class="inline"><a href="#prog">Program Manual Pages</a>
+ <li class="inline"><a href="#docs">Supporting Documentation</a>
+ <li class="inline"><a href="#back">Background Information</a>
+ <li class="inline"><a href="#app">Application Notes</a>
+ </ul>
+ <hr>
+ <h4 id="intro">Introduction</h4>
+ <p>Note: The software contained in this distribution is available without charge under the conditions set forth in the <a href="copyright.html">Copyright Notice</a>.</p>
+ <p>The Network Time Protocol (NTP) is used to synchronize the time of a computer client or server to another server or reference time source, such as a radio or satellite receiver or modem. It provides accuracies typically within a millisecond on LANs and up to a few tens of milliseconds on WANs relative to Coordinated Universal Time (UTC) via a Global Positioning Service (GPS) receiver, for example. Typical NTP configurations utilize multiple redundant servers and diverse network paths in order to achieve high accuracy and reliability.</p>
+ <p>This software release implements NTP Version 4 (NTPv4), but is in general backwards compatible with previous versions except NTP Version 1, support for which is no longer viable. NTPv4 includes support for both symmetric key and public key cryptography to prevent accidental or malicious protocol attacks, as well as automatic server discovery using IP multicast means. This release includes full support for the IPv6 address family, where the operating system supports it, as well as the default IPv4 address family. Either or both families can be used at the same time on the same machine.</p>
+ <p>Background information on computer network time synchronization can be found on the <a href="http://www.eecis.udel.edu/%7emills/exec.html">Executive Summary - Computer Network Time Synchronization</a> page. Discussion on protocol conformance issues and interoperability with previous NTP versions can be found on the <a href="http://www.eecis.udel.edu/%7emills/biblio.html">Protocol Conformance Statement</a> page. Discussion on how NTP reckons the time can be found on the <a href="http://www.eecis.udel.edu/%7emills/leap.html">NTP Timescale and Leap Seconds</a> page. Background information, bibliography and briefing slides suitable for presentations can be found on the <a href="http://www.eecis.udel.edu/%7emills/ntp.html">Network Time Synchronization Project</a> page. Additional information can be found at the NTP web site <a href="http://www.ntp.org">www.ntp.org</a>. Please send bug reports to <a href="mailto:bugs@mail.ntp.org">&lt;bugs@mail.ntp.org&gt;</a>.</p>
+ <h4 id="build">Building and Installing NTP</h4>
+ <p>NTP supports Unix and Windows (NT4 and 2000) systems. The <a href="build.html">Building and Installing the Distribution</a> page presents an overview of the procedures for compiling the distribution and installing it on a typical client or server. The build procedures inspect the system hardware and software environment and automatically select the appropriate options for that environment. While these procedures work with most computers and operating systems marketed today, exceptions requiring manual intervention do exist, as documented on the <a href="config.html">Configuration Options</a> and <a href="release.html">Release Notes</a> pages.</p>
+ <p>Bringing up a NTP primary server requires a radio or satellite receiver or modem. The distribution includes hardware drivers for some forty radio and satellite clocks and modem services. A list of supported drivers is given on the <a href="refclock.html">Reference Clock Drivers</a> page. It is also possible to use an otherwise undisciplined machine as a primary or backup server, as described on the <a href="drivers/driver1.html">Undisciplined Local Clock</a> page. For most popular workstations marketed by Sun, Silicon Graphics and Hewlett Packard, as well as widely available Unix clones such as FreeBSD and Linux, the automatic build procedures select all drivers that run on the target machine. While this increases the size of the executable binary somewhat, individual drivers can be included or excluded using the configure utility documented in the Configuration Options page.</p>
+ <p>Some programs included in this distribution use cryptographic algorithms to verify authenticity and credentials. Where local security policy permits relatively weak symmetric key cryptography, the required software is included in this distribution. However, where local policy requires stronger public key cryptography, additional software not in this distribution is required. This distribution uses the OpenSSL library available from <a href="http://www.openssl.org">http://www.openssl.org</a>. This library is also used by the Secure Shell facility, so is often already installed on Unix workstations and servers. It includes support for most message digest and digital signature algorithms used in the industry, as well as X.509 certificate generation, signing and verification.</p>
+ <p>While public key cryptography is optional but highly recommended for all NTP operations, it is required for the NTPv4 Autokey protocol described on the <a href="http://www.eecis.udel.edu/%7emills/autokey.html">Autonomous Authentication</a> page and is an integral component of the generic automatic configuration scheme described on the <a href="http://www.eecis.udel.edu/%7emills/autocfg.html">Autonomous Configuration</a> page. In addition, access can be restricted in various ways described on the <a href="accopt.html">Access Control Options</a> page.</p>
+ <h4 id="conf">Configuring Clients and Servers</h4>
+ <p>NTP is by its very nature a complex distributed network application and can be configured and used for a great many widely divergent timekeeping scenarios. The documentation presented on these pages attempts to cover the entire suite of configuration, operation and maintenance facilities which this distribution supports. However, most applications will need only a few of these facilities. If this is the case, the <a href="quick.html">Quick Start</a> page may be useful to get a simple workstation on the air with an existing server.</p>
+ <p>However, in order to participate in the existing NTP synchronization subnet and obtain accurate, reliable time, it is usually necessary to construct an appropriate configuration file, commonly called <tt>ntp.conf</tt>, which establishes the servers and/or external receivers or modems to be used by this particular machine. Directions for constructing this file are in the <a href="notes.html">Notes on Configuring NTP and Setting up a NTP Subnet</a> page. However, in many common cases involving simple network topologies and workstations, the configuration data can be specified entirely on the command line for the <a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a>.</p>
+ <p>The most important factor in providing accurate, reliable time is the selection of modes and servers to be used in the configuration file. A discussion on the available modes is on the <a href="assoc.html">Association Management</a> page. NTP support for one or more computers is normally engineered as part of the existing public NTP synchronization subnet. The public subnet consists of a multiply redundant hierarchy of servers and clients, with each level in the hierarchy identified by stratum number. Primary servers operate at stratum one and provide synchronization to secondary servers operating at stratum two and so on to higher strata. In this hierarchy, clients are simply servers that have no dependents.</p>
+ <p>Configuring a corporate or campus NTP subnet can be an engineering challenge. NTP contains many features designed to survive system and network failures, software bugs, clock errors and hacker attacks. Surviving these hazards requires intricate design of the timekeeping network using good principles of server redundancy and path diversity. The Manycast mode, new to NTPv4, is designed to track the current server and network states and adjust the client/server configuration for the best available accuracy and reliability. More information on the Manycast mode is on the <a href="authopt.html">Athentication Options</a> and <a href="manyopt.html">Automatic NTP Configuration Options</a> pages.</p>
+ <p>The NTP subnet in early 2003 includes well over a hundred public primary (stratum 1) servers synchronized directly to UTC by radio, satellite or modem and located in every continent of the globe, including Antarctica. Normally, client workstations and servers with a relatively small number of clients do not synchronize to primary servers. There are well over a hundred public secondary (stratum 2) servers synchronized to the primary servers and providing synchronization to a total well over 100,000 clients and servers in the Internet. The current lists are maintained on the <a href="http://www.eecis.udel.edu/%7emills/ntp/index.html">Information on Time and Frequency Services</a> page, which is updated frequently. There are thousands upon thousands of private primary and secondary servers not normally available to the public, many hiding behind firewalls. Clients are strongly discouraged against using these servers, since they sometimes hide in little ghettos behind dinky links to the outside world and unwanted traffic can bring up expensive ISDN lines, causing much grief and frustration. There are defensive means described on the Access Control Options page, including the Kiss-of-Death packet.</p>
+ <h4 id="prob">Resolving Problems</h4>
+ <p>Like other things Internet, the NTP synchronization subnets tend to be large and devilishly intricate, with many opportunities for misconfiguration and network problems. The NTP engineering model is specifically designed to help isolate and repair such problems using an integrated management protocol, together with a suite of monitoring and debugging tools. There is an optional statistics data recording facility which can be used to record normal and aberrant operation, log problems to the system log facility, and retain records of client access. The <a href="debug.html">NTP Debugging Techniques</a> and <a href="hints.html">Hints and Kinks</a> pages contain useful information for identifying problems and devising solutions. In extreme cases, problems can be detected through the use of the <a href="ntpdsim.html"><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</a> included in this software distribution.</p>
+ <p>Users are requested to report bugs, offer suggestions and contribute additions to this distribution. The <a href="patches.html">Patching Procedures</a> page suggests procedures which greatly simplify distribution updates, while the <a href="porting.html">Porting Hints</a> page suggest ways to make porting this code to new hardware and operating systems easier. Additional information on reference clock driver construction and debugging can be found in the <a href="rdebug.html">Debugging Hints for Reference Clock Drivers</a> page.</p>
+ <h4 id="prog">Program Manual Pages</h4>
+ <ul>
+ <li class="inline"><a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a>
+ <li class="inline"><a href="ntpq.html"><tt>ntpq</tt> - standard NTP query program</a>
+ <li class="inline"><a href="ntpdc.html"><tt>ntpdc</tt> - special NTP query program</a>
+ <li class="inline"><a href="ntpdate.html"><tt>ntpdate</tt> - set the date and time via NTP</a>
+ <li class="inline"><a href="ntptrace.html"><tt>ntptrace</tt> - trace a chain of NTP servers back to the primary source</a>
+ <li class="inline"><a href="tickadj.html"><tt>tickadj</tt> - set time-related kernel variables</a>
+ <li class="inline"><a href="ntptime.html"><tt>ntptime</tt> - read kernel time variables</a>
+ <li class="inline"><a href="keygen.html"><tt>ntp-genkeys</tt> - generate public and private keys</a>
+ <li class="inline"><a href="ntpdsim.html"><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</a>
+ </ul>
+ <h4 id="docs">Supporting Documentation</h4>
+ <ul>
+ <li class="inline"><a href="copyright.html">Copyright Notice</a>
+ <li class="inline"><a href="notes.html">Notes on Configuring NTP and Setting up a NTP Subnet</a>
+ <li class="inline"><a href="release.html">NTP Version 4 Release Notes</a>
+ <li class="inline"><a href="build.html">Building and Installing the Distribution</a>
+ <li class="inline"><a href="config.html">Configuration Options</a>
+ <li class="inline"><a href="refclock.html">Reference Clock Drivers</a>
+ <li class="inline"><a href="debug.html">NTP Debugging Techniques</a>
+ <li class="inline"><a href="rdebug.html">Debugging Reference Clock Drivers</a>
+ <li class="inline"><a href="msyslog.html"><tt>ntpd</tt> System Log Messages</a>
+ <li class="inline"><a href="patches.html">Patching Procedures</a>
+ <li class="inline"><a href="hints.html">Hints and Kinks</a>
+ <li class="inline"><a href="porting.html">Porting Hints</a>
+ </ul>
+ <h4 id="back">Background Information</h4>
+ <ul>
+ <li class="inline"><a href="http://www.eecis.udel.edu/%7emills/ntp.html">NTP Project and Reference Library</a>
+ <li class="inline"><a href="http://www.eecis.udel.edu/%7emills/exec.html">Executive Summary - Computer Network Time Synchronization</a>
+ <li class="inline"><a href="http://www.eecis.udel.edu/%7emills/y2k.html">The Network Time Protocol Timescale and Era Numbering</a>
+ <li class="inline"><a href="http://www.eecis.udel.edu/%7emills/leap.html">NTP Timescale and Leap Seconds</a>
+ <li class="inline"><a href="http://www.eecis.udel.edu/%7emills/biblio.html">Protocol Conformance Statement</a>
+ </ul>
+ <h4 id="app">Application Notes</h4>
+ <ul>
+ <li class="inline"><a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a>
+ <li class="inline"><a href="assoc.html">Association Management</a>
+ <li class="inline"><a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a>
+ <li class="inline"><a href="measure.html">Time and Time Interval Measurement with Application to Computer and Network Performance Evaluation</a>
+ <li class="inline"><a href="kern.html">Kernel Model for Precision Timekeeping</a>
+ </ul>
+ <hr>
+ <div align="center">
+ <img src="pic/pogo1a.gif" alt="gif"></div>
+ <br>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/kern.html b/contrib/ntp/html/kern.html
new file mode 100644
index 000000000000..9a8a392c7697
--- /dev/null
+++ b/contrib/ntp/html/kern.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Kernel Model for Precision Timekeeping</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Kernel Model for Precision Timekeeping</h3>
+ <p><img src="pic/alice61.gif" alt="gif" align="left"> <a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a></p>
+ <p>Alice touched the kernel and it exploded.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">20:26</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="257">Monday, December 02, 2002</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links11.txt"></script>
+ <hr>
+ <p>The technical report [2], which is a major revision and update of RFC-1589 [3], describes an engineering model for a precision time-of-day function for a generic operating system. The model is based on the principles of disciplined oscillators using phase-lock loops (PLL) and frequency-lock loops (FLL) often found in the engineering literature. The model uses a hybrid PLL/FLL discipline algorithm implemented in the kernel. The algorithm, which is very similar to the algorithm implemented in the NTP daemon, provides automatic time and frequency steering with update intervals from a few seconds to tens of minutes.</p>
+ <p>The hybrid PLL/FLL code described in [2] is included in Solaris and Digital/Compaq/HP Tru64. It includes two system calls <tt>ntp_gettime()</tt> and <tt>ntp_adjtime()</tt> and can discipline the system clock with microsecond resolution. However, newer hardware and kernels with the same system calls can discipline the clock with nanosecond resolution. The new code described in [1] is available for Linux, FreeBSD, SunOS and Tru64; however, only the Linux and FreeBSD implementations, which do not include licensed code, are readily available. The software and documentation, including a simulator used to verify correct behavior, but not involving licensed code, is available at <a href="ftp://ftp.udel.edu/pub/ntp/software/nanokernel.tar.gz">nanokernel.tar.gz</a>.</p>
+ <p>The model also changes the way the system clock is adjusted in time and frequency relative to an external precision timing source, such as described in the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. The NTP software daemon uses the PPS to provide synchronization limited in principle only by the accuracy and stability of the external timing source.</p>
+ <h4>References</h4>
+ <ol>
+ <li>Mills, D.L., and P.-H. Kamp. The nanokernel. <i>Proc. Precision Time and Time Interval (PTTI) Applications and Planning Meeting</i> (Reston VA, November 2000). Paper: <a href="http://www.eecis.udel.edu/%7emills/database/papers/nano/nano2.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/papers/nano/nano2.pdf">PDF</a>, Slides: <a href="http://www.eecis.udel.edu/%7emills/database/brief/nano/nano.html">HTML</a> | <a href="http://www.eecis.udel.edu/%7emills/database/brief/nano/nano.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/brief/nano/nano.pdf">PDF</a> | <a href="http://www.eecis.udel.edu/%7emills/database/brief/nano/nano.ppt">PowerPoint</a>
+ <li>Mills, D.L. Unix kernel modifications for precision time synchronization. Electrical Engineering Department Report 94-10-1, University of Delaware, October 1994, 24 pp. Abstract: <a href="http://www.eecis.udel.edu/%7emills/database/reports/kern/kerna.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/reports/kern/kerna.pdf">PDF</a>, Body: <a href="http://www.eecis.udel.edu/%7emills/database/reports/kern/kernb.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/reports/kern/kernb.pdf">PDF</a>
+ <li>Mills, D.L. A kernel model for precision timekeeping. Network Working Group Report RFC-1589, University of Delaware, March 1994. 31 pp. <a href="http://www.eecis.udel.edu/%7emills/database/rfc/rfc1589.txt">ASCII</a>
+ </ol>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/keygen.html b/contrib/ntp/html/keygen.html
new file mode 100644
index 000000000000..fcdb8314012a
--- /dev/null
+++ b/contrib/ntp/html/keygen.html
@@ -0,0 +1,112 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>ntp-keygen - generate public and private keys</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3><tt>ntp-keygen</tt> - generate public and private keys</h3>
+ <img src="pic/alice23.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>Alice holds the key.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:13 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links9.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#synop">Synopsis</a>
+ <li class="inline"><a href="#descrip">Description</a>
+ <li class="inline"><a href="#run">Running the program</a>
+ <li class="inline"><a href="#trust">Trusted Hosts and Groups</a>
+ <li class="inline"><a href="#idexp">Identity Schemes</a>
+ <li class="inline"><a href="#exam">Example</a>
+ <li class="inline"><a href="#cmd">Command Line Options</a>
+ <li class="inline"><a href="#rand">Random Seed File</a>
+ <li class="inline"><a href="#fmt">Cryptographic Data FIles</a>
+ <li class="inline"><a href="#bug">Bugs</a>
+ </ul>
+ <hr>
+ <h4 id="synop">Synopsis</h4>
+ <p id="intro"><tt>ntp-keygen [ -deGgHIMnPT ] [ -c [RSA-MD2 | RSA-MD5 | RSA-SHA | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ] ] [ -i <i>name</i> ] [ -p <i>password</i> ] [ -S [ RSA | DSA ] ] [ -s <i>name</i> ] [ -v <i>nkeys</i> ]</tt></p>
+ <h4 id="descrip">Description</h4>
+ <p>This program generates cryptographic data files used by the NTPv4 authentication and identification schemes. It generates MD5 key files used in symmetric key cryptography. In addition, if the OpenSSL software library has been installed, it generates keys, certificate and identity files used in public key cryptography. These files are used for cookie encryption, digital signature and challenge/response identification algorithms compatible with the Internet standard security infrastructure.</p>
+ <p>All files are in PEM-encoded printable ASCII format, so they can be embedded as MIME attachments in mail to other sites and certificate authorities. By default, files are not encrypted. The <tt>-p <i>password</i></tt> option specifies the write password and <tt>-q <i>password</i></tt> option the read password for previously encrypted files. The <tt>ntp-keygen</tt> program prompts for the password if it reads an encrypted file and the password is missing or incorrect. If an encrypted file is read successfully and no write password is specified, the read password is used as the write password by default.</p>
+ <p>The <tt>ntpd</tt> configuration command <tt>crypto pw <i>password</i></tt> specifies the read password for previously encrypted files. The daemon expires on the spot if the password is missing or incorrect. For convenience, if a file has been previously encrypted, the default read password is the name of the host running the program. If the previous write password is specified as the host name, these files can be read by that host with no explicit password.</p>
+ <p>File names begin with the prefix <tt>ntpkey_</tt> and end with the postfix <tt><i>_hostname.filestamp</i></tt>, where <tt><i>hostname</i></tt> is the owner name, usually the string returned by the Unix <tt>gethostname()</tt> routine, and <tt><i>filestamp</i></tt> is the NTP seconds when the file was generated, in decimal digits. This both guarantees uniqueness and simplifies maintenance procedures, since all files can be quickly removed by a <tt>rm ntpkey*</tt> command or all files generated at a specific time can be removed by a <tt>rm *<i>filestamp</i></tt> command. To further reduce the risk of misconfiguration, the first two lines of a file contain the file name and generation date and time as comments.</p>
+ <p>All files are installed by default in the keys directory <tt>/usr/local/etc</tt>, which is normally in a shared filesystem in NFS-mounted networks. The actual location of the keys directory and each file can be overridden by configuration commands, but this is not recommended. Normally, the files for each host are generated by that host and used only by that host, although exceptions exist as noted later on this page.</p>
+ <p>Normally, files containing private values, including the host key, sign key and identification parameters, are permitted root read/write-only; while others containing public values are permitted world readable. Alternatively, files containing private values can be encrypted and these files permitted world readable, which simplifies maintenance in shared file systems. Since uniqueness is insured by the hostname and file name extensions, the files for a NFS server and dependent clients can all be installed in the same shared directory.</p>
+ <p>The recommended practice is to keep the file name extensions when installing a file and to install a soft link from the generic names specified elsewhere on this page to the generated files. This allows new file generations to be activated simply by changing the link. If a link is present, <tt>ntpd</tt> follows it to the file name to extract the filestamp. If a link is not present, <tt>ntpd</tt> extracts the filestamp from the file itself. This allows clients to verify that the file and generation times are always current. The <tt>ntp-keygen</tt> program uses the same timestamp extension for all files generated at one time, so each generation is distinct and can be readily recognized in monitoring data.</p>
+ <h4 id="run">Running the program</h4>
+ <p>The safest way to run the <tt>ntp-keygen</tt> program is logged in directly as root. The recommended procedure is change to the keys directory, usually <tt>/ust/local/etc</tt>, then run the program. When run for the first time, or if all <tt>ntpkey</tt> files have been removed, the program generates a RSA host key file and matching RSA-MD5 certificate file, which is all that is necessary in many cases. The program also generates soft links from the generic names to the respective files. If run again, the program uses the same host key file, but generates a new certificate file and link.</p>
+ <p>The host key is used to encrypt the cookie when required and so must be RSA type. By default, the host key is also the sign key used to encrypt signatures. When necessary, a different sign key can be specified and this can be either RSA or DSA type. By default, the message digest type is MD5, but any combination of sign key type and message digest type supported by the OpenSSL library can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2 and RIPE160 message digest algorithms. However, the scheme specified in the certificate must be compatible with the sign key. Certificates using any digest algorithm are compatible with RSA sign keys; however, only SHA and SHA1 certificates are compatible with DSA sign keys.</p>
+ <p>Private/public key files and certificates are compatible with other OpenSSL applications and very likely other libraries as well. Certificates or certificate requests derived from them should be compatible with extant industry practice, although some users might find the interpretation of X509v3 extension fields somewhat liberal. However, the identification parameter files, although encoded as the other files, are probably not compatible with anything other than Autokey.</p>
+ <p>Running the program as other than root and using the Unix <tt>su</tt> command to assume root may not work properly, since by default the OpenSSL library looks for the random seed file <tt>.rnd</tt> in the user home directory. However, there should be only one <tt>.rnd</tt>, most conveniently in the root directory, so it is convenient to define the <tt>$RANDFILE</tt> environment variable used by the OpenSSL library as the path to <tt>/.rnd</tt>.</p>
+ <p>Installing the keys as root might not work in NFS-mounted shared file systems, as NFS clients may not be able to write to the shared keys directory, even as root. In this case, NFS clients can specify the files in another directory such as <tt>/etc</tt> using the <tt>keysdir</tt> command. There is no need for one client to read the keys and certificates of other clients or servers, as these data are obtained automatically by the Autokey protocol.</p>
+ <p>Ordinarily, cryptographic files are generated by the host that uses them, but it is possible for a trusted agent (TA) to generate these files for other hosts; however, in such cases files should always be encrypted. The subject name and trusted name default to the hostname of the host generating the files, but can be changed by command line options. It is convenient to designate the owner name and trusted name as the subject and issuer fields, respectively, of the certificate. The owner name is also used for the host and sign key files, while the trusted name is used for the identity files.</p>
+ <h4 id="trust">Trusted Hosts and Groups</h4>
+ <p>Each cryptographic configuration involves selection of a signature scheme and identification scheme, called a cryptotype, as explained in the <a href="authopt.html">Authentication Options</a> page. The default cryptotype uses RSA encryption, MD5 message digest and TC identification. First, configure a NTP subnet including one or more low-stratum trusted hosts from which all other hosts derive synchronization directly or indirectly. Trusted hosts have trusted certificates; all other hosts have nontrusted certificates. These hosts will automatically and dynamically build authoritative certificate trails to one or more trusted hosts. A trusted group is the set of all hosts that have, directly or indirectly, a certificate trail ending at a trusted host. The trail is defined by static configuration file entries or dynamic means described on the <a href=manyopt.html>Automatic NTP Configuration Options</a> page.</p>
+ <p>On each trusted host as root, change to the keys directory. To insure a fresh fileset, remove all <tt>ntpkey</tt> files. Then run <tt>ntp-keygen -T</tt> to generate keys and a trusted certificate. On all other hosts do the same, but leave off the <tt>-T</tt> flag to generate keys and nontrusted certificates. When complete, start the NTP daemons beginning at the lowest stratum and working up the tree. It may take some time for Autokey to instantiate the certificate trails throughout the subnet, but setting up the environment is completely automatic.</p>
+ <p>If it is necessary to use a different sign key or different digest/signature scheme than the default, run <tt>ntp-keygen</tt> with the <tt>-S</tt><i><tt> type</tt></i> option, where <i><tt>type</tt></i> is either <tt>RSA</tt> or <tt>DSA</tt>. The most often need to do this is when a DSA-signed certificate is used. If it is necessary to use a different certificate scheme than the default, run <tt>ntp-keygen</tt> with the <tt>-c <i>scheme</i></tt> option and selected <i><tt>scheme</tt></i> as needed. If <tt>ntp-keygen</tt> is run again without these options, it generates a new certificate using the same scheme and sign key.</p>
+ <p>After setting up the environment it is advisable to update certificates from time to time, if only to extend the validity interval. Simply run <tt>ntp-keygen</tt> with the same flags as before to generate new certificates using existing keys. However, if the host or sign key is changed, <tt>ntpd</tt> should be restarted. When ntpd is restarted, it loads any new files and restarts the protocol. Other dependent hosts will continue as usual until signatures are refreshed, at which time the protocol is restarted.</p>
+ <h4 id="idexp">Identity Schemes</h4>
+ <p>As mentioned on the Autonomous Authentication page, the default TC identity scheme is vulnerable to a middleman attack. However, there are more secure identity schemes available, including PC, IFF, GQ and MV described on the <a href="http://www.eecis.udel.edu/%7emills/keygen.html">Identification Schemes</a> page. These schemes are based on a TA, one or more trusted hosts and some number of nontrusted hosts. Trusted hosts prove identity using values provided by the TA, while the remaining hosts prove identity using values provided by a trusted host and certificate trails that end on that host. The name of a trusted host is also the name of its sugroup and also the subject and issuer name on its trusted certificate. The TA is not necessarily a trusted host in this sense, but often is.</p>
+ <p>In some schemes there are separate keys for servers and clients. A server can also be a client of another server, but a client can never be a server for another client. In general, trusted hosts and nontrusted hosts that operate as both server and client have parameter files that contain both server and client keys. Hosts that operate only as clients have key files that contain only client keys.</p>
+ <p>The PC scheme supports only one trusted host in the group. On trusted host <i>alice</i> run <tt>ntp-keygen -P -p <i>password</i></tt> to generate the host key file <tt>ntpkey_RSAkey_<i>alice.filestamp</i></tt> and trusted private certificate file <tt>ntpkey_RSA-MD5_cert_<i>alice.filestamp</i></tt>. Copy both files to all group hosts; they replace the files which would be generated in other schemes. On each host <i>bob</i> install a soft link from the generic name <tt>ntpkey_host_<i>bob</i></tt> to the host key file and soft link <tt>ntpkey_cert_<i>bob</i></tt> to the private certificate file. Note the generic links are on <i>bob</i>, but point to files generated by trusted host <i>alice</i>. In this scheme it is not possible to refresh either the keys or certificates without copying them to all other hosts in the group.</p>
+ <p>For the IFF scheme proceed as in the TC scheme to generate keys and certificates for all group hosts, then for every trusted host in the group, generate the IFF&nbsp;parameter file. On trusted host <i>alice</i> run <tt>ntp-keygen -T </tt><tt>-I -p <i>password</i></tt> to produce her parameter file <tt>ntpkey_IFFpar_<i>alice.filestamp</i></tt>, which includes both server and client keys. Copy this file to all group hosts that operate as both servers and clients and install a soft link from the generic <tt>ntpkey_iff_<i>alice</i></tt> to this file. If there are no hosts restricted to operate only as clients, there is nothing further to do. As the IFF scheme is independent of keys and certificates, these files can be refreshed as needed.</p>
+ <p>If a rogue client has the parameter file, it could masquerade as a legitimate server and present a middleman threat. To eliminate this threat, the client keys can be extracted from the parameter file and distributed to all restricted clients. After generating the parameter file, on <i>alice</i> run <tt>ntp-keygen</tt> <tt>-e</tt> and pipe the output to a file or mail program. Copy or mail this file to all restricted clients. On these clients install a soft link from the generic <tt>ntpkey_iff_<i>alice</i></tt> to this file. To further protect the integrity of the keys, each file can be encrypted with a secret password.</p>
+ <p>For the GQ scheme proceed as in the TC scheme to generate keys and certificates for all group hosts, then for every trusted host in the group, generate the IFF parameter file. On trusted host <i>alice</i> run <tt>ntp-keygen -T </tt><tt>-G -p <i>password</i></tt> to produce her parameter file <tt>ntpkey_GQpar_<i>alice.filestamp</i></tt>, which includes both server and client keys. Copy this file to all group hosts and install a soft link from the generic <tt>ntpkey_gq_<i>alice</i></tt> to this file. In addition, on each host <i>bob</i> install a soft link from generic <tt>ntpkey_gq_<i>bob</i></tt> to this file. As the GQ scheme updates the GQ parameters file and certificate at the same time, keys and certificates can be regenerated as needed.</p>
+ <p>For the MV scheme, proceed as in the TC scheme to generate keys and certificates for all group hosts. For illustration assume <i>trish</i> is the TA, <i>alice</i> one of several trusted hosts and <i>bob</i> one of her clients. On TA <i>trish</i> run <tt>ntp-keygen </tt><tt>-V&nbsp;<i>n</i> -p <i>password</i></tt>, where <i>n</i> is the number of revokable keys (typically 5) to produce the parameter file <tt>ntpkeys_MVpar_<i>trish.filestamp </i></tt>and client key files <tt>ntpkeys_MVkey<i>d</i>_<i>trish.filestamp</i></tt> where <i><tt>d</tt></i> is the key number (0 &lt; <i><tt>d</tt></i> &lt; <i>n</i>). Copy the parameter file to <i>alice</i> and install a soft link from the generic <tt>ntpkey_mv_<i>alice</i></tt> to this file. Copy one of the client key files to <i>alice</i> for later distribution to her clients. It doesn't matter which client key file goes to <i>alice</i>, since they all work the same way. <i>Alice</i> copies the client key file to all of her cliens. On client <i>bob</i> install a soft link from generic <tt>ntpkey_mvkey_<i>bob </i></tt>to the client key file. As the MV scheme is independent of keys and certificates, these files can be refreshed as needed.</p>
+ <h4 id="cmd">Command Line Options</h4>
+ <dl>
+ <dt><tt>-c [ RSA-MD2 | RSA-MD5 | RSA-SHA | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ]</tt>
+ <dd>Select certificate message digest/signature encryption scheme. Note that RSA schemes must be used with a RSA sign key and DSA schemes must be used with a DSA sign key. The default without this option is <tt>RSA-MD5</tt>.
+ <dt><tt>-d</tt>
+ <dd>Enable debugging. This option displays the cryptographic data produced in eye-friendly billboards.
+ <dt><tt>-e</tt>
+ <dd>Write the IFF&nbsp;client keys to the standard output. This is intended for automatic key distribution by mail. <dt><tt>-G</tt>
+ <dd>Generate parameters and keys for the GQ identification scheme, obsoleting any that may exist.
+ <dt><tt>-g</tt>
+ <dd>Generate keys for the GQ identification scheme using the existing GQ parameters. If the GQ parameters do not yet exist, create them first.
+ <dt><tt>-H</tt>
+ <dd>Generate new host keys, obsoleting any that may exist.
+ <dt><tt>-I</tt>
+ <dd>Generate parameters for the IFF identification scheme, obsoleting any that may exist.
+ <dt><tt>-i <i>name</i></tt>
+ <dd>Set the suject name to <i>name</i>. This is used as the subject field in certificates and in the file name for host and sign keys. <dt><tt>-M</tt>
+ <dd>Generate MD5 keys, obsoleting any that may exist.
+ <dt><tt>-P</tt>
+ <dd>Generate a private certificate. By default, the program generates public certificates.
+ <dt><tt>-p <i>password</i><tt></tt></tt>
+ <dd>Encrypt generated files containing private data with <tt><i>password</i></tt> and the DES-CBC algorithm.
+ <dt><tt>-q</tt>
+ <dd>Set the password for reading files to <tt><i>password</i></tt>.
+ <dt><tt>-S [ RSA | DSA ]</tt>
+ <dd>Generate a new sign key of the designated type, obsoleting any that may exist. By default, the program uses the host key as the sign key.
+ <dt><tt>-s <i>name</i></tt>
+ <dd>Set the issuer name to <i>name</i>. This is used for the issuer field in certificates and in the file name for identity files. <dt><tt>-T</tt>
+ <dd>Generate a trusted certificate. By default, the program generates a non-trusted certificate.
+ <dt><tt>-V <i>nkeys</i></tt>
+ <dd>Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme.
+</dl>
+ <h4 id="rand">Random Seed File</h4>
+ <p>All cryptographically sound key generation schemes must have means to randomize the entropy seed used to initialize the internal pseudo-random number generator used by the library routines. The OpenSSL library uses a designated random seed file for this purpose. The file must be available when starting the NTP daemon and <tt>ntp-keygen</tt> program. If a site supports OpenSSL or its companion OpenSSH, it is very likely that means to do this are already available.</p>
+ <p>It is important to understand that entropy must be evolved for each generation, for otherwise the random number sequence would be predictable. Various means dependent on external events, such as keystroke intervals, can be used to do this and some systems have built-in entropy sources. Suitable means are described in the OpenSSL software documentation, but are outside the scope of this page.</p>
+ <p>The entropy seed used by the OpenSSL library is contained in a file, usually called <tt>.rnd</tt>, which must be available when starting the NTP daemon or the <tt>ntp-keygen</tt> program. The NTP daemon will first look for the file using the path specified by the <tt>randfile</tt> subcommand of the <tt>crypto</tt> configuration command. If not specified in this way, or when starting the <tt>ntp-keygen</tt> program, the OpenSSL library will look for the file using the path specified by the <tt>RANDFILE</tt> environment variable in the user home directory, whether root or some other user. If the <tt>RANDFILE</tt> environment variable is not present, the library will look for the <tt>.rnd</tt> file in the user home directory. If the file is not available or cannot be written, the daemon exits with a message to the system log and the program exits with a suitable error message.</p>
+ <h4 id="priv">Cryptographic Data Files</h4>
+ <p>All other file formats begin with two lines. The first contains the file name, including the generated host name and filestamp. The second contains the datestamp in conventional Unix <tt>date</tt> format. Lines beginning with <tt>#</tt> are considered comments and ignored by the <i><tt>ntp-keygen </tt></i>program and <tt>ntpd</tt> daemon. Cryptographic values are encoded first using ASN.1 rules, then encrypted if necessary, and finally written PEM-encoded printable ASCII format preceded and followed by MIME content identifier lines.</p>
+ <p id="symkey">The format of the symmetric keys file is somewhat different than the other files in the interest of backward compatibility. Since DES-CBC is deprecated in NTPv4, the only key format of interest is MD5 alphanumeric strings. Following hte heard the keys are entered one per line in the format</p>
+ <p><i><tt>keyno type key</tt></i></p>
+ <p>where <i><tt>keyno</tt></i> is a positive integer in the range 1-65,535, <i><tt>type</tt></i> is the string <tt>MD5</tt> defining the key format and <i><tt>key</tt></i> is the key itself, which is a printable ASCII string 16 characters or less in length. Each character is chosen from the 93 printable characters in the range 0x21 through 0x7f excluding space and the '#' character.</p>
+ <p>Note that the keys used by the <tt>ntpq</tt> and <tt>ntpdc</tt> programs are checked against passwords requested by the programs and entered by hand, so it is generally appropriate to specify these keys in human readable ASCII format.</p>
+ <p>The <tt>ntp-keygen</tt> program generates a MD5 symmetric keys file <tt>ntpkey_MD5key_<i>hostname.filestamp</i></tt>. Since the file contains private shared keys, it should be visible only to root and distributed by secure means to other subnet hosts. The NTP daemon loads the file <tt>ntp.keys</tt>, so <tt>ntp-keygen</tt> installs a soft link from this name to the generated file. Subsequently, similar soft links must be installed by manual or automated means on the other subnet hosts. While this file is not used with the Autokey Version 2 protocol, it is needed to authenticate some remote configuration commands used by the <a href="ntpdc.html"><tt>ntpq</tt></a> and <a href="ntpq.html"><tt>ntpdc</tt></a> utilities.</p>
+ <h4 id="bug">Bugs</h4>
+ <p>It can take quite a while to generate some cryptographic values, from one to several minutes with modern architectures such as UltraSPARC and up to tens of minutes to an hour with older architectures such as SPARC IPC.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/ldisc.html b/contrib/ntp/html/ldisc.html
new file mode 100644
index 000000000000..40e58045be97
--- /dev/null
+++ b/contrib/ntp/html/ldisc.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Line Disciplines and Streams Modules</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Line Disciplines and Streams Modules</h3>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">14:45</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="235">Monday, January 20, 2003</csobj></p>
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links11.txt"></script>
+ <hr>
+ <h4>Description</h4>
+ <p>Most radio and modem clocks used for a primary (stratum-1) NTP server utilize serial ports operating at speeds of 9600 baud or greater. The intrinsic delay and jitter contributed by the serial port hardware and software driver can accumulate up to a millisecond in newer Unix systems and tens of milliseconds in older ones. In order to reduce the effects of delay and jitter, a set of special line disciplines, stream modules and operating system calls (<tt>ioctls</tt>) can be configured in some Unix kernels. These routines intercept special characters or signals provided by the radio or modem clock and save a timestamp for later processing.</p>
+ <p>The routines provide two important functions. Some insert a timestamp in the receive data stream upon occurance of a designated character or characters at the serial interface. This can be used to timestamp an on-time character produced by a radio clock, for example. Other routines support an application program interface for pulse-per-second (PPS) signals generated by some radio clocks and laboratory instruments. These routines are normally accessed through the PPSAPI application program interface described below.</p>
+ <p>The routines can be compiled in the kernel in older BSD-derived systems, or installed as System V streams modules and either compiled in the kernel or dynamically loaded when required. In either case, they require minor changes in some kernel files and in the NTP daemon <tt>ntpd</tt>. The streams modules can be pushed and popped from the streams stack using conventional System V streams program primitives. Note that some Unix kernels do not support line disciplines and some do not support System V streams. The routines described here are known to work correctly with the Unix kernels called out in the descriptions, but have not been tested for other kernels.</p>
+ <h4><tt>tty_clk</tt> Line Discipline/Streams Module</h4>
+ <p>This routine intercepts characters received from the serial port and passes unchanged all except a set of designated characters to the generic serial port discipline. For each of the exception characters, the character is inserted in the receiver buffer followed by a local timestamp in Unix <tt>timeval</tt> format. Both <tt>select()</tt> and <tt>SIGIO</tt> are supported by the routine. Support for this routine is automatically detected during the NTP build process and interface code compiled as necessary.</p>
+ <p>There are two versions of the <tt>tty_clk</tt> routine. The <tt>tty_clk.c</tt> line discipline is designed for older BSD systems and is compiled in the kernel. The <tt>tty_clk_STREAMS.c</tt> is designed for System V streams, in which case it can be either compiled in the kernel or dynamically loaded. Since these programs are small, unobtrusive, and do nothing unless specifically enabled by an application program, it probably doesn't matter which version is chosen. Instructions on how to configure and build a kernel supporting either of these routines is in the <tt>README</tt> file in the <tt>./kernel</tt> directory.</p>
+ <p>The <tt>tty_clk</tt> routine defines a new ioctl <tt>CLK_SETSTR</tt>, which takes a pointer to a string of no more than 32 characters. Until the first <tt>CLK_SETSTR</tt> is performed, the routine will simply pass through characters. Once it is passed a string by <tt>CLK_SETSTR</tt>, any character in that string will be immediately followed by a timestamp in Unix <tt>timeval</tt> format. You can change the string whenever you want by doing another <tt>CLK_SETSTR</tt>. The character must be an exact, 8 bit match. The character '\000' cannot, be used, as it is the string terminator. Passing an empty string to <tt>CLK_SETSTR</tt> turns off timestamping. Passing <tt>NULL</tt> may produce surprising results.</p>
+ <h4><tt>TIOCDCDTIMESTAMP</tt> ioctl in FreeBSD</h4>
+ <p>This ioctl is included in FreeBSD 2.2 and later. It causes a timestamp to be inserted in the serial port receive data stream when the data carrier detect (DCD) signal is asserted. This is useful for those radio clocks that indicate the on-time epoch by means of a modem control signal. It is not recommended that this be used for PPS timestamps, as this function is available using the PPS application program interface included in FreeBSD 3.4 and later.</p>
+ <p>The <tt>TIOCDCDTIMESTAMP</tt> ioctl() is detected and compiled automatically on FreeBSD systems if available. With FreeBSD 2.2 the measured delay between activation of the DCD signal and the time the timestamp is captured on a 66MHz 486DX2 is 19 <font face="Symbol">m</font>s and on a 100MHz Pentium is 6 <font face="Symbol">m</font>s.</p>
+ <h4><tt>ppsclock</tt>Streams Module (depredated)</h4>
+ <p>This routine is a streams module which causes a timestamp to be captured when the DCD signal is asserted. It is normally used in connection with a PPS signal generated by some radio clocks. However, it is normally used only by the PPSAPI interface and SunOS 4.1.3 and should be avoided in other contexts. Instructions on how to configure and build a kernel supporting either of these routines is in the <tt>README</tt> file in the <tt>./kernel</tt> directory.</p>
+ <p>The ppsclock streams module implements the <tt>CIOGETEV</tt> ioctl, which takes a pointer to the structure</p>
+ <pre>
+struct ppsclockev {
+ struct timeval tv;
+ u_int serial;
+};
+</pre>
+ <p>The <tt>ppsclock</tt> module is pushed on the streams stack of the serial port connected to the DCD line. At each positive-going edge of the PPS signal, the routine latches the current local timestamp and increments a counter. At each <tt>CIOGETEV</tt> ioctl call, the current values of the timestamp and counter are returned in the <tt>ppsclockev</tt> structure.</p>
+ <h4><tt>TIOCSPPS</tt> and <tt>TIOCGETPPSEV</tt> ioctls in Solaris</h4>
+ <p>These ioctls are included in Solaris 2.4 and later. They implement the same function as the <tt>ppsclock</tt> streams module, but are implemented as integrated system calls independent of the streams facility. They are normally used in connection with a pulse-per-second (PPS) signal generated by some radio clocks. However, these ioctls are normally used only by the PPSAPI interface and should be avoided in other contexts. See the Sun documentation for the calling sequence and return values.</p>
+ <p>Users are cautioned that these ioctls function improperly in Solaris versions prior to 2.8 with patch Generic_108528-02.</p>
+ <h4><tt>tty_chu</tt> Line Discipline/Streams Module (depredated)</h4>
+ <p>This routine is a special purpose line discipline for receiving a special timecode broadcast by Canadian time and frequency standard station CHU. It has been removed from the distribution since its function has been replaced by the <a href="drivers/driver7.html">Radio CHU Audio Demodulator/Decoder (type 7)</a> clock driver.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/manyopt.html b/contrib/ntp/html/manyopt.html
new file mode 100644
index 000000000000..d2003d31d32a
--- /dev/null
+++ b/contrib/ntp/html/manyopt.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Automatic NTP Configuration Options</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Automatic NTP Configuration Options</h3>
+ <img src="pic/alice51.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>Make sure who your friends are.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:13 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links9.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#many">Manycasting</a>
+ <li class="inline"><a href="#auto">Manycast Interactions with Autokey</a>
+ <li class="inline"><a href="#opt">Manycast Options</a>
+ </ul>
+ <hr>
+ <h4 id="many">Manycasting</h4>
+ <p>Manycasting is a automatic discovery and configuration paradigm new to NTPv4. It is intended as a means for a multicast client to troll the nearby network neighborhood to find cooperating manycast servers, validate them using cryptographic means and evaluate their time values with respect to other servers that might be lurking in the vicinity. The intended result is that each manycast client mobilizes client associations with some number of the &quot;best&quot; of the nearby manycast servers, yet automatically reconfigures to sustain this number of servers should one or another fail.</p>
+ <p>Note that the manycasting paradigm does not coincide with the anycast paradigm described in RFC-1546, which is designed to find a single server from a clique of servers providing the same service. The manycast paradigm is designed to find a plurality of redundant servers satisfying defined optimality criteria.</p>
+ <p>Manycasting can be used with either symmetric key or public key cryptography. The public key infrastructure (PKI) offers the best protection against compromised keys and is generally considered stronger, at least with relatively large key sizes. It is implemented using the Autokey protocol and the OpenSSL cryptographic library available from <a href="http://www.openssl.org">http://www.openssl.org</a>. The library can also be used with other NTPv4 modes as well and is highly recommended, especially for broadcast modes.</p>
+ <p>A persistent manycast client association is configured using the <tt>manycastclient</tt> command, which is similar to the <tt>server</tt> command but with a multicast (IPv4 class D or IPv6 prefix <tt>FF</tt>) group address. The IANA has designated IPv4 address 224.1.1.1 and IPv6 address FF05::101 (site local) for NTP. When more servers are needed, it broadcasts manycast client messages to this address at the minimum feasible rate and minimum feasible time-to-live (TTL) hops, depending on how many servers have already been found. There can be as many manycast client associations as different group address, each one serving as a template for a future ephemeral unicast client/server association.</p>
+ <p>Manycast servers configured with the <tt>manycastserver</tt> command listen on the specified group address for manycast client messages. Note the distinction between manycast client, which actively broadcasts messages, and manycast server, which passively responds to them. If a manycast server is in scope of the current TTL and is itself synchronized to a valid source and operating at a stratum level equal to or lower than the manycast client, it replies to the manycast client message with an ordinary unicast server message.</p>
+ <p>The manycast client receiving this message mobilizes an ephemeral client/server association according to the matching manycast client template, but only if cryptographically authenticated and the server stratum is less than or equal to the client stratum. Authentication is explicitly required and either symmetric key or public key (Autokey) can be used. Then, the client polls the server at its unicast address in burst mode in order to reliably set the host clock and validate the source. This normally results in a volley of eight client/server at 2-s intervals during which both the synchronization and cryptographic protocols run concurrently. Following the volley, the client runs the NTP intersection and clustering algorithms, which act to discard all but the &quot;best&quot; associations according to stratum and synchronization distance. The surviving associations then continue in ordinary client/server mode.</p>
+ <p>The manycast client polling strategy is designed to reduce as much as possible the volume of manycast client messages and the effects of implosion due to near-simultaneous arrival of manycast server messages. The strategy is determined by the <tt>manycastclient</tt>, <tt>tos</tt> and <tt>ttl</tt> configuration commands. The manycast poll interval is normally eight times the system poll interval, which starts out at the <tt>minpoll</tt> value specified in the <tt>manycastclient</tt>, command and, under normal circumstances, increments to the <tt>maxpolll</tt> value specified in this command. Initially, the TTL is set at the minimum hops specified by the <tt>ttl</tt> command. At each retransmission the TTL is increased until reaching the maximum hops specified by this command or a sufficient number client associations have been found. Further retransmissions use the same TTL.</p>
+ <p>The quality and reliability of the suite of associations discovered by the manycast client is determined by the NTP mitigation algorithms and the <tt>minclock</tt> and <tt>minsane</tt> values specified in the <tt>tos</tt> configuration command. At least <tt>minsane</tt> candidate servers must be available and the mitigation algorithms produce at least <tt>minclock</tt> survivors in order to synchronize the clock. Byzantine agreement principles require at least four candidates in order to correctly discard a single falseticker. For legacy purposes, <tt>minsane</tt> defaults to 1 and <tt>minclock</tt> defaults to 3. For manycast service <tt>minsane</tt> should be explicitly set to 4. assuming at least that number of servers are available.</p>
+ <p>If at least <tt>minclock</tt> servers are found, the manycast poll interval is immediately set to eight times <tt>maxpoll</tt>. If less than <tt>minclock</tt> servers are found when the TTL has reached the maximum hops, the manycast poll interval is doubled. For each transmission after that, the poll interval is doubled again until reaching the maximum of eight times <tt>maxpoll</tt>. Further transmissions use the same poll interval and TTL values. Note that while all this is going on, each client/server association found is operating normally it the system poll interval.</p>
+ <p>Administratively scoped multicast boundaries are normally specified by the network router configuration and, in the case of IPv6, the link/site scope prefix. By default, the increment for TTL hops is 32 starting from 31; however, the <tt>ttl</tt> configuration command can be used to modify the values to match the scope rules.</p>
+ <p>It is often useful to narrow the range of acceptable servers which can be found by manycast client associations. Because manycast servers respond only when the client stratum is equal to or greater than the server stratum, primary (stratum 1) servers fill find only primary servers in TTL range, which is probably the most common objective. However, unless configured otherwise, all manycast clients in TTL range will eventually find all primary servers in TTL range, which is probably not the most common objective in large networks. The <tt>tos</tt> command can be used to modify this behavior. Servers with stratum below <tt>floor</tt> or above <tt>ceiling</tt> specified in the <tt>tos</tt> command are strongly discouraged during the selection process; however, these servers may be temporally accepted if the number of servers within TTL range is less than <tt>minclock</tt>.</p>
+ <p>The above actions occur for each manycast client message, which repeats at the designated poll interval. However, once the ephemeral client association is mobilized, subsequent manycast server replies are discarded, since that would result in a duplicate association. If during a poll interval the number of client associations falls below <tt>minclock</tt>, all manycast client prototype associations are reset to the initial poll interval and TTL hops and operation resumes from the beginning. It is important to avoid frequent manycast client messages, since each one requires all manycast servers in TTL range to respond. The result could well be an implosion, either minor or major, depending on the number of servers in range. The recommended value for <tt>maxpoll</tt> is 12 (4,096 s).</p>
+ <p>It is possible and frequently useful to configure a host as both manycast client and manycast server. A number of hosts configured this way and sharing a common group address will automatically organize themselves in an optimum configuration based on stratum and synchronization distance. For example, consider an NTP subnet of two primary servers and a hundred or more dependent clients. With two exceptions, all servers and clients have identical configuration files including both <tt>multicastclient</tt> and <tt>multicastserver</tt> commands using, for instance, multicast group address 239.1.1.1. The only exception is that each primary server configuration file must include commands for the primary reference source such as a GPS receiver.</p>
+ <p>The remaining configuration files for all secondary servers and clients have the same contents, except for the <tt>tos</tt> command, which is specific for each stratum level. For stratum 1 and stratum 2 servers, that command is not necessary. For stratum 3 and above servers the <tt>floor</tt> value is set to the intended stratum number. Thus, all stratum 3 configuration files are identical, all stratum 4 files are identical and so forth.</p>
+ <p>Once operations have stabilized in this scenario, the primary servers will find the primary reference source and each other, since they both operate at the same stratum (1), but not with any secondary server or client, since these operate at a higher stratum. The secondary servers will find the servers at the same stratum level. If one of the primary servers loses its GPS receiver, it will continue to operate as a client and other clients will time out the corresponding association and re-associate accordingly.</p>
+ <p>Some administrators prefer to avoid running <tt>ntpd</tt> continuously and run either <tt>ntpdate</tt> or <tt>ntpd -q</tt> as a cron job. In either case the servers must be configured in advance and the program fails if none are available when the cron job runs. A really slick application of manycast is with <tt>ntpd -q</tt>. The program wakes up, scans the local landscape looking for the usual suspects, selects the best from among the rascals, sets the clock and then departs. Servers do not have to be configured in advance and all clients throughout the network can have the same configuration file.</p>
+ <h4 id="auto">Manycast Interactions with Autokey</h4>
+ <p>Each time a manycast client sends a client mode packet to a multicast group address, all manycast servers in scope generate a reply including the host name and status word. The manycast clients then run the Autokey protocol, which collects and verifies all certificates involved. Following the burst interval all but three survivors are cast off, but the certificates remain in the local cache. It often happens that several complete signing trails from the client to the primary servers are collected in this way.</p>
+ <p>About once an hour or less often if the poll interval exceeds this, the client regenerates the Autokey key list. This is in general transparent in client/server mode. However, about once per day the server private value used to generate cookies is refreshed along with all manycast client associations. In this case all cryptographic values including certificates is refreshed. If a new certificate has been generated since the last refresh epoch, it will automatically revoke all prior certificates that happen to be in the certificate cache. At the same time, the manycast scheme starts all over from the beginning and the expanding ring shrinks to the minimum and increments from there while collecting all servers in scope.</p>
+ <h4 id="opt">Manycast Options</h4>
+ <dl>
+ <dt><tt>tos [ ceiling <i>ceiling</i> | cohort {0 | 1} |floor <i>floor</i> | minclock <i>minclock</i> | minsane <i>minsane</i> ]</tt>
+ <dd>This command affects the clock selection and clustering algorithms. It can be used to select the quality and quantity of peers used to synchronize the system clock and is most useful in manycast mode. The variables operate as follows:
+ <dl>
+ <dt><tt>ceiling <i>ceiling</i></tt>
+ <dd>Peers with strata above <i>ceiling</i> will be discarded if there are at least <i>minclock</i> peers remaining. This value defaults to 15, but can be changed to any number from 1 to 15.
+ <dt><tt>cohort { 0 | 1 }</tt>
+ <dd>This is a binary flag which enables (0) or disables (1) manycast server replies to manycast clients with the same stratum level. This is useful to reduce implosions where large numbers of clients with the same stratum level are present. The default is to enable these replies.
+ <dt><tt>floor <i>floor</i></tt>
+ <dd>Peers with strata below <i>floor</i> will be discarded if there are at least <i>minclock</i> peers remaining. This value defaults to 1, but can be changed to any number from 1 to 15.
+ <dt><tt>minclock <i>minclock</i></tt>
+ <dd>The clustering algorithm repeatedly casts out outlyer associations until no more than <i>minclock</i> associations remain. This value defaults to 3, but can be changed to any number from 1 to the number of configured sources.
+ <dt><tt>minsane <i>minsane</i></tt>
+ <dd>This is the minimum number of candidates available to the clock selection algorithm in order to produce one or more truechimers for the clustering algorithm. If fewer than this number are available, the clock is undisciplined and allowed to run free. The default is 1 for legacy purposes. However, according to principles of Byzantine agreement, <i>minsane</i> should be at least 4 in order to detect and discard a single falseticker.
+ </dl>
+ <dt><tt>ttl <i>hop</i> ...</tt>
+ <dd>This command specifies a list of TTL values in increasing order. up to 8 values can be specified. In manycast mode these values are used in turn in an expanding-ring search. The default is eight multiples of 32 starting at 31.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/measure.html b/contrib/ntp/html/measure.html
new file mode 100644
index 000000000000..c2546270ba9e
--- /dev/null
+++ b/contrib/ntp/html/measure.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Time and Time Interval Measurement with Application to Computer and Network Performance Evaluation</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Time and Time Interval Measurement with Application to Computer and Network Performance Evaluation</h3>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">20:24</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="257">Monday, December 02, 2002</csobj></p>
+ <hr>
+ <p>The technical memorandum: <cite>Time and Time Interval Measurement with Application to Computer and Network Performance Evaluation</cite><a href="http://www.eecis.udel.edu/%7emills/database/memos/memo96a.ps">(PostScript) </a>describes a number of techniques for conducting experiments typical of computer network and transmission systems engineering.</p>
+ <p>In most experiments in which time is involved, it is necessary to develop estimates of time, frequency and measurement errors from a series of time measurements between the clocks of a number of computers and ancillary devices interconnected by some kind of computer network. However, time is not a physical quantity, such as mass, nor can it be measured relative to an absolute frame of reference, such as velocity. The only way to measure time in our universe is to compare the reading of one clock, which runs according to its own timescale, with another clock, which runs according to a given timescale, at some given instant or epoch. The errors arise from the precision of time comparisons and the accuracy of frequency estimates between the timescales involved.</p>
+ <p>The usual data collected during a performance run of some experiment might include time offsets, time delays, frequency offsets and various error statistics. While time offsets between two clocks can be measured directly, frequency offsets can be estimated only from two or more time offsets made over some time interval in the experiment. In practice, a sequence of time comparisons can be performed over the lifetime of the experiment and the instantaneous frequency estimated either in real time with a recurrence relation, or retrospectively with a polynomial fit to the data.</p>
+ <p>Estimating time and frequency errors in real time has been studied by a distinct subspecies of physicists who have made a career of the technology involved. Various means including autoregressive models, Kalman filters and simple weighted-average algorithms are used extensively by national standards laboratories to model cesium-clock ensembles. These techniques have been adapted to computer network and transmission engineering problems as well. This memorandum explores issues in performing experiments of this type and summarizes various techniques found useful in practice.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/miscopt.html b/contrib/ntp/html/miscopt.html
new file mode 100644
index 000000000000..13f8981c2ed5
--- /dev/null
+++ b/contrib/ntp/html/miscopt.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Miscellaneous Options</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Miscellaneous Options</h3>
+ <img src="pic/boom3.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>We have three, now looking for more.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">01:50</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="217">Friday, May 02, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ <hr>
+ <dl>
+ <dt><tt>broadcastdelay <i>seconds</i></tt>
+ <dd>The broadcast and multicast modes require a special calibration to determine the network delay between the local and remote servers. Ordinarily, this is done automatically by the initial protocol exchanges between the client and server. In some cases, the calibration procedure may fail due to network or server access controls, for example. This command specifies the default delay to be used under these circumstances. Typically (for Ethernet), a number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds.
+ <dt><tt>calldelay <i>delay</i></tt>
+ <dd>This option controls the delay in seconds between the first and second packets sent in burst or iburst mode to allow additional time for a modem or ISDN call to complete.
+ <dt><tt>driftfile <i>driftfile</i></tt>
+ <dd>This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. This is the same operation as the <tt>-f</tt> command linke option. If the file exists, it is read at startup in order to set the initial frequency and then updated once per hour with the current frequency computed by the daemon. If the file name is specified, but the file itself does not exist, the starts with an initial frequency of zero and creates the file when writing it for the first time. If this command is not given, the daemon will always start with an initial frequency of zero.
+ <p>The file format consists of a single line containing a single floating point number, which records the frequency offset measured in parts-per-million (PPM). The file is updated by first writing the current drift value into a temporary file and then renaming this file to replace the old version. This implies that <tt>ntpd</tt> must have write permission for the directory the drift file is located in, and that file system links, symbolic or otherwise, should be avoided.</p>
+ <dt><tt>enable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</tt><br>
+ <tt>disable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats ]</tt>
+ <dd>Provides a way to enable or disable various system options. Flags not mentioned are unaffected. Note that all of these flags can be controlled remotely using the <a href="ntpdc.html"><tt>ntpdc</tt></a> utility program.
+ <dl>
+ <dt><tt>auth</tt>
+ <dd>Enables the server to synchronize with unconfigured peers only if the peer has been correctly authenticated using either public key or private key cryptography. The default for this flag is enable.
+ <dt><tt>bclient</tt>
+ <dd>Enables the server to listen for a message from a broadcast or multicast server, as in the <tt>multicastclient</tt> command with default address. The default for this flag is disable.
+ <dt><tt>calibrate</tt>
+ <dd>Enables the calibrate feature for reference clocks. The default for this flag is disable.
+ <dt><tt>kernel</tt>
+ <dd>Enables the kernel time discipline, if available. The default for this flag is enable if support is available, otherwise disable.
+ <dt><tt>monitor</tt>
+ <dd>Enables the monitoring facility. See the <tt>ntpdc</tt> program and the <tt>monlist</tt> command or further information. The default for this flag is enable.
+ <dt><tt>ntp</tt>
+ <dd>Enables time and frequency discipline. In effect, this switch opens and closes the feedback loop, which is useful for testing. The default for this flag is enable.
+ <dt><tt>pps</tt>
+ <dd>Enables the pulse-per-second (PPS) signal when frequency and time is disciplined by the precision time kernel modifications. See the <a href="kern.html">A Kernel Model for Precision Timekeeping</a> page for further information. The default for this flag is disable.
+ <dt><tt>stats</tt>
+ <dd>Enables the statistics facility. See the <a href="monopt.html">Monitoring Options</a> page for further information. The default for this flag is disable
+ </dl>
+ <dt><tt>includefile <i>includefile</i></tt>
+ <dd>This command allows additional configuration commands to be included from a separate file. Include files may be nested to a depth of five; upon reaching the end of any include file, command processing resumes in the previous configuration file. This option is useful for sites that run <tt>ntpd</tt> on multiple hosts, with (mostly) common options (e.g., a restriction list).
+ <dt><tt>logconfig <i>configkeyword</i></tt>
+ <dd>This command controls the amount and type of output written to the system <tt>syslog</tt> facility or the alternate <tt>logfile</tt> log file. By default, all output is turned on. All <i><tt>configkeyword</tt></i> keywords can be prefixed with <tt>=</tt>, <tt>+</tt> and <tt>-</tt>, where <tt>=</tt> sets the <tt>syslogmask</tt>, <tt>+</tt> adds and <tt>-</tt> removes messages. <tt>syslog messages</tt> can be controlled in four classes (<tt>clock</tt>, <tt>peer</tt>, <tt>sys</tt> and <tt>sync</tt>). Within these classes four types of messages can be controlled: informational messages (<tt>info</tt>), event messages (<tt>events</tt>), statistics messages (<tt>statistics</tt>) and status messages (<tt>status</tt>).
+ <p>Configuration keywords are formed by concatenating the message class with the event class. The <tt>all</tt> prefix can be used instead of a message class. A message class may also be followed by the <tt>all</tt> keyword to enable/disable all messages of the respective message class.Thus, a minimal log configuration could look like this:</p>
+ <p><tt>logconfig=syncstatus +sysevents</tt></p>
+ <p>This would just list the synchronizations state of <tt>ntpd</tt> and the major system events. For a simple reference server, the following minimum message configuration could be useful:</p>
+ <p><tt>logconfig=syncall +clockall</tt></p>
+ <p>This configuration will list all clock information and synchronization information. All other events and messages about peers, system events and so on is suppressed.</p>
+ <p><tt>logfile <i>logfile</i></tt></p>
+ <p>This command specifies the location of an alternate log file to be used instead of the default system <tt>syslog</tt> facility. This is the same operation as the <tt>-l </tt>command line option.</p>
+ <dt><tt>setvar <i>variable</i> [default]</tt>
+ <dd>This command adds an additional system variable. These variables can be used to distribute additional information such as the access policy. If the variable of the form <tt><i>name</i> = <i>value</i></tt> is followed by the <tt>default</tt> keyword, the variable will be listed as part of the default system variables (<tt>ntpq rv</tt> command). These additional variables serve informational purposes only. They are not related to the protocol other that they can be listed. The known protocol variables will always override any variables defined via the <tt>setvar</tt> mechanism. There are three special variables that contain the names of all variable of the same group. The <tt>sys_var_list</tt> holds the names of all system variables. The <tt>peer_var_list</tt> holds the names of all peer variables and the <tt>clock_var_list</tt> holds the names of the reference clock variables.
+ <dt><tt>tinker [ allan <i>allan</i> | dispersion <i>dispersion</i> | freq <i>freq</i> | huffpuff | <i>huffpuff</i> | panic <i>panic</i> | step <i>step</i> | stepout <i>stepout</i> ]</tt>
+ <dd>This command can be used to alter several system variables in very exceptional circumstances. It should occur in the configuration file before any other configuration options. The default values of these variables have been carefully optimized for a wide range of network speeds and reliability expectations. In general, they interact in intricate ways that are hard to predict and some combinations can result in some very nasty behavior. Very rarely is it necessary to change the default values; but, some folks can't resist twisting the knobs anyway and this command is for them. Emphasis added: twisters are on their own and can expect no help from the support group.
+ <p>The variables operate as follows:</p>
+ <dl>
+ <dt><tt>allan <i>allan</i></tt>
+ <dd>The argument becomes the new value for the minimum Allan intercept, which is a parameter of the PLL/FLL clock discipline algorithm. The value in log2 seconds defaults to 7 (1024 s), which is also the lower limit.
+ <dt><tt>dispersion <i>dispersion</i></tt>
+ <dd>The argument becomes the new value for the dispersion increase rate, normally .000015 s/s.
+ <dt><tt>freq <i>freq</i></tt>
+ <dd>The argument becomes the initial value of the frequency offset in parts-per-million. This overrides the value in the frequency file, if present, and avoids the initial training state if it is not.
+ <dt><tt>huffpuff <i>huffpuff</i></tt>
+ <dd>The argument becomes the new value for the experimental huff-n'-puff filter span, which determines the most recent interval the algorithm will search for a minimum delay. The lower limit is 900 s (15 m), but a more reasonable value is 7200 (2 hours). There is no default, since the filter is not enabled unless this command is given.
+ <dt><tt>panic <i>panic</i></tt>
+ <dd>The argument is the panic threshold, normally 1000 s. If set to zero, the panic sanity check is disabled and a clock offset of any value will be accepted.
+ <dt><tt>step <i>step</i></tt>
+ <dd>The argument is the step threshold, which by default is 0.128 s. It can be set to any positive number in seconds. If set to zero, step adjustments will never occur. Note:&nbsp;The kernel time discipline is disabled if the step threshold is set to zero or greater than the default.
+ <dt><tt>stepout <i>stepout</i></tt>
+ <dd>The argument is the stepout timeout, which by default is 900 s. It can be set to any positive number in seconds. If set to zero, the stepout pulses will not be suppressed.
+ </dl>
+ <dt><tt>trap <i>host_address</i> [port <i>port_number</i>] [interface <i>interface_address</i>]</tt>
+ <dd>This command configures a trap receiver at the given host address and port number for sending messages with the specified local interface address. If the port number is unspecified, a value of 18447 is used. If the interface address is not specified, the message is sent with a source address of the local interface the message is sent through. Note that on a multihomed host the interface used may vary from time to time with routing changes.
+ <p>The trap receiver will generally log event messages and other information from the server in a log file. While such monitor programs may also request their own trap dynamically, configuring a trap receiver will ensure that no messages are lost when the server is started.</p>
+ <dt><tt>ttl <i>hop</i> ...</tt>
+ <dd>This command specifies a list of TTL values in increasing order. up to 8 values can be specified. In manycast mode these values are used in turn in an expanding-ring search. The default is eight multiples of 32 starting at 31.
+ </dl>
+ <h4>Files</h4>
+ <tt>ntp.drift</tt> frequency compensation (PPM)
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/monopt.html b/contrib/ntp/html/monopt.html
new file mode 100644
index 000000000000..f790bc8b360e
--- /dev/null
+++ b/contrib/ntp/html/monopt.html
@@ -0,0 +1,123 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Monitoring Options</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Monitoring Options</h3>
+ <img src="pic/pogo8.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>The pig watches the logs.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">17:22</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="230">Friday, February 07, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ <hr>
+ <tt>ntpd</tt> includes a comprehensive monitoring facility suitable for continuous, long term recording of server and client timekeeping performance. See the <tt>statistics</tt> command below for a listing and example of each type of statistics currently supported. Statistic files are managed using file generation sets and scripts in the <tt>./scripts</tt> directory of this distribution. Using these facilities and Unix <tt>cron</tt> jobs, the datacan be automatically summarized and archived for retrospective analysis.
+ <h4>Monitoring Commands</h4>
+ <dl>
+ <dt><tt>statistics <i>name</i> [...]</tt>
+ <dd>Enables writing of statistics records. Currently, four kinds of <i><tt>name</tt></i>statistics are supported.
+ <dl>
+ <dt><tt>clockstats</tt>
+ <dd>Enables recording of clock driver statistics information. Each update received from a clock driver appends a line of the following form to the file generation set named <tt>clockstats</tt>:
+ <dd><tt>49213 525.624 127.127.4.1 93 226 00:08:29.606 D</tt>
+ <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next field shows the clock address in dotted-quad notation, The final field shows the last timecode received from the clock in decoded ASCII format, where meaningful. In some clock drivers a good deal of additional information can be gathered and displayed as well. See information specific to each clock for further details.
+ <dt><tt>cryptostats</tt>
+ <dd>This option requires the OpenSSL cryptographic software library. It enables recording of cryptographic public key protocol information. Each message received by the protocol module appends a line of the following form to the file generation set named <tt>cryptostats</tt>:
+ <dd><tt>49213 525.624 127.127.4.1 <i>message</i></tt>
+ <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next field shows the peer address in dotted-quad notation, The final <tt><i>message</i></tt> field includes the message type and certain ancillary information. See the <a href="authopt.html">Authentication Options</a> page for further information.
+ <dt><tt>loopstats</tt>
+ <dd>Enables recording of loop filter statistics information. Each update of the local clock outputs a line of the following form to the file generation set named <tt>loopstats</tt>:
+ <dd><tt>50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806</tt>
+ <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next five fields show time offset (seconds), frequency offset (parts per million - PPM), RMS jitter (seconds), Allan deviation (PPM) and clock discipline time constant.
+ <dt><tt>peerstats</tt>
+ <dd>Enables recording of peer statistics information. This includes statistics records of all peers of a NTP server and of special signals, where present and configured. Each valid update appends a line of the following form to the current element of a file generation set named <tt>peerstats</tt>:
+ <dt><tt>48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674</tt>
+ <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next two fields show the peer address in dotted-quad notation and status, respectively. The status field is encoded in hex in the format described in Appendix A of the NTP specification RFC 1305. The final four fields show the offset, delay, dispersion and RMS jitter, all in seconds.
+ <dt><tt>rawstats</tt>
+ <dd>Enables recording of raw-timestamp statistics information. This includes statistics records of all peers of a NTP server and of special signals, where present and configured. Each NTP message received from a peer or clock driver appends a line of the following form to the file generation set named <tt>rawstats</tt>:
+ <dt><tt>50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000</tt>
+ <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next two fields show the remote peer or clock address followed by the local address in dotted-quad notation, The final four fields show the originate, receive, transmit and final NTP timestamps in order. The timestamp values are as received and before processing by the various data smoothing and mitigation algorithms.
+
+ <dt><tt>sysstats</tt>
+ <dd>Enables recording of <tt>ntpd</tt> statistics counters on a periodic basis. Each hour a line of the following form is appended to the file generation set named <tt>sysstats</tt>:
+
+ <dd><tt>50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147</tt>
+ <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The remaining ten fields show the statistics counter values accumulated since the last generated line. <dl>
+ <dt>Time since restart <tt>36000</tt>
+ <dd>Time in hours since the system was last rebooted. <dt>Packets received <tt>81965</tt>
+ <dd>Total number of packets received.
+ <dt>Packets processed <tt>0</tt>
+ <dd>Number of packets received in response to previous packets sent
+ <dt>Current version <tt>9546</tt>
+ <dd>Number of packets matching the current NTP version.
+ <dt>Previous version <tt>56</tt>
+ <dd>Number of packets matching the previous NTP version. <dt>Bad version <tt>71793</tt>
+ <dd>Number of packets matching neither NTP version. <dt>Access denied <tt>512</tt>
+ <dd>Number of packets denied access for any reason.
+ <dt>Bad length or format <tt>540</tt>
+ <dd>Number of packets with invalid length, format or port number.
+ <dt>Bad authentication <tt>10</tt>
+ <dd>Number of packets not verified as authentic. <dt>Rate exceeded <tt>147</tt>
+ <dd>Number of packets discarded due to rate limitation.
+ </dl>
+ <dt><tt>statsdir <i>directory_path</i></tt>
+ <dd>Indicates the full path of a directory where statistics files should be created (see below). This keyword allows the (otherwise constant) <tt>filegen</tt> filename prefix to be modified for file generation sets, which is useful for handling statistics logs.
+ <dt><tt>filegen <i>name</i> [file <i>filename</i>] [type <i>typename</i>] [link | nolink] [enable | disable]</tt>
+ <dd>Configures setting of generation file set <i>name</i>. Generation file sets provide a means for handling files that are continuously growing during the lifetime of a server. Server statistics are a typical example for such files. Generation file sets provide access to a set of files used to store the actual data. At any time at most one element of the set is being written to. The type given specifies when and how data will be directed to a new element of the set. This way, information stored in elements of a file set that are currently unused are available for administrational operations without the risk of disturbing the operation of <tt>ntpd</tt>. (Most important: they can be removed to free space for new data produced.)
+ <dd>Note that this command can be sent from the <tt>ntpdc</tt> program running at a remote location.
+ <dl>
+ <dt><i><tt>name</tt></i>
+ <dd>This is the type of the statistics records, as shown in the <tt>statistics</tt> command.
+ </dl>
+ <dd><tt>file <i>filename</i></tt>
+ <dl>
+ <dd>This is the file name for the statistics records. Filenames of set members are built from three concatenated elements <i><tt>prefix</tt></i>, <i><tt>filename</tt></i> and <i><tt>suffix</tt></i>:
+ <dl>
+ <dt><i><tt>prefix</tt></i>
+ <dd>This is a constant filename path. It is not subject to modifications via the <tt>filegen</tt> option. It is defined by the server, usually specified as a compile-time constant. It may, however, be configurable for individual file generation sets via other commands. For example, the prefix used with <tt>loopstats</tt> and <tt>peerstats</tt> generation can be configured using the <tt>statsdir</tt> option explained above.
+ <dt><i><tt>filename</tt></i>
+ <dd>This string is directly concatenated to the prefix mentioned above (no intervening <tt>/</tt> (slash)). This can be modified using the <tt>file</tt> argument to the <tt>filegen</tt> statement. No <tt>..</tt> elements are allowed in this component to prevent filenames referring to parts outside the filesystem hierarchy denoted by <tt>prefix</tt>.
+ <dt><i><tt>suffix</tt></i>
+ <dd>This part is reflects individual elements of a file set. It is generated according to the type of a file set.
+ </dl>
+ </dl>
+ <dd><tt>type <i>typename</i></tt>
+ <dl>
+ <dd>A file generation set is characterized by its type. The following types are supported:
+ <dl>
+ <dt><tt>none</tt>
+ <dd>The file set is actually a single plain file.
+ <dt><tt>pid</tt>
+ <dd>One element of file set is used per incarnation of a <tt>ntpd</tt> server. This type does not perform any changes to file set members during runtime, however it provides an easy way of separating files belonging to different <tt>ntpd</tt> server incarnations. The set member filename is built by appending a <tt>.</tt> (dot) to concatenated <i>prefix</i> and <i>filename</i> strings, and appending the decimal representation of the process ID of the <tt>ntpd</tt> server process.
+ <dt><tt>day</tt>
+ <dd>One file generation set element is created per day. A day is defined as the period between 00:00 and 24:00 UTC. The file set member suffix consists of a <tt>.</tt> (dot) and a day specification in the form <tt>YYYYMMdd. YYYY</tt> is a 4-digit year number (e.g., 1992). <tt>MM</tt> is a two digit month number. <tt>dd</tt> is a two digit day number. Thus, all information written at 10 December 1992 would end up in a file named <tt><i>prefix filename</i>.19921210</tt>.
+ <dt><tt>week</tt>
+ <dd>Any file set member contains data related to a certain week of a year. The term week is defined by computing day-of-year modulo 7. Elements of such a file generation set are distinguished by appending the following suffix to the file set filename base: A dot, a 4-digit year number, the letter <tt>W</tt>, and a 2-digit week number. For example, information from January, 10th 1992 would end up in a file with suffix <tt>.1992W1</tt>.
+ <dt><tt>month</tt>
+ <dd>One generation file set element is generated per month. The file name suffix consists of a dot, a 4-digit year number, and a 2-digit month.
+ <dt><tt>year</tt>
+ <dd>One generation file element is generated per year. The filename suffix consists of a dot and a 4 digit year number.
+ <dt><tt>age</tt>
+ <dd>This type of file generation sets changes to a new element of the file set every 24 hours of server operation. The filename suffix consists of a dot, the letter <tt>a</tt>, and an 8-digit number. This number is taken to be the number of seconds the server is running at the start of the corresponding 24-hour period. Information is only written to a file generation by specifying <tt>enable</tt>; output is prevented by specifying <tt>disable</tt>.
+ </dl>
+ </dl>
+ <dd><tt>link | nolink</tt>
+ <dl>
+ <dd>It is convenient to be able to access the current element of a file generation set by a fixed name. This feature is enabled by specifying <tt>link</tt> and disabled using <tt>nolink</tt>. If <tt>link</tt> is specified, a hard link from the current file set element to a file without suffix is created. When there is already a file with this name and the number of links of this file is one, it is renamed appending a dot, the letter <tt>C</tt>, and the pid of the <tt>ntpd</tt> server process. When the number of links is greater than one, the file is unlinked. This allows the current file to be accessed by a constant name.
+ </dl>
+ <dd><tt>enable | disable</tt>
+ <dl>
+ <dd>Enables or disables the recording function.
+ </dl>
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/msyslog.html b/contrib/ntp/html/msyslog.html
new file mode 100644
index 000000000000..8a9a78f7c474
--- /dev/null
+++ b/contrib/ntp/html/msyslog.html
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>ntpd System Log Messages</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3><tt>ntpd</tt> System Log Messages</h3>
+ <img src="pic/alice47.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>The mushroom knows all the error codes, which is more than most of us do.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">02:23</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="254">Saturday, February 01, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <p>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ </p>
+ <hr>
+ <p>You have come here because you found a cryptic message in the system log. This page by no means lists all messages that might be found, since new ones come and old ones go. Generally, however, the most common ones will be found here. They are listed by program module and log severity code in bold: <tt><b>LOG_ERR</b></tt>, <b><tt>LOG_NOTICE</tt></b> and <tt><b>LOG_INFO</b></tt>.</p>
+ <p>Most of the time <b><tt>LOG_ERR</tt></b> messages are fatal, but often <tt>ntpd</tt> limps onward in the hopes of discovering more errors. The <tt><b>LOG_NOTICE</b></tt> messages usually mean the time has changed or some other condition that probably should be noticed. The <tt><b>LOG_INFO</b></tt>&nbsp;messages usually say something about the system operations, but do not affect the time.</p>
+ <p>In the following a '?' character stands for text in the message. The meaning should be clear from context.</p>
+ <h4>Protocol Module</h4>
+ <p><tt><b>LOG_ERR</b></tt></p>
+ <dl>
+ <dt>buffer overflow ?
+ <dd>Fatal error. An input packet is too long for processing.
+ </dl>
+ <p><tt><b>LOG_NOTICE</b></tt></p>
+ <dl>
+ <dt><tt>no reply; clock not set </tt>
+ <dd>In <tt>ntpdate</tt> mode no servers have been found. The server(s) and/or network may be down. Standard debugging procedures apply.
+ </dl>
+ <p><tt><b>LOG_INFO</b></tt></p>
+ <dl>
+ <dt><tt>proto_config: illegal item ?, value ? </tt>
+ <dd>Program error. Please report to bugs@ntp.org.
+ <dt><tt>pps sync enabled </tt>
+ <dd>The PPS signal has been detected and enabled.
+ <dt><tt>transmit: encryption key ? not found </tt>
+ <dd>The key cache is inconsistent. Please report to bugs@ntp.org.
+ <dt><tt>precision = ? usec </tt>
+ <dd>This reports the precision measured for this machine.
+ <dt><tt>using 10ms tick adjustments </tt>
+ <dd>Gotcha for some machines with dirty rotten clock hardware.
+ <dt><tt>no servers reachable </tt>
+ <dd>The system clock is running on internal batteries. The server(s) and/or network may be down.
+ </dl>
+ <h4>Clock Discipline Module</h4>
+ <p><tt><b>LOG_ERR</b></tt></p>
+ <dl>
+ <dt><tt>time correction of ? seconds exceeds sanity limit (?); set clock manually to the correct UTC time</tt>.
+ <dd>Fatal error. Better do what it says, then restart the daemon. Be advised NTP and Unix know nothing about local time zones. The clock must be set to Coordinated Universal Time (UTC). Believe it; by international agreement abbreviations are in French and descriptions are in English.
+ <dt><tt>sigaction() fails to save SIGSYS trap: ? </tt>
+ <dt><tt>sigaction() fails to restore SIGSYS trap: ? </tt>
+ <dd>Program error. Please report to bugs@ntp.org.
+ </dl>
+ <p><tt><b>LOG_NOTICE</b></tt></p>
+ <dl>
+ <dt><tt>frequency error ? exceeds tolerance 500 PPM</tt>
+ <dd>The hardware clock frequency error exceeds the rate the kernel can correct. This could be a hardware or a kernel problem. <dt><tt>time slew ? s </tt>
+ <dd>The time error exceeds the step threshold and is being slewed to the correct time. You may have to wait a very long time.
+ <dt><tt>time reset ? s </tt>
+ <dd>The time error exceeds the step threshold and has been reset to the correct time. Computer scientists don't like this, but they can set the <tt>ntpd -x</tt> option and wait forever.
+ <dt><tt>kernel time sync disabled ? </tt>
+ <dd>The kernel reports an error. See the codes in the <tt>timex.h</tt> file.
+ <dt><tt>pps sync disabled </tt>
+ <dd>The PPS signal has died, probably due to a dead radio, broken wire or loose connector.
+ </dl>
+ <p><tt><b>LOG_INFO</b></tt></p>
+ <tt>kernel time sync status ? </tt>
+ <dl>
+ <dd>For information only. See the codes in the <tt>timex.h</tt> file.
+ </dl>
+ <h4>Cryptographic Module</h4>
+ <p><tt><b>LOG_ERR</b></tt></p>
+ <dl>
+ <dt><tt>cert_parse ? </tt>
+ <dt><tt>cert_sign ? </tt>
+ <dt><tt>crypto_cert ? </tt>
+ <dt><tt>crypto_encrypt ? </tt>
+ <dt><tt>crypto_gq ? </tt>
+ <dt><tt>crypto_iff ? </tt>
+ <dt><tt>crypto_key ? </tt>
+ <dt><tt>crypto_mv ? </tt>
+ <dt><tt>crypto_setup ? </tt>
+ <dt><tt>make_keys ? </tt>
+ <dd>Usually fatal errors. These messages display error codes returned from the OpenSSL library. See the OpenSSL documentation for explanation.
+ <dt><tt>crypto_setup: certificate ? is trusted, but not self signed. </tt>
+ <dt><tt>crypto_setup: certificate ? not for this host </tt>
+ <dt><tt>crypto_setup: certificate file ? not found or corrupt </tt>
+ <dt><tt>crypto_setup: host key file ? not found or corrupt </tt>
+ <dt><tt>crypto_setup: host key is not RSA key type </tt>
+ <dt><tt>crypto_setup: random seed file ? not found</tt>
+ <dt><tt>crypto_setup: random seed file not specified </tt>
+ <dd>Fatal errors. These messages show problems during the initialization procedure.
+ </dl>
+ <p><tt><b>LOG_INFO</b></tt></p>
+ <dl>
+ <dt><tt>cert_parse: expired ? </tt>
+ <dt><tt>cert_parse: invalid issuer ? </tt>
+ <dt><tt>cert_parse: invalid signature ? </tt>
+ <dt><tt>cert_parse: invalid subject ? </tt>
+ <dd>There is a problem with a certificate. Operation cannot proceed untill the problem is fixed. If the certificate is local, it can be regenerated using the <tt>ntp-keygen</tt> program. If it is held somewhere else, it must be fixed by the holder.
+ <dt><tt>crypto_?: defective key </tt>
+ <dt><tt>crypto_?: invalid filestamp </tt>
+ <dt><tt>crypto_?: missing challenge </tt>
+ <dt><tt>crypto_?: scheme unavailable </tt>
+ <dd>There is a problem with the identity scheme. Operation cannot proceed untill the problem is fixed. Usually errors are due to misconfiguration or an orphan association. If the latter, <tt>ntpd</tt> will usually time out and recover by itself.
+ <dt><tt>crypto_cert: wrong PEM type ? </tt>
+ <dd>The certificate does not have MIME type <tt>CERTIFICATE</tt>. You are probably using the wrong type from OpenSSL or an external certificate authority.
+ <dt><tt>crypto_ident: no compatible identity scheme found </tt>
+ <dd>Configuration error. The server and client identity schemes are incompatible.
+ <dt><tt>crypto_tai: kernel TAI update failed </tt>
+ <dd>The kernel does not support this function. You may need a new kernel or patch.
+ <dt><tt>crypto_tai: leapseconds file ? error ? </tt>
+ <dd>The leapseconds file is corrupt. Obtain the latest file from <tt>time.nist.gov</tt>.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/mx4200data.html b/contrib/ntp/html/mx4200data.html
new file mode 100644
index 000000000000..c2ab03a2d979
--- /dev/null
+++ b/contrib/ntp/html/mx4200data.html
@@ -0,0 +1,1073 @@
+<html>
+
+ <head>
+ <title>MX4200 Receiver Data Format</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h1>MX4200 Receiver Data Format</h1>
+ <hr>
+ <h2>Table of Contents</h2>
+ <ul>
+ <li><a href="#control">Control Port Sentences</a>
+ <li><a href="#input">Control Port Input Sentences</a>
+ <ul>
+ <li><a href="#input_000">$PMVXG,000</a> Initialization/Mode Control - Part A
+ <li><a href="#input_001">$PMVXG,001</a> Initialization/Mode Control - Part B
+ <li><a href="#input_007">$PMVXG,007</a> Control Port Configuration
+ <li><a href="#input_023">$PMVXG,023</a> Time Recovery Configuration
+ <li><a href="#input_gpq">$CDGPQ,YYY</a> Query From a Remote Device / Request to Output a Sentence
+ </ul>
+ <li><a href="#output">Control Port Output Sentences</a>
+ <ul>
+ <li><a href="#output_000">$PMVXG,000</a> Receiver Status
+ <li><a href="#output_021">$PMVXG,021</a> Position, Height, Velocity
+ <li><a href="#output_022">$PMVXG,022</a> DOPs
+ <li><a href="#output_030">$PMVXG,030</a> Software Configuration
+ <li><a href="#output_101">$PMVXG,101</a> Control Sentence Accept/Reject
+ <li><a href="#output_523">$PMVXG,523</a> Time Recovery Configuration
+ <li><a href="#output_830">$PMVXG,830</a> Time Recovery Results
+ </ul>
+ </ul>
+ <hr>
+ <h2><a name="control">Control Port Sentences</a></h2>
+ <p>The Control (CDU) Port is used to initialize, monitor, and control the receiver. The structure of the control port sentences is based on the <cite>NMEA-0183</cite> Standard for Interfacing Marine Electronics Navigation Devices (version 1.5). For more details, please refer to the <cite>NMEA-0183</cite> Specification available from the <a href="http://www.nmea.org/">National Marine Electronics Association</a>.</p>
+ <p>Reserved characters are used to indicate the beginning and the end of records in the data stream, and to delimit data fields within a sentence. Only printable ASCII characters (Hex 20 through 7F) may be used in a sentence. <a href="#table_2">Table 2</a> lists the reserved characters and defines their usage. <a href="#table_1">Table 1</a> illustrates the general Magnavox proprietary NMEA sentence format.</p>
+ <h4><a name="table_1">Table 1. Magnavox Proprietary NMEA Sentence Format</a></h4>
+ <code>$PMVXG,XXX,...................*CK </code>
+ <p></p>
+ <table border>
+ <tr>
+ <th>Character</th>
+ <th>Meaning</th>
+ </tr>
+ <tr>
+ <td><code>$</code></td>
+ <td>Sentence Start Character</td>
+ </tr>
+ <tr>
+ <td><code>P</code></td>
+ <td>Special ID (P = Proprietary)</td>
+ </tr>
+ <tr>
+ <td><code>MVX</code></td>
+ <td>Originator ID (MVX = Magnavox)</td>
+ </tr>
+ <tr>
+ <td><code>G</code></td>
+ <td>Interface ID (G = GPS)</td>
+ </tr>
+ <tr>
+ <td><code>XXX</code></td>
+ <td>Sentence Type</td>
+ </tr>
+ <tr>
+ <td><code>...</code></td>
+ <td>Data</td>
+ </tr>
+ <tr>
+ <td><code>*</code></td>
+ <td>Optional Checksum Field Delimiter</td>
+ </tr>
+ <tr>
+ <td><code>CK</code></td>
+ <td>Optional Checksum</td>
+ </tr>
+ </table>
+ <h4><a name="table_2">Table 2. NMEA Sentence Reserved Characters</a></h4>
+ <table border>
+ <tr>
+ <th>Character</th>
+ <th>Hex Value</th>
+ <th>Usage</th>
+ </tr>
+ <tr>
+ <td><code>$</code></td>
+ <td>24</td>
+ <td>Start of Sentence Identifier</td>
+ </tr>
+ <tr>
+ <td><code>{cr}{lf}</code></td>
+ <td>0D 0A</td>
+ <td>End of Sentence Identifier</td>
+ </tr>
+ <tr>
+ <td><code>,</code></td>
+ <td>2C</td>
+ <td>Sentence Delimiter</td>
+ </tr>
+ <tr>
+ <td><code>*</code></td>
+ <td>2A</td>
+ <td>Optional Checksum Field Delimiter</td>
+ </tr>
+ </table>
+ <p>Following the start character <code>$</code>, are five characters which constitute the block label of the sentence. For Magnavox proprietary sentences, this label is always <code>PMVXG</code>. The next field after the block label is the sentence type, consisting of three decimal digits.</p>
+ <p>The data, delimited by commas, follows the sentence type. Note that the receiver uses a free-format parsing algorithm, so you need not send the exact number of characters shown in the examples. You will need to use the commas to determine how many bytes of data need to be retrieved.</p>
+ <p>The notation <code>CK</code> shown in <a href="#table_1">Table 1</a> symbolically indicates the optional checksum in the examples. The checksum is computed by exclusive-ORing all of the bytes between the <code>$</code> and the <code>*</code> characters. The <code>$</code>, <code>*</code> and the checksum are not included in the checksum computation.</p>
+ <p>Checksums are optional for Control Port input sentences, but are highly recommended to limit the effects of communication errors. Magnavox receivers always generate checksums for Control Port output sentences.</p>
+ <p>ASCII data characters are transmitted in the following format:</p>
+ <table border>
+ <tr>
+ <td>Data Bits</td>
+ <td>8 (msb always 0)</td>
+ </tr>
+ <tr>
+ <td>Parity</td>
+ <td>None</td>
+ </tr>
+ <tr>
+ <td>Stop Bits</td>
+ <td>1</td>
+ </tr>
+ </table>
+ <p>NULL fields are fields which do not contain any data. They would appear as two commas together in the sentence format, except for the final field. Some Magnavox proprietary sentences require that the format contain NULL fields. mandatory NULL fields are identified by an '*' next to the respective field.</p>
+ <hr>
+ <h2><a name="input">Control Port Input Sentences</a></h2>
+ These are the subset of the MX4200 control port input sentences sent by the NTP driver to the GPS receiver.
+ <hr>
+ <h3><a name="input_000">$PMVXG,000</a></h3>
+ <h4>Initialization/Mode Control - Part A</h4>
+ Initializes the time, position and antenna height of the MX4200.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Default</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Day</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>1-31</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Month</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>1-12</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Year</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>1991-9999</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>GMT Time</td>
+ <td>HHMMSS</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>000000-235959</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>WGS-84 Latitude</td>
+ <td>DDMM.MMMM</td>
+ <td>Float</td>
+ <td>0.0</td>
+ <td>0 - 8959.9999</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>North/South Indicator</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>N</td>
+ <td>N,S</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>WGS-84 Longitude</td>
+ <td>DDDMM.MMMM</td>
+ <td>Float</td>
+ <td>0.0</td>
+ <td>0 - 17959.9999</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>East/West Indicator</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>E</td>
+ <td>E,W</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>Altitude (height above Mean Sea Level) in meters (WGS-84)</td>
+ <td>Meters</td>
+ <td>Float</td>
+ <td>0.0</td>
+ <td>+/-99999.0</td>
+ </tr>
+ <tr>
+ <td>10</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,000,,,,,,,,,,*48</code><br>
+ <code>$PMVXG,000,,,,,5128.4651,N,00020.0715,W,58.04,*4F</code>
+ <hr>
+ <h3><a name="input_001">$PMVXG,001</a></h3>
+ <h4>Initialization/Mode Control - Part B</h4>
+ Specifies various navigation parameters: Altitude aiding, acceleration DOP limits, and satellite elevation limits.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Default</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>*1</td>
+ <td>Constrain Altitude</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1</td>
+ <td>0=3D Only<br>
+ 1=Auto<br>
+ 2=2D Only</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>*3</td>
+ <td>Horizontal Acceleration Factor</td>
+ <td>m/sec^2</td>
+ <td>Float</td>
+ <td>1.0</td>
+ <td>0.5-10.0</td>
+ </tr>
+ <tr>
+ <td>*4</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>*5</td>
+ <td>VDOP Limit</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>10</td>
+ <td>1-9999</td>
+ </tr>
+ <tr>
+ <td>*6</td>
+ <td>HDOP Limit</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>10</td>
+ <td>1-9999</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Elevation Limit</td>
+ <td>Deg</td>
+ <td>Int</td>
+ <td>5</td>
+ <td>0-90</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>Time Output Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>U</td>
+ <td>U=UTC<br>
+ L=Local Time</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>Local Time Offset</td>
+ <td>HHMM</td>
+ <td>Int</td>
+ <td>0</td>
+ <td>+/- 0-2359</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,001,3,,0.1,0.1,10,10,5,U,0*06</code>
+ <hr>
+ <h3><a name="input_007">$PMVXG,007</a></h3>
+ <h4>Control Port Output Configuration</h4>
+ This message enables or disables output of the specified sentence and defines the output rate. The user sends this message for each sentence that the receiver is to output.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Default</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Control Port Output Block Label</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Clear Current Output List</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>0=No<br>
+ 1=Yes</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Add/Delete Sentence from List</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>1=Append<br>
+ 2=Delete</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>Sentence Output Rate</td>
+ <td>Sec</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>1-9999</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td># digits of Precision for CGA and GLL sentences</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>2</td>
+ <td>2-4</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,007,022,0,1,,1,,,*4F</code>
+ <hr>
+ <h3><a name="input_023">$PMVXG,023</a></h3>
+ <h4>Time Recovery Configuration</h4>
+ This message is used to enable/disable the time recovery feature of the receiver. The time synchronization for the 1PPS output is specified in addition to a user time bias and an error tolerance for a valid pulse. This record is accepted in units configured for time recovery. If the back panel contains a 1PPS outlet, the receiver is a time recovery unit.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Default</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>*1</td>
+ <td>Time Recovery Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>D</td>
+ <td>D=Dynamic<br>
+ S=Static<br>
+ K=Known Position<br>
+ N=No Time Recovery</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Time Synchronization</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>G</td>
+ <td>U=UTC<br>
+ G=GPS</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Time Mark Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>A</td>
+ <td>A=Always<br>
+ V=Valid Pulses Only</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Maximum Time Error</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>100</td>
+ <td>50-1000</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>User Time Bias</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>0</td>
+ <td>+/- 99999</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>ASCII Time Message Control</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0</td>
+ <td>0=No Output<br>
+ 1=830 to Control Port<br>
+ 2=830 to Equipment Port</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Known Pos PRN</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0</td>
+ <td>1-32<br>
+ 0=Track All Sats</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,023,S,U,A,500,0,1,*16</code>
+ <hr>
+ <h3><a name="input_gpq">$CDGPQ,YYY</a></h3>
+ <h4>Query From a Remote Device / Request to Output a Sentence</h4>
+ Enables the controller to request a one-time transmission of a specific block label. To output messages at a periodic rate, refer to input sentence <a href="#input_007">$PMVXG,007</a>.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Default</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1:CD</td>
+ <td>ID of Remote Device</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ <td>(See <cite>NMEA-0183</cite>)</td>
+ </tr>
+ <tr>
+ <td>2:GP</td>
+ <td>GPS</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ <td>(See <cite>NMEA-0183</cite>)</td>
+ </tr>
+ <tr>
+ <td>3:Q</td>
+ <td>Query</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ <td>(See <cite>NMEA-0183</cite>)</td>
+ </tr>
+ <tr>
+ <td>4:YYY</td>
+ <td>Label of Desired Sentence</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ <td>Any Valid NMEA or Magnavox Sentence Type</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$CDGPQ,030*5E</code>
+ <hr>
+ <h2><a name="output">Control Port Output Sentences</a></h2>
+ These are the subset of the MX4200 control port output sentences recognized by the NTP driver.
+ <hr>
+ <h3><a name="output_000">$PMVXG,000</a></h3>
+ <h4>Receiver Status</h4>
+ Returns the current status of the receiver including the operating mode, number of satellites visible, and the number of satellites being tracked.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Current Receiver Status</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>ACQ=Reacquisition<br>
+ ALT=Constellation Selection<br>
+ IAC=Initial Acquisition<br>
+ IDL=Idle, No Satellites<br>
+ NAV=Navigating<br>
+ STS=Search The Sky<br>
+ TRK=Tracking</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Number of Satellites that should be Visible</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0-12</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Number of Satellites being Tracked</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0-12</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Time since Last Navigation</td>
+ <td>HHMM</td>
+ <td>Int</td>
+ <td>0-2359</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>Initialization Status</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0=Waiting for Initialization<br>
+ 1=Initialization Complete</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,000,TRK,3,3,0122,1*19</code>
+ <hr>
+ <h3><a name="output_021">$PMVXG,021</a></h3>
+ <h4>Position, Height, Velocity</h4>
+ This sentence gives the receiver position, height, navigation mode and velocity north/east. <em>This sentence is intended for post analysis applications.</em>
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>UTC Measurement Time</td>
+ <td>Seconds into the week</td>
+ <td>Float</td>
+ <td>0-604800.00</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>WGS-84 Latitude</td>
+ <td>DDMM.MMMM</td>
+ <td>Float</td>
+ <td>0-89.9999</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>North/South Indicator</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>N, S</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>WGS-84 Longitude</td>
+ <td>DDDMM.MMMM</td>
+ <td>Float</td>
+ <td>0-179.9999</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>East/West Indicator</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>E, W</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>Altitude (MSL)</td>
+ <td>Meters</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Geoidal Height</td>
+ <td>Meters</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>Velocity East</td>
+ <td>M/Sec</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>Velocity North</td>
+ <td>M/Sec</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>10</td>
+ <td>Navigation Mode</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td><em>Navigating</em><br>
+ 1=Position From a Remote Device<br>
+ 2=2D<br>
+ 3=3D<br>
+ 4=2D differential<br>
+ 5=3D differential<br>
+ <em>Not Navigating</em><br>
+ 51=Too Few Satellites<br>
+ 52=DOPs too large<br>
+ 53=Position STD too large<br>
+ 54=Velocity STD too large<br>
+ 55=Too many iterations for velocity<br>
+ 56=Too many iterations for position<br>
+ 57=3 Sat Startup failed</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,021,142244.00,5128.4744,N,00020.0593,W,00054.4,0047.4,0000.1,-000.2,03*66</code>
+ <hr>
+ <h3><a name="output_022">$PMVXG,022</a></h3>
+ <h4>DOPs</h4>
+ This sentence reports the DOP (Dilution Of Precision) values actually used in the measurement processing corresponding to the satellites listed. The satellites are listed in receiver channel order. Fields 11-16 are output only on 12-channel receivers.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>UTC Measurement Time</td>
+ <td>Seconds into the week</td>
+ <td>Float</td>
+ <td>0-604800.00</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>East DOP (EDOP)</td>
+ <td>&nbsp;</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>North DOP (NDOP)</td>
+ <td>&nbsp;</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Vertical DOP (VDOP)</td>
+ <td>&nbsp;</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>PRN on Channel #1</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>PRN on Channel #2</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>PRN on Channel #3</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>PRN on Channel #4</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>PRN on Channel #5</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>10</td>
+ <td>PRN on Channel #6</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>11</td>
+ <td>PRN on Channel #7</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>12</td>
+ <td>PRN on Channel #8</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>13</td>
+ <td>PRN on Channel #9</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>14</td>
+ <td>PRN on Channel #10</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>15</td>
+ <td>PRN on Channel #11</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>16</td>
+ <td>PRN on Channel #12</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,022,142243.00,00.7,00.8,01.9,27,26,10,09,13,23*77</code>
+ <hr>
+ <h3><a name="output_030">$PMVXG,030</a></h3>
+ <h4>Software Configuration</h4>
+ This sentence contains the navigation processor and baseband firmware version numbers.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Nav Processor Version Number</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Baseband Firmware Version Number</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,030,DA35,015</code>
+ <hr>
+ <h3><a name="output_101">$PMVXG,101</a></h3>
+ <h4>Control Sentence Accept/Reject</h4>
+ This sentence is returned (on the Control Port) for every <strong>$PMVXG</strong> and <strong>$XXGPQ</strong> sentence that is received.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Sentence ID</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Accept/Reject Status</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0=Sentence Accepted<br>
+ 1=Bad Checksum<br>
+ 2=Illegal Value<br>
+ 3=Unrecognized ID<br>
+ 4=Wrong # of fields<br>
+ 5=Required Data Field Missing<br>
+ 6=Requested Sentence Unavailable</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Bad Field Index</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Requested Sentence ID (If field #1 = GPQ)</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,101,GPQ,0,,030*0D</code>
+ <hr>
+ <h3><a name="output_523">$PMVXG,523</a></h3>
+ <h4>Time Recovery Configuration</h4>
+ This sentence contains the configuration of the time recovery function of the receiver.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Time Recovery Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>D=Dynamic<br>
+ S=Static<br>
+ K=Known Position<br>
+ N=No Time Recovery</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Time Synchronization</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>U=UTC Time<br>
+ G=GPS Time</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Time Mark Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>A=Always Output Time Pulse<br>
+ V=Only when Valid</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Maximum Time Error for which a time mark will be considered valid</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>User Time Bias</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>Time Message Control</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0=No Message<br>
+ 1=830 to Control Port<br>
+ 2=830 to Equipment Port</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,523,S,U,A,0500,000000,1,0*23</code>
+ <hr>
+ <h3><a name="output_830">$PMVXG,830</a></h3>
+ <h4>Time Recovery Results</h4>
+ This sentence is output approximately 1 second preceding the 1PPS output. It indicates the exact time of the next pulse, whether or not the time mark will be valid (based on operator-specified error tolerance), the time to which the pulse is synchronized, the receiver operating mode, and the time error of the <strong>last</strong> 1PPS output. The leap second flag (Field #11) is not output by older receivers.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Time Mark Valid</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>T=Valid<br>
+ F=Not Valid</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Year</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1993-</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Month</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-12</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Day</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>1-31</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>Time</td>
+ <td>HH:MM:SS</td>
+ <td>Int</td>
+ <td>00:00:00-23:59:59</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>Time Synchronization</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>U=UTC<br>
+ G=GPS</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Operating Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>D=Dynamic<br>
+ S=Static<br>
+ K=Known Position</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>Oscillator Offset - estimate of oscillator frequency error</td>
+ <td>PPB</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>Time Mark Error of last pulse</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>10</td>
+ <td>User Time Bias</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>11</td>
+ <td>Leap Second Flag - indicates that a leap second will occur. This value is usually zero except during the week prior to a leap second occurrence, when this value will be set to +/-1. A value of +1 indicates that GPS time will be 1 second further ahead of UTC time.</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>-1,0,1</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,830,T,1998,10,12,15:30:46,U,S,000298,00003,000000,01*02</code>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/notes.html b/contrib/ntp/html/notes.html
new file mode 100644
index 000000000000..96fc1db6524a
--- /dev/null
+++ b/contrib/ntp/html/notes.html
@@ -0,0 +1,279 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Notes on setting up a NTP subnet</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Notes on setting up a NTP subnet</h3>
+ <img src="pic/tonea.gif" alt="gif" align="left">From NBS Special Publication 432 (out of print)
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">20:23</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="257">Monday, December 02, 2002</csobj></p>
+ <br clear="left">
+ <hr>
+ <h4>Introduction</h4>
+ <p>This document is a collection of notes concerning the use of ntpd and related programs, and on coping with the Network Time Protocol (NTP) in general. It is a major rewrite and update of an earlier document written by Dennis Ferguson of the University of Toronto and includes many changes and additions resulting from the NTP Version 3 specification and new Version 4 implementation features. It supersedes earlier documents, which should no longer be used for new configurations.</p>
+ <p><tt>ntpd</tt> includes a complete implementation of the NTP Version 3 specification, as defined in:</p>
+ <ul>
+ <li>Mills, D.L. Network Time Protocol (Version 3) specification, implementation and analysis. Network Working Group Report RFC-1305, University of Delaware, March 1992, 113 pp. Abstract: <a href="http://www.eecis.udel.edu/%7emills/database/rfc/rfc1305/rfc1305a.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/rfc/rfc1305/rfc1305a.pdf">PDF</a>, Body: <a href="http://www.eecis.udel.edu/%7emills/database/rfc/rfc1305/rfc1305b.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/rfc/rfc1305/rfc1305b.pdf">PDF</a>, Appendices: <a href="http://www.eecis.udel.edu/%7emills/database/rfc/rfc1305/rfc1305c.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/rfc/rfc1305/rfc1305c.pdf">PDF</a>
+ </ul>
+ <p>Additional features have are described for <a href="release.html">NTP Version 4 Release Notes</a>. It also retains compatibility with both NTP Version 2, as defined in RFC-1119, and NTP Version 1, as defined in RFC-1059, although this compatibility is sometimes strained and only semiautomatic. In order to support in principle the ultimate precision of about 232 picoseconds in the NTP specification, <tt>ntpd</tt> uses NTP timestamp format for external communication and double precision floating point arithmetic internally. <tt>ntpd</tt> fully implements NTP Versions 2 and 3 authentication and in addition Version 4 autokey. It supports the NTP mode-6 control message facility along with a private mode-7 control- message facility used to remotely reconfigure the system and monitor a considerable amount of internal detail. As extensions to the specification, a flexible address-and-mask restriction facility has been included.</p>
+ <p>The code is biased towards the needs of a busy time server with numerous, often hundreds, of clients and other servers. Tables are hashed to allow efficient handling of many associations, though at the expense of additional overhead when the number of associations is small. Many fancy features have been included to permit efficient management and monitoring of a busy primary server, features which are probably excess baggage for a high stratum client. In such cases, a stripped-down version of the protocol, the Simple Network Time Protocol (SNTP) can be used. SNTP and NTP servers and clients can interwork in most situations, as described in: Mills, D.L. Simple Network Time Protocol (SNTP). Network Working Group Report RFC-2030, University of Delaware, October 1996, 14 pp. <a href="http://www.eecis.udel.edu/%7emills/database/rfc2030.txt">(ASCII)</a>.</p>
+ <p>The code was written with near demonic attention to details which can affect precision and as a consequence should be able to make good use of high performance, special purpose hardware such as precision oscillators and radio clocks. The present code supports a number of radio clocks, including those for the WWV, CHU, WWVB, MSF, DCF77, GOES and GPS radio and satellite time services and USNO, ACTS and PTB modem time services. It also supports the IRIG-B and IRIG-E signal format connected via an audio codec. The server methodically avoids the use of Unix-specific library routines where possible by implementing local versions, in order to aid in porting the code to perverse Unix and non-Unix platforms.</p>
+ <p>While this implementation conforms in most respects to the NTP Version 3 specification RFC-1305, a number of improvements have been made which are described in the conformance statement in the <a href="http://www.eecis.udel.edu/%7emills/biblio.html">NTP Protocol Conformance Statement</a> page. It has been specifically tuned to achieve the highest accuracy possible on whatever hardware and operating-system platform is available. In general, its precision and stability are limited only by the characteristics of the onboard clock source used by the hardware and operating system, usually an uncompensated crystal oscillator. On modern RISC-based processors connected directly to radio clocks via serial-asynchronous interfaces, the accuracy is usually limited by the radio clock and interface to the order of a millisecond or less. The code includes special features to support a pulse-per-second (PPS) signal and/or an IRIG-B signal generated by some radio clocks. When used in conjunction with a suitable hardware level converter, the accuracy can be improved to a few tens of microseconds. Further improvement is possible using an outboard, stabilized frequency source, in which the accuracy and stability are limited only by the characteristics of that source.</p>
+ <p>The NTP Version 4 distribution includes, in addition to the daemon itself (<tt><a href="ntpd.html">ntpd</a></tt>), several utility programs, including two remote-monitoring programs (<a href="ntpq.html"><tt>ntpq</tt></a>, <tt><a href="ntpdc.html">ntpdc</a></tt>), a remote clock-setting program similar to the Unix rdate program (<tt>ntpdate</tt>), a traceback utility u seful to discover suitable synchronization sources (<tt>ntptrace</tt>), and various programs used to configure the local platform and calibrate the intrinsic errors. NTP has been ported to a large number of platforms, including most RISC and CISC workstations and mainframes manufactured today. Example configuration files for many models of these machines are included in the distribution. While in most cases the standard version of the implementation runs with no hardware or operating system modifications, not all features of the distribution are available on all platforms. For instance, a special feature allowing Sun workstations to achieve accuracies in the order of 100 microseconds requires some minor changes and additions to the kernel and input/output support.</p>
+ <p>There are, however, several drawbacks to all of this. <tt>ntpd</tt> is quite fat. This is rotten if your intended platform for the daemon is memory limited. <tt>ntpd</tt> uses <tt>SIGIO</tt> for all input, a facility which appears to not enjoy universal support and whose use seems to exercise the parts of your vendors' kernels which are most likely to have been done poorly. The code is unforgiving in the face of kernel problems which affect performance, and generally requires that you repair the problems in order to achieve acceptable performance. The code has a distinctly experimental flavour and contains features which could charitably be termed failed experiments, but which have not been completely hacked out. Much was learned from the addition of support for a variety of radio clocks, with the result that some radio clock drivers could use some rewriting.</p>
+ <h4>How NTP Works</h4>
+ <p>The approach used by NTP to achieve reliable time synchronization from a set of possibly unreliable remote time servers is somewhat different than other protocols. In particular, NTP does not attempt to synchronize clocks to each other. Rather, each server attempts to synchronize to Universal Coordinated Time (UTC) using the best available source and available transmission paths to that source. This is a fine point which is worth understanding. A group of NTP-synchronized clocks may be close to each other in time, but this is not a consequence of the clocks in the group having synchronized to each other, but rather because each clock has synchronized closely to UTC via the best source it has access to. As such, trying to synchronize a set of clocks to a set of servers whose time is not in mutual agreement may not result in any sort of useful synchronization of the clocks, even if you don't care about UTC. However, in networks isolated from UTC sources, provisions can made to nominate one of them as a phantom UTC source.</p>
+ <p>NTP operates on the premise that there is one true standard time, and that if several servers which claim synchronization to standard time disagree about what that time is, then one or more of them must be broken. There is no attempt to resolve differences more gracefully since the premise is that substantial differences cannot exist. In essence, NTP expects that the time being distributed from the root of the synchronization subnet will be derived from some external source of UTC (e.g., a radio clock). This makes it somewhat inconvenient (though by no means impossible) to synchronize hosts together without a reliable source of UTC to synchronize them to. If your network is isolated and you cannot access other people's servers across the Internet, a radio clock may make a good investment.</p>
+ <p>Time is distributed through a hierarchy of NTP servers, with each server adopting a <i>stratum</i> which indicates how far away from an external source of UTC it is operating at. Stratum-1 servers, which are at the top of the pile (or bottom, depending on your point of view), have access to some external time source, usually a radio clock synchronized to time signal broadcasts from radio stations which explicitly provide a standard time service. A stratum-2 server is one which is currently obtaining time from a stratum-1 server, a stratum-3 server gets its time from a stratum-2 server, and so on. To avoid long lived synchronization loops the number of strata is limited to 15.</p>
+ <p>Each client in the synchronization subnet (which may also be a server for other, higher stratum clients) chooses exactly one of the available servers to synchronize to, usually from among the lowest stratum servers it has access to. This is, however, not always an optimal configuration, for indeed NTP operates under another premise as well, that each server's time should be viewed with a certain amount of distrust. NTP really prefers to have access to several sources of lower stratum time (at least three) since it can then apply an agreement algorithm to detect insanity on the part of any one of these. Normally, when all servers are in agreement, NTP will choose the best of these, where &quot;best&quot; is defined in terms of lowest stratum, closest (in terms of network delay) and claimed precision, along with several other considerations. The implication is that, while one should aim to provide each client with three or more sources of lower stratum time, several of these will only be providing backup service and may be of lesser quality in terms of network delay and stratum (i.e., a same-stratum peer which receives time from lower stratum sources the local server doesn't access directly can also provide good backup service).</p>
+ <p>Finally, there is the issue of association modes. There are a number of modes in which NTP servers can associate with each other, with the mode of each server in the pair indicating the behaviour the other server can expect from it. In particular, when configuring a server to obtain time from other servers, there is a choice of two modes which may be used. Configuring an association in symmetric-active mode (usually indicated by a <tt>peer</tt> declaration in the configuration file) indicates to the remote server that one wishes to obtain time from the remote server and that one is also willing to supply time to the remote server if need be. This mode is appropriate in configurations involving a number of redundant time servers interconnected via diverse network paths, which is presently the case for most stratum-1 and stratum-2 servers on the Internet today. Configuring an association in client mode (usually indicated by a <tt>server</tt> declaration in the configuration file) indicates that one wishes to obtain time from the remote server, but that one is not willing to provide time to the remote server. This mode is appropriate for file-server and workstation clients that do not provide synchronization to other local clients. Client mode is also useful for boot-date-setting programs and the like, which really have no time to provide and which don't retain state about associations over the longer term.</p>
+ <p>Where the requirements in accuracy and reliability are modest, clients can be configured to use broadcast and/or multicast modes. These modes are not normally utilized by servers with dependent clients. The advantage of these modes is that clients do not need to be configured for a specific server, so that all clients operating can use the same configuration file. Broadcast mode requires a broadcast server on the same subnet, while multicast mode requires support for IP multicast on the client machine, as well as connectivity via the MBONE to a multicast server. Since broadcast messages are not propagated by routers, only those broadcast servers on the same subnet will be used. There is at present no way to select which of possibly many multicast servers will be used, since all operate on the same group address.</p>
+ <p>Where the maximum accuracy and reliability provided by NTP are needed, clients and servers operate in either client/server or symmetric modes. Symmetric modes are most often used between two or more servers operating as a mutually redundant group. In these modes, the servers in the group members arrange the synchronization paths for maximum performance, depending on network jitter and propagation delay. If one or more of the group members fail, the remaining members automatically reconfigure as required. Dependent clients and servers normally operate in client/server mode, in which a client or dependent server can be synchronized to a group member, but no group member can synchronize to the client or dependent server. This provides protection against malfunctions or protocol attacks.</p>
+ <p>Servers that provide synchronization to a sizeable population of clients normally operate as a group of three or more mutually redundant servers, each operating with three or more stratum-one or stratum-two servers in client-server modes, as well as all other members of the group in symmetric modes. This provides protection against malfunctions in which one or more servers fail to operate or provide incorrect time. The NTP algorithms have been specifically engineered to resist attacks where some fraction of the configured synchronization sources accidently or purposely provide incorrect time. In these cases a special voting procedure is used to identify spurious sources and discard their data.</p>
+ <h4>Configuring Your Subnet</h4>
+ At startup time the <tt>ntpd</tt> daemon running on a host reads the initial configuration information from a file, usually <tt>/etc/ntp.conf</tt>, unless a different name has been specified at compile time. Putting something in this file which will enable the host to obtain time from somewhere else is usually the first big hurdle after installation of the software itself, which is described in the <a href="build.html">Building and Installing the Distribution</a> page. At its simplest, what you need to do in the configuration file is declare the servers that the daemon should poll for time synchronization. In principle, no such list is needed if some other time server operating in broadcast/multicast mode is available, which requires the client to operate in a broadcastclient mode.
+ <p>In the case of a workstation operating in an enterprise network for a public or private organization, there is often an administrative department that coordinates network services, including NTP. Where available, the addresses of appropriate servers can be provided by that department. However, if this infrastructure is not available, it is necessary to explore some portion of the existing NTP subnet now running in the Internet. There are at present many thousands of time servers running NTP in the Internet, a significant number of which are willing to provide a public time- synchronization service. Some of these are listed in the list of public time servers, which can be accessed via the <a href="http://www.eecis.udel.edu/%7entp">NTP web page</a>. These data are updated on a regular basis using information provided voluntarily by various site administrators. There are other ways to explore the nearby subnet using the <tt><a href="ntptrace.html">ntptrace</a></tt> and <tt><a href="ntpdc.html">ntpdc</a></tt> programs.</p>
+ <p>It is vital to carefully consider the issues of robustness and reliability when selecting the sources of synchronization. Normally, not less than three sources should be available, preferably selected to avoid common points of failure. It is usually better to choose sources which are likely to be &quot;close&quot; to you in terms of network topology, though you shouldn't worry overly about this if you are unable to determine who is close and who isn't. Normally, it is much more serious when a server becomes faulty and delivers incorrect time than when it simply stops operating, since an NTP-synchronized host normally can coast for hours or even days without its clock accumulating serious error approaching a second, for instance. Selecting at least three sources from different operating administrations, where possible, is the minimum recommended, although a lesser number could provide acceptable service with a degraded degree of robustness.</p>
+ <p>Normally, it is not considered good practice for a single workstation to request synchronization from a primary (stratum-1) time server. At present, these servers provide synchronization for hundreds of clients in many cases and could, along with the network access paths, become seriously overloaded if large numbers of workstation clients requested synchronization directly. Therefore, workstations located in sparsely populated administrative domains with no local synchronization infrastructure should request synchronization from nearby stratum-2 servers instead. In most cas es the keepers of those servers in the lists of public servers provide unrestricted access without prior permission; however, in all cases it is considered polite to notify the administrator listed in the file upon commencement of regular service. In all cases the access mode and notification requirements listed in the file must be respected. Under no conditions should servers not in these lists be used without prior permission, as to do so can create severe problems in the local infrastructure, especially in cases of dial-up access to the Internet.</p>
+ <p>In the case of a gateway or file server providing service to a significant number of workstations or file servers in an enterprise network it is even more important to provide multiple, redundant sources of synchronization and multiple, diversity-routed, network access paths. The preferred configuration is at least three administratively coordinated time servers providing service throughout the administrative domain including campus networks and subnetworks. Each of these should obtain service from at least two different outside sources of synchronization, preferably via different gateways and access paths. These sources should all operate at the same stratum level, which is one less than the stratum level to be used by the local time servers themselves. In addition, each of these time servers should peer with all of the other time servers in the local administrative domain at the stratum level used by the local time servers, as well as at least one (different) outside source at this level. This configuration results in the use of six outside sources at a lower stratum level (toward the primary source of synchronization, usually a radio clock), plus three outside sources at the same stratum level, for a total of nine outside sources of synchronization. While this may seem excessive, the actual load on network resources is minimal, since the interval between polling messages exchanged between peers usually ratchets back to no more than one message every 17 minutes.</p>
+ <p>The stratum level to be used by the local time servers is an engineering choice. As a matter of policy, and in order to reduce the load on the primary servers, it is desirable to use the highest stratum consistent with reliable, accurate time synchronization throughout the administrative domain. In the case of enterprise networks serving hundreds or thousands of client file servers and workstations, conventional practice is to obtain service from stratum-1 primary servers listed for public access. When choosing sources away from the primary sources, the particular synchronization path in use at any time can be verified using the <tt>ntptrace</tt> program included in this distribution. It is important to avoid loops and possible common points of failure when selecting these sources. Note that, while NTP detects and rejects loops involving neighboring servers, it does not detect loops involving intervening servers. In the unlikely case that all primary sources of synchronization are lost throughout the subnet, the remaining servers on that subnet can form temporary loops and, if the loss continues for an interval of many hours, the servers will drop off the subnet and free-run with respect to their internal (disciplined) timing sources. After some period with no outside timing source (currently one day), a host will declare itself unsynchronized and provide this information to local application programs.</p>
+ <p>In many cases the purchase of one or more radio clocks is justified, in which cases good engineering practice is to use the configurations described above anyway and connect the radio clock to one of the local servers. This server is then encouraged to participate in a special primary-server subnetwork in which each radio-equipped server peers with several other similarly equipped servers. In this way the radio-equipped server may provide synchronization, as well as receive synchronization, should the local or remote radio clock(s) fail or become faulty. <tt>ntpd</tt> treats attached radio clock(s) in the same way as other servers and applies the same criteria and algorithms to the time indications, so can detect when the radio fails or becomes faulty and switch to alternate sources of synchronization. It is strongly advised, and in practice for most primary servers today, to employ the authentication or access-control features of the NTP specification in order to protect against hostile intruders and possible destabilization of the time service. Using this or similar strategies, the remaining hosts in the same administrative domain can be synchronized to the three (or more) selected time servers. Assuming these servers are synchronized directly to stratum-1 sources and operate normally as stratum-2, the next level away from the primary source of synchronization, for instance various campus file servers, will operate at stratum 3 and dependent workstations at stratum 4. Engineered correctly, such a subnet will survive all but the most exotic failures or even hostile penetrations of the various, distributed timekeeping resources.</p>
+ <p>The above arrangement should provide very good, robust time service with a minimum of traffic to distant servers and with manageable loads on the local servers. While it is theoretically possible to extend the synchronization subnet to even higher strata, this is seldom justified and can make the maintenance of configuration files unmanageable. Serving time to a higher stratum peer is very inexpensive in terms of the load on the lower stratum server if the latter is located on the same concatenated LAN. When justified by the accuracy expectations, NTP can be operated in broadcast and multicast modes, so that clients need only listen for periodic broadcasts and do not need to send anything.</p>
+ <p>When planning your network you might, beyond this, keep in mind a few generic don'ts, in particular:</p>
+ <ul>
+ <li>Don't synchronize a local time server to another peer at the same stratum, unless the latter is receiving time from lower stratum sources the former doesn't talk to directly. This minimizes the occurrence of common points of failure, but does not eliminate them in cases where the usual chain of associations to the primary sources of synchronization are disrupted due to failures.
+ <li style="list-style: none"><br>
+ <li>Don't configure peer associations with higher stratum servers. Let the higher strata configure lower stratum servers, but not the reverse. This greatly simplifies configuration file maintenance, since there is usually much greater configuration churn in the high stratum clients such as personal workstations.
+ <li style="list-style: none"><br>
+ <li>Don't synchronize more than one time server in a particular administrative domain to the same time server outside that domain. Such a practice invites common points of failure, as well as raises the possibility of massive abuse, should the configuration file be automatically distributed do a large number of clients.
+ </ul>
+ There are many useful exceptions to these rules. When in doubt, however, follow them.
+ <h4>Configuring Your Server or Client</h4>
+ <p>As mentioned previously, the configuration file is usually called /etc/ntp.conf. This is an ASCII file conforming to the usual comment and whitespace conventions. A working configuration file might look like (in this and other examples, do not copy this directly):</p>
+ <pre>
+ # peer configuration for host whimsy
+ # (expected to operate at stratum 2)
+
+ server rackety.udel.edu
+ server umd1.umd.edu
+ server lilben.tn.cornell.edu
+
+ driftfile /etc/ntp.drift
+</pre>
+ (Note the use of host names, although host addresses in dotted-quad notation can also be used. It is always preferable to use names rather than addresses, since over time the addresses can change, while the names seldom change.)
+ <p>This particular host is expected to operate as a client at stratum 2 by virtue of the <tt>server</tt> keyword and the fact that two of the three servers declared (the first two) have radio clocks and usually run at stratum 1. The third server in the list has no radio clock, but is known to maintain associations with a number of stratum 1 peers and usually operates at stratum 2. Of particular importance with the last host is that it maintains associations with peers besides the two stratum 1 peers mentioned. This can be verified using the <tt>ntpq</tt> program mentioned above. When configured using the <tt>server</tt> keyword, this host can receive synchronization from any of the listed servers, but can never provide synchronization to them.</p>
+ <p>Unless restricted using facilities described later, this host can provide synchronization to dependent clients, which do not have to be listed in the configuration file. Associations maintained for these clients are transitory and result in no persistent state in the host. These clients are normally not visible using the <tt>ntpq</tt> program included in the distribution; however, <tt>ntpd</tt> includes a monitoring feature (described later) which caches a minimal amount of client information useful for debugging administrative purposes.</p>
+ <p>A time server expected to both receive synchronization from another server, as well as to provide synchronization to it, is declared using the <tt>peer</tt> keyword instead of the <tt>server</tt> keyword. In all other aspects the server operates the same in either mode and can provide synchronization to dependent clients or other peers. If a local source of UTC time is available, it is considered good engineering practice to declare time servers outside the administrative domain as <tt>peer</tt> and those inside as <tt>server</tt> in order to provide redundancy in the global Internet, while minimizing the possibility of instability within the domain itself. A time server in one domain can in principle heal another domain temporarily isolated from all other sources of synchronization. However, it is probably unwise for a casual workstation to bridge fragments of the local domain which have become temporarily isolated.</p>
+ <p>Note the inclusion of a <tt>driftfile</tt> declaration. One of the things the NTP daemon does when it is first started is to compute the error in the intrinsic frequency of the clock on the computer it is running on. It usually takes about a day or so after the daemon is started to compute a good estimate of this (and it needs a good estimate to synchronize closely to its server). Once the initial value is computed, it will change only by relatively small amounts during the course of continued operation. The <tt>driftfile</tt> declaration indicates to the daemon the name of a file where it may store the current value of the frequency error so that, if the daemon is stopped and restarted, it can reinitialize itself to the previous estimate and avoid the day's worth of time it will take to recompute the frequency estimate. Since this is a desirable feature, a <tt>driftfile</tt> declaration should always be included in the configuration file.</p>
+ <p>An implication in the above is that, should <tt>ntpd</tt> be stopped for some reason, the local platform time will diverge from UTC by an amount that depends on the intrinsic error of the clock oscillator and the time since last synchronized. In view of the length of time necessary to refine the frequency estimate, every effort should be made to operate the daemon on a continuous basis and minimize the intervals when for some reason it is not running.</p>
+ <h4>Configuring NTP with NetInfo</h4>
+ If NetInfo support is compiled into NTP, you can opt to configure ntp in your NetInfo domain. NTP will look int he NetInfo directory <tt>/locations/ntp</tt> for property/value pairs which are equivalent the the lines in the configuration file described above. Each configuration keyword may have a coresponding property in NetInfo. Each value for a given property is treated as arguments to that property, similar to a line in the configuration file.
+ <p>For example, the configuration shown in the configuration file above can be duplicated in NetInfo by adding a property &quot;<tt>server</tt>&quot; with values &quot;<tt>rackety.udel.edu</tt>&quot;, &quot;<tt>umd1.umd.edu</tt>&quot;, and &quot;<tt>lilben.tn.cornell.edu</tt>&quot;; and a property &quot;<tt>driftfile</tt>&quot; with the single value &quot;<tt>/etc/ntp.drift</tt>&quot;.</p>
+ <p>Values may contain multiple tokens similar to the arguments available in the configuration file. For example, to use <tt>mimsy.mil</tt> as an NTP version 1 time server, you would add a value &quot;<tt>mimsy.mil version 1</tt>&quot; to the &quot;<tt>server</tt>&quot; property.</p>
+ <h4>Ntp4 Versus Previous Versions</h4>
+ There are several items of note when dealing with a mixture of <tt>ntp4</tt> and previous distributions of NTP Version 2 (<tt>ntpd</tt>) and NTP Version 1 (<tt>ntp3.4</tt>). The <tt>ntp4</tt> implementation conforms to the NTP Version 3 specification RFC-1305 and, in addition, contains additional feaures documented in the <a href="release.html">Release Notes</a> page. As such, by default when no additional information is available concerning the preferences of the peer, <tt>ntpd</tt> claims to be version 4 in the packets that it sends from configured associations. The <tt>version</tt> subcommand of the <tt>server</tt>, <tt>peer</tt>, <tt>broadcast</tt> and <tt>manycastclient</tt> command can be used to change the default. In unconfigured (ephemeral) associaitons, the daemon always replies in the same version as the request.
+ <p>An NTP implementation conforming to a previous version specification ordinarily discards packets from a later version. However, in most respects documented in RFC-1305, The version 2 implementation is compatible with the version 3 algorithms and protocol. The version 1 implementation contains most of the version 2 algorithms, but without important features for clock selection and robustness. Nevertheless, in most respects the NTP versions are backwards compatible. The sticky part here is that, when a previous version implementation receives a packet claiming to be from a version 4 server, it discards it without further processing. Hence there is a danger that in some situations synchronization with previous versions will fail.</p>
+ <p>The trouble occurs when an previous version is to be included in an <tt>ntpd</tt> configuration file. With no further indication, <tt>ntpd</tt> will send packets claiming to be version 4 when it polls. To get around this, <tt>ntpd</tt> allows a qualifier to be added to configuration entries to indicate which version to use when polling. Hence the entries</p>
+ <pre>
+ # specify NTP version 1
+
+ server mimsy.mil version
+1 # server running ntpd version 1
+ server apple.com version
+2 # server running ntpd version 2
+</pre>
+ will cause version 1 packets to be sent to the host mimsy.mil and version 2 packets to be sent to apple.com. If you are testing <tt>ntpd</tt> against previous version servers you will need to be careful about this. Note that, as indicated in the RFC-1305 specification, there is no longer support for the original NTP specification, once called NTP Version 0.
+ <h4>Traffic Monitoring</h4>
+ <tt>ntpd</tt> handles peers whose stratum is higher than the stratum of the local server and polls using client mode by a fast path which minimizes the work done in responding to their polls, and normally retains no memory of these pollers. Sometimes, however, it is interesting to be able to determine who is polling the server, and how often, as well as who has been sending other types of queries to the server.
+ <p>To allow this, <tt>ntpd</tt> implements a traffic monitoring facility which records the source address and a minimal amount of other information from each packet which is received by the server. This feature is normally enabled, but can be disabled if desired using the configuration file entry:</p>
+ <pre>
+ # disable monitoring feature
+ disable monitor
+</pre>
+ The recorded information can be displayed using the <tt>ntpdc</tt> query program, described briefly below.
+ <h4>Address-and-Mask Restrictions</h4>
+ The address-and-mask configuration facility supported by <tt>ntpd</tt> is quite flexible and general, but is not an integral part of the NTP Version 3 specification. The major drawback is that, while the internal implementation is very nice, the user interface is not. For this reason it is probably worth doing an example here. Briefly, the facility works as follows. There is an internal list, each entry of which holds an address, a mask and a set of flags. On receipt of a packet, the source address of the packet is compared to each entry in the list, with a match being posted when the following is true:
+ <pre>
+ (source_addr &amp; mask) == (address &amp;
+mask)
+</pre>
+ A particular source address may match several list entries. In this case the entry with the most one bits in the mask is chosen. The flags associated with this entry are used to control the access.
+ <p>In the current implementation the flags always add restrictions. In effect, an entry with no flags set leaves matching hosts unrestricted. An entry can be added to the internal list using a <tt>restrict</tt> declaration. The flags associated with the entry are specified textually. For example, the <tt>notrust</tt> flag indicates that hosts matching this entry, while treated normally in other respects, shouldn't be trusted to provide synchronization even if otherwise so enabled. The <tt>nomodify</tt> flag indicates that hosts matching this entry should not be allowed to do run-time configuration. There are many more flags, see the <a href="ntpd.html"><tt>ntpd</tt></a> page.</p>
+ <p>Now the example. Suppose you are running the server on a host whose address is 128.100.100.7. You would like to ensure that run time reconfiguration requests can only be made from the local host and that the server only ever synchronizes to one of a pair of off-campus servers or, failing that, a time source on net 128.100. The following entries in the configuration file would implement this policy:</p>
+ <pre>
+ # by default, don't trust and don't allow
+modifications
+
+ restrict default notrust nomodify
+
+ # these guys are trusted for time, but no
+modifications allowed
+
+ restrict 128.100.0.0 mask 255.255.0.0 nomodify
+ restrict 128.8.10.1 nomodify
+ restrict 192.35.82.50 nomodify
+
+ # the local addresses are unrestricted
+
+ restrict 128.100.100.7
+ restrict 127.0.0.1
+</pre>
+ The first entry is the default entry, which all hosts match and hence which provides the default set of flags. The next three entries indicate that matching hosts will only have the <tt>nomodify</tt> flag set and hence will be trusted for time. If the mask isn't specified in the <tt>restrict</tt> keyword, it defaults to 255.255.255.255. Note that the address 128.100.100.7 matches three entries in the table, the default entry (mask 0.0.0.0), the entry for net 128.100 (mask 255.255.0.0) and the entry for the host itself (mask 255.255.255.255). As expected, the flags for the host are derived from the last entry since the mask has the most bits set.
+ <p>The only other thing worth mentioning is that the <tt>restrict</tt> declarations apply to packets from all hosts, including those that are configured elsewhere in the configuration file and even including your clock pseudopeer(s), if any. Hence, if you specify a default set of restrictions which you don't wish to be applied to your configured peers, you must remove those restrictions for the configured peers with additional <tt>restrict</tt> declarations mentioning each peer separately.</p>
+ <h4>Authentication</h4>
+ <tt>ntpd</tt> supports the optional authentication procedure specified in the NTP Version 2 and 3 specifications. Briefly, when an association runs in authenticated mode, each packet transmitted has appended to it a 32-bit key ID and a 64/128-bit cryptographic checksum of the packet contents computed using either the Data Encryption Standard (DES) or Message Digest (MD5) algorithms. Note that, while either of these algorithms provide sufficient protection from message- modification attacks, distribution of the former algorithm implementation is restricted to the U.S. and Canada, while the latter presently is free from such restrictions. For this reason, the DES algorithm is not included in the current distribution. Directions for obtaining it in other countries is in the <a href="build.html">Building and Installing the Distribution</a> page. With either algorithm the receiving peer recomputes the checksum and compares it with the one included in the packet. For this to work, the peers must share at least one encryption key and, furthermore, must associate the shared key with the same key ID.
+ <p>This facility requires some minor modifications to the basic packet processing procedures, as required by the specification. These modifications are enabled by the <tt>enable auth</tt> configuration declaration, which is currently the default. In authenticated mode, peers which send unauthenticated packets, peers which send authenticated packets which the local server is unable to decrypt and peers which send authenticated packets encrypted using a key we don't trust are all marked untrustworthy and unsuitable for synchronization. Note that, while the server may know many keys (identified by many key IDs), it is possible to declare only a subset of these as trusted. This allows the server to share keys with a client which requires authenticated time and which trusts the server, but which is not trusted by the server. Also, some additional configuration language is required to specify the key ID to be used to authenticate each configured peer association. Hence, for a server running in authenticated mode, the configuration file might look similar to the following:</p>
+ <pre>
+ # peer configuration for 128.100.100.7
+ # (expected to operate at stratum 2)
+ # fully authenticated this time
+
+ peer 128.100.49.105 key 22 #
+suzuki.ccie.utoronto.ca
+ peer 128.8.10.1 key 4 #
+umd1.umd.edu
+ peer 192.35.82.50 key 6 #
+lilben.tn.cornell.edu
+
+ keys /usr/local/etc/ntp.keys # path for
+key file
+ trustedkey 1 2 14 15 #
+define trusted keys
+ requestkey
+15 #
+key (7) for accessing server variables
+ controlkey
+15 #
+key (6) for accessing server variables
+
+ authdelay
+0.000094 # authentication delay
+(Sun4c/50 IPX)
+</pre>
+ There are a couple of previously unmentioned things in here. The <tt>keys</tt> line specifies the path to the keys file (see below and the <tt>ntpd</tt> document page for details of the file format). The <tt>trustedkey</tt> declaration identifies those keys that are known to be uncompromised; the remainder presumably represent the expired or possibly compromised keys. Both sets of keys must be declared by key identifier in the <tt>ntp.keys</tt> file described below. This provides a way to retire old keys while minimizing the frequency of delicate key-distribution procedures. The <tt>requestkey</tt> line establishes the key to be used for mode-6 control messages as specified in RFC-1305 and used by the <tt>ntpq</tt> utility program, while the <tt>controlkey</tt> line establishes the key to be used for mode-7 private control messages used by the <tt>ntpdc</tt> utility program. These keys are used to prevent unauthorized modification of daemon variables.
+ <p>Ordinarily, the authentication delay; that is, the processing time taken between the freezing of a transmit timestamp and the actual transmission of the packet when authentication is enabled (i.e. more or less the time it takes for the DES or MD5 routine to encrypt a single block) is computed automatically by the daemon. If necessary, the delay can be overriden by the <tt>authdelay</tt> line, which is used as a correction for the transmit timestamp.</p>
+ Additional utility programs included in the <tt>./authstuff</tt> directory can be used to generate random keys, certify implementation correctness and display sample keys. As a general rule, keys should be chosen randomly, except possibly the request and control keys, which must be entered by the user as a password.
+ <p>The <tt>ntp.keys</tt> file contains the list of keys and associated key IDs the server knows about (for obvious reasons this file is better left unreadable by anyone except root). The contents of this file might look like:</p>
+ <pre>
+ # ntp keys file (ntp.keys)
+ 1 N
+29233E0461ECD6AE # des key in NTP format
+ 2 M
+RIrop8KPPvQvYotM # md5 key as an ASCII random string
+ 14 M
+sundial
+; # md5 key as an ASCII string
+ 15 A
+sundial
+; # des key as an ASCII string
+
+ # the following 3 keys are identical
+
+ 10 A SeCReT
+ 10 N
+d3e54352e5548080
+ 10 S
+a7cb86a4cba80101
+</pre>
+ In the keys file the first token on each line indicates the key ID, the second token the format of the key and the third the key itself. There are four key formats. An <tt>A</tt> indicates a DES key written as a 1- to-8 character string in 7-bit ASCII representation, with each character standing for a key octet (like a Unix password). An <tt>S</tt> indicates a DES key written as a hex number in the DES standard format, with the low order bit (LSB) of each octet being the (odd) parity bit. An <tt>N</tt> indicates a DES key again written as a hex number, but in NTP standard format with the high order bit of each octet being the (odd) parity bit (confusing enough?). An <tt>M</tt> indicates an MD5 key written as a 1-to-31 character ASCII string in the <tt>A</tt> format. Note that, because of the simple tokenizing routine, the characters <tt>' ', '#', '\t', '\n'</tt> and <tt>'\0'</tt> can't be used in either a DES or MD5 ASCII key. Everything else is fair game, though. Key 0 (zero) is used for special purposes and should not appear in this file.
+ <p>The big trouble with the authentication facility is the keys file. It is a maintenance headache and a security problem. This should be fixed some day. Presumably, this whole bag of worms goes away if/when a generic security regime for the Internet is established. An alternative with NTP Version 4 is the autokey feature, which uses random session keys and public-key cruptography and avoids the key file entirely. While this feature is not completely finished yet, details can be found in the <a href="release.html">Release Notes</a> page.</p>
+ <h4>Query Programs</h4>
+ Three utility query programs are included with the distribution, <tt>ntpq</tt>, <tt>ntptrace</tt> and <tt>ntpdc</tt>. <tt>ntpq</tt> is a handy program which sends queries and receives responses using NTP standard mode-6 control messages. Since it uses the standard control protocol specified in RFC- 1305, it may be used with NTP Version 2 and Version 3 implementations for both Unix and Fuzzball, but not Version 1 implementations. It is most useful to query remote NTP implementations to assess timekeeping accuracy and expose bugs in configuration or operation.
+ <p><tt>ntptrace</tt> can be used to display the current synchronization path from a selected host through possibly intervening servers to the primary source of synchronization, usually a radio clock. It works with both version 2 and version 3 servers, but not version 1.</p>
+ <p><tt>ntpdc</tt> is a horrid program which uses NTP private mode-7 control messages to query local or remote servers. The format and contents of these messages are specific to this version of <tt>ntpd</tt> and some older versions. The program does allow inspection of a wide variety of internal counters and other state data, and hence does make a pretty good debugging tool, even if it is frustrating to use. The other thing of note about <tt>ntpdc</tt> is that it provides a user interface to the run time reconfiguration facility. See the respective document pages for details on the use of these programs.</p>
+ <h4>Run-Time Reconfiguration</h4>
+ <tt>ntpd</tt> was written specifically to allow its configuration to be fully modifiable at run time. Indeed, the only way to configure the server is at run time. The configuration file is read only after the rest of the server has been initialized into a running default-configured state. This facility was included not so much for the benefit of Unix, where it is handy but not strictly essential, but rather for dedicated platforms where the feature is more important for maintenance. Nevertheless, run time configuration works very nicely for Unix servers as well.
+ <p>Nearly all of the things it is possible to configure in the configuration file may be altered via NTP mode-7 messages using the <tt>ntpdc</tt> program. Mode-6 messages may also provide some limited configuration functionality (though the only thing you can currently do with mode-6 messages is set the leap-second warning bits) and the <tt>ntpq</tt> program provides generic support for the latter. The leap bits that can be set in the <tt>leap_warning</tt> variable (up to one month ahead) and in the <tt>leap_indication</tt> variable have a slightly different encoding than the usual interpretation:</p>
+ <pre>
+
+Value Action
+
+
+00
+p; The daemon passes the leap bits of its
+
+
+synchronisation source (usual mode of operation)
+
+ 01/10 A leap
+second is added/deleted
+
+
+11
+p; Leap information from the synchronization source
+
+ is
+ignored (thus LEAP_NOWARNING is passed on)
+</pre>
+ Mode-6 and mode-7 messages which would modify the configuration of the server are required to be authenticated using standard NTP authentication. To enable the facilities one must, in addition to specifying the location of a keys file, indicate in the configuration file the key IDs to be used for authenticating reconfiguration commands. Hence the following fragment might be added to a configuration file to enable the mode-6 (ntpq) and mode-7 (ntpdc) facilities in the daemon:
+ <pre>
+ # specify mode-6 and mode-7 trusted keys
+
+ requestkey 65535 # for mode-7
+requests
+ controlkey 65534 # for mode-6
+requests
+</pre>
+ If the <tt>requestkey</tt> and/or the <tt>controlkey</tt> configuration declarations are omitted from the configuration file, the corresponding run-time reconfiguration facility is disabled.
+ <p>The query programs require the user to specify a key ID and a key to use for authenticating requests to be sent. The key ID provided should be the same as the one mentioned in the configuration file, while the key should match that corresponding to the key ID in the keys file. As the query programs prompt for the key as a password, it is useful to make the request and control authentication keys typeable (in ASCII format) from the keyboard.</p>
+ <h4>Name Resolution</h4>
+ <tt>ntpd</tt> includes the capability to specify host names requiring resolution in <tt>peer</tt> and <tt>server</tt> declarations in the configuration file. However, in some outposts of the Internet, name resolution is unreliable and the interface to the Unix resolver routines is synchronous. The hangups and delays resulting from name-resolver clanking can be unacceptable once the NTP server is running (and remember it is up and running before the configuration file is read). However, it is advantageous to resolve time server names, since their addresses are occasionally changed.
+ <p>In order to prevent configuration delays due to the name resolver, the daemon runs the name resolution process in parallel with the main daemon code. When the daemon comes across a <tt>peer</tt> or <tt>server</tt> entry with a non-numeric host address, it records the relevant information in a temporary file and continues on. When the end of the configuration file has been reached and one or more entries requiring name resolution have been found, the server runs the name resolver from the temporary file. The server then continues on normally but with the offending peers/servers omitted from its configuration.</p>
+ <p>As each name is resolved, it configures the associated entry into the server using the same mode-7 run time reconfiguration facility that <tt>ntpdc</tt> uses. If temporary resolver failures occur, the resolver will periodically retry the requests until a definite response is received. The program will continue to run until all entries have been resolved.</p>
+ <h4>Dealing with Frequency Tolerance Violations (<tt>tickadj</tt> and Friends)</h4>
+ The NTP Version 3 specification RFC-1305 calls for a maximum oscillator frequency tolerance of +-100 parts-per-million (PPM), which is representative of those components suitable for use in relatively inexpensive workstation platforms. For those platforms meeting this tolerance, NTP will automatically compensate for the frequency errors of the individual oscillator and no further adjustments are required, either to the configuration file or to various kernel variables. For the NTP Version 4 release, this tolerance has been increased to +-500 PPM.
+ <p>However, in the case of certain notorious platforms, in particular Sun 4.1.1 systems, the performance can be improved by adjusting the values of certain kernel variables; in particular, <tt>tick</tt> and <tt>tickadj</tt>. The variable <tt>tick</tt> is the increment in microseconds added to the system time on each interval- timer interrupt, while the variable <tt>tickadj</tt> is used by the time adjustment code as a slew rate, in microseconds per tick. When the time is being adjusted via a call to the system routine <tt>adjtime()</tt>, the kernel increases or reduces tick by <tt>tickadj</tt> microseconds per tick until the specified adjustment has been completed. Unfortunately, in most Unix implementations the tick increment must be either zero or plus/minus exactly <tt>tickadj</tt> microseconds, meaning that adjustments are truncated to be an integral multiple of <tt>tickadj</tt> (this latter behaviour is a misfeature, and is the only reason the <tt>tickadj</tt> code needs to concern itself with the internal implementation of <tt>tickadj</tt> at all). In addition, the stock Unix implementation considers it an error to request another adjustment before a prior one has completed.</p>
+ <p>Thus, to make very sure it avoids problems related to the roundoff, the <tt>tickadj</tt> program can be used to adjust the values of <tt>tick</tt> and <tt>tickadj</tt>. This ensures that all adjustments given to <tt>adjtime()</tt> are an even multiple of <tt>tickadj</tt> microseconds and computes the largest adjustment that can be completed in the adjustment interval (using both the value of <tt>tick</tt> and the value of <tt>tickadj</tt>) so it can avoid exceeding this limit. It is important to note that not all systems will allow inspection or modification of kernel variables other than at system build time. It is also important to know that, with the current NTP tolerances, it is rarely necessary to make these changes, but in many cases they will substantially improve the general accurace of the time service.</p>
+ <p>Unfortunately, the value of <tt>tickadj</tt> set by default is almost always too large for <tt>ntpd</tt>. NTP operates by continuously making small adjustments to the clock, usually at one-second intervals. If <tt>tickadj</tt> is set too large, the adjustments will disappear in the roundoff; while, if <tt>tickadj</tt> is too small, NTP will have difficulty if it needs to make an occasional large adjustment. While the daemon itself will read the kernel's values of these variables, it will not change the values, even if they are unsuitable. You must do this yourself before the daemon is started using the <tt>tickadj</tt> program included in the <tt>./util</tt> directory of the distribution. Note that the latter program will also compute an optimal value of <tt>tickadj</tt> for NTP use based on the kernel's value of <tt>tick</tt>.</p>
+ <p>The <tt>tickadj</tt> program can reset several other kernel variables if asked. It can change the value of <tt>tick</tt> if asked. This is handy to compensate for kernel bugs which cause the clock to run with a very large frequency error, as with SunOS 4.1.1 systems. It can also be used to set the value of the kernel <tt>dosynctodr</tt> variable to zero. This variable controls whether to synchronize the system clock to the time-of-day clock, something you really don't want to be happen when <tt>ntpd</tt> is trying to keep it under control. In some systems, such as recent Sun Solaris kernels, the <tt>dosynctodr</tt> variable is the only one that can be changed by the <tt>tickadj</tt> program. In this and other modern kernels, it is not necessary to change the other variables in any case.</p>
+ <p>We have a report that says starting with Solaris 2.6 we should leave <i>dosynctodr</i> alone.</p>
+ <p>In order to maintain reasonable correctness bounds, as well as reasonably good accuracy with acceptable polling intervals, <tt>ntpd</tt> will complain if the frequency error is greater than 500 PPM. For machines with a value of <tt>tick</tt> in the 10-ms range, a change of one in the value of <tt>tick</tt> will change the frequency by about 100 PPM. In order to determine the value of <tt>tick</tt> for a particular CPU, disconnect the machine from all sources of time (<tt>dosynctodr</tt> = 0) and record its actual time compared to an outside source (eyeball-and-wristwatch will do) over a day or more. Multiply the time change over the day by 0.116 and add or subtract the result to tick, depending on whether the CPU is fast or slow. An example call to <tt>tickadj</tt> useful on SunOS 4.1.1 is:</p>
+ <pre>
+ <tt>tickadj</tt> -t 9999 -a 5 -s
+</pre>
+ which sets tick 100 PPM fast, <tt>tickadj</tt> to 5 microseconds and turns off the clock/calendar chip fiddle. This line can be added to the <tt>rc.local</tt> configuration file to automatically set the kernel variables at boot time.
+ <p>All this stuff about diddling kernel variables so the NTP daemon will work is really silly. If vendors would ship machines with clocks that kept reasonable time and would make their <tt>adjtime()</tt> system call apply the slew it is given exactly, independent of the value of <tt>tickadj</tt>, all this could go away. This is in fact the case on many current Unix systems.</p>
+ <h4>Tuning Your Subnet</h4>
+ There are several parameters available for tuning the NTP subnet for maximum accuracy and minimum jitter. One of these is the <tt>prefer</tt> configuration declaration described in <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> documentation page. When more than one eligible server exists, the NTP clock-selection and combining algorithms act to winnow out all except the &quot;best&quot; set of servers using several criteria based on differences between the readings of different servers and between successive readings of the same server. The result is usually a set of surviving servers that are apparently statistically equivalent in accuracy, jitter and stability. The population of survivors remaining in this set depends on the individual server characteristics measured during the selection process and may vary from time to time as the result of normal statistical variations. In LANs with high speed RISC-based time servers, the population can become somewhat unstable, with individual servers popping in and out of the surviving population, generally resulting in a regime called <i>clockhopping</i>.
+ <p>When only the smallest residual jitter can be tolerated, it may be convenient to elect one of the servers at each stratum level as the preferred one using the keyword <tt>prefer</tt> on the configuration declaration for the selected server:</p>
+ <pre>
+ # preferred server declaration
+
+ peer rackety.udel.edu prefer
+# preferred server
+</pre>
+ The preferred server will always be included in the surviving population, regardless of its characteristics and as long as it survives preliminary sanity checks and validation procedures.
+ <p>The most useful application of the <tt>prefer</tt> keyword is in high speed LANs equipped with precision radio clocks, such as a GPS receiver. In order to insure robustness, the hosts need to include outside peers as well as the GPS-equipped server; however, as long as that server is running, the synchronization preference should be that server. The keyword should normally be used in all cases in order to prefer an attached radio clock. It is probably inadvisable to use this keyword for peers outside the LAN, since it interferes with the carefully crafted judgement of the selection and combining algorithms.</p>
+ <h4>Provisions for Leap Seconds and Accuracy Metrics</h4>
+ <tt>ntpd</tt> understands leap seconds and will attempt to take appropriate action when one occurs. In principle, every host running ntpd will insert a leap second in the local timescale in precise synchronization with UTC. This requires that the leap-warning bits be activated some time prior to the occurrence of a leap second at the primary (stratum 1) servers. Subsequently, these bits are propagated throughout the subnet depending on these servers by the NTP protocol itself and automatically implemented by <tt>ntpd</tt> and the time- conversion routines of each host. The implementation is independent of the idiosyncrasies of the particular radio clock, which vary widely among the various devices, as long as the idiosyncratic behavior does not last for more than about 20 minutes following the leap. Provisions are included to modify the behavior in cases where this cannot be guaranteed. While provisions for leap seconds have been carefully crafted so that correct timekeeping immediately before, during and after the occurrence of a leap second is scrupulously correct, stock Unix systems are mostly inept in responding to the available information. This caveat goes also for the maximum-error and statistical-error bounds carefully calculated for all clients and servers, which could be very useful for application programs needing to calibrate the delays and offsets to achieve a near- simultaneous commit procedure, for example. While this information is maintained in the <tt>ntpd</tt> data structures, there is at present no way for application programs to access it. This may be a topic for further development.
+ <h4>Clock Support Overview</h4>
+ <tt>ntpd</tt> was designed to support radio (and other external) clocks and does some parts of this function with utmost care. Clocks are treated by the protocol as ordinary NTP peers, even to the point of referring to them with an (invalid) IP host address. Clock addresses are of the form 127.127.<i>t.u</i>, where <i>t</i> specifies the particular type of clock (i.e., refers to a particular clock driver) and <i>u</i> is a unit number whose interpretation is clock-driver dependent. This is analogous to the use of major and minor device numbers by Unix and permits multiple instantiations of clocks of the same type on the same server, should such magnificent redundancy be required.
+ <p>Because clocks look much like peers, both configuration file syntax and run time reconfiguration commands can be used to control clocks in the same way as ordinary peers. Clocks are configured via <tt>server</tt> declarations in the configuration file, can be started and stopped using ntpdc and are subject to address-and-mask restrictions much like a normal peer, should this stretch of imagination ever be useful. As a concession to the need to sometimes transmit additional information to clock drivers, an additional configuration file is available: the <tt>fudge</tt> statement. This enables one to specify the values of two time quantities, two integral values and two flags, the use of which is dependent on the particular clock driver. For example, to configure a PST radio clock which can be accessed through the serial device <tt>/dev/pst1</tt>, with propagation delays to WWV and WWVH of 7.5 and 26.5 milliseconds, respectively, on a machine with an imprecise system clock and with the driver set to disbelieve the radio clock once it has gone 30 minutes without an update, one might use the following configuration file entries:</p>
+ <pre>
+ # radio clock fudge fiddles
+ server 127.127.3.1
+ fudge 127.127.3.1 time1 0.0075 time2 0.0265
+ fudge 127.127.3.1 value2 30 flag1 1
+</pre>
+ Additional information on the interpretation of these data with respect to various radio clock drivers is given in the <a href="refclock.html">Reference Clock Drivers</a> document page and in the individual driver documents accessible via that page.
+ <h4>Towards the Ultimate Tick</h4>
+ This section considers issues in providing precision time synchronization in NTP subnets which need the highest quality time available in the present technology. These issues are important in subnets supporting real-time services such as distributed multimedia conferencing and wide-area experiment control and monitoring.
+ <p>In the Internet of today synchronization paths often span continents and oceans with moderate to high variations in delay due to traffic spasms. NTP is specifically designed to minimize timekeeping jitter due to delay variations using intricately crafted filtering and selection algorithms; however, in cases where these variations are as much as a second or more, the residual jitter following these algorithms may still be excessive. Sometimes, as in the case of some isolated NTP subnets where a local source of precision time is available, such as a PPS signal produced by a calibrated cesium clock, it is possible to remove the jitter and retime the local clock oscillator of the NTP server. This has turned out to be a useful feature to improve the synchronization quality of time distributed in remote places where radio clocks are not available. In these cases special features of the distribution are used together with the PPS signal to provide a jitter-free timing signal, while NTP itself is used to provide the coarse timing and resolve the seconds numbering.</p>
+ <p>Most available radio clocks can provide time to an accuracy in the order of milliseconds, depending on propagation conditions, local noise levels and so forth. However, as a practical matter, all clocks can occasionally display errors significantly exceeding nominal specifications. Usually, the algorithms used by NTP for ordinary network peers, as well as radio clock peers will detect and discard these errors as discrepancies between the disciplined local clock oscillator and the decoded time message produced by the radio clock. Some radio clocks can produce a special PPS signal which can be interfaced to the server platform in a number of ways and used to substantially improve the (disciplined) clock oscillator jitter and wander characteristics by at least an order of magnitude. Using these features it is possible to achieve accuracies in the order of a few tens of microseconds with a fast RISC- based platform.</p>
+ <p>There are three ways to implement PPS support, depending on the radio clock model, platform model and serial line interface. These are described in detail in the application notes mentioned in the <a href="index.html">The Network Time Protocol (NTP) Distribution</a> document page. Each of these requires circuitry to convert the TTL signal produced by most clocks to the EIA levels used by most serial interfaces. The <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page describes a device designed to do this. Besides being useful for this purpose, this device includes an inexpensive modem designed for use with the Canadian CHU time/frequency radio station.</p>
+ <p>In order to select the appropriate implementation, it is important to understand the underlying PPS mechanism used by ntpd. The PPS support depends on a continuous source of PPS pulses used to calculate an offset within +-500 milliseconds relative to the local clock. The serial timecode produced by the radio or the time determined by NTP in absence of the radio is used to adjust the local clock within +-128 milliseconds of the actual time. As long as the local clock is within this interval the PPS support is used to discipline the local clock and the timecode used only to verify that the local clock is in fact within the interval. Outside this interval the PPS support is disabled and the timecode used directly to control the local clock.</p>
+ <h4>Parting Shots</h4>
+ There are several undocumented programs which can be useful in unusual cases. They can be found in the <tt>./clockstuff</tt> and <tt>./authstuff</tt> directories of the distribution. One of these is the <tt>propdelay</tt> program, which can compute high frequency radio propagation delays between any two points whose latitude and longitude are known. The program understands something about the phenomena which allow high frequency radio propagation to occur, and will generally provide a better estimate than a calculation based on the great circle distance. Other programs of interest include <tt>clktest</tt>, which allows one to exercise the generic clock line discipline, and <tt>chutest</tt>, which runs the basic reduction algorithms used by the daemon on data received from a serial port.&nbsp;
+ <hr>
+ <center>
+ <img src="pic/pogo1a.gif" alt="gif"></center>
+ <br>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/ntpd.html b/contrib/ntp/html/ntpd.html
new file mode 100644
index 000000000000..ccfd9d467384
--- /dev/null
+++ b/contrib/ntp/html/ntpd.html
@@ -0,0 +1,184 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>ntpd - Network Time Protocol (NTP) daemon</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</h3>
+ <img src="pic/alice47.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>The mushroom knows all the command line options.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:15 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#synop">Synopsis</a><br>
+ <li class="inline"><a href="#descr">Description</a><br>
+ <li class="inline"><a href="#op">How NTP Operates</a><br>
+ <li class="inline"><a href="#freq">Frequency Discipline</a><br>
+ <li class="inline"><a href="#modes">Operating Modes</a><br>
+ <li class="inline"><a href="#poll">Poll Interval Control</a><br>
+ <li class="inline"><a href="#poll">Poll Interval Control</a><br>
+ <li class="inline"><a href="#notes">Notes</a><br>
+ <li class="inline"><a href="#cmd">Command Line Options</a><br>
+ <li class="inline"><a href="#cfg">The Configuration File</a><br>
+ <li class="inline"><a href="#opt">Configuration Options</a><br>
+ <li class="inline"><a href="#files">Files</a>
+ </ul>
+ <hr>
+ <h4 id="synop">Synopsis</h4>
+ <tt>ntpd [ -46aAbdDgLmnNPqx ] [ -c <i>conffile</i> ] [ -f <i>driftfile</i> ] [ -k <i>keyfile</i> ] [ -l <i>logfile</i> ] [ -p <i>pidfile</i> ] [ -r <i>broadcastdelay</i> ] [ -s <i>statsdir</i> ] [ -t <i>key</i> ] [ -v <i>variable</i> ] [ -V <i>variable</i> ]</tt>
+ <h4 id="descr">Description</h4>
+ <p>The <tt>ntpd</tt> program is an operating system daemon which sets and maintains the system time of day in synchronism with Internet standard time servers. It is a complete implementation of the Network Time Protocol (NTP) version 4, but also retains compatibility with version 3, as defined by RFC-1305, and version 1 and 2, as defined by RFC-1059 and RFC-1119, respectively. <tt>ntpd</tt> does most computations in 64-bit floating point arithmetic and does relatively clumsy 64-bit fixed point operations only when necessary to preserve the ultimate precision, about 232 picoseconds. While the ultimate precision is not achievable with ordinary workstations and networks of today, it may be required with future gigahertz CPU clocks and gigabit LANs.</p>
+ <h4 id="op">How NTP Operates</h4>
+ <p>The <tt>ntpd</tt> program operates by exchanging messages with one or more configured servers at designated poll intervals. When started, whether for the first or subsequent times, the program requires several exchanges from the majority of these servers so the signal processing and mitigation algorithms can accumulate and groom the data and set the clock. In order to protect the network from bursts, the initial poll interval for each server is delayed an interval randomized over a few seconds. At the default initial poll interval of 64s, several minutes can elapse before the clock is set. The initial delay to set the clock can be reduced using the <tt>iburst</tt> keyword with the <tt>server</tt> configuration command, as described on the <a href="confopt.html">Configuration Options</a> page.</p>
+ <p>Most operating systems and hardware of today incorporate a time-of-year (TOY) chip to maintain the time during periods when the power is off. When the machine is booted, the chip is used to initialize the operating system time. After the machine has synchronized to a NTP server, the operating system corrects the chip from time to time. In case there is no TOY chip or for some reason its time is more than 1000s from the server time, <tt>ntpd</tt> assumes something must be terribly wrong and the only reliable action is for the operator to intervene and set the clock by hand. This causes <tt>ntpd</tt> to exit with a panic message to the system log. The <tt>-g</tt> option overrides this check and the clock will be set to the server time regardless of the chip time. However, and to protect against broken hardware, such as when the CMOS battery fails or the clock counter becomes defective, once the clock has been set, an error greater than 1000s will cause <tt>ntpd</tt> to exit anyway.</p>
+ <p>Under ordinary conditions, <tt>ntpd</tt> adjusts the clock in small steps so that the timescale is effectively continuous and without discontinuities. Under conditions of extreme network congestion, the roundtrip delay jitter can exceed three seconds and the synchronization distance, which is equal to one-half the roundtrip delay plus error budget terms, can become very large. The <tt>ntpd</tt> algorithms discard sample offsets exceeding 128 ms, unless the interval during which no sample offset is less than 128 ms exceeds 900s. The first sample after that, no matter what the offset, steps the clock to the indicated time. In practice this reduces the false alarm rate where the clock is stepped in error to a vanishingly low incidence.</p>
+ <p>As the result of this behavior, once the clock has been set, it very rarely strays more than 128 ms, even under extreme cases of network path congestion and jitter. Sometimes, in particular when <tt>ntpd</tt> is first started, the error might exceed 128 ms. This may on occasion cause the clock to be set backwards if the local clock time is more than 128 s in the future relative to the server. In some applications, this behavior may be unacceptable. If the <tt>-x</tt> option is included on the command line, the clock will never be stepped and only slew corrections will be used.</p>
+ <p>The issues should be carefully explored before deciding to use the <tt>-x</tt> option. The maximum slew rate possible is limited to 500 parts-per-million (PPM) as a consequence of the correctness principles on which the NTP protocol and algorithm design are based. As a result, the local clock can take a long time to converge to an acceptable offset, about 2,000 s for each second the clock is outside the acceptable range. During this interval the local clock will not be consistent with any other network clock and the system cannot be used for distributed applications that require correctly synchronized network time.</p>
+ <p>In spite of the above precautions, sometimes when large frequency errors are present the resulting time offsets stray outside the 128-ms range and an eventual step or slew time correction is required. If following such a correction the frequency error is so large that the first sample is outside the acceptable range, <tt>ntpd</tt> enters the same state as when the <tt>ntp.drift</tt> file is not present. The intent of this behavior is to quickly correct the frequency and restore operation to the normal tracking mode. In the most extreme cases (<tt>time.ien.it</tt> comes to mind), there may be occasional step/slew corrections and subsequent frequency corrections. It helps in these cases to use the <tt>burst</tt> keyword when configuring the server.</p>
+ <h4 id="freq">Frequency Discipline</h4>
+ <p>The <tt>ntpd</tt> behavior at startup depends on whether the frequency file, usually <tt>ntp.drift</tt>, exists. This file contains the latest estimate of clock frequency error. When the <tt>ntpd</tt> is started and the file does not exist, the <tt>ntpd</tt> enters a special mode designed to quickly adapt to the particular system clock oscillator time and frequency error. This takes approximately 15 minutes, after which the time and frequency are set to nominal values and the <tt>ntpd</tt> enters normal mode, where the time and frequency are continuously tracked relative to the server. After one hour the frequency file is created and the current frequency offset written to it. When the <tt>ntpd</tt> is started and the file does exist, the <tt>ntpd</tt> frequency is initialized from the file and enters normal mode immediately. After that the current frequency offset is written to the file at hourly intervals.</p>
+ <h4 id="modes">Operating Modes</h4>
+ <p><tt>ntpd</tt> can operate in any of several modes, including symmetric active/passive, client/server broadcast/multicast and manycast, as described in the <a href="assoc.html">Association Management</a> page. It normally operates continuously while monitoring for small changes in frequency and trimming the clock for the ultimate precision. However, it can operate in a one-time mode where the time is set from an external server and frequency is set from a previously recorded frequency file. A broadcast/multicast or manycast client can discover remote servers, compute server-client propagation delay correction factors and configure itself automatically. This makes it possible to deploy a fleet of workstations without specifying configuration details specific to the local environment.</p>
+ <p>By default, <tt>ntpd</tt> runs in continuous mode where each of possibly several external servers is polled at intervals determined by an intricate state machine. The state machine measures the incidental roundtrip delay jitter and oscillator frequency wander and determines the best poll interval using a heuristic algorithm. Ordinarily, and in most operating environments, the state machine will start with 64s intervals and eventually increase in steps to 1024s. A small amount of random variation is introduced in order to avoid bunching at the servers. In addition, should a server become unreachable for some time, the poll interval is increased in steps to 1024s in order to reduce network overhead.</p>
+ <p>In some cases it may not be practical for <tt>ntpd</tt> to run continuously. A common workaround has been to run the <tt>ntpdate</tt> program from a <tt>cron</tt> job at designated times. However, this program does not have the crafted signal processing, error checking and mitigation algorithms of <tt>ntpd</tt>. The <tt>-q</tt> option is intended for this purpose. Setting this option will cause <tt>ntpd</tt> to exit just after setting the clock for the first time. The procedure for initially setting the clock is the same as in continuous mode; most applications will probably want to specify the <tt>iburst</tt> keyword with the <tt>server</tt> configuration command. With this keyword a volley of messages are exchanged to groom the data and the clock is set in about 10 s. If nothing is heard after a couple of minutes, the daemon times out and exits. After a suitable period of mourning, the <tt>ntpdate</tt> program may be retired.</p>
+ <p>When kernel support is available to discipline the clock frequency, which is the case for stock Solaris, Tru64, Linux and FreeBSD, a useful feature is available to discipline the clock frequency. First, <tt>ntpd</tt> is run in continuous mode with selected servers in order to measure and record the intrinsic clock frequency offset in the frequency file. It may take some hours for the frequency and offset to settle down. Then the <tt>ntpd</tt> is stopped and run in one-time mode as required. At each startup, the frequency is read from the file and initializes the kernel frequency.</p>
+ <h4 id="poll">Poll Interval Control</h4>
+ <p>This version of NTP includes an intricate state machine to reduce the network load while maintaining a quality of synchronization consistent with the observed jitter and wander. There are a number of ways to tailor the operation in order enhance accuracy by reducing the interval or to reduce network overhead by increasing it. However, the user is advised to carefully consider the consequences of changing the poll adjustment range from the default minimum of 64 s to the default maximum of 1,024 s. The default minimum can be changed with the <tt>tinker minpoll</tt> command to a value not less than 16 s. This value is used for all configured associations, unless overriden by the <tt>minpoll</tt> option on the configuration command. Note that most device drivers will not operate properly if the poll interval is less than 64 s and that the broadcast server and manycast client associations will also use the default, unless overriden.</p>
+ <p>In some cases involving dial up or toll services, it may be useful to increase the minimum interval to a few tens of minutes and maximum interval to a day or so. Under normal operation conditions, once the clock discipline loop has stabilized the interval will be increased in steps from the minimum to the maximum. However, this assumes the intrinsic clock frequency error is small enough for the discipline loop correct it. The capture range of the loop is 500 PPM at an interval of 64s decreasing by a factor of two for each doubling of interval. At a minimum of 1,024 s, for example, the capture range is only 31 PPM. If the intrinsic error is greater than this, the drift file <tt>ntp.drift</tt> will have to be specially tailored to reduce the residual error below this limit. Once this is done, the drift file is automatically updated once per hour and is available to initialize the frequency on subsequent daemon restarts.</p>
+ <h4 id="huff">The huff-n'-puff Filter</h4>
+ <p>In scenarios where a considerable amount of data are to be downloaded or uploaded over telephone modems, timekeeping quality can be seriously degraded. This occurs because the differential delays on the two directions of transmission can be quite large. In many cases the apparent time errors are so large as to exceed the step threshold and a step correction can occur during and after the data transfer is in progress.</p>
+ <p>The huff-n'-puff filter is designed to correct the apparent time offset in these cases. It depends on knowledge of the propagation delay when no other traffic is present. In common scenarios this occurs during other than work hours. The filter maintains a shift register that remembers the minimum delay over the most recent interval measured usually in hours. Under conditions of severe delay, the filter corrects the apparent offset using the sign of the offset and the difference between the apparent delay and minimum delay. The name of the filter reflects the negative (huff) and positive (puff) correction, which depends on the sign of the offset.</p>
+ <p>The filter is activated by the <tt>tinker</tt> command and <tt>huffpuff</tt> keyword, as described in the <a href="miscopt.html">Miscellaneous Options</a> page.</p>
+ <h4 id="notes">Notes</h4>
+ <p>If NetInfo support is built into <tt>ntpd</tt>, then <tt>ntpd</tt> will attempt to read its configuration from the NetInfo if the default ntp.conf file cannot be read and no file is specified by the <tt>-c</tt> option.</p>
+ <p>In contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
+ <p>Various internal <tt>ntpd</tt> variables can be displayed and configuration options altered while the <tt>ntpd</tt> is running using the <tt><a href="ntpq.html">ntpq</a></tt> and <tt><a href="ntpdc.html">ntpdc</a></tt> utility programs.</p>
+ <p>When <tt>ntpd</tt> starts it looks at the value of <tt>umask</tt>, and if zero <tt>ntpd</tt> will set the <tt>umask</tt> to <tt>022</tt>.</p>
+ <h4 id="cmd">Command Line Options</h4>
+ <dl>
+ <dt><tt>-4</tt>
+ <dd>Force DNS resolution of following host names to the IPv4 namespace.
+ <dt><tt>-6</tt>
+ <dd>Force DNS resolution of following host names to the IPv6 namespace.
+ <dt><tt>-a</tt>
+ <dd>Require cryptographic authentication for broadcast client, multicast client and symmetric passive associations. This is the default.
+ <dt><tt>-A</tt>
+ <dd>Do not require cryptographic authentication for broadcast client, multicast client and symmetric passive associations. This is almost never a good idea.
+ <dt><tt>-b</tt>
+ <dd>Enable the client to synchronize to broadcast servers.
+ <dt><tt>-c <i>conffile</i></tt>
+ <dd>Specify the name and path of the configuration file, default <tt>/etc/ntp.conf</tt>.
+ <dt><tt>-d</tt>
+ <dd>Specify debugging mode. This option may occur more than once, with each occurrence indicating greater detail of display.
+ <dt><tt>-D <i>level</i></tt>
+ <dd>Specify debugging level directly.
+ <dt><tt>-f <i>driftfile</i></tt>
+ <dd>Specify the name and path of the frequency file, default <tt>/etc/ntp.drift</tt>. This is the same operation as the <tt>driftfile <i>driftfile</i></tt> configuration command.
+ <dt><tt>-g</tt>
+ <dd>Normally, <tt>ntpd</tt> exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, <tt>ntpd</tt> will exit with a message to the system log. This option can be used with the <tt>-q</tt> and <tt>-x</tt> options. See the <tt>tinker</tt> command for other options.
+ <dt><tt>-k <i>keyfile</i></tt>
+ <dd>Specify the name and path of the symmetric key file, default <tt>/etc/ntp.keys</tt>. This is the same operation as the <tt>keys <i>keyfile</i></tt> configuration command.
+ <dt><tt>-l <i>logfile</i></tt>
+ <dd>Specify the name and path of the log file. The default is the system log file. This is the same operation as the <tt>logfile <i>logfile</i></tt> configuration command.
+ <dt><tt>-L</tt>
+ <dd>Do not listen to virtual IPs. The default is to listen.
+ <dt><tt>-m</tt>
+ <dd>Enable the client to synchronize to multicast servers at the IPv4 multicast group address 224.0.1.1.
+ <dt><tt>-n</tt>
+ <dd>Don't fork.
+ <dt><tt>-N</tt>
+ <dd>To the extent permitted by the operating system, run the <tt>ntpd</tt> at the highest priority.
+ <dt><tt>-p <i>pidfile</i></tt>
+ <dd>Specify the name and path of the file used to record the <tt>ntpd</tt> process ID. This is the same operation as the <tt>pidfile <i>pidfile</i></tt> configuration command.
+ <dt><tt>-P <i>priority</i></tt>
+ <dd>To the extent permitted by the operating system, run the <tt>ntpd</tt> at the specified priority.
+ <dt><tt>-q</tt>
+ <dd>Exit the <tt>ntpd</tt> just after the first time the clock is set. This behavior mimics that of the <tt>ntpdate</tt> program, which is to be retired. The <tt>-g</tt> and <tt>-x</tt> options can be used with this option. Note:&nbsp;The kernel time discipline is disabled with this option.
+ <dt><tt>-r <i>broadcastdelay</i></tt>
+ <dd>Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
+ <dt><tt>-s <i>statsdir</i></tt>
+ <dd>Specify the directory path for files created by the statistics facility. This is the same operation as the <tt>statsdir <i>statsdir</i></tt> configuration command.
+ <dt><tt>-t <i>key</i></tt>
+ <dd>Add a key number to the trusted key list. This option can occur more than once.
+ <dt><tt>-v <i>variable</i></tt>
+ <dt><tt>-V <i>variable</i></tt>
+ <dd>Add a system variable listed by default.
+ <dt><tt>-x</tt>
+ <dd>Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold. This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment as much as 600 s will take almost 14 days to complete. This option can be used with the <tt>-g</tt> and <tt>-q</tt> options. See the <tt>tinker</tt> command for other options. Note:&nbsp;The kernel time discipline is disabled with this option.
+ </dl>
+ <h4 id="cfg">The Configuration File</h4>
+ <p>Ordinarily, <tt>ntpd</tt> reads the <tt>ntp.conf</tt> configuration file at startup time in order to determine the synchronization sources and operating modes. It is also possible to specify a working, although limited, configuration entirely on the command line, obviating the need for a configuration file. This may be particularly useful when the local host is to be configured as a broadcast/multicast client, with all peers being determined by listening to broadcasts at run time.</p>
+ <p>Usually, the configuration file is installed in the <tt>/etc</tt> directory, but could be installed elsewhere (see the <tt>-c <i>conffile</i></tt> command line option). The file format is similar to other Unix configuration files - comments begin with a <tt>#</tt> character and extend to the end of the line; blank lines are ignored.</p>
+ <p>Configuration commands consist of an initial keyword followed by a list of arguments, some of which may be optional, separated by whitespace. Commands may not be continued over multiple lines. Arguments may be host names, host addresses written in numeric, dotted-quad form, integers, floating point numbers (when specifying times in seconds) and text strings. Optional arguments are delimited by <tt>[ ]</tt> in the following descriptions, while alternatives are separated by <tt>|</tt>. The notation <tt>[ ... ]</tt> means an optional, indefinite repetition of the last item before the <tt>[ ... ]</tt>.</p>
+ <h4 id="opt">Configuration Options</h4>
+ <p><a href="confopt.html">Server Options</a><br>
+ <a href="authopt.html">Authentication Options</a><br>
+ <a href="monopt.html">Monitoring Options</a><br>
+ <a href="accopt.html">Access Control Options</a><br>
+ <a href="manyopt.html">Automatic NTP Configuration Options</a><br>
+ <a href="clockopt.html">Reference Clock Options</a><br>
+ <a href="miscopt.html">Miscellaneous Options</a></p>
+ <h4 id="files">Files</h4>
+ <table width="100%" border="1" cellspacing="2" cellpadding="0">
+ <tr>
+ <td width="30%">File</td>
+ <td width="30%">Default</td>
+ <td width="20%">Option</td>
+ <td width="20%">Command</td>
+ </tr>
+ <tr>
+ <td width="30%">configuration file</td>
+ <td width="30%"><tt>/etc/ntp.conf</tt></td>
+ <td width="20%"><tt>-c</tt></td>
+ <td width="20%">none</td>
+ </tr>
+ <tr>
+ <td width="30%">frequency file</td>
+ <td width="30%"><tt>/etc/ntp.drift</tt></td>
+ <td width="20%"><tt>-f</tt></td>
+ <td width="20%"><tt>driftfile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">process ID file</td>
+ <td width="30%">none</td>
+ <td width="20%"><tt>-p</tt></td>
+ <td width="20%"><tt>pidfile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">log file</td>
+ <td width="30%">system log</td>
+ <td width="20%"><tt>-l</tt></td>
+ <td width="20%"><tt>logfile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">include file</td>
+ <td width="30%">none</td>
+ <td width="20%">none</td>
+ <td width="20%"><tt>includefile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">statistics path</td>
+ <td width="30%"><tt>/var/NTP</tt></td>
+ <td width="20%"><tt>-s</tt></td>
+ <td width="20%"><tt>statsdir</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">keys path</td>
+ <td width="30%"><tt>/usr/local/etc</tt></td>
+ <td width="20%"><tt>-k</tt></td>
+ <td width="20%"><tt>keysdir</tt></td>
+ </tr>
+ </table>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/ntpdate.html b/contrib/ntp/html/ntpdate.html
new file mode 100644
index 000000000000..fe511951f4b7
--- /dev/null
+++ b/contrib/ntp/html/ntpdate.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>ntpdate - set the date and time via NTP</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3><tt>ntpdate</tt> - set the date and time via NTP</h3>
+ <img src="pic/rabbit.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>I told you it was eyeball and wristwatch.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">01:13</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="252">Sunday, December 22, 2002</csobj></p>
+ <br clear="left">
+ <hr>
+ <p>Disclaimer: The functionality of this program is now available in the <tt>ntpd</tt> program. See the <tt>-q</tt> command line option in the <a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a> page. After a suitable period of mourning, the <tt>ntpdate</tt> program is to be retired from this distribution</p>
+ <h4>Synopsis</h4>
+ <tt>ntpdate [ -bBdoqsuv ] [ -a <i>key</i> ] [ -e <i>authdelay</i> ] [ -k <i>keyfile</i> ] [ -o <i>version</i> ] [ -p <i>samples</i> ] [ -t <i>timeout</i> ] <i>server</i> [ ... ]</tt>
+ <h4>Description</h4>
+ <tt>ntpdate</tt> sets the local date and time by polling the Network Time Protocol (NTP) server(s) given as the <i>server</i> arguments to determine the correct time. It must be run as root on the local host. A number of samples are obtained from each of the servers specified and a subset of the NTP clock filter and selection algorithms are applied to select the best of these. Note that the accuracy and reliability of <tt>ntpdate</tt> depends on the number of servers, the number of polls each time it is run and the interval between runs.
+ <p><tt>ntpdate</tt> can be run manually as necessary to set the host clock, or it can be run from the host startup script to set the clock at boot time. This is useful in some cases to set the clock initially before starting the NTP daemon <tt>ntpd</tt>. It is also possible to run <tt>ntpdate</tt> from a <tt>cron</tt> script. However, it is important to note that <tt>ntpdate</tt> with contrived <tt>cron</tt> scripts is no substitute for the NTP daemon, which uses sophisticated algorithms to maximize accuracy and reliability while minimizing resource use. Finally, since <tt>ntpdate</tt> does not discipline the host clock frequency as does <tt>ntpd</tt>, the accuracy using <tt>ntpdate</tt> is limited.</p>
+ <p>Time adjustments are made by <tt>ntpdate</tt> in one of two ways. If <tt>ntpdate</tt> determines the clock is in error more than 0.5 second it will simply step the time by calling the system <tt>settimeofday()</tt> routine. If the error is less than 0.5 seconds, it will slew the time by calling the system <tt>adjtime()</tt> routine. The latter technique is less disruptive and more accurate when the error is small, and works quite well when <tt>ntpdate</tt> is run by <tt>cron</tt> every hour or two.</p>
+ <p><tt>ntpdate</tt> will decline to set the date if an NTP server daemon (e.g., <tt>ntpd</tt>) is running on the same host. When running <tt>ntpdate</tt> on a regular basis from <tt>cron</tt> as an alternative to running a daemon, doing so once every hour or two will result in precise enough timekeeping to avoid stepping the clock.</p>
+ <p>Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
+ <p>If NetInfo support is compiled into <tt>ntpdate</tt>, then the <tt>server</tt> argument is optional if <tt>ntpdate</tt> can find a time server in the NetInfo configuration for <tt>ntpd</tt>.</p>
+ <h4>Command Line Options</h4>
+ <dl>
+ <dt><tt>-4</tt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.
+ <dt><tt>-6</tt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.
+ <dt><tt>-a <i>key</i></tt>
+ <dd>Enable the authentication function and specify the key identifier to be used for authentication as the argument <i>key</i><tt>ntpdate</tt>. The keys and key identifiers must match in both the client and server key files. The default is to disable the authentication function.
+ <dt><tt>-B</tt>
+ <dd>Force the time to always be slewed using the adjtime() system call, even if the measured offset is greater than +-128 ms. The default is to step the time using settimeofday() if the offset is greater than +-128 ms. Note that, if the offset is much greater than +-128 ms in this case, that it can take a long time (hours) to slew the clock to the correct value. During this time. the host should not be used to synchronize clients.
+ <dt><tt>-b</tt>
+ <dd>Force the time to be stepped using the settimeofday() system call, rather than slewed (default) using the adjtime() system call. This option should be used when called from a startup file at boot time.
+ <dt><tt>-d</tt>
+ <dd>Enable the debugging mode, in which <tt>ntpdate</tt> will go through all the steps, but not adjust the local clock. Information useful for general debugging will also be printed.
+ <dt><tt>-e <i>authdelay</i></tt>
+ <dd>Specify the processing delay to perform an authentication function as the value <i>authdelay</i>, in seconds and fraction (see <tt>ntpd</tt> for details). This number is usually small enough to be negligible for most purposes, though specifying a value may improve timekeeping on very slow CPU's.
+ <dt><tt>-k <i>keyfile</i></tt>
+ <dd>Specify the path for the authentication key file as the string <i>keyfile</i>. The default is <tt>/etc/ntp.keys</tt>. This file should be in the format described in <tt>ntpd</tt>.
+ <dt><tt>-o <i>version</i></tt>
+ <dd>Specify the NTP version for outgoing packets as the integer <i>version</i>, which can be 1 or 2. The default is 3. This allows <tt>ntpdate</tt> to be used with older NTP versions.
+ <dt><tt>-p <i>samples</i></tt>
+ <dd>Specify the number of samples to be acquired from each server as the integer <i>samples</i>, with values from 1 to 8 inclusive. The default is 4.
+ <dt><i><tt>-q</tt></i>
+ <dd>Query only - don't set the clock.
+ <dt><tt>-s</tt>
+ <dd>Divert logging output from the standard output (default) to the system <tt>syslog</tt> facility. This is designed primarily for convenience of <tt>cron</tt> scripts.
+ <dt><tt>-t <i>timeout</i></tt>
+ <dd>Specify the maximum time waiting for a server response as the value <i>timeout</i>, in seconds and fraction. The value is is rounded to a multiple of 0.2 seconds. The default is 1 second, a value suitable for polling across a LAN.
+ <dt><tt>-u</tt>
+ <dd>Direct <tt>ntpdate</tt> to use an unprivileged port or outgoing packets. This is most useful when behind a firewall that blocks incoming traffic to privileged ports, and you want to synchronise with hosts beyond the firewall. Note that the <tt>-d</tt> option always uses unprivileged ports.
+ <dt><tt>-<i>v</i></tt>
+ <dd>Be verbose. This option will cause <tt>ntpdate</tt>'s version identification string to be logged.
+ </dl>
+ <h4>Files</h4>
+ <tt>/etc/ntp.keys</tt> - encryption keys used by <tt>ntpdate</tt>.
+ <h4>Bugs</h4>
+ The slew adjustment is actually 50% larger than the measured offset, since this (it is argued) will tend to keep a badly drifting clock more accurate. This is probably not a good idea and may cause a troubling hunt for some values of the kernel variables <tt>tick</tt> and <tt>tickadj</tt>.&nbsp;
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/ntpdc.html b/contrib/ntp/html/ntpdc.html
new file mode 100644
index 000000000000..c29c0a29be98
--- /dev/null
+++ b/contrib/ntp/html/ntpdc.html
@@ -0,0 +1,158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>ntpdc - special NTP query program</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3><tt>ntpdc</tt> - special NTP query program</h3>
+ <img src="pic/alice31.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>This program is a big puppy.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">21:39</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="230">Sunday, January 26, 2003</csobj></p>
+ <br clear="left">
+ <h4>More Help</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links12.txt"></script>
+ <hr>
+ <h4>Synopsis</h4>
+ <tt>ntpdc [ -ilnps ] [ -c <i>command</i> ] [ <i>host</i> ] [ ... ]</tt>
+ <h4>Description</h4>
+ <tt>ntpdc</tt> is used to query the <tt>ntpd</tt> daemon about its current state and to request changes in that state. The program may be run either in interactive mode or controlled using command line arguments. Extensive state and statistics information is available through the <tt>ntpdc</tt> interface. In addition, nearly all the configuration options which can be specified at startup using ntpd's configuration file may also be specified at run time using <tt>ntpdc</tt>.
+ <p>If one or more request options are included on the command line when <tt>ntpdc</tt> is executed, each of the requests will be sent to the NTP servers running on each of the hosts given as command line arguments, or on localhost by default. If no request options are given, <tt>ntpdc</tt> will attempt to read commands from the standard input and execute these on the NTP server running on the first host given on the command line, again defaulting to localhost when no other host is specified. <tt>ntpdc</tt> will prompt for commands if the standard input is a terminal device.</p>
+ <p><tt>ntpdc</tt> uses NTP mode 7 packets to communicate with the NTP server, and hence can be used to query any compatible server on the network which permits it. Note that since NTP is a UDP protocol this communication will be somewhat unreliable, especially over large distances in terms of network topology. <tt>ntpdc</tt> makes no attempt to retransmit requests, and will time requests out if the remote host is not heard from within a suitable timeout time.</p>
+ <p>The operation of <tt>ntpdc</tt> are specific to the particular implementation of the <tt>ntpd</tt> daemon and can be expected to work only with this and maybe some previous versions of the daemon. Requests from a remote <tt>ntpdc</tt> program which affect the state of the local server must be authenticated, which requires both the remote program and local server share a common key and key identifier.</p>
+ <p>Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
+ <h4>Command Line Options</h4>
+ <p>Specifying a command line option other than <tt>-i</tt> or <tt>-n</tt> will cause the specified query (queries) to be sent to the indicated host(s) immediately. Otherwise, <tt>ntpdc</tt> will attempt to read interactive format commands from the standard input.</p>
+ <dl>
+ <dt><tt>-4</tt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.
+ <dt><tt>-6</tt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.
+ <dt><tt>-c <i>command</i></tt>
+ <dd>The following argument is interpreted as an interactive format command and is added to the list of commands to be executed on the specified host(s). Multiple -c options may be given.
+ <dt><tt>-i</tt>
+ <dd>Force <tt>ntpdc</tt> to operate in interactive mode. Prompts will be written to the standard output and commands read from the standard input.
+ <dt><tt>-l</tt>
+ <dd>Obtain a list of peers which are known to the server(s). This switch is equivalent to <tt>-c listpeers</tt>.
+ <dt><tt>-n</tt>
+ <dd>Output all host addresses in dotted-quad numeric format rather than converting to the canonical host names.
+ <dt><tt>-p</tt>
+ <dd>Print a list of the peers known to the server as well as a summary of their state. This is equivalent to <tt>-c peers</tt>.
+ <dt><tt>-s</tt>
+ <dd>Print a list of the peers known to the server as well as a summary of their state, but in a slightly different format than the -p switch. This is equivalent to <tt>-c dmpeers</tt>.
+ </dl>
+ <h4>Interactive Commands</h4>
+ <p>Interactive format commands consist of a keyword followed by zero to four arguments. Only enough characters of the full keyword to uniquely identify the command need be typed. The output of a command is normally sent to the standard output, but optionally the output of individual commands may be sent to a file by appending a <tt>&lt;</tt>, followed by a file name, to the command line.</p>
+ <p>A number of interactive format commands are executed entirely within the <tt>ntpdc</tt> program itself and do not result in NTP mode 7 requests being sent to a server. These are described following.</p>
+ <dl>
+ <dt><tt>? [ <i>command_keyword</i> ]</tt><br>
+ <tt>help [ <i>command_keyword</i> ]</tt>
+ <dd>A <tt>?</tt> by itself will print a list of all the command keywords known to this incarnation of <tt>ntpq</tt>. A <tt>?</tt> followed by a command keyword will print function and usage information about the command. This command is probably a better source of information about <tt>ntpq</tt> than this manual page.
+ <dt><tt>delay <i>milliseconds</i></tt>
+ <dd>Specify a time interval to be added to timestamps included in requests which require authentication. This is used to enable (unreliable) server reconfiguration over long delay network paths or between machines whose clocks are unsynchronized. Actually the server does not now require timestamps in authenticated requests, so this command may be obsolete.
+ <dt><tt>host <i>hostname</i></tt>
+ <dd>Set the host to which future queries will be sent. Hostname may be either a host name or a numeric address.
+ <dt><tt>hostnames [ yes | no ]</tt>
+ <dd>If <tt>yes</tt> is specified, host names are printed in information displays. If <tt>no</tt> is specified, numeric addresses are printed instead. The default is <tt>yes</tt>, unless modified using the command line <tt>-n</tt> switch.
+ <dt><tt>keyid <i>keyid</i></tt>
+ <dd>This command allows the specification of a key number to be used to authenticate configuration requests. This must correspond to a key number the server has been configured to use for this purpose.
+ <dt><tt>quit</tt>
+ <dd>Exit <tt>ntpdc</tt>.
+ <dt><tt>passwd</tt>
+ <dd>This command prompts you to type in a password (which will not be echoed) which will be used to authenticate configuration requests. The password must correspond to the key configured for use by the NTP server for this purpose if such requests are to be successful.
+ <dt><tt>timeout <i>millseconds</i></tt>
+ <dd>Specify a timeout period for responses to server queries. The default is about 8000 milliseconds. Note that since <tt>ntpdc</tt> retries each query once after a timeout, the total waiting time for a timeout will be twice the timeout value set.
+ </dl>
+ <h4>Control Message Commands</h4>
+ <p>Query commands result in NTP mode 7 packets containing requests for information being sent to the server. These are read-only commands in that they make no modification of the server configuration state.</p>
+ <dl>
+ <dt><tt>listpeers</tt>
+ <dd>Obtains and prints a brief list of the peers for which the server is maintaining state. These should include all configured peer associations as well as those peers whose stratum is such that they are considered by the server to be possible future synchronization candidates.
+ <dt><tt>peers</tt>
+ <dd>Obtains a list of peers for which the server is maintaining state, along with a summary of that state. Summary information includes the address of the remote peer, the local interface address (0.0.0.0 if a local address has yet to be determined), the stratum of the remote peer (a stratum of 16 indicates the remote peer is unsynchronized), the polling interval, in seconds, the reachability register, in octal, and the current estimated delay, offset and dispersion of the peer, all in seconds.
+ <p>The character in the left margin indicates the mode this peer entry is operating in. A <tt>+</tt> denotes symmetric active, a <tt>-</tt> indicates symmetric passive, a <tt>=</tt> means the remote server is being polled in client mode, a <tt>^</tt> indicates that the server is broadcasting to this address, a <tt>~</tt> denotes that the remote peer is sending broadcasts and a <tt>*</tt> marks the peer the server is currently synchronizing to.</p>
+ <p>The contents of the host field may be one of four forms. It may be a host name, an IP address, a reference clock implementation name with its parameter or <tt>REFCLK(<i>implementation number</i>, <i>parameter</i>)</tt>. On <tt>hostnames no</tt> only IP-addresses will be displayed.</p>
+ <dt><tt>dmpeers</tt>
+ <dd>A slightly different peer summary list. Identical to the output of the <tt>peers</tt> command, except for the character in the leftmost column. Characters only appear beside peers which were included in the final stage of the clock selection algorithm. A <tt>.</tt> indicates that this peer was cast off in the falseticker detection, while a <tt>+</tt> indicates that the peer made it through. A <tt>*</tt> denotes the peer the server is currently synchronizing with.
+ <dt><tt>showpeer <i>peer_address</i> [...]</tt>
+ <dd>Shows a detailed display of the current peer variables for one or more peers. Most of these values are described in the NTP Version 2 specification.
+ <dt><tt>pstats <i>peer_address</i> [...]</tt>
+ <dd>Show per-peer statistic counters associated with the specified peer(s).
+ <dt><tt>clockinfo <i>clock_peer_address</i> [...]</tt>
+ <dd>Obtain and print information concerning a peer clock. The values obtained provide information on the setting of fudge factors and other clock performance information.
+ <dt><tt>kerninfo</tt>
+ <dd>Obtain and print kernel phase-lock loop operating parameters. This information is available only if the kernel has been specially modified for a precision timekeeping function.
+ <dt><tt>loopinfo [ oneline | multiline ]</tt>
+ <dd>Print the values of selected loop filter variables. The loop filter is the part of NTP which deals with adjusting the local system clock. The <tt>offset</tt> is the last offset given to the loop filter by the packet processing code. The <tt>frequency</tt> is the frequency error of the local clock in parts-per-million (ppm). The <tt>time_const</tt> controls the stiffness of the phase-lock loop and thus the speed at which it can adapt to oscillator drift. The <tt>watchdog timer</tt> value is the number of seconds which have elapsed since the last sample offset was given to the loop filter. The <tt>oneline</tt> and <tt>multiline</tt> options specify the format in which this information is to be printed, with <tt>multiline</tt> as the default.
+ <dt><tt>sysinfo</tt>
+ <dd>Print a variety of system state variables, i.e., state related to the local server. All except the last four lines are described in the NTP Version 3 specification, RFC-1305.
+ <p>The <tt>system flags</tt> show various system flags, some of which can be set and cleared by the <tt>enable</tt> and <tt>disable</tt> configuration commands, respectively. These are the <tt>auth</tt>, <tt>bclient</tt>, <tt>monitor</tt>, <tt>pll</tt>, <tt>pps</tt> and <tt>stats</tt> flags. See the <tt>ntpd</tt> documentation for the meaning of these flags. There are two additional flags which are read only, the <tt>kernel_pll</tt> and <tt>kernel_pps</tt>. These flags indicate the synchronization status when the precision time kernel modifications are in use. The <tt>kernel_pll</tt> indicates that the local clock is being disciplined by the kernel, while the kernel_pps indicates the kernel discipline is provided by the PPS signal.</p>
+ <p>The <tt>stability</tt> is the residual frequency error remaining afterthe system frequency correction is applied and is intended for maintenance and debugging. In most architectures, this value will initially decrease from as high as 500 ppm to a nominal value in the range .01 to 0.1 ppm. If it remains high for some time after starting the daemon, something may be wrong with the local clock, or the value of the kernel variable <tt>tick</tt> may be incorrect.</p>
+ <p>The <tt>broadcastdelay</tt> shows the default broadcast delay, as set by the <tt>broadcastdelay</tt> configuration command.</p>
+ <p>The <tt>authdelay</tt> shows the default authentication delay, as set by the <tt>authdelay</tt> configuration command.</p>
+ <dt><tt>sysstats</tt>
+ <dd>Print statistics counters maintained in the protocol module.
+ <dt><tt>memstats</tt>
+ <dd>Print statistics counters related to memory allocation code.
+ <dt><tt>iostats</tt>
+ <dd>Print statistics counters maintained in the input-output module.
+ <dt><tt>timerstats</tt>
+ <dd>Print statistics counters maintained in the timer/event queue support code.
+ <dt><tt>reslist</tt>
+ <dd>Obtain and print the server's restriction list. This list is (usually) printed in sorted order and may help to understand how the restrictions are applied.
+ <dt><tt>monlist [ <i>version</i> ]</tt>
+ <dd>Obtain and print traffic counts collected and maintained by the monitor facility. The version number should not normally need to be specified.
+ <dt><tt>clkbug <i>clock_peer_address</i> [...]</tt>
+ <dd>Obtain debugging information for a reference clock driver. This information is provided only by some clock drivers and is mostly undecodable without a copy of the driver source in hand.
+ </dl>
+ <h4>Runtime Configuration Requests</h4>
+ <p>All requests which cause state changes in the server are authenticated by the server using a configured NTP key (the facility can also be disabled by the server by not configuring a key). The key number and the corresponding key must also be made known to <tt>ntpdc<\tt>. This can be done using the keyid and passwd commands, the latter of which will prompt at the terminal for a password to use as the encryption key. You will also be prompted automatically for both the key number and password the first time a command which would result in an authenticated request to the server is given. Authentication not only provides verification that the requester has permission to make such changes, but also gives an extra degree of protection again transmission errors.</p>
+ <p>Authenticated requests always include a timestamp in the packet data, which is included in the computation of the authentication code. This timestamp is compared by the server to its receive time stamp. If they differ by more than a small amount the request is rejected. This is done for two reasons. First, it makes simple replay attacks on the server, by someone who might be able to overhear traffic on your LAN, much more difficult. Second, it makes it more difficult to request configuration changes to your server from topologically remote hosts. While the reconfiguration facility will work well with a server on the local host, and may work adequately between time-synchronized hosts on the same LAN, it will work very poorly for more distant hosts. As such, if reasonable passwords are chosen, care is taken in the distribution and protection of keys and appropriate source address restrictions are applied, the run time reconfiguration facility should provide an adequate level of security.</p>
+ <p>The following commands all make authenticated requests.</p>
+ <dl>
+ <dt><tt>addpeer <i>peer_address</i> [ <i>keyid</i> ] [ <i>version</i> ] [ <i>prefer</i> ]</tt>
+ <dd>Add a configured peer association at the given address and operating in symmetric active mode. Note that an existing association with the same peer may be deleted when this command is executed, or may simply be converted to conform to the new configuration, as appropriate. If the optional <tt>keyid</tt> is a nonzero integer, all outgoing packets to the remote server will have an authentication field attached encrypted with this key. If the value is 0 (or not given) no authentication will be done. The <tt>version#</tt> can be 1, 2 or 3 and defaults to 3. The <tt>prefer</tt> keyword indicates a preferred peer (and thus will be used primarily for clock synchronisation if possible). The preferred peer also determines the validity of the PPS signal - if the preferred peer is suitable for synchronisation so is the PPS signal.
+ <dt><tt>addserver <i>peer_address</i> [ <i>keyid</i> ] [ <i>version</i> ] [ <i>prefer</i> ]</tt>
+ <dd>Identical to the addpeer command, except that the operating mode is client.
+ <dt><tt>broadcast <i>peer_address</i> [ <i>keyid</i> ] [ <i>version</i> ] [ <i>prefer</i> ]</tt>
+ <dd>Identical to the addpeer command, except that the operating mode is broadcast. In this case a valid key identifier and key are required. The <tt>peer_address</tt> parameter can be the broadcast address of the local network or a multicast group address assigned to NTP. If a multicast address, a multicast-capable kernel is required.
+ <dt><tt>unconfig <i>peer_address</i> [...]</tt>
+ <dd>This command causes the configured bit to be removed from the specified peer(s). In many cases this will cause the peer association to be deleted. When appropriate, however, the association may persist in an unconfigured mode if the remote peer is willing to continue on in this fashion.
+ <dt><tt>fudge <i>peer_address</i> [ <i>time1</i> ] [ <i>time2</i> ] [ <i>stratum</i> ] [ <i>refid</i> ]</tt>
+ <dd>This command provides a way to set certain data for a reference clock. See the source listing for further information.
+ <dt><tt>enable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</tt><br>
+ <tt>disable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</tt>
+ <dd>These commands operate in the same way as the <tt>enable</tt> and <tt>disable</tt> configuration file commands of <tt>ntpd</tt>. See the <a href="miscopt.html">Miscellaneous Options</a> page for further information.
+ <dt><tt>restrict <i>address mask flag</i> [ <i>flag</i> ]</tt>
+ <dd>This command operates in the same way as the <tt>restrict</tt> configuration file commands of <tt>ntpd</tt>.
+ <dt><tt>unrestrict <i>address mask flag</i> [ <i>flag</i> ]</tt>
+ <dd>Unrestrict the matching entry from the restrict list.
+ <dt><tt>delrestrict <i>address mask [ ntpport ]</i></tt>
+ <dd>Delete the matching entry from the restrict list.
+ <dt><tt>readkeys</tt>
+ <dd>Causes the current set of authentication keys to be purged and a new set to be obtained by rereading the keys file (which must have been specified in the <tt>ntpd</tt> configuration file). This allows encryption keys to be changed without restarting the server.
+ <dt><tt>trustedkey <i>keyid</i> [...]</tt>
+ <dt><tt>untrustedkey <i>keyid</i> [...]</tt>
+ <dd>These commands operate in the same way as the <tt>trustedkey</tt> and <tt>untrustedkey</tt> configuration file commands of <tt>ntpd</tt>.
+ <dt><tt>authinfo</tt>
+ <dd>Returns information concerning the authentication module, including known keys and counts of encryptions and decryptions which have been done.
+ <dt><tt>traps</tt>
+ <dd>Display the traps set in the server. See the source listing for further information.
+ <dt><tt>addtrap [ <i>address</i> [ <i>port</i> ] [ <i>interface</i> ]</tt>
+ <dd>Set a trap for asynchronous messages. See the source listing for further information.
+ <dt><tt>clrtrap [ <i>address</i> [ <i>port</i> ] [ <i>interface</i>]</tt>
+ <dd>Clear a trap for asynchronous messages. See the source listing for further information.
+ <dt><tt>reset</tt>
+ <dd>Clear the statistics counters in various modules of the server. See the source listing for further information.
+ </dl>
+ <h4>Bugs</h4>
+ <p><tt>ntpdc</tt> is a crude hack. Much of the information it shows is deadly boring and could only be loved by its implementer. The program was designed so that new (and temporary) features were easy to hack in, at great expense to the program's ease of use. Despite this, the program is occasionally useful.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/ntpdsim.html b/contrib/ntp/html/ntpdsim.html
new file mode 100644
index 000000000000..25dc2937cbc2
--- /dev/null
+++ b/contrib/ntp/html/ntpdsim.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>ntpdsim - Network Time Protocol (NTP) simulator</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</h3>
+ <img src="pic/alice47.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>The mushroom knows all the command line options.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:16 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#synop">Synopsis</a><br>
+ <li class="inline"><a href="#descr">Description</a><br>
+ <li class="inline"><a href="#cmd">Command Line Oprionts</a>
+ <li class="inline"><a href="#files">Files</a>
+ </ul>
+ <hr>
+ <h4 id="synop">Synopsis</h4>
+ <tt>ntpdsim [ -B <i>bdly</i> ] [ -C <i>snse</i> ] [ -O <i>clk_time</i> ] [ -S <i>sim_time</i> ] [ -T <i>ferr</i> ] [ -W <i>fsne</i> ] [ -Y </tt><i><tt>ndly</tt></i><tt> ] [ -X </tt><i><tt>pdly</tt></i><tt> ]</tt>
+ <h4 id="descr">Description</h4>
+ <p>The <tt>ntpdsim</tt> program is an adaptation of the <tt>ntpd</tt> operating system daemon. The program operates as a discrete time simulator using specified systematic and random driving sources. It includes all the mitigation and discipline algorithms of the actual daemon, but with the packet I/O and system clock algorithms driven by simulation. Most functions of the real <tt>ntpd</tt> remain intact, including the monitoring, statistics recording, trace and host name resolution features. Further information on the simulator is on the <a href="http://www.eecis.udel.edu/~mills/ntpsim.html">NTP Discrete Event Simulator</a> page.</p>
+ <p>The simulator is most useful to study NTP behavior in response to time and/or frequency transients under specific conditions of network jitter and oscillator wander. For this purpose the daemon can be driven by pseudorandom jitter and wander sample sequences characteristic of real networks and oscillators. The jitter generator produces samples from a Poisson distribution, while the wander generator produces samples from a Guassian distribution.</p>
+ <p>The easiest way to use this program is to create a <tt>ntpstats</tt> directory, configuration file <tt>ntp.conf</tt> and frequency file <tt>ntp.drift</tt> and test shell <tt>test.sh</tt> in the base directory. The <tt>ntp.drift</tt> file and <tt>ntpstats</tt> directory can be empty to start. The <tt>test.sh</tt> script can contain something like</p>
+ <pre>rm ./ntpstats/*
+ntpdsim -O 0.1 -C .001 -T 400 -W 1 -c ./ntp.conf,
+</pre>
+ <p>which starts the simulator with a time offset 100 ms, network jitter 1 ms, frequency offset 400 PPM and oscillator wander 1 PPM/s. These parameters represent typical conditions with modern workstations on a Ethernet LAN. The ntp.conf file should contain something like</p>
+ <pre>disable kernel
+server pogo
+driftfile ./ntp.drift
+statsdir ./ntpstats/
+filegen loopstats type day enable
+filegen peerstats type day enable
+</pre>
+ <h4 id="cmd">Command Line Options</h4>
+ <dl>
+ <dt>Most of the <tt>ntpd</tt> command line options apply also to <tt>ntpdsim</tt>. In addition, the following command line options apply to <tt>ntpdsim.</tt>
+ <dt><tt>-B <i>bdly</i></tt>
+ <dd>Specify beep delay (3600) s.
+ <dt><tt>-C <i>snse</i></tt>
+ <dd>Specify network jitter parameter (0) s.
+ <dt><tt>-O <i>clk_time</i></tt>
+ <dd>Specify initial time offset (0) s.
+ <dt><tt>-S <i>sim_time</i></tt>
+ <dd>Specify simulation duration (86400) s.
+ <dt><tt>-T <i>ferr</i></tt>
+ <dd>Specify initial frequency offset (0) PPM.
+ <dt><tt>-W <i>fnse</i></tt>
+ <dd>Specify oscillator wander parameter (0) PPM/s.
+ <dt><tt>-Y <i>ndly</i></tt>
+ <dd>Specify network propagation delay (.001) s.
+ <dt><tt>-Z <i>pdly</i></tt>
+ <dd>Specify server processing delay (.001) s.
+ </dl>
+ <h4 id="files">Files</h4>
+ <tt>/etc/ntp.conf</tt> - the default name of the configuration file<br>
+ <tt>/etc/ntp.drift</tt> - the default name of the drift file<br>
+ <tt>/etc/ntp.keys</tt> - the default name of the key file
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/ntpq.html b/contrib/ntp/html/ntpq.html
new file mode 100644
index 000000000000..ce6baa5eff69
--- /dev/null
+++ b/contrib/ntp/html/ntpq.html
@@ -0,0 +1,262 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>ntpq - standard NTP query program</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3><tt>ntpq</tt> - standard NTP query program</h3>
+ <img src="pic/bustardfly.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>A typical NTP monitoring packet</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">21:38</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="230">Sunday, January 26, 2003</csobj></p>
+ <br clear="left">
+ <h4>More Help</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links12.txt"></script>
+ <hr>
+ <h4>Synopsis</h4>
+ <tt>ntpq [-inp] [-c <i>command</i>] [<i>host</i>] [...]</tt>
+ <h4>Description</h4>
+ <p>The <tt>ntpq</tt> utility program is used to monitor NTP daemon <tt>ntpd</tt> operations and determine performance. It uses the standard NTP mode 6 control message formats defined in Appendix B of the NTPv3 specification RFC1305. The same formats are used in NTPv4, although some of the variables have changed and new ones added. The description on this page is for the NTPv4 variables.</p>
+ <p>The program can be run either in interactive mode or controlled using command line arguments. Requests to read and write arbitrary variables can be assembled, with raw and pretty-printed output options being available. The <tt>ntpq</tt> can also obtain and print a list of peers in a common format by sending multiple queries to the server.</p>
+ <p>If one or more request options is included on the command line when <tt>ntpq</tt> is executed, each of the requests will be sent to the NTP servers running on each of the hosts given as command line arguments, or on localhost by default. If no request options are given, <tt>ntpq</tt> will attempt to read commands from the standard input and execute these on the NTP server running on the first host given on the command line, again defaulting to localhost when no other host is specified. <tt>ntpq</tt>will prompt for commands if the standard input is a terminal device.</p>
+ <p><tt>ntpq</tt> uses NTP mode 6 packets to communicate with the NTP server, and hence can be used to query any compatible server on the network which permits it. Note that since NTP is a UDP protocol this communication will be somewhat unreliable, especially over large distances in terms of network topology. <tt>ntpq</tt> makes one attempt to retransmit requests, and will time requests out if the remote host is not heard from within a suitable timeout time.</p>
+ <p>Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
+ <p>For examples and usage, see the <a href="debug.html">NTP Debugging Techniques</a> page.</p>
+ <p>Command line options are described following. Specifying a command line option other than <tt>-i</tt> or <tt>-n</tt> will cause the specified query (queries) to be sent to the indicated host(s) immediately. Otherwise, <tt>ntpq</tt> will attempt to read interactive format commands from the standard input.</p>
+ <dl>
+ <dt><tt>-4</tt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.
+ <dt><tt>-6</tt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.
+ <dt><tt>-c</tt>
+ <dd>The following argument is interpreted as an interactive format command and is added to the list of commands to be executed on the specified host(s). Multiple <tt>-c</tt> options may be given.
+ <dt><tt>-d</tt>
+ <dd>Turn on debugging mode.
+ <dt><tt>-i</tt>
+ <dd>Force <tt>ntpq</tt> to operate in interactive mode. Prompts will be written to the standard output and commands read from the standard input.
+ <dt><tt>-n</tt>
+ <dd>Output all host addresses in dotted-quad numeric format rather than converting to the canonical host names.
+ <dt><tt>-p</tt>
+ <dd>Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the <tt>peers</tt> interactive command.
+ </dl>
+ <h4>Internal Commands</h4>
+ <p>Interactive format commands consist of a keyword followed by zero to four arguments. Only enough characters of the full keyword to uniquely identify the command need be typed. The output of a command is normally sent to the standard output, but optionally the output of individual commands may be sent to a file by appending a <tt>&gt;</tt>, followed by a file name, to the command line. A number of interactive format commands are executed entirely within the <tt>ntpq</tt> program itself and do not result in NTP mode 6 requests being sent to a server. These are described following.</p>
+ <dl>
+ <dt><tt>? [<i>command_keyword</i>]</tt><br>
+ <tt>helpl [<i>command_keyword</i>]</tt>
+ <dd>A <tt>?</tt> by itself will print a list of all the command keywords known to this incarnation of <tt>ntpq</tt>. A <tt>?</tt> followed by a command keyword will print function and usage information about the command. This command is probably a better source of information about <tt>ntpq</tt> than this manual page.
+ <dt><tt>addvars <i>variable_name</i> [ = <i>value</i>] [...]</tt><br>
+ <tt>rmvars <i>variable_name</i> [...]</tt><br>
+ <tt>clearvars</tt>
+ <dd>The data carried by NTP mode 6 messages consists of a list of items of the form <tt><i>variable_name</i> = <i>value</i></tt>, where the <tt>= <i>value</i></tt> is ignored, and can be omitted, in requests to the server to read variables. <tt>ntpq</tt> maintains an internal list in which data to be included in control messages can be assembled, and sent using the <tt>readlist</tt> and <tt>writelist</tt> commands described below. The <tt>addvars</tt> command allows variables and their optional values to be added to the list. If more than one variable is to be added, the list should be comma-separated and not contain white space. The <tt>rmvars</tt> command can be used to remove individual variables from the list, while the <tt>clearlist</tt> command removes all variables from the list.
+ <dt><tt>cooked</tt>
+ <dd>Causes output from query commands to be &quot;cooked&quot;, so that variables which are recognized by <tt>ntpq</tt> will have their values reformatted for human consumption. Variables which <tt>ntpq</tt> thinks should have a decodable value but didn't are marked with a trailing <tt>?</tt>.
+ <dt><tt>debug more | less | off</tt>
+ <dd>Turns internal query program debugging on and off.
+ <dt><tt>delay <i>milliseconds</i></tt>
+ <dd>Specify a time interval to be added to timestamps included in requests which require authentication. This is used to enable (unreliable) server reconfiguration over long delay network paths or between machines whose clocks are unsynchronized. Actually the server does not now require timestamps in authenticated requests, so this command may be obsolete.
+ <dt><tt>host <i>hostname</i></tt>
+ <dd>Set the host to which future queries will be sent. Hostname may be either a host name or a numeric address.
+ <dt><tt>hostnames [yes | no]</tt>
+ <dd>If <tt>yes</tt> is specified, host names are printed in information displays. If <tt>no</tt> is specified, numeric addresses are printed instead. The default is <tt>yes</tt>, unless modified using the command line <tt>-n</tt> switch.
+ <dt><tt>keyid <i>keyid</i></tt>
+ <dd>This command specifies the key number to be used to authenticate configuration requests. This must correspond to a key number the server has been configured to use for this purpose.
+ <dt><tt>ntpversion 1 | 2 | 3 | 4</tt>
+ <dd>Sets the NTP version number which <tt>ntpq</tt> claims in packets. Defaults to 3, Note that mode 6 control messages (and modes, for that matter) didn't exist in NTP version 1.
+ <dt><tt>passwd</tt>
+ <dd>This command prompts for a password (which will not be echoed) which will be used to authenticate configuration requests. The password must correspond to the key configured for NTP server for this purpose.
+ <dt><tt>quit</tt>
+ <dd>Exit <tt>ntpq</tt>.
+ <dt><tt>raw</tt>
+ <dd>Causes all output from query commands is printed as received from the remote server. The only formating/interpretation done on the data is to transform nonascii data into a printable (but barely understandable) form.
+ <dt><tt>timeout <i>millseconds</i></tt>
+ <dd>Specify a timeout period for responses to server queries. The default is about 5000 milliseconds. Note that since <tt>ntpq</tt> retries each query once after a timeout, the total waiting time for a timeout will be twice the timeout value set.
+ </dl>
+ <h4>Control Message Commands</h4>
+ <p>Each association known to an NTP server has a 16 bit integer association identifier. NTP control messages which carry peer variables must identify the peer the values correspond to by including its association ID. An association ID of 0 is special, and indicates the variables are system variables, whose names are drawn from a separate name space.</p>
+ <p>Control message commands result in one or more NTP mode 6 messages being sent to the server, and cause the data returned to be printed in some format. Most commands currently implemented send a single message and expect a single response. The current exceptions are the peers command, which will send a preprogrammed series of messages to obtain the data it needs, and the mreadlist and mreadvar commands, which will iterate over a range of associations.</p>
+ <dl>
+ <dt><tt>associations</tt>
+ <dd>Obtains and prints a list of association identifiers and peer statuses for in-spec peers of the server being queried. The list is printed in columns. The first of these is an index numbering the associations from 1 for internal use, the second the actual association identifier returned by the server and the third the status word for the peer. This is followed by a number of columns containing data decoded from the status word See the peers command for a decode of the <tt>condition</tt> field. Note that the data returned by the <tt>associations&quot;</tt> command is cached internally in <tt>ntpq</tt>. The index is then of use when dealing with stupid servers which use association identifiers which are hard for humans to type, in that for any subsequent commands which require an association identifier as an argument, the form &amp;index may be used as an alternative.
+ <dt><tt>clockvar [<i>assocID</i>] [<i>variable_name</i> [ = <i>value</i> [...]] [...]</tt>
+ <dt><tt>cv [<i>assocID</i>] [<i>variable_name</i> [ = <i>value</i> [...] ][...]</tt>
+ <dd>Requests that a list of the server's clock variables be sent. Servers which have a radio clock or other external synchronization will respond positively to this. If the association identifier is omitted or zero the request is for the variables of the <tt>system clock</tt> and will generally get a positive response from all servers with a clock. If the server treats clocks as pseudo-peers, and hence can possibly have more than one clock connected at once, referencing the appropriate peer association ID will show the variables of a particular clock. Omitting the variable list will cause the server to return a default variable display.
+ <dt><tt>lassociations</tt>
+ <dd>Obtains and prints a list of association identifiers and peer statuses for all associations for which the server is maintaining state. This command differs from the <tt>associations</tt> command only for servers which retain state for out-of-spec client associations (i.e., fuzzballs). Such associations are normally omitted from the display when the <tt>associations</tt> command is used, but are included in the output of <tt>lassociations</tt>.
+ <dt><tt>lpassociations</tt>
+ <dd>Print data for all associations, including out-of-spec client associations, from the internally cached list of associations. This command differs from <tt>passociations</tt> only when dealing with fuzzballs.
+ <dt><tt>lpeers</tt>
+ <dd>Like R peers, except a summary of all associations for which the server is maintaining state is printed. This can produce a much longer list of peers from fuzzball servers.
+ <dt><tt>mreadlist <i>assocID</i> <i>assocID</i></tt><br>
+ <tt>mrl <i>assocID</i> <i>assocID</i></tt>
+ <dd>Like the <tt>readlist</tt> command, except the query is done for each of a range of (nonzero) association IDs. This range is determined from the association list cached by the most recent <tt>associations</tt> command.
+ <dt><tt>mreadvar <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt><br>
+ <tt>mrv <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt>
+ <dd>Like the <tt>readvar</tt> command, except the query is done for each of a range of (nonzero) association IDs. This range is determined from the association list cached by the most recent <tt>associations</tt> command.
+ <dt><tt>opeers</tt>
+ <dd>An old form of the <tt>peers</tt> command with the reference ID replaced by the local interface address.
+ <dt><tt>passociations</tt>
+ <dd>Displays association data concerning in-spec peers from the internally cached list of associations. This command performs identically to the <tt>associations</tt> except that it displays the internally stored data rather than making a new query.
+ <dt><tt>peers</tt>
+ <dd>Obtains a current list peers of the server, along with a summary of each peer's state. Summary information includes the address of the remote peer, the reference ID (0.0.0.0 if this is unknown), the stratum of the remote peer, the type of the peer (local, unicast, multicast or broadcast), when the last packet was received, the polling interval, in seconds, the reachability register, in octal, and the current estimated delay, offset and dispersion of the peer, all in milliseconds. The character at the left margin of each line shows the synchronization status of the association and is a valuable diagnostic tool. The encoding and meaning of this character, called the tally code, is given later in this page.
+ <dt><tt>pstatus <i>assocID</i></tt>
+ <dd>Sends a read status request to the server for the given association. The names and values of the peer variables returned will be printed. Note that the status word from the header is displayed preceding the variables, both in hexadecimal and in pidgeon English.
+ <dt><tt>readlist [ <i>assocID</i> ]</tt><br>
+ <tt>rl [ <i>assocID</i> ]</tt>
+ <dd>Requests that the values of the variables in the internal variable list be returned by the server. If the association ID is omitted or is 0 the variables are assumed to be system variables. Otherwise they are treated as peer variables. If the internal variable list is empty a request is sent without data, which should induce the remote server to return a default display.
+ <dt><tt>readvar <i>assocID</i> <i>variable_name</i> [ = <i>value</i> ] [ ...]</tt><br>
+ <tt>rv <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i> ] [...]</tt>
+ <dd>Requests that the values of the specified variables be returned by the server by sending a read variables request. If the association ID is omitted or is given as zero the variables are system variables, otherwise they are peer variables and the values returned will be those of the corresponding peer. Omitting the variable list will send a request with no data which should induce the server to return a default display. The encoding and meaning of the variables derived from NTPv3 is given in RFC-1305; the encoding and meaning of the additional NTPv4 variables are given later in this page.
+ <dt><tt>writevar <i>assocID</i> <i>variable_name</i> [ = <i>value</i> [ ...]</tt>
+ <dd>Like the readvar request, except the specified variables are written instead of read.
+ <dt><tt>writelist [ <i>assocID</i> ]</tt>
+ <dd>Like the readlist request, except the internal list variables are written instead of read.
+ </dl>
+ <h4>Tally Codes</h4>
+ <p>The character in the left margin in the <tt>peers</tt> billboard, called the tally code, shows the fate of each association in the clock selection process. Following is a list of these characters, the pigeon used in the <tt>rv</tt> command, and a short explanation of the condition revealed.</p>
+ <dl>
+ <dt><tt>space reject</tt>
+ <dd>The peer is discarded as unreachable, synchronized to this server (synch loop) or outrageous synchronization distance.
+ <dt><tt>x&nbsp;&nbsp;falsetick</tt>
+ <dd>The peer is discarded by the intersection algorithm as a falseticker.
+ <dt><tt>.&nbsp;&nbsp;excess</tt>
+ <dd>The peer is discarded as not among the first ten peers sorted by synchronization distance and so is probably a poor candidate for further consideration.
+ <dt><tt>-&nbsp;&nbsp;outlyer</tt>
+ <dd>The peer is discarded by the clustering algorithm as an outlyer.
+ <dt><tt>+&nbsp;&nbsp;candidat</tt>
+ <dd>The peer is a survivor and a candidate for the combining algorithm.
+ <dt><tt>#&nbsp;&nbsp;selected</tt>
+ <dd>The peer is a survivor, but not among the first six peers sorted by synchronization distance. If the association is ephemeral, it may be demobilized to conserve resources. <dt><tt>*&nbsp;&nbsp;sys.peer</tt>
+ <dd>The peer has been declared the system peer and lends its variables to the system variables.
+ <dt><tt>o&nbsp;&nbsp;pps.peer</tt>
+ <dd>The peer has been declared the system peer and lends its variables to thesystem variables. However, the actual system synchronization is derived from a pulse-per-second (PPS) signal, either indirectly via the PPS reference clock driver or directly via kernel interface.
+ </dl>
+ <h4>System Variables</h4>
+ <p>The <tt>status, leap, stratum, precision, rootdelay, rootdispersion, refid, reftime, poll, offset, and frequency</tt> variables are described in RFC-1305 specification. Additional NTPv4 system variables include the following.</p>
+ <dl>
+ <dt><tt>version</tt>
+ <dd>Everything you might need to know about the software version and generation time.
+ <dt><tt>processor</tt>
+ <dd>The processor and kernel identification string.
+ <dt><tt>system</tt>
+ <dd>The operating system version and release identifier.
+ <dt><tt>state</tt>
+ <dd>The state of the clock discipline state machine. The values are described in the architecture briefing on the NTP Project page linked from www.ntp.org.
+ <dt><tt>peer</tt>
+ <dd>The internal integer used to identify the association currently designated the system peer.
+ <dt><tt>jitter</tt>
+ <dd>The estimated time error of the system clock measured as an exponential average of RMS time differences.
+ <dt><tt>stability</tt>
+ <dd>The estimated frequency stability of the system clock measured as an exponential average of RMS frequency differences.
+ </dl>
+ <p>When the NTPv4 daemon is compiled with the OpenSSL software library, additional system variables are displayed, including some or all of the following, depending on the particular dance:</p>
+ <dl>
+ <dt><tt>flags</tt>
+ <dd>The current flags word bits and message digest algorithm identifier (NID) in hex format. The high order 16 bits of the four-byte word contain the NID from the OpenSSL ligrary, while the low-order bits are interpreted as follows:
+ <dd>
+ <dl>
+ <dt><tt>0x01</tt>
+ <dd>autokey enabled
+ <dt><tt>0x02</tt>
+ <dd>NIST leapseconds file loaded
+ <dt><tt>0x10</tt>
+ <dd>PC identity scheme
+ <dt><tt>0x20</tt>
+ <dd>IFF identity scheme
+ <dt><tt>0x40</tt>
+ <dd>GQ identity scheme
+ </dl>
+ <dt><tt>hostname</tt>
+ <dd>The name of the host as returned by the Unix <tt>gethostname()</tt> library function.
+ <dt><tt>hostkey</tt>
+ <dd>The NTP filestamp of the host key file.
+ <dt><tt>cert</tt>
+ <dd>A list of certificates held by the host. Each entry includes the subject, issuer, flags and NTP filestamp in order. The bits are interpreted as follows:
+ <dd>
+ <dl>
+ <dt><tt>0x01</tt>
+ <dd>certificate has been signed by the server
+ <dt><tt>0x02</tt>
+ <dd>certificate is trusted
+ <dt><tt>0x04</tt>
+ <dd>certificate is private
+ <dt><tt>0x08</tt>
+ <dd>certificate contains errors and should not be trusted
+ </dl>
+ <dt><tt>leapseconds</tt>
+ <dd>The NTP filestamp of the NIST leapseconds file.
+ <dt><tt>refresh</tt>
+ <dd>The NTP timestamp when the host public cryptographic values were refreshed and signed.
+ <dt><tt>signature</tt>
+ <dd>The host digest/signature scheme name from the OpenSSL library.
+ <dt><tt>tai</tt>
+ <dd>The TAI-UTC offset in seconds obtained from the NIST leapseconds table.
+ </dl>
+ <h4>Peer Variables</h4>
+ <p>The <tt>status, srcadr, srcport, dstadr, dstport, leap, stratum, precision, rootdelay, rootdispersion, readh, hmode, pmode, hpoll, ppoll, offset, delay, dspersion, reftime</tt> variables are described in the RFC-1305 specification, as are the timestamps <tt>org, rec and xmt</tt>. Additional NTPv4 system variables include the following.</p>
+ <dl>
+ <dt><tt>flash</tt>
+ <dd>The flash code for the most recent packet received. The encoding and meaning of these codes is given later in this page.
+ <dt><tt>jitter</tt>
+ <dd>The estimated time error of the peer clock measured as an exponential average of RMS time differences.
+ <dt><tt>unreach</tt>
+ <dd>The value of the counter which records the number of poll intervals since the last valid packet was received.
+ </dl>
+ <p>When the NTPv4 daemon is compiled with the OpenSSL software library, additional peer variables are displayed, including the following:</p>
+ <dl>
+ <dt><tt>flags</tt>
+ <dd>The current flag bits. This word is the server host status word with additional bits used by the Autokey state machine. See the source code for the bit encoding.
+ <dt><tt>hostname</tt>
+ <dd>The server host name.
+ <dt><tt>initkey <i>key</i></tt>
+ <dd>The initial key used by the key list generator in the Autokey protocol.
+ <dt><tt>initsequence <i>index</i></tt>
+ <dd>The initial index used by the key list generator in the Autokey protocol.
+ <dt><tt>signature</tt>
+ <dd>The server message digest/signature scheme name from the OpenSSL software library.
+ <dt><tt>timestamp <i>time</i></tt>
+ <dd>The NTP timestamp when the last Autokey key list was generated and signed.
+ </dl>
+ <h4>Flash Codes</h4>
+ <p>The <tt>flash</tt> code is a valuable debugging aid displayed in the peer variables list. It shows the results of the original sanity checks defined in the NTP specification RFC-1305 and additional ones added in NTPv4. There are 12 tests designated <tt>TEST1</tt> through <tt>TEST12</tt>. The tests are performed in a certain order designed to gain maximum diagnostic information while protecting against accidental or malicious errors. The <tt>flash</tt> variable is initialized to zero as each packet is received. If after each set of tests one or more bits are set, the packet is discarded.</p>
+ <p>Tests <tt>TEST1</tt> through <tt>TEST3</tt> check the packet timestamps from which the offset and delay are calculated. If any bits are set, the packet is discarded; otherwise, the packet header variables are saved. <tt>TEST4</tt> and <tt>TEST5</tt> are associated with access control and cryptographic authentication. If any bits are set, the packet is discarded immediately with nothing changed.</p>
+ <p>Tests <tt>TEST6</tt> through <tt>TEST8</tt> check the health of the server. If any bits are set, the packet is discarded; otherwise, the offset and delay relative to the server are calculated and saved. <tt>TEST9</tt> checks the health of the association itself. If any bits are set, the packet is discarded; otherwise, the saved variables are passed to the clock filter and mitigation algorithms.</p>
+ <p>Tests <tt>TEST10</tt> through <tt>TEST12</tt> check the authentication state using Autokey public-key cryptography, as described in the <a href="authopt.html">Authentication Options</a> page. If any bits are set and the association has previously been marked reachable, the packet is discarded; otherwise, the originate and receive timestamps are saved, as required by the NTP protocol, and processing continues.</p>
+ <p>The <tt>flash</tt> bits for each test are defined as follows.</p>
+ <dl>
+ <dt><tt>0x001 TEST1</tt>
+ <dd>Duplicate packet. The packet is at best a casual retransmission and at worst a malicious replay.
+ <dt><tt>0x002 TEST2</tt>
+ <dd>Bogus packet. The packet is not a reply to a message previously sent. This can happen when the NTP daemon is restarted and before somebody else notices.
+ <dt><tt>0x004 TEST3</tt>
+ <dd>Unsynchronized. One or more timestamp fields are invalid. This normally happens when the first packet from a peer is received.
+ <dt><tt>0x008 TEST4</tt>
+ <dd>Access is denied. See the <a href="accopt.html">Access Control Options</a> page.
+ <dt><tt>0x010 TEST5</tt>
+ <dd>Cryptographic authentication fails. See the <a href="authopt.html">Authentication Options</a> page.
+ <dt><tt>0x020TEST6</tt>
+ <dd>The server is unsynchronized. Wind up its clock first.
+ <dt><tt>0x040 TEST7</tt>
+ <dd>The server stratum is at the maximum than 15. It is probably unsynchronized and its clock needs to be wound up.
+ <dt><tt>0x080 TEST8</tt>
+ <dd>Either the root delay or dispersion is greater than one second, which is highly unlikely unless the peer is unsynchronized to Mars.
+ <dt><tt>0x100 TEST9</tt>
+ <dd>Either the peer delay or dispersion is greater than one second, which is higly unlikely unless the peer is on Mars.
+ <dt><tt>0x200 TEST10</tt>
+ <dd>The autokey protocol has detected an authentication failure. See the <a href="authopt.html">Authentication Options</a> page.
+ <dt><tt>0x400 TEST11</tt>
+ <dd>The autokey protocol has not verified the server or peer is proventic and has valid public key credentials. See the <a href="authopt.html">Authentication Options</a> page.
+ <dt><tt>0x800 TEST12</tt>
+ <dd>A protocol or configuration error has occurred in the public key algorithms or a possible intrusion event has been detected. See the <a href="authopt.html">Authentication Options</a> page.
+ </dl>
+ <h4>Bugs</h4>
+ <p>The peers command is non-atomic and may occasionally result in spurious error messages about invalid associations occurring and terminating the command. The timeout time is a fixed constant, which means you wait a long time for timeouts since it assumes sort of a worst case. The program should improve the timeout estimate as it sends queries to a particular host, but doesn't.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/ntptime.html b/contrib/ntp/html/ntptime.html
new file mode 100644
index 000000000000..0ddd8e40bd71
--- /dev/null
+++ b/contrib/ntp/html/ntptime.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>ntptime - read kernel time variables</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3><tt>ntptime</tt> - read kernel time variables</h3>
+ <img src="pic/pogo5.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>The turtle has been swimming in the kernel.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">20:19</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="257">Monday, December 02, 2002</csobj></p>
+ <br clear="left">
+ <hr>
+ <h4>Synopsis</h4>
+ <tt>ntptime [ -chr ] [ -e <i>est_error</i> ] [ -f <i>frequency</i> ] [ -m <i>max_error</i> ] [ -o <i>offset</i> ] [ -s <i>status</i> ] [ -t <i>time_constant</i>]</tt>
+ <h4>Description</h4>
+ <p>This program is useful only with special kernels described in the <a href="kern.html">A Kernel Model for Precision Timekeeping</a> page. It reads and displays time-related kernel variables using the <tt>ntp_gettime()</tt> system call. A similar display can be obtained using the <tt>ntpdc</tt> program and <tt>kerninfo</tt> command.</p>
+ <h4>Options</h4>
+ <dl>
+ <dt><tt>-c</tt>
+ <dd>Display the execution time of <tt>ntptime</tt> itself.
+ <dt><tt>-e <i>est_error</i></tt>
+ <dd>Specify estimated error, in microseconds.
+ <dt><tt>-f <i>frequency</i></tt>
+ <dd>Specify frequency offset, in parts per million.
+ <dt><tt>-h</tt>
+ <dd>Display help information.
+ <dt><tt>-m <i>max_error</i></tt>
+ <dd>Specify max possible errors, in microseconds.
+ <dt><tt>-o <i>offset</i></tt>
+ <dd>Specify clock offset, in microseconds.
+ <dt><tt>-r</tt>
+ <dd>Display Unix and NTP times in raw format.
+ <dt><tt>-s <i>status</i></tt>
+ <dd>Specify clock status. Better know what you are doing.
+ <dt><tt>-t <i>time_constant</i></tt>
+ <dd>Specify time constant, an integer in the range 0-10.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/ntptrace.html b/contrib/ntp/html/ntptrace.html
new file mode 100644
index 000000000000..76002bf0e72a
--- /dev/null
+++ b/contrib/ntp/html/ntptrace.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>ntptrace - trace a chain of NTP servers back to the primary source</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3><tt>ntptrace</tt> - trace a chain of NTP servers back to the primary source</h3>
+ <img src="pic/alice13.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>The rabbit knows the way back.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">20:19</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="257">Monday, December 02, 2002</csobj></p>
+ <br clear="left">
+ <hr>
+ <h4>Synopsis</h4>
+ <tt>ntptrace [ -vdn ] [ -r <i>retries</i> ] [ -t <i>timeout</i> ] [ <i>server</i> ]</tt>
+ <h4>Description</h4>
+ <p><tt>ntptrace</tt> determines where a given Network Time Protocol (NTP) server gets its time from, and follows the chain of NTP servers back to their master time source. If given no arguments, it starts with <tt>localhost</tt>. Here is an example of the output from <tt>ntptrace</tt>:</p>
+ <pre>
+% ntptrace
+localhost: stratum 4, offset 0.0019529, synch distance 0.144135
+server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784
+usndh.edu: stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
+</pre>
+ <p>On each line, the fields are (left to right): the host name, the host stratum, the time offset between that host and the local host (as measured by <tt>ntptrace</tt>; this is why it is not always zero for &quot;<tt>localhost</tt>&quot;), the host synchronization distance, and (only for stratum-1 servers) the reference clock ID. All times are given in seconds. Note that the stratum is the server hop count to the primary source, while the synchronization distance is the estimated error relative to the primary source. These terms are precisely defined in RFC-1305.</p>
+ <h4>Options</h4>
+ <dl>
+ <dt><tt>-d</tt>
+ <dd>Turns on some debugging output.
+ <dt><tt>-n</tt>
+ <dd>Turns off the printing of host names; instead, host IP addresses are given. This may be useful if a nameserver is down.
+ <dt><tt>-r <i>retries</i></tt>
+ <dd>Sets the number of retransmission attempts for each host (default = 5).
+ <dt><tt>-t <i>timeout</i></tt>
+ <dd>Sets the retransmission timeout (in seconds) (default = 2).
+ <dt><tt>-v</tt>
+ <dd>Prints verbose information about the NTP servers.
+ </dl>
+ <h4>Bugs</h4>
+ <p>This program makes no attempt to improve accuracy by doing multiple samples.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/parsedata.html b/contrib/ntp/html/parsedata.html
new file mode 100644
index 000000000000..d5b2383bdff7
--- /dev/null
+++ b/contrib/ntp/html/parsedata.html
@@ -0,0 +1,336 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>NTP PARSE clock data formats</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>NTP PARSE clock data formats</h3>
+ <p>The parse driver currently supports several clocks with different query mechanisms. In order for you to find a sample that might be similar to a clock you might want to integrate into parse i'll sum up the major features of the clocks (this information is distributed in the parse/clk_*.c and ntpd/refclock_parse.c files).</p>
+ <hr>
+ <h4>Meinberg clocks</h4>
+ <pre>
+Meinberg: start=&lt;STX&gt;, end=&lt;ETX&gt;, sync on start
+ pattern=&quot;\2D: . . ;T: ;U: . . ; \3&quot;
+ pattern=&quot;\2 . . ; ; : : ; \3&quot;
+ pattern=&quot;\2 . . ; ; : : ; : ; ; . . &quot;
+</pre>
+ <p>Meinberg is a German manufacturer of time code receivers. Those clocks have a pretty common output format in the stock version. In order to support NTP Meinberg was so kind to produce some special versions of the firmware for the use with NTP. So, if you are going to use a Meinberg clock please ask whether there is a special Uni Erlangen version. You can reach <a href="http://www.meinberg.de/">Meinberg</a> via the Web. Information can also be ordered via eMail from <a href="mailto:%20info@meinberg.de">info@meinberg.de</a></p>
+ <p>General characteristics:<br>
+ Meinberg clocks primarily output pulse per second and a describing ASCII string. This string can be produced in two modes. either upon the reception of a question mark or every second. NTP uses the latter mechanism. The DCF77 variants have a pretty good relationship between RS232 time code and the PPS signal while the GPS receiver has no fixed timeing between the datagram and the pulse (you need to use PPS with GPS!) on DCF77 you might get away without the PPS signal.</p>
+ <p>The preferred tty setting for Meinberg is:</p>
+ <pre>
+ CFLAG (B9600|CS7|PARENB|CREAD|HUPCL)
+ IFLAG (IGNBRK|IGNPAR|ISTRIP)
+ OFLAG 0
+ LFLAG 0
+ </pre>
+ <p>The tty setting for Meinberg GPS 166/167 receivers is:</p>
+ <pre>
+ CFLAG (B19200|CS8|PARENB|CREAD|HUPCL)
+ IFLAG (IGNBRK|IGNPAR|ISTRIP)
+ OFLAG 0
+ LFLAG 0
+ </pre>
+ <p>The clock is run at datagram once per second. Stock dataformat is:</p>
+ <pre>
+ &lt;STX&gt;D:&lt;dd&gt;.&lt;mm&gt;.&lt;yy&gt;;T:&lt;w&gt;;U:&lt;hh&gt;:&lt;mm&gt;:&lt;ss&gt;;&lt;S&gt;&lt;F&gt;&lt;D&gt;&lt;A&gt;&lt;ETX&gt;
+pos: 0 00 00 0 00 0 11 111 1 111 12 2 22 2 22 2 2 2 3 3 3
+ 1 23 45 6 78 9 01 234 5 678 90 1 23 4 56 7 8 9 0 1 2
+
+&lt;STX&gt; = '\002' ASCII start of text
+&lt;ETX&gt; = '\003' ASCII end of text
+&lt;dd&gt;,&lt;mm&gt;,&lt;yy&gt; = day, month, year(2 digits!!)
+&lt;w&gt; = day of week (sunday= 0)
+&lt;hh&gt;,&lt;mm&gt;,&lt;ss&gt; = hour, minute, second
+&lt;S&gt; = '#' if never synced since powerup else ' ' for DCF U/A 31
+ '#' if not PZF sychronisation available else ' ' for PZF 535
+&lt;F&gt; = '*' if time comes from internal quartz else ' '
+&lt;D&gt; = 'S' if daylight saving time is active else ' '
+&lt;D&gt; = 'U' if UTC time code is deliverd else ' '
+&lt;A&gt; = '!' during the hour preceeding an daylight saving time
+ start/end change
+&lt;A&gt; = 'A' if a leap second is announced
+</pre>
+ <pre>
+ &lt;STX&gt;&lt;dd&gt;.&lt;mm&gt;.&lt;yy&gt;; &lt;w&gt;; &lt;hh&gt;:&lt;mm&gt;:&lt;ss&gt;; &lt;U&gt;&lt;S&gt;&lt;F&gt;&lt;D&gt;&lt;A&gt;&lt;L&gt;&lt;R&gt;&lt;ETX&gt;
+ pos: 0 00 0 00 0 00 11 1 11 11 1 11 2 22 22 2 2 2 2 2 3 3 3
+ 1 23 4 56 7 89 01 2 34 56 7 89 0 12 34 5 6 7 8 9 0 1 2
+ &lt;STX&gt; = '\002' ASCII start of text
+ &lt;ETX&gt; = '\003' ASCII end of text
+ &lt;dd&gt;,&lt;mm&gt;,&lt;yy&gt; = day, month, year(2 digits!!)
+ &lt;w&gt; = day of week (sunday= 0)
+ &lt;hh&gt;,&lt;mm&gt;,&lt;ss&gt; = hour, minute, second
+ &lt;U&gt; = 'U' UTC time display
+ &lt;S&gt; = '#' if never synced since powerup else ' ' for DCF U/A 31
+ '#' if not PZF sychronisation available else ' ' for PZF 535
+ &lt;F&gt; = '*' if time comes from internal quartz else ' '
+ &lt;D&gt; = 'S' if daylight saving time is active else ' '
+ &lt;A&gt; = '!' during the hour preceeding an daylight saving time
+ start/end change
+ &lt;L&gt; = 'A' LEAP second announcement
+ &lt;R&gt; = 'R' alternate antenna
+</pre>
+ <p>Meinberg GPS166 receiver<br>
+ You must get the Uni-Erlangen firmware for the GPS receiver support to work to full satisfaction !</p>
+ <pre>
+ &lt;STX&gt;&lt;dd&gt;.&lt;mm&gt;.&lt;yy&gt;; &lt;w&gt;; &lt;hh&gt;:&lt;mm&gt;:&lt;ss&gt;; &lt;+/-&gt;&lt;00:00&gt;; &lt;U&gt;&lt;S&gt;&lt;F&gt;&lt;D&gt;&lt;A&gt;&lt;L&gt;&lt;R&gt;&lt;L&gt;; &lt;position...&gt;&lt;ETX&gt;
+ *
+ 000000000111111111122222222223333333333444444444455555555556666666
+ 123456789012345678901234567890123456789012345678901234567890123456
+ \x0209.07.93; 5; 08:48:26; +00:00; ; 49.5736N 11.0280E 373m\x03
+ *
+
+ &lt;STX&gt; = '\002' ASCII start of text
+ &lt;ETX&gt; = '\003' ASCII end of text
+ &lt;dd&gt;,&lt;mm&gt;,&lt;yy&gt; = day, month, year(2 digits!!)
+ &lt;w&gt; = day of week (sunday= 0)
+ &lt;hh&gt;,&lt;mm&gt;,&lt;ss&gt; = hour, minute, second
+ &lt;+/-&gt;,&lt;00:00&gt; = offset to UTC
+ &lt;S&gt; = '#' if never synced since powerup else ' ' for DCF U/A 31
+ '#' if not PZF sychronisation available else ' ' for PZF 535
+ &lt;U&gt; = 'U' UTC time display
+ &lt;F&gt; = '*' if time comes from internal quartz else ' '
+ &lt;D&gt; = 'S' if daylight saving time is active else ' '
+ &lt;A&gt; = '!' during the hour preceeding an daylight saving time
+ start/end change
+ &lt;L&gt; = 'A' LEAP second announcement
+ &lt;R&gt; = 'R' alternate antenna (reminiscent of PZF535) usually ' '
+ &lt;L&gt; = 'L' on 23:59:60
+</pre>
+ <p>For the Meinberg parse look into clock_meinberg.c</p>
+ <h4>Raw DCF77 Data via serial line</h4>
+ <p>RAWDCF: end=TIMEOUT&gt;1.5s, sync each char (any char),generate psuedo time codes, fixed format</p>
+ <p>direct DCF77 code input</p>
+ <p>In Europe it is relatively easy/cheap the receive the german time code transmitter DCF77. The simplest version to process its signal is to feed the 100/200ms pulse of the demodulated AM signal via a level converter to an RS232 port at 50Baud. parse/clk_rawdcf.c holds all necessary decoding logic for the time code which is transmitted each minute for one minute. A bit of the time code is sent once a second.</p>
+ <pre>
+ The preferred tty setting is:
+ CFLAG (B50|CS8|CREAD|CLOCAL)
+ IFLAG 0
+ OFLAG 0
+ LFLAG 0
+</pre>
+ <h4>DCF77 raw time code</h4>
+ <p>From &quot;Zur Zeit&quot;, Physikalisch-Technische Bundesanstalt (PTB), Braunschweig und Berlin, M&#132;rz 1989<br>
+ </p>
+ <p>Timecode transmission:</p>
+ <pre>
+ AM:
+
+ time marks are send every second except for the second before the
+ next minute mark
+ time marks consist of a reduction of transmitter power to 25%
+ of the nominal level
+ the falling edge is the time indication (on time)
+ time marks of a 100ms duration constitute a logical 0
+ time marks of a 200ms duration constitute a logical 1
+</pre>
+ <p>see the spec. (basically a (non-)inverted psuedo random phase shift) encoding:</p>
+ <pre>
+ FM:
+
+ Second Contents
+ 0 - 10 AM: free, FM: 0
+ 11 - 14 free
+ 15 R - alternate antenna
+ 16 A1 - expect zone change (1 hour before)
+ 17 - 18 Z1,Z2 - time zone
+ 0 0 illegal
+ 0 1 MEZ (MET)
+ 1 0 MESZ (MED, MET DST)
+ 1 1 illegal
+ 19 A2 - expect leap insertion/deletion (1 hour before)
+ 20 S - start of time code (1)
+ 21 - 24 M1 - BCD (lsb first) Minutes
+ 25 - 27 M10 - BCD (lsb first) 10 Minutes
+ 28 P1 - Minute Parity (even)
+ 29 - 32 H1 - BCD (lsb first) Hours
+ 33 - 34 H10 - BCD (lsb first) 10 Hours
+ 35 P2 - Hour Parity (even)
+ 36 - 39 D1 - BCD (lsb first) Days
+ 40 - 41 D10 - BCD (lsb first) 10 Days
+ 42 - 44 DW - BCD (lsb first) day of week (1: Monday -&gt; 7: Sunday)
+ 45 - 49 MO - BCD (lsb first) Month
+ 50 MO0 - 10 Months
+ 51 - 53 Y1 - BCD (lsb first) Years
+ 54 - 57 Y10 - BCD (lsb first) 10 Years
+ 58 P3 - Date Parity (even)
+ 59 - usually missing (minute indication), except for leap insertion
+</pre>
+ <hr>
+ <h4>Schmid clock</h4>
+ <p>Schmid clock: needs poll, binary input, end='\xFC', sync start</p>
+ <p>The Schmid clock is a DCF77 receiver that sends a binary time code at the reception of a flag byte. The contents if the flag byte determined the time code format. The binary time code is delimited by the byte 0xFC.</p>
+ <pre>
+ TTY setup is:
+ CFLAG (B1200|CS8|CREAD|CLOCAL)
+ IFLAG 0
+ OFLAG 0
+ LFLAG 0
+
+</pre>
+ <p>The command to Schmid's DCF77 clock is a single byte; each bit allows the user to select some part of the time string, as follows (the output for the lsb is sent first).</p>
+ <pre>
+ Bit 0: time in MEZ, 4 bytes *binary, not BCD*; hh.mm.ss.tenths
+ Bit 1: date 3 bytes *binary, not BCD: dd.mm.yy
+ Bit 2: week day, 1 byte (unused here)
+ Bit 3: time zone, 1 byte, 0=MET, 1=MEST. (unused here)
+ Bit 4: clock status, 1 byte, 0=time invalid,
+ 1=time from crystal backup,
+ 3=time from DCF77
+ Bit 5: transmitter status, 1 byte,
+ bit 0: backup antenna
+ bit 1: time zone change within 1h
+ bit 3,2: TZ 01=MEST, 10=MET
+ bit 4: leap second will be
+ added within one hour
+ bits 5-7: Zero
+ Bit 6: time in backup mode, units of 5 minutes (unused here)
+</pre>
+ <hr>
+ <h4>Trimble SV6 ASCII time code (TAIP)</h4>
+ <p>Trimble SV6: needs poll, ascii timecode, start='&gt;', end='&lt;', query='&gt;QTM&lt;', eol='&lt;'</p>
+ <p>Trimble SV6 is a GPS receiver with PPS output. It needs to be polled. It also need a special tty mode setup (EOL='&lt;').</p>
+ <pre>
+ TTY setup is:
+ CFLAG (B4800|CS8|CREAD)
+ IFLAG (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON)
+ OFLAG (OPOST|ONLCR)
+ LFLAG (ICANON|ECHOK)
+</pre>
+ <p>Special flags are:</p>
+ <pre> PARSE_F_PPSPPS - use CIOGETEV for PPS time stamping
+ PARSE_F_PPSONSECOND - the time code is not related to
+ the PPS pulse (so use the time code
+ only for the second epoch)
+
+ Timecode
+ 0000000000111111111122222222223333333 / char
+ 0123456789012345678901234567890123456 \ posn
+ &gt;RTMhhmmssdddDDMMYYYYoodnnvrrrrr;*xx&lt; Actual
+ ----33445566600112222BB7__-_____--99- Parse
+ &gt;RTM 1 ;* &lt; Check
+</pre>
+ <hr>
+ <h4>ELV DCF7000</h4>
+ <p>ELV DCF7000: end='\r', pattern=&quot; - - - - - - - \r&quot;</p>
+ <p>The ELV DCF7000 is a cheap DCF77 receiver sending each second a time code (though not very precise!) delimited by '`r'</p>
+ <pre>
+ Timecode
+ YY-MM-DD-HH-MM-SS-FF\r
+
+ FF&amp;0x1 - DST
+ FF&amp;0x2 - DST switch warning
+ FF&amp;0x4 - unsynchronised
+</pre>
+ <hr>
+ <h4>HOPF 6021 und Kompatible</h4>
+ <p>HOPF Funkuhr 6021 mit serieller Schnittstelle Created by F.Schnekenbuehl &lt;frank@comsys.dofn.de&gt; from clk_rcc8000.c Nortel DASA Network Systems GmbH, Department: ND250 A Joint venture of Daimler-Benz Aerospace and Nortel.</p>
+ <pre>
+ hopf Funkuhr 6021
+ used with 9600,8N1,
+ UTC via serial line
+ &quot;Sekundenvorlauf&quot; ON
+ ETX zum Sekundenvorlauf ON
+ dataformat 6021
+ output time and date
+ transmit with control characters
+ transmit evry second
+ </pre>
+ <p>Type 6021 Serial Output format</p>
+ <pre>
+ 000000000011111111 / char
+ 012345678901234567 \ position
+ sABHHMMSSDDMMYYnre Actual
+ C4110046231195 Parse
+ s enr Check
+
+ s = STX (0x02), e = ETX (0x03)
+ n = NL (0x0A), r = CR (0x0D)
+
+ A B - Status and weekday
+
+ A - Status
+
+ 8 4 2 1
+ x x x 0 - no announcement
+ x x x 1 - Summertime - wintertime - summertime announcement
+ x x 0 x - Wintertime
+ x x 1 x - Summertime
+ 0 0 x x - Time/Date invalid
+ 0 1 x x - Internal clock used
+ 1 0 x x - Radio clock
+ 1 1 x x - Radio clock highprecision
+
+ B - 8 4 2 1
+ 0 x x x - MESZ/MEZ
+ 1 x x x - UTC
+ x 0 0 1 - Monday
+ x 0 1 0 - Tuesday
+ x 0 1 1 - Wednesday
+ x 1 0 0 - Thursday
+ x 1 0 1 - Friday
+ x 1 1 0 - Saturday
+ x 1 1 1 - Sunday
+</pre>
+ <hr>
+ <h4>Diem Computime Clock</h4>
+ <p>The Computime receiver sends a datagram in the following format every minute</p>
+ <pre>
+ Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLF
+ Pos 0123456789012345678901 2 3
+ 0000000000111111111122 2 2
+ Parse T: : : : : : : \r\n
+
+ T Startcharacter &quot;T&quot; specifies start of the timestamp
+ YY Year MM Month 1-12
+ MD Day of the month
+ WD Day of week
+ HH Hour
+ MM Minute
+ SS Second
+ CR Carriage return
+ LF Linefeed
+</pre>
+ <hr>
+ <h4>WHARTON 400A Series Clock with a 404.2 Serial interface</h4>
+ <p>The WHARTON 400A Series clock is able to send date/time serial messages in 7 output formats. We use format 1 here because it is the shortest. We set up the clock to send a datagram every second. For use with this driver, the WHARTON 400A Series clock must be set-up as follows :</p>
+ <pre>
+ Programmable Selected
+ Option No Option
+ BST or CET display 3 9 or 11
+ No external controller 7 0
+ Serial Output Format 1 9 1
+ Baud rate 9600 bps 10 96
+ Bit length 8 bits 11 8
+ Parity even 12 E
+</pre>
+ <p>WHARTON 400A Series output format 1 is as follows :</p>
+ <pre>
+ Timestamp STXssmmhhDDMMYYSETX
+ Pos 0 12345678901234
+ 0 00000000011111
+
+ STX start transmission (ASCII 0x02)
+ ETX end transmission (ASCII 0x03)
+ ss Second expressed in reversed decimal (units then tens)
+ mm Minute expressed in reversed decimal
+ hh Hour expressed in reversed decimal
+ DD Day of month expressed in reversed decimal
+ MM Month expressed in reversed decimal (January is 1)
+ YY Year (without century) expressed in reversed decimal
+ S Status byte : 0x30 +
+ bit 0 0 = MSF source 1 = DCF source
+ bit 1 0 = Winter time 1 = Summer time
+ bit 2 0 = not synchronised 1 = synchronised
+ bit 3 0 = no early warning 1 = early warning
+</pre>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/parsenew.html b/contrib/ntp/html/parsenew.html
new file mode 100644
index 000000000000..0f0e0b313d45
--- /dev/null
+++ b/contrib/ntp/html/parsenew.html
@@ -0,0 +1,195 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Making PARSE Clocks</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>How to build new PARSE clocks</h3>
+ <p>Here is an attempt to sketch out what you need to do in order to add another clock to the parse driver: Currently the implementation is being cleaned up - so not all information in here is completely correct. Refer to the included code where in doubt.</p>
+ <p>Prerequisites:</p>
+ <ul>
+ <li>Does the system you want the clock connect to have the include files termio.h or termios.h ? (You need that for the parse driver)
+ </ul>
+ <p>What to do:</p>
+ <p>Make a conversion module (libparse/clk_*.c)</p>
+ <ol>
+ <li>What ist the time code format ?
+ <ul>
+ <li>find year, month, day, hour, minute, second, status (synchronised or not), possibly time zone information (you need to give the offset to UTC) You will have to convert the data from a string into a struct clocktime:
+ <pre>
+ struct clocktime /* clock time broken up from time code */
+ {
+ long day;
+ long month;
+ long year;
+ long hour;
+ long minute;
+ long second;
+ long usecond;
+ long utcoffset; /* in seconds */
+ time_t utcoffset; /* true utc time instead of date/time */
+ long flags; /* current clock status */
+ };
+</pre>
+ <p>Conversion is usually simple and straight forward. For the flags following values can be OR'ed together:</p>
+ <pre>
+ PARSEB_ANNOUNCE switch time zone warning (informational only)
+ PARSEB_POWERUP no synchronisation - clock confused (must set then)
+ PARSEB_NOSYNC timecode currently not confirmed (must set then)
+ usually on reception error when there is still a
+ chance the the generated time is still ok.
+
+ PARSEB_DST DST in effect (informational only)
+ PARSEB_UTC timecode contains UTC time (informational only)
+ PARSEB_LEAPADD LEAP addition warning (prior to leap happening - must set when imminent)
+ also used for time code that do not encode the
+ direction (as this is currently the default).
+ PARSEB_LEAPDEL LEAP deletion warning (prior to leap happening - must set when imminent)
+ PARSEB_ALTERNATE backup transmitter (informational only)
+ PARSEB_POSITION geographic position available (informational only)
+ PARSEB_LEAPSECOND actual leap second (this time code is the leap
+ second - informational only)
+</pre>
+ <p>These are feature flags denoting items that are supported by the clock:</p>
+ <pre>
+ PARSEB_S_LEAP supports LEAP - might set PARSEB_LEAP
+ PARSEB_S_ANTENNA supports ANTENNA - might set PARSEB_ALTERNATE
+ PARSEB_S_PPS supports PPS time stamping
+ PARSEB_S_POSITION supports position information (GPS)
+ </pre>
+ <p>If the utctime field is non zero this value will be take as time code value. This allows for conversion routines that already have the utc time value. The utctime field gives the seconds since Jan 1st 1970, 0:00:00. The useconds field gives the respective usec value. The fields for date and time (down to second resolution) will be ignored.</p>
+ <p>Conversion is done in the cvt_* routine in parse/clk_*.c files. look in them for examples. The basic structure is:</p>
+ <pre>
+ struct clockformat &lt;yourclock&gt;_format = {
+ lots of fields for you to fill out (see below)
+ };
+
+ static cvt_&lt;yourclock&gt;()
+ ...
+ {
+ if (&lt;I do not recognize my time code&gt;) {
+ return CVT_NONE;
+ } else {
+ if (&lt;conversion into clockformat is ok&gt;) {
+ &lt;set all necessary flags&gt;;
+ return CVT_OK;
+ } else {
+ return CVT_FAIL|CVT_BADFMT;
+ }
+ }
+</pre>
+ <p>The struct clockformat is the interface to the rest of the parse driver - it holds all information necessary for finding the clock message and doing the appropriate time stamping.</p>
+ <pre>
+struct clockformat
+{
+ u_long (*input)();
+ /* input routine - your routine - cvt_&lt;yourclock&gt; */
+ u_long (*convert)();
+ /* conversion routine - your routine - cvt_&lt;yourclock&gt; */
+ /* routine for handling RS232 sync events (time stamps) - usually sync_simple */
+ u_long (*syncpps)();
+ /* PPS input routine - usually pps_one */
+ void *data;
+ /* local parameters - any parameters/data/configuration info your conversion
+ routine might need */
+ char *name;
+ /* clock format name - Name of the time code */
+ unsigned short length;
+ /* maximum length of data packet for your clock format */
+ u_long flags;
+ /* information for the parser what to look for */
+};
+</pre>
+ <p>The above should have given you some hints on how to build a clk_*.c file with the time code conversion. See the examples and pick a clock closest to yours and tweak the code to match your clock.</p>
+ <p>In order to make your clk_*.c file usable a reference to the clockformat structure must be put into parse_conf.c.</p>
+ </ul>
+ <li>TTY setup and initialisation/configuration will be done in ntpd/refclock_parse.c.
+ <ul>
+ <li>Find out the exact tty settings for your clock (baud rate, parity, stop bits, character size, ...) and note them in terms of termio*.h c_cflag macros.
+ <li>in ntpd/refclock_parse.c fill out a new the struct clockinfo element (that allocates a new &quot;IP&quot; address - see comments) (see all the other clocks for example)
+ <pre>
+ struct clockinfo
+ {
+ u_long cl_flags; /* operation flags (io modes) */
+ PARSE_F_PPSPPS use loopfilter PPS code (CIOGETEV)
+ PARSE_F_PPSONSECOND PPS pulses are on second
+ usually flags stay 0 as they are used only for special setups
+
+ void (*cl_poll)(); /* active poll routine */
+ The routine to call when the clock needs data sent to it in order to
+ get a time code from the clock (e.g. Trimble clock)
+
+ int (*cl_init)(); /* active poll init routine */
+ The routine to call for very special initializations.
+
+ void (*cl_event)(); /* special event handling (e.g. reset clock) */
+ What to do, when an event happens - used to re-initialize clocks on timeout.
+
+ void (*cl_end)(); /* active poll end routine */
+ The routine to call to undo any special initialisation (free memory/timers)
+
+ void *cl_data; /* local data area for &quot;poll&quot; mechanism */
+ local data for polling routines
+
+ u_fp cl_rootdelay; /* rootdelay */
+ NTP rootdelay estimate (usually 0)
+
+ u_long cl_basedelay; /* current offset - unsigned l_fp
+ fractional part (fraction) by
+ which the RS232 time code is
+ delayed from the actual time. */
+
+ u_long cl_ppsdelay; /* current PPS offset - unsigned l_fp fractional
+ time (fraction) by which the PPS time stamp is delayed (usually 0)
+ part */
+
+ char *cl_id; /* ID code (usually &quot;DCF&quot;) */
+ Refclock id - (max 4 chars)
+
+ char *cl_description; /* device name */
+ Name of this device.
+
+ char *cl_format; /* fixed format */
+ If the data format cann not ne detected automatically this is the name
+ as in clk_*.c clockformat.
+
+ u_char cl_type; /* clock type (ntp control) */
+ Type if clock as in clock status word (ntp control messages) - usually 0
+
+ u_long cl_maxunsync; /* time to trust oscillator after losing synch
+ */
+ seconds a clock can be trusted after losing synchronisation.
+
+ u_long cl_speed; /* terminal input &amp; output baudrate */
+ u_long cl_cflag; /* terminal io flags */
+ u_long cl_iflag; /* terminal io flags */
+ u_long cl_oflag; /* terminal io flags */
+ u_long cl_lflag; /* terminal io flags */
+ termio*.h tty modes.
+
+ u_long cl_samples; /* samples for median filter */
+ u_long cl_keep; /* samples for median filter to keep */
+ median filter parameters - smoothing and rejection of bad samples
+ } clockinfo[] = {
+ ...,&lt;other clocks&gt;,...
+ { &lt; your parameters&gt; },
+ };
+
+</pre>
+ </ul>
+ </ol>
+ <p>Well, this is very sketchy, i know. But I hope it helps a little bit. The best way is to look which clock comes closest to your and tweak that code.</p>
+ <p>Two sorts of clocks are used with parse. Clocks that automatically send their time code (once a second) do not need entries in the poll routines because they send the data all the time. The second sort are the clocks that need a command sent to them in order to reply with a time code (like the Trimble clock).</p>
+ <p>For questions: <a href="mailto:%20kardel@acm.org">kardel@acm.org</a>.</p>
+ <p>Please include an exact description on how your clock works. (initialisation, TTY modes, strings to be sent to it, responses received from the clock).</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+ <body></body>
+
+</html>
diff --git a/contrib/ntp/html/patches.html b/contrib/ntp/html/patches.html
new file mode 100644
index 000000000000..cd6e550e4e1b
--- /dev/null
+++ b/contrib/ntp/html/patches.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Patching Procedures</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Patching Procedures</h3>
+ <img src="pic/alice38.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html"> rom <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>The Mad Hatter needs patches.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">02:16</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="246">Thursday, January 02, 2003</csobj></p>
+ <br clear="left">
+ <hr>
+ <p>A distribution so widely used as this one eventually develops numerous barnacles as the result of <a href="porting.html">porting</a> to new systems, idiosyncratic new features and just plain bugs. In order to help keep order and make maintenance bearable, we ask that proposed changes to the distribution be submitted in the following form.</p>
+ <ol>
+ <li>Please submit patches to <a href="mailto:bugs@mail.ntp.org">bugs@mail.ntp.org</a> in the form of either unified-diffs (<tt>diff -u</tt>) or context-diffs (<tt>diff -c</tt>).
+ <li>Please include the <strong>output</strong> from <tt>config.guess</tt> in the description of your patch. If <tt>config.guess</tt> does not produce any output for your machine, please fix that, too!
+ <li>Please base the patch on the root directory of the distribution. The preferred procedure here is to copy your patch to the root directory and mumble
+ <p><tt>patch -p &lt;your_patch&gt;</tt></p>
+ <li>Please avoid patching the RCS subdirectories; better yet, clean them out before submitting patches.
+ <li>If you have whole new files, as well as patches, wrap the files and patches in a shell script. If you need to compress it, use either GNU <tt>gzip</tt> or the stock Unix <tt>compress</tt> utility.
+ <li>Don't forget the documentation that may be affected by the patch. Send us patches for the <tt>./htm</tt> files as well.
+ <li>We would be glad to include your name, electric address and descriptive phrase in the <a href="copyright.html">Copyright</a> page, if you wish.
+ </ol>
+ <p>Prior to ntp3-5.83 (releases up to and including ntp3.5f) a complete patch history back to the dark ages was kept in the <tt>./patches</tt> directory, which might have been helpful to see if the same problem occurred in another port, etc. Patches were saved in that directory with file name in the form <tt>patch.<i>nnn</i></tt>, where <i>nnn</i> was approaching 200. All patches in that directory have been made; so, if yours was there, it was in the distribution.</p>
+ <p>Since we have been getting multple patches for some bugs, plus many changes are implemented locally, no two maintainers here use the same tools, and since we're not using any bug-tracking software or even source code control, there is currently no tracking of specific changes.</p>
+ <p>The best way to see what's changed between two distributions is to run a <tt>diff</tt> against them.</p>
+ <p>Thanks for your contribution and happy chime.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/porting.html b/contrib/ntp/html/porting.html
new file mode 100644
index 000000000000..44db2ab289e8
--- /dev/null
+++ b/contrib/ntp/html/porting.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Porting Hints</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Porting Hints</h3>
+ <img src="pic/wingdorothy.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a>
+ <p>Porting Dorothy in Oz
+ </p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">20:17</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="257">Monday, December 02, 2002</csobj></p>
+ <br clear="left">
+ <hr>
+ <p>NOTE: The following procedures have been replaced by GNU <tt>automake</tt> and <tt>autoconfigure</tt>. This page is to be updated in the next release.</p>
+ <p>Porting to a new machine or operating system ordinarily requires updating the <tt>./machines</tt> directory and the <tt>./compilers</tt> directories in order to define the build environment and autoconfigure means. You will probably have to modify the <tt>ntp_machines.h</tt> file and <tt>&quot;l_stdlib.h&quot;</tt> files as well. The two most famous trouble spots are the I/O code in <tt>./ntpd/ntp_io.c</tt> and the clock adjustment code in <tt>./ntpd/ntp_unixclock.c</tt>.</p>
+ <p>These are the rules so that older bsd systems and the POSIX standard system can coexist together.</p>
+ <ol>
+ <li>If you use <tt>select</tt> then include <tt>&quot;ntp_select.h&quot;</tt>. <tt>select</tt> is not standard, since it is very system dependent as to where it is defined. The logic to include the right system dependent include file is in <tt>&quot;ntp_select.h&quot;</tt>.
+ <li>Always use POSIX definition of strings. Include <tt>&quot;ntp_string.h&quot;</tt> instead of <tt>&lt;string.h&gt;</tt>.
+ <li>Always include <tt>&quot;ntp_malloc.h&quot;</tt> if you use <tt>malloc</tt>.
+ <li>Always include <tt>&quot;ntp_io.h&quot;</tt> instead of <tt>&lt;sys/file.h&gt;</tt> or <tt>&lt;fnctl.h&gt;</tt> to get <tt>O_*</tt> flags.
+ <li>Always include <tt>&quot;ntp_if.h&quot;</tt> instead of <tt>&lt;net/if.h&gt;</tt>.
+ <li>Always include <tt>&quot;ntp_stdlib.h&quot;</tt> instead of <tt>&lt;stdlib.h&gt;</tt>.
+ <li>Define any special defines needed for a system in <tt>./include/ntp_machine.h</tt> based on system identifier. This file is included by the <tt>&quot;ntp_types.h&quot;</tt> file and should always be placed first after the <tt>&lt;&gt;</tt> defines.
+ <li>Define any special library prototypes left over from the system library and include files in the <tt>&quot;l_stdlib.h&quot;</tt> file. This file is included by the <tt>&quot;ntp_stdlib.h&quot;</tt> file and should ordinarily be placed last in the includes list.
+ <li>Don't define a include file by the same name as a system include file.
+ </ol>
+ <p><tt>&quot;l_stdlib.h&quot;</tt> can contain any extra definitions that are needed so that <tt>gcc</tt> will shut up. They should be controlled by a system identifier and there should be a separate section for each system. Really this will make it easier to maintain.</p>
+ <p>See <tt>include/ntp_machines.h</tt> for the various compile time options.</p>
+ <p>When you are satisfied the port works and that other ports are not adversely affected, please send <a href="patches.html">patches</a> for the system files you have changed, as well as any documentation that should be updated, including the advice herein.</p>
+ <p>Good luck.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/pps.html b/contrib/ntp/html/pps.html
new file mode 100644
index 000000000000..c0601481fd6c
--- /dev/null
+++ b/contrib/ntp/html/pps.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Pulse-per-second (PPS) Signal Interfacing</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Pulse-per-second (PPS) Signal Interfacing</h3>
+ <img src="pic/alice32.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>Alice is trying to find the PPS signal connector.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">14:46</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="235">Monday, January 20, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links11.txt"></script>
+ <hr>
+ <p>Some radio clocks and related timekeeping gear have a pulse-per-second (PPS) signal that can be used to discipline the system clock to a high degree of precision, typically to the order less than 10 <font face="Symbol">m</font>s in time and 0.01 parts-per-million (PPM) in frequency. This page describes the hardware and software necessar for NTP to use this signal.</p>
+ <img src="pic/gadget.jpg" alt="gif" align="left">A Gadget Box built by Chuck Hanavin<br clear="left">
+ <h4>Gadget Box</h4>
+ <p>The PPS signal can be connected in either of two ways: via the data carrier detector (DCD) pin of a serial port or via the acknowledge (ACK) pin of a parallel port, depending on the hardware and operating system. Note that NTP no longer supports connection via the data leads of a serial port. However, the PPS signal levels are usually incompatible with serial port levels. The gadget box consists of a handful of electronic components assembled in a small aluminum box. It includes level converters and a optional modem designed to decode the radio timecode signals transmitted by Canadian time and frequency station CHU. This can be used with the <a href="drivers/driver7.html">Radio CHU Audio Demodulator/Decoder</a>. A complete set of schematics, PCB artwork and drill templates can be obrtained via the web at <a href="ftp://ftp.udel.edu/pub/ntp/hardware/gadget.tar.Z">gadget.tar.Z</a>.</p>
+ <h4>Operating System Support&nbsp;</h4>
+ <p>Both the serial and parallel port connection require operating system support, which is available in only a few operating systems, including FreeBSD, Linux (with PPSkit patch) and Solaris. Support on an experimental basis is available for several other systems, including SunOS and HP/Compaq/Digital Tru64. The PPSAPI application program interface defined in [1] is the only interface currently supported. Older PPS interfaces based on the <tt>ppsclock</tt> and <tt>tty_clk</tt> streams modules are no longer supported. As the PPSAPI is expected to become an IETF cross-platform standard, it should be used by new applications.</p>
+ <p>The entire PPS interface functionality is currently provided by inline code in the <tt>timepps.h</tt> header file. While not all implementations support the full PPSAPI specification, they do support all the functions required for the PPS driver described next. The FreeBSD, Linux and Solaris implementations can be used with the stock kernels provided with those systems; however, the Tru64 and SunOS kernels require additional functions not provided in the stock kernels. Solaris users are cautioned that these functions operate improperly in Solaris versions prior to 2.8 with patch Generic_108528-02. Header files for other systems can be found via the web at <a href="ftp://ftp.udel.edu/pub/ntp/software/nanokernel.tar.gz">nanokernel.tar.gz</a>.</p>
+ <h4>PPS Driver</h4>
+ <p>In the preferred mode of operation, PPS signals are processed by the <a href="drivers/driver22.html">PPS Clock Discipline</a> driver and other clock drivers which might be involved need not know or care about them. In some cases where there is no other driver, time might be obtained from remote NTP servers via the network and local PPS signals, for instance from a calibrated cesium oscillator, used to stabilize the frequency and remove network jitter. Note that the <tt>pps</tt> configuration command has been obsoleted by this driver.</p>
+ <p>The PPS driver operates in conjunction with a preferred peer, as described in the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. One of the drivers described in the <a href="refclock.html">Reference Clock Drivers</a> page or another NTP server furnishes the coarse timing and disambiguates the seconds numbering of the PPS signal itself. The NTP daemon mitigates between the clock driver or NTP server and the PPS driver as described in that page in order to provide the most accurate time, while respecting the various types of equipment failures that could happen.</p>
+ <p>Some Unix system kernels support a PPS signal directly, as described in the <a href="kern.html">A Kernel Model for Precision Timekeeping</a> page. Specifically, the PPS driver can be used to direct the PPS signal to the kernel for use as a discipline source for both time and frequency. The presence of the kernel support is automatically detected during the NTP build process and supporting code automatically compiled. Note that the PPS driver does not normally enable the PPS kernel code, since performance is generally better without it. However, this code can be enabled by a driver fudge flag if necessary.</p>
+ <p>Some configurations may include multiple radio clocks with individual PPS outputs. In some PPSAPI designs multiple PPS signals can be connected to multiple instances of the PPS driver. In such cases the NTP mitigation and grooming algorithms operate with all the radio timecodes and PPS signals to develop the highest degree of redundancy and survivability.</p>
+ <h4>Reference</h4>
+ <ol>
+ <li>Mogul, J., D. Mills, J. Brittenson, J. Stone and U. Windl. Pulse-per-second API for Unix-like operating systems, version 1. Request for Comments RFC-2783, Internet Engineering Task Force, March 2000, 31 pp. <a href="http://www.eecis.udel.edu/mills/database/rfc/rfc2783.txt">ASCII</a>
+ </ol>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/prefer.html b/contrib/ntp/html/prefer.html
new file mode 100644
index 000000000000..fe909b7d4081
--- /dev/null
+++ b/contrib/ntp/html/prefer.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Mitigation Rules and the prefer Keyword</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Mitigation Rules and the <tt>prefer</tt> Keyword</h3>
+ <img src="pic/alice11.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html"> from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>Listen carefully to what I say; it is very complicated.</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:17 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links10.txt"></script>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#intro">Introduction</a>
+ <li class="inline"><a href="#prefer">The <tt>prefer</tt> Peer</a>
+ <li class="inline"><a href="#peer">Peer Classification</a>
+ <li class="inline"><a href="#miti">Mitigation Rules</a>
+ <li class="inline"><a href="#pps">Using the Pulse-per-Second (PPS) Signal</a>
+ </ul>
+ <hr>
+ <h4 id="intro">Introduction</h4>
+ <p>The mechanics of the NTP algorithms which select the best data sample from each available server and the best subset of the server population have been finely crafted to resist network jitter, faults in the network or server operations, and to deliver the best possible accuracy. Most of the time these algorithms do a good job without requiring explicit manual tailoring of the configuration file. However, there are times when the accuracy can be improved by some careful tailoring. The following sections explain how to do this using explicit configuration items and special signals, when available, that are generated by some radio clocks and laboratory instruments.</p>
+ <p>In order to provide robust backup sources, primary (stratum-1) servers are usually operated in a diversity configuration, in which the server operates with a number of remote servers in addition to one or more radio or modem clocks. In these configurations the suite of algorithms used in NTP to refine the data from each peer separately and to select and combine the data from a number of servers and clocks. As the result of these algorithms, a set of <i>survivors</i> are identified which can presumably provide the most reliable and accurate time. Ordinarily, the individual clock offsets of the survivors are combined on a weighted average basis to produce an offset used to control the system clock.</p>
+ <p>However, because of small but significant systematic time offsets between the survivors, it is in general not possible to achieve the lowest jitter and highest stability in these configurations. This happens because the selection algorithm tends to <i>clockhop</i> between survivors of substantially the same quality, but showing small systematic offsets between them. In addition, there are a number of configurations involving pulse-per-second (PPS) signals, modem backup services and other special cases, so that a set of mitigation rules becomes necessary to select a single peer from among the survivors. These rules are based on a set of special characteristics of the various remote servers and reference clock drivers specified in the configuration file.</p>
+ <h4 id="prefer">The <tt>prefer</tt> Peer</h4>
+ <p>The mitigation rules are designed to provide an intelligent selection between various sources of substantially the same statistical quality without compromising the normal operation of the NTP algorithms. While they have been implemented in NTP Version 4 and will be incorporated in the NTP Version 4 specification when published, they are not in the NTP Version 3 specification RFC-1305. The rules are based on the concept of <i>prefer peer</i>, which is specified by including the <tt>prefer</tt> keyword with the associated <tt>server</tt> or <tt>peer</tt> command in the configuration file. This keyword can be used with any server or peer, but is most commonly used with a radio clock. While the rules do not forbid it, it does not seem useful to designate more than one peer as preferred, since the additional complexities to mitigate among them do not seem justified from on-air experience.</p>
+ <p>The prefer scheme works on the set of peers that have survived the sanity checks and intersection algorithms of the clock selection procedures. Ordinarily, the members of this set can be considered <i>truechimers</i> and any one of them could in principle provide correct time; however, due to various error contributions, not all can provide the most accurate and stable time. The job of the clustering algorithm, which is invoked at this point, is to select the best subset of the survivors providing the least variance in the combined ensemble average, compared to the variance in each member of the subset separately. The detailed operation of the clustering algorithm, which is given in RFC-1305, is beyond the scope of discussion here. It operates in rounds, where a survivor, presumably the worst of the lot, is discarded in each round until one of several termination conditions is met. An example terminating condition is when the number of survivors is about to be reduced below three.</p>
+ <p>In the prefer scheme the clustering algorithm is modified so that the prefer peer is never discarded; on the contrary, its potential removal becomes a termination condition. If the original algorithm were about to toss out the prefer peer, the algorithm terminates immediately. The prefer peer can still be discarded by the sanity checks and intersection algorithm, of course, but it will always survive the clustering algorithm. If it does not survive or for some reason it fails to provide updates, it will eventually become unreachable and the clock selection will remitigate to select the next best source.</p>
+ <p>Along with this behavior, the clock selection procedures are modified so that the combining algorithm is not used when a prefer peer is present. Instead, the offset of the prefer peer is used exclusively as the synchronization source. In the usual case involving a radio clock and a flock of remote stratum-1 peers, and with the radio clock designated a prefer peer, the result is that the high quality radio time disciplines the server clock as long as the radio itself remains operational and with valid time, as determined from the remote peers, sanity checks and intersection algorithm.</p>
+ <h4 id="peer">Peer Classification</h4>
+ <p>In order to understand the effects of the various intricate schemes involved, it is necessary to understand some arcane details on how the algorithms decide on a synchronization source when more than one source is available. This is done on the basis of a set of explicit mitigation rules, which define special classes of remote serves and local radio clocks as a function of configuration declarations and clock driver type:</p>
+ <ol>
+ <li>The prefer peer is designated using the <tt>prefer</tt> keyword with the <tt>server</tt> or <tt>peer</tt> commands. All other things being equal, this peer will be selected for synchronization over all other survivors of the clock selection procedures.
+ <li>When a PPS signal is connected via the PPS Clock Discipline driver (type 22), this is called the <i>PPS peer</i>. This driver provides precision clock corrections only within one second, so is always operated in conjunction with another server or radio clock driver, which provides the seconds numbering. The PPS peer is active only under conditions explained below.
+ <li>When the Undisciplined Local Clock driver (type 1) is configured, this is called the <i>local clock peer</i>. This is used either as a backup reference source (stratum greater than zero), should all other synchronization sources fail, or as the primary reference source (stratum zero) in cases where the kernel time is disciplined by some other means of synchronization, such as the NIST <tt>lockclock</tt> scheme, or another synchronization protocol, such as the Digital Time Synchronization Service (DTSS).
+ <li>When a modem driver such as the Automated Computer Time Service driver (type 18) is configured, this is called the <i>modem peer</i>. This is used either as a backup reference source, should all other primary sources fail, or as the (only) primary reference source.
+ <li>Where support is available, the PPS signal may be processed directly by the kernel, as described in the <a href="kern.html">A Kernel Model for Precision Timekeeping</a> page. This is called the <i>kernel discipline</i>. The PPS signal can discipline the kernel in both frequency and time. The frequency discipline is active as long as the PPS interface device and signal itself is operating correctly, as determined by the kernel algorithms. The time discipline is active only under conditions explained below.
+ </ol>
+ <p>Reference clock drivers operate in the manner described in the <a href="refclock.html">Reference Clock Drivers</a> page and its dependencies. The drivers are ordinarily operated at stratum zero, so that as the result of ordinary NTP operations, the server itself operates at stratum one, as required by the NTP specification. In some cases described below, the driver is intentionally operated at an elevated stratum, so that it will be selected only if no other survivor is present with a lower stratum. In the case of the PPS peer or kernel time discipline, these sources appear active only if the prefer peer has survived the intersection and clustering algorithms, as described below, and its clock offset relative to the current local clock is less than a specified value, currently 128 ms.</p>
+ <p>The modem clock drivers are a special case. Ordinarily, the update interval between modem calls to synchronize the system clock is many times longer than the interval between polls of either a remote server or local radio clock. In order to provide the best stability, the operation of the clock discipline algorithm changes gradually from a phase-lock mode at the shorter update intervals to a frequency-lock mode at the longer update intervals. If remote servers or local radio clocks together with a modem peer operate in the same client, the following things can happen.</p>
+ <p>First the clock selection algorithm can select one or more remote servers or local radio clocks and the clock discipline algorithm will optimize for the shorter update intervals. Then, the selection algorithm can select the modem peer, which requires a much different optimization. The intent in the design is to allow the modem peer to control the system clock either when no other source is available or, if the modem peer happens to be marked as prefer, then it always controls the clock, as long as it passes the sanity checks and intersection algorithm. There still is room for suboptimal operation in this scheme, since a noise spike can still cause a clockhop either way. Nevertheless, the optimization function is slow to adapt, so that a clockhop or two does not cause much harm.</p>
+ <p>The local clock driver is another special case. Normally, this driver is eligible for selection only if no other source is available. When selected, vernier adjustments introduced via the configuration file or remotely using the <tt><a href="ntpdc.html">ntpdc</a> </tt>program can be used to trim the local clock frequency and time. However, if the local clock driver is designated the prefer peer, this driver is always selected and all other sources are ignored. This behavior is intended for use when the kernel time is controlled by some means external to NTP, such as the NIST <tt>lockclock</tt> algorithm or another time synchronization protocol such as DTSS. In this case the only way to disable the local clock driver is to mark it unsynchronized using the leap indicator bits. In the case of modified kernels with the <tt>ntp_adjtime()</tt> system call, this can be done automatically if the external synchronization protocol uses it to discipline the kernel time.</p>
+ <h4 id="miti">Mitigation Rules</h4>
+ <p>The mitigation rules apply in the intersection and clustering algorithms described in the NTP specification. The intersection algorithm first scans all peers with a persistent association and includes only those that satisfy specified sanity checks. In addition to the checks required by the specification, the mitigation rules require either the local-clock peer or modem peer to be included only if marked as the prefer peer. The intersection algorithm operates on the included population to select only those peers believed to represent the correct time. If one or more peers survive the algorithm, processing continues in the clustering algorithm. Otherwise, if there is a modem peer, it is declared the only survivor; otherwise, if there is a local-clock peer, it is declared the only survivor. Processing then continues in the clustering algorithm.</p>
+ <p>The clustering algorithm repeatedly discards outlyers in order to reduce the residual jitter in the survivor population. As required by the NTP specification, these operations continue until either a specified minimum number of survivors remain or the minimum select dispersion of the population is greater than the maximum peer dispersion of any member. The mitigation rules require an additional terminating condition which stops these operations at the point where the prefer peer is about to be discarded.</p>
+ <p>The mitigation rules establish the choice of <i>system peer</i>, which determines the stratum, reference identifier and several other system variables which are visible to clients of the server. In addition, they establish which source or combination of sources control the local clock.</p>
+ <ol>
+ <li>If there is a prefer peer and it is the local-clock peer or the modem peer; or, if there is a prefer peer and the kernel time discipline is active, choose the prefer peer as the system peer and its offset as the system clock offset. If the prefer peer is the local-clock peer, an offset can be calculated by the driver to produce a frequency offset in order to correct for systematic frequency errors. In case a source other than NTP is controlling the system clock, corrections determined by NTP can be ignored by using the <tt>disable pll</tt> in the configuration file. If the prefer peer is the modem peer, it must be the primary source for the reasons noted above. If the kernel time discipline is active, the system clock offset is ignored and the corrections handled directly by the kernel.
+ <li>If the above is not the case and there is a PPS peer, then choose it as the system peer and its offset as the system clock offset.
+ <li>If the above is not the case and there is a prefer peer (not the local-clock or modem peer in this case), then choose it as the system peer and its offset as the system clock offset.
+ <li>If the above is not the case and the peer previously chosen as the system peer is in the surviving population, then choose it as the system peer and average its offset along with the other survivors to determine the system clock offset. This behavior is designed to avoid excess jitter due to clockhopping, when switching the system peer would not materially improve the time accuracy.
+ <li>If the above is not the case, then choose the first candidate in the list of survivors ranked in order of synchronization distance and average its offset along with the other survivors to determine the system clock offset. This is the default case and the only case considered in the current NTP specification.
+ </ol>
+ <h4 id="pps">Using the Pulse-per-Second (PPS) Signal</h4>
+ <p>Most radio clocks are connected using a serial port operating at speeds of 9600 bps or higher. The accuracy using typical timecode formats, where the on-time epoch is indicated by a designated ASCII character, like carriage-return <tt>&lt;cr&gt;</tt>, is limited to a millisecond or two. However, some radios produce a PPS signal which can be used to improve the accuracy with typical workstation servers to the order of microseconds. The details of how this can be accomplished are discussed in the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. The following paragraphs discuss how the PPS signal is affected by the mitigation rules.</p>
+ <p>First, it should be pointed out that the PPS signal is inherently ambiguous, in that it provides a precise seconds epoch, but does not provide a way to number the seconds. In principle and most commonly, another source of synchronization, either the timecode from an associated radio clock, or even one or more remote NTP servers, is available to perform that function. In all cases, a specific, configured peer or server must be designated as associated with the PPS signal. This is done using the <tt>prefer</tt> keyword as described previously. The PPS signal can be associated in this way with any peer, but is most commonly used with the radio clock generating the PPS signal.</p>
+ <p>The PPS signal can be used in two ways to discipline the local clock, one using a special PPS driver described in the <a href="drivers/driver22.html">PPS Clock Discipline</a> page, the other using PPS signal support in the kernel, as described in the <a href="kern.html">A Kernel Model for Precision Timekeeping</a> page. In either case, the signal must be present and within nominal jitter and wander error tolerances. In addition, the associated prefer peer must have survived the sanity checks and intersection algorithms and the dispersion settled below 1 s. This insures that the radio clock hardware is operating correctly and that, presumably, the PPS signal is operating correctly as well. Second, the absolute offset of the local clock from that peer must be less than 128 ms, or well within the 0.5-s unambiguous range of the PPS signal itself. In the case of the PPS driver, the time offsets generated from the PPS signal are propagated via the clock filter to the clock selection procedures just like any other peer. Should these pass the sanity checks and intersection algorithms, they will show up along with the offsets of the prefer peer itself. Note that, unlike the prefer peer, the PPS peer samples are not protected from discard by the clustering algorithm. These complicated procedures insure that the PPS offsets developed in this way are the most accurate, reliable available for synchronization.</p>
+ <p>The PPS peer remains active as long as it survives the intersection algorithm and the prefer peer is reachable; however, like any other clock driver, it runs a reachability algorithm on the PPS signal itself. If for some reason the signal fails or displays gross errors, the PPS peer will either become unreachable or stray out of the survivor population. In this case the clock selection remitigates as described above.</p>
+ <p>When kernel support for the PPS signal is available, the PPS signal is interfaced to the kernel serial driver code via a modem control lead. As the PPS signal is derived from external equipment, cables, etc., which sometimes fail, a good deal of error checking is done in the kernel to detect signal failure and excessive noise. The way in which the mitigation rules affect the kernel discipline is as follows.</p>
+ <p>PPS support requires the PPS driver (type 22) and PPSAPI interface described in the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. In order to operate, the prefer peer must be designated and the kernel support enabled by the <tt>enable pps</tt> command in the configuration file and the signal must be present and within nominal jitter and wander error tolerances. In the NTP daemon, the PPS discipline is active only when the prefer peer is among the survivors of the clustering algorithm, and its absolute offset is within 128 ms, as determined by the PPS driver. Under these conditions the kernel disregards updates produced by the NTP daemon and uses its internal PPS source instead. The kernel maintains a watchdog timer for the PPS signal; if the signal has not been heard or is out of tolerance for more than some interval, currently two minutes, the kernel discipline is declared inoperable and operation continues as if it were not present.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/quick.html b/contrib/ntp/html/quick.html
new file mode 100644
index 000000000000..151ea1b2d2b9
--- /dev/null
+++ b/contrib/ntp/html/quick.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Quick Start</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Quick Start</h3>
+ <img src="pic/panda.gif" alt="gif" align="left">FAX test image for SATNET (1979).
+ <p>The baby panda was scanned at University College London and used as a FAX test image for a demonstration of the DARPA Atlantic SATNET Program and the first transatlantic Internet connection in 1978. The computing system used for that demonstration was called the <a href="http://www.eecis.udel.edu/%7emills/database/papers/fuzz.ps">Fuzzball</a> . As it happened, this was also the first Internet multimedia presentation and the first to use NTP in regular operation. The image was widely copied and used for testing purpose throughout much of the 1980s.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">00:39</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="244">Saturday, January 11, 2003</csobj></p>
+ <br clear="left">
+ <hr>
+ <p>For the rank amateur the sheer volume of the documentation collection must be intimidating. However, it doesn't take much to fly the <tt>ntpd</tt> daemon with a simple configuration where a workstation needs to synchronize to some server elsewhere in the Internet. The first thing that needs to be done is to build the distribution for the particular workstation and install in the usual place. The <a href="build.html">Building and Installing the Distribution</a> page describes how to do this.</p>
+ <p>While it is possible that certain configurations do not need a configuration file, most do require one. The file, called by default <tt>/etc/ntp.conf</tt>, need only contain one line specifying a remote server, for instance</p>
+ <p><tt>server foo.bar.com</tt></p>
+ <p>Choosing an appropriate remote server is somewhat of a black art, but a suboptimal choice is seldom a problem. There are about two dozen public time servers operated by National Institutes of Science and Technology (NIST), US Naval Observatory (USNO), Canadian Metrology Centre (CMC) and many others available on the Internet. Lists of public primary and secondary NTP servers maintained on the <a href="http://www.eecis.udel.edu/~mills/ntp/servers.html">Public NTP TIme Servers</a> page, which is updated frequently.The lists are sorted by country and, in the case of the US, by state. Usually, the best choice is the nearest in geographical terms, but the terms of engagement specified in each list entry should be carefully respected.</p>
+ <p>During operation <tt>ntpd</tt> measures and corrects for incidental clock frequency error and writes the current value to a file called by default <tt>/etc/ntp.drift</tt>. If <tt>ntpd</tt> is stopped and restarted, it initializes the frequency from this file. In this way the potentially lengthy interval to relearn the frequency error is avoided.</p>
+ <p>That's all there is to it, unless some problem in network connectivity or local operating system configuration occurs. The most common problem is some firewall between the workstation and server. System administrators should understand NTP uses UDP port 123 as both the source and destination port and that NTP does not involve any operating system interaction other than to set the system clock. While almost all modern Unix systems have included NTP and UDP port 123 defined in the services file, this should be checked if <tt>ntpd</tt> fails to come up at all.</p>
+ <p>The best way to confirm NTP is working is using the <a href="ntpq.html"><tt>ntpq</tt></a> utility, although the <a href="ntpdc.html"><tt>ntpdc</tt></a> utility may be useful in extreme cases. See the documentation pages for further information. In the most extreme cases the <tt>-d</tt> option on the <tt>ntpd</tt> command line results in a blow-by-blow trace of the daemon operations. While the trace output can be cryptic, to say the least, it gives a general idea of what the program is doing and, in particular, details the arriving and departing packets and detected errors, if present.</p>
+ <p>Sometimes the <tt>ntpd</tt>. behavior may seem to violate the Principle of Least Astonishment, but there are good reasons for this. See the <a href="ntpd.html">Network Time Protocol (NTP) daemon</a> page for revealing insights. See this page and its dependencies for additional configuration and control options. The <a href="notes.html">Notes on Configuring NTP and Setting up a NTP Subnet</a> page contains an extended discussion of these options.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/rdebug.html b/contrib/ntp/html/rdebug.html
new file mode 100644
index 000000000000..87598edbe628
--- /dev/null
+++ b/contrib/ntp/html/rdebug.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Debugging Reference Clock Drivers</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Debugging Reference Clock Drivers</h3>
+ <img src="pic/oz2.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a>
+ <p>Call the girls and the'll sweep your bugs.</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">21:31</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="230">Sunday, January 26, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links10.txt"></script>
+ <h4>More Help</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links12.txt"></script>
+ <hr>
+ <p>The <a href="ntpq.html"><tt>ntpq</tt></a> and <a href="ntpdc.html"><tt>ntpdc</tt></a> utility programs can be used to debug reference clocks, either on the server itself or from another machine elsewhere in the network. The server is compiled, installed and started using the configuration file described in the <a href="ntpd.html"><tt>ntpd</tt></a> page and its dependencies. If the clock appears in the <tt>ntpq</tt> utility and <tt>pe</tt> command, no errors have occurred and the daemon has started, opened the devices specified and waiting for peers and radios to come up. If not, the first thing to look for are error messages on the system log. These are usually due to improper configuration, missing links or multiple instances of the daemon.</p>
+ <p>It normally takes a minute or so for evidence to appear that the clock is running and the driver is operating correctly. The first indication is a nonzero value in the <tt>reach</tt> column in the <tt>pe</tt> billboard. If nothing appears after a few minutes, the next step is to be sure the RS232 messages, if used, are getting to and from the clock. The most reliable way to do this is with an RS232 tester and to look for data flashes as the driver polls the clock and/or as data arrive from the clock. Our experience is that the overwhelming fraction of problems occurring during installation are due to problems such as miswired connectors or improperly configured device links at this stage.</p>
+ <p>If RS232 messages are getting to and from the clock, the variables of interest can be inspected using the <tt>ntpq</tt> program and various commands described on the documentation page. First, use the <tt>pe</tt> and <tt>as</tt> commands to display billboards showing the peer configuration and association IDs for all peers, including the radio clock. The assigned clock address should appear in the <tt>pe</tt> billboard and the association ID for it at the same relative line position in the <tt>as</tt> billboard.</p>
+ <p>Additional information is available with the <tt>rv</tt> and <tt>clockvar</tt> commands, which take as argument the association ID shown in the <tt>as</tt> billboard. The <tt>rv</tt> command with no argument shows the system variables, while the <tt>rv</tt> command with association ID argument shows the peer variables for the clock, as well as other peers of interest. The <tt>clockvar</tt> command with argument shows the peer variables specific to reference clock peers, including the clock status, device name, last received timecode (if relevant), and various event counters. In addition, a subset of the <tt>fudge</tt> parameters is included. The poll and error counters in the <tt>clockvar</tt> billboard are useful debugging aids. The <tt>poll</tt> counts the poll messages sent to the clock, while the <tt>noreply</tt>, <tt>badformat</tt> and <tt>baddate</tt> count various errors. Check the timecode to be sure it matches what the driver expects. This may require consulting the clock hardware reference manual, which is probably pretty dusty at this stage.</p>
+ <p>The <tt>ntpdc</tt> utility program can be used for detailed inspection of the clock driver status. The most useful are the <tt>clockstat</tt> and <tt>clkbug</tt> commands described in the document page. While these commands permit getting quite personal with the particular driver involved, their use is seldom necessary, unless an implementation bug shows up. If all else fails, turn on the debugging trace using two <tt>-d</tt> flags in the <tt>ntpd</tt> startup command line. Most drivers will dump status at every received message in this case. While the displayed trace can be intimidating, this provides the most detailed and revealing indicator of how the driver and clock are performing and where bugs might lurk.</p>
+ <p>Most drivers write a message to the <tt>clockstats</tt> file as each timecode or surrogate is received from the radio clock. By convention, this is the last ASCII timecode (or ASCII gloss of a binary-coded one) received from the radio clock. This file is managed by the <tt>filegen</tt> facility described in the <tt>ntpd</tt> page and requires specific commands in the configuration file. This forms a highly useful record to discover anomalies during regular operation of the clock. The scripts included in the <tt>./scripts/stats</tt> directory can be run from a <tt>cron</tt> job to collect and summarize these data on a daily or weekly basis. The summary files have proven inspirational to detect infrequent misbehavior due to clock implementation bugs in some radios.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/contrib/ntp/html/refclock.html b/contrib/ntp/html/refclock.html
new file mode 100644
index 000000000000..a9f74abc1039
--- /dev/null
+++ b/contrib/ntp/html/refclock.html
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Reference Clock Drivers</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Reference Clock Drivers</h3>
+ <img src="pic/stack1a.jpg" alt="gif" align="left">Master Time Facility at the <a href="http://www.eecis.udel.edu/%7emills/lab.html">UDel Internet Research Laboratory</a>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:54 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
+ <br clear="left">
+ <h4>Related Links</h4>
+ <script type="text/javascript" language="javascript" src="scripts/links10.txt"></script>
+ <h4>Pulse-Per-Second Interfacing Links</h4>
+ <p>
+ <script type="text/javascript" language="javascript" src="scripts/links11.txt"></script>
+ </p>
+ <h4>Audio Driver Links</h4>
+ <p>
+ <script type="text/javascript" language="javascript" src="scripts/links8.txt"></script>
+ </p>
+ <h4>Table of Contents</h4>
+ <ul>
+ <li class="inline"><a href="#clock">Reference Clock Drivers</a>
+ <li class="inline"><a href="#cal">Driver Calibration</a>
+ <li class="inline"><a href="#perf">Performance Enhancements</a>
+ <li class="inline"><a href="#list">Comprehensive List of Clock Drivers</a>
+ </ul>
+ <hr>
+ <h4 id="clock">Reference Clock Drivers</h4>
+ <p>Support for most of the commonly available radio and modem reference clocks is included in the default configuration of the NTP daemon for Unix <tt>ntpd</tt>. Individual clocks can be activated by configuration file commands, specifically the <tt>server</tt> and <tt>fudge</tt> commands described in the <a href="ntpd.html"><tt>ntpd</tt> program manual page</a>. The following discussion presents Information on how to select and configure the device drivers in a running Unix system.</p>
+ <p>Many radio reference clocks can be set to display local time as adjusted for timezone and daylight saving mode. For use with NTP the clock must be set for Coordinated Universal Time (UTC) only. Ordinarily, these adjustments are performed by the kernel, so the fact that the clock runs on UTC will be transparent to the user.</p>
+ <p>Radio and modem clocks by convention have addresses in the form 127.127.<i>t.u</i>, where <i>t</i> is the clock type and <i>u</i> is a unit number in the range 0-3 used to distinguish multiple instances of clocks of the same type. Most of these clocks require support in the form of a serial port or special bus peripheral, but some can work directly from the audio codec found in some workstations. The particular device is normally specified by adding a soft link <tt>/dev/device<i>u</i></tt> to the particular hardware device involved, where <i><tt>u</tt></i> correspond to the unit number above.</p>
+ <p>Most clock drivers communicate with the reference clock using a serial port, usually at 9600 bps. There are several application program interfaces (API) used in the various Unix and NT systems, most of which can be detected at configuration time. Thus, it is important that the NTP daemon and utilities be compiled on the target system or clone. In some cases special features are available, such as timestamping in the kernel or pulse-per-second (PPS) interface. In most cases these features can be detected at configuration time as well; however, the kernel may have to be recompiled in order for them to work.</p>
+ <p>The audio drivers are a special case. These include support for the NIST time/frequency stations WWV and WWVH, the Canadian time/frequency station CHU and generic IRIG signals. Currently, support for the Solaris and SunOS audio API is included in the distribution. It is left to the volunteer corps to extend this support to other systems. Further information on hookup, debugging and monitoring is given in the <a href="audio.html">Audio Drivers</a> page.</p>
+ <p>The local clock driver is also a special case. A server configured with this driver can operate as a primary server to synchronize other clients when no other external synchronization sources are available. If the server is connected directly or indirectly to the public Internet, there is some danger that it can adversely affect the operation of unrelated clients. Carefully read the <a href="drivers/driver1.html">Undisciplined Local Clock</a> page and respect the stratum limit.</p>
+ <p>The local clock driver also supports an external synchronization source such as a high resolution counter disciplined by a GPS receiver, for example. Further information is on the <a href="extern.html">External Clock Discipline and the Local Clock Driver</a> page.</p>
+ <h4 id="cal">Driver Calibration</h4>
+ <p>Some drivers depending on longwave and shortwave radio services need to know the radio propagation time from the transmitter to the receiver, which can amount to some tens of milliseconds. This must be calculated for each specific receiver location and requires the geographic coordinates of both the transmitter and receiver. The transmitter coordinates for various radio services are given in the <a href="http://www.eecis.udel.edu/%7emills/qth.html">Time and Frequency Standard Station Information</a> page. Receiver coordinates can be obtained or estimated from various sources. The actual calculations are beyond the scope of this document.</p>
+ <p>When more than one clock driver is supported, it is often the case that each shows small systematic offset differences relative to the rest. To reduce the effects of jitter when switching from one driver to the another, it is useful to calibrate the drivers to a common ensemble offset. The <tt>enable calibrate</tt> configuration command in the <a href="miscopt.html">Miscellaneous Options</a> page is useful for this purpose. The calibration function can also be enabled and disabled using the <tt>ntpdc</tt> program utility.</p>
+ <p>Most clock drivers use the <tt>time1</tt> value specified in the <tt>fudge</tt> configuration command to provide the calibration correction when this cannot be provided by the clock or interface. When the calibration function is enabled, the <tt>time1</tt> value is automatically adjusted to match the offset of the remote server or local clock driver selected for synchronization. Ordinarily, the NTP selection algorithm chooses the best from among all sources, usually the best radio clock determined on the basis of stratum, synchronization distance and jitter. The calibration function adjusts the <tt>time1</tt> values for all clock drivers except this source so that their indicated offsets tend to zero. If the selected source is the kernel PPS discipline, the <tt>fudge time1</tt> values for all clock drivers are adjusted.</p>
+ <p>The adjustment function is an exponential average designed to improve accuracy, so the function takes some time to converge. The recommended procedure is to enable the function, let it run for an hour or so, then edit the configuration file using the <tt>time1</tt> values displayed by the <tt>ntpq</tt> utility and <tt>clockvar</tt> command. Finally, disable the calibration function to avoid possible future disruptions due to misbehaving clocks or drivers.</p>
+ <h4 id="perf">Performance Enhancements</h4>
+ <p>In general, performance can be improved, especially when more than one clock driver is supported, to use the prefer peer function described in the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The prefer peer is ordinarily designated the remote peer or local clock driver which provides the best quality time. All other things equal, only the prefer peer source is used to discipline the system clock and jitter-producing &quot;clockhopping&quot; between sources is avoided. This is valuable when more than one clock driver is present and especially valuable when the PPS clock driver (type 22) is used. Support for PPS signals is summarized in the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page.</p>
+ <p>Where the highest performance is required, generally better than one millisecond, additional hardware and/or software functions may be required. Kernel modifications for precision time are described in the <a href="kern.html">A Kernel Model for Precision Timekeeping</a> page. Special line discipline and streams modules for use in capturing precision timestamps are described in the <a href="ldisc.html">Line Disciplines and Streams Drivers</a> page.</p>
+ <h4 id="list">Comprehensive List of Clock Drivers</h4>
+ <p>Following is a list showing the type and title of each driver currently implemented. The compile-time identifier for each is shown in parentheses. Click on a selected type for specific description and configuration documentation, including the clock address, reference ID, driver ID, device name and serial line speed, and features (line disciplines, etc.). For those drivers without specific documentation, please contact the author listed in the <a href="copyright.html">Copyright Notice</a> page.</p>
+ <ul>
+ <li class="inline"><a href="drivers/driver1.html">Type 1</a> Undisciplined Local Clock (<tt>LOCAL</tt>)
+ <li class="inline"><a href="drivers/driver2.html">Type 2</a> Trak 8820 GPS Receiver (<tt>GPS_TRAK</tt>)
+ <li class="inline"><a href="drivers/driver3.html">Type 3</a> PSTI/Traconex 1020 WWV/WWVH Receiver (<tt>WWV_PST</tt>)
+ <li class="inline"><a href="drivers/driver4.html">Type 4</a> Spectracom WWVB and GPS Receivers (<tt>WWVB_SPEC</tt>)
+ <li class="inline"><a href="drivers/driver5.html">Type 5</a> TrueTime GPS/GOES/OMEGA Receivers (<tt>TRUETIME</tt>)
+ <li class="inline"><a href="drivers/driver6.html">Type 6</a> IRIG Audio Decoder (<tt>IRIG_AUDIO</tt>)
+ <li class="inline"><a href="drivers/driver7.html">Type 7</a> Radio CHU Audio Demodulator/Decoder (<tt>CHU</tt>)
+ <li class="inline"><a href="drivers/driver8.html">Type 8</a> Generic Reference Driver (<tt>PARSE</tt>)
+ <li class="inline"><a href="drivers/driver9.html">Type 9</a> Magnavox MX4200 GPS Receiver (<tt>GPS_MX4200</tt>)
+ <li class="inline"><a href="drivers/driver10.html">Type 10</a> Austron 2200A/2201A GPS Receivers (<tt>GPS_AS2201</tt>)
+ <li class="inline"><a href="drivers/driver11.html">Type 11</a> Arbiter 1088A/B GPS Receiver (<tt>GPS_ARBITER</tt>)
+ <li class="inline"><a href="drivers/driver12.html">Type 12</a> KSI/Odetics TPRO/S IRIG Interface (<tt>IRIG_TPRO</tt>)
+ <li class="inline">Type 13 Leitch CSD 5300 Master Clock Controller (<tt>ATOM_LEITCH</tt>)
+ <li class="inline">Type 14 EES M201 MSF Receiver (<tt>MSF_EES</tt>)
+ <li class="inline"><a href="drivers/driver5.html">Type 15</a> * TrueTime generic receivers
+ <li class="inline"><a href="drivers/driver16.html">Type 16</a> Bancomm GPS/IRIG Receiver (<tt>GPS_BANCOMM</tt>)
+ <li class="inline">Type 17 Datum Precision Time System (<tt>GPS_DATUM</tt>)
+ <li class="inline"><a href="drivers/driver18.html">Type 18</a> NIST Modem Time Service (<tt>ACTS_NIST</tt>)
+ <li class="inline"><a href="drivers/driver19.html">Type 19</a> Heath WWV/WWVH Receiver (<tt>WWV_HEATH</tt>)
+ <li class="inline"><a href="drivers/driver20.html">Type 20</a> Generic NMEA GPS Receiver (<tt>NMEA</tt>)
+ <li class="inline">Type 21 TrueTime GPS-VME Interface (<tt>GPS_VME</tt>)
+ <li class="inline"><a href="drivers/driver22.html">Type 22</a> PPS Clock Discipline (<tt>PPS</tt>)
+ <li class="inline"><a href="drivers/driver23.html">Type 23</a> PTB Modem Time Service (<tt>ACTS_PTB</tt>)
+ <li class="inline"><a href="drivers/driver24.html">Type 24</a> USNO Modem Time Service (<tt>ACTS_USNO</tt>)
+ <li class="inline"><a href="drivers/driver5.html">Type 25</a> * TrueTime generic receivers
+ <li class="inline"><a href="drivers/driver26.html">Type 26</a> Hewlett Packard 58503A GPS Receiver (<tt>GPS_HP</tt>)
+ <li class="inline"><a href="drivers/driver27.html">Type 27</a> Arcron MSF Receiver (<tt>MSF_ARCRON</tt>)
+ <li class="inline"><a href="drivers/driver28.html">Type 28</a> Shared Memory Driver (<tt>SHM</tt>)
+ <li class="inline"><a href="drivers/driver29.html">Type 29</a> Trimble Navigation Palisade GPS (<tt>GPS_PALISADE</tt>)
+ <li class="inline"><a href="drivers/driver30.html">Type 30</a> Motorola UT Oncore GPS <tt>GPS_ONCORE</tt>)
+ <li class="inline">Type 31 Rockwell Jupiter GPS (<tt>GPS_JUPITER</tt>)
+ <li class="inline"><a href="drivers/driver32.html">Type 32</a> Chrono-log K-series WWVB receiver (<tt>CHRONOLOG</tt>)
+ <li class="inline"><a href="drivers/driver33.html">Type 33</a> Dumb Clock (<tt>DUMBCLOCK</tt>)
+ <li class="inline"><a href="drivers/driver34.html">Type 34</a> Ultralink WWVB Receivers (<tt>ULINK</tt>)
+ <li class="inline"><a href="drivers/driver35.html">Type 35</a> Conrad Parallel Port Radio Clock (<tt>PCF</tt>)
+ <li class="inline"><a href="drivers/driver36.html">Type 36</a> Radio WWV/H Audio Demodulator/Decoder (<tt>WWV</tt>)
+ <li class="inline"><a href="drivers/driver37.html">Type 37</a> Forum Graphic GPS Dating station (<tt>FG</tt>)
+ <li class="inline"><a href="drivers/driver38.html">Type 38</a> hopf GPS/DCF77 6021/komp for Serial Line (<tt>HOPF_S</tt>)
+ <li class="inline"><a href="drivers/driver39.html">Type 39</a> hopf GPS/DCF77 6039 for PCI-Bus (<tt>HOPF_P</tt>)
+ <li class="inline"><a href="drivers/driver40.html">Type 40</a> JJY Receivers (<tt>JJY</tt>)
+ <li class="inline">Type 41 TrueTime 560 IRIG-B Decoder
+ <li class="inline"><a href="drivers/driver42.html">Type 42</a> Zyfer GPStarplus Receiver
+ <li class="inline"><a href="drivers/driver43.html">Type 43</a> RIPE NCC interface for Trimble Palisade
+ <li class="inline"><a href="drivers/driver44.html">Type 44</a> NeoClock4X - DCF77 / TDF serial line
+ </ul>
+ <p>* All TrueTime receivers are now supported by one driver, type 5. Types 15 and 25 will be retained only for a limited time and may be reassigned in future.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/release.html b/contrib/ntp/html/release.html
new file mode 100644
index 000000000000..6c8d90f4f4e5
--- /dev/null
+++ b/contrib/ntp/html/release.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>NTP Version 4 Release Notes</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>NTP Version 4 Release Notes</h3>
+ <img src="pic/hornraba.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>The rabbit toots to make sure you read this</p>
+ <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="97">10:24 PM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="266">Tuesday, August 05, 2003</csobj></p>
+ .<br clear="left">
+ <hr>
+ <h4>NTP Version 4 Release Notes</h4>
+ <p>This release of the NTP Version 4 (NTPv4) daemon for Unix, VMS and Windows incorporates new features and refinements to the NTP Version 3 (NTPv3) algorithms. However, it continues the tradition of retaining backwards compatibility with older versions, including NTPv3 and NTPv2, but not NTPv1. Support for NTPv1 has been discontinued because of certain security vulnerabilities. The NTPv4 version has been under development for quite a while and isn't finished yet. In fact, quite a number of NTPv4 features have already been retrofitted in the older NTPv3, although this version is not actively maintained by the NTPv4 developer corps.</p>
+ <p>The code compiles and runs properly in all test host configurations available to the developer corps, including Sun Microsystems, Digital/Compaq, Hewlett Packard, FreeBSD and Linux. Other volunteers have verified it works in IRIX and certain versions of Windows NT and several others. We invite comments and corrections about the various architectures, operating systems and hardware complement that can't be verified by the developer corps. Of particular interest are Windows, VMS and various reference clock drivers. As always, corrections and bugfixes are warmly received, especially in the form of context diffs sent to <a href="mailto:bugs@ntp.org">bugs@ntp.org</a>.</p>
+ <p>This release has been compiled and tested on many systems, including SunOS 4.1.3, Solaris 2.5.1-2.8, Alpha Tru64 4.0-5.1, Ultrix 4.4, Linux 2.4.2, FreeBSD 4.5 and HP-UX 10.02. It has been compiled and tested by others on Windows NT4, 2000 and XP, but not yet on other Windows versions or for VMS. There are several new features apparently incompatible with Linux systems, including some modes used with the Autokey protocol. The developers corps looks for help elsewhere to resolve these differences. We are relying on the NTP volunteer corps to do that.</p>
+ <p>This note summarizes the differences between this software release of NTPv4, called ntp-4.x.x, and the previous NTPv3 version, called xntp3-5.x.x. Additional information on protocol compatibility details is on the <a href="http://www.eecis.udel.edu/%7emills/biblio.html">Protocol Conformance Statement</a> page.</p>
+ <h4>New Features</h4>
+ <ol>
+ <li>Support for the IPv6 addressing family is included in this distribution. If the Basic Socket Interface Extensions for IPv6 (RFC-2553) is detected, support for the IPv6 address family is generated in addition to the default support for the IPv4 address family. Combination IPv6 and IPv4 configurations have been successfully tested in all protocol modes supported by NTP and using both symmetric and public key (Autokey) cryptography. However, users should note that IPv6 support is new and we have not had a lot of experience with it in various operational scenarios and local infrastructure environments. As always, feedback is welcome.
+ <li>Most calculations are now done using 64-bit floating double format, rather than 64-bit fixed point format. The motivation for this is to reduce size, improve speed and avoid messy bounds checking. Workstations of today are much faster than when the original NTP version was designed in the early 1980s, and it is rare to find a processor architecture that does not support floating double. The fixed point format is still used with raw timestamps, in order to retain the full precision of about 212 picoseconds. However, the algorithms which process raw timestamps all produce fixed point differences before converting to floating double. The differences are ordinarily quite small so can be expressed without loss of accuracy in this format.
+ <li>The clock discipline algorithms have been redesigned to improve accuracy, reduce the impact of network jitter and allow increased in poll intervals to well over one day with only moderate sacrifice in accuracy. A new feature called <i>huffpuff</i> maximizes accuracy in cases of highly asymmetric network delays typical of ISDN and modem access circuits. The NTPv4 design allows servers to increase the poll intervals even when synchronized directly to the peer. In NTPv3 the poll interval in such cases was clamped to the minimum, usually 64 s. For those servers with hundreds of clients, the new design can dramatically reduce the network load, especially when large numbers of potential clients, as in national laboratory services. A scheme designed to reduce &quot;clockhopping&quot; when the choice of servers changes frequently as the result of comparatively insignificant quality changes.
+ <li>This release includes support for the <a href="ftp://ftp.udel.edu/usa/ftp/pub/ntp/software/"><i>nanokernel</i></a> precision time kernel support, which is now in stock Linux and FreeBSD kernels. If a precision time source such as a GPS timing receiver or cesium clock is available, kernel timekeeping can be improved to the order of one microsecond. The older <i>microtime</i> kernel for Digital/Compaq/HP Tru64, Digital Ultrix, as well as Sun Microsystems SunOS and Solaris, continues to be supported.
+ <li>This release includes support for Autokey public-key cryptography, which is the preferred scheme for authenticating servers to clients. Autokey Version 2 uses NTP header extension fields and protocols as described on the NTP project page linked from www.ntp.org. This release includes support for additional message digest and digital signature schemes supported by the OpenSSL software library, as well as new identity schemes based on cryptographic challenge/responce algorithms. The new design greatly simplifies key generation and distribution and provides orderly key refreshment. Security procedures and media formats are consistent with industry standard X.509 Version 3 certificates and authority procedures. Specific improvements to the protocol include a reduction in the number of messages required and a method to protect the cookie used in client/server mode against disclosure. Additional information about Autokey cryptography is contained in the <a href="authopt.html">Authentication Options</a> page and links from there. See also the new <tt>cryptostats</tt> monitoring statistics file in the <a href="monopt.html">Monitoring Options</a> page.
+ <li>This release includes support for a discrete event simulator (DES), which allows the NTP&nbsp;algorithms to be tested in an embedded environment with systematic and pseudorandom network delay and oscillator wander distributions. This has been used to verify correct operation under conditions of extreme error and misconfiguration. See the <a href="ntpdsim.html"><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</a> page.
+ <li>NTPv4 includes two new association modes which in most applications can avoid per-host configuration altogether. Both of these are based on IP multicast technology and Autokey cryptography. They provide automatic discovery, configuration and authentication of servers and clients without identifying servers or clients in advance. In multicast mode a server sends a message at fixed intervals using specified multicast group addresses, while clients listen on these addresses.
+ <p>Upon receiving the the first message, a client exchanges several messages with the server in order to calibrate the multicast propagation delay between the client and server and run the authentication protocol. In manycast mode a client sends a message to a specified multicast group address and expects one or more servers to reply. Using engineered algorithms, the client selects an appropriate subset of servers from the messages received and continues an ordinary client/server campaign. The manycast scheme can provide somewhat better accuracy than the multicast scheme at the price of additional network overhead. See the <a href="manyopt.html">Automatic NTP Configuration Options</a> page for further information.</p>
+ <li>There are two burst mode features available where special conditions apply. One of these is enabled by the <tt>iburst</tt> keyword in the <tt>server</tt> configuration command. It is intended for cases where it is important to set the clock quickly when an association is first mobilized. The other is enabled by the <tt>burst</tt> keyword in the <tt>server</tt> configuration command. It is intended for cases where the network attachment requires an initial calling or training procedure. See the <a href="assoc.html">Association Management</a> page for further information.
+ <li>The reference clock driver interface is smaller, more rational and more accurate. Support for pulse-per-second (PPS) signals has been extended to all drivers as an intrinsic function. Most of the drivers in NTPv3 have been converted to the NTPv4 interface and continue to operate as before. New drivers have been added for several GPS receivers now on the market for a total of 44 drivers. Audio drivers for the Canadian standard time and frequency station CHU, the US standard time and frequency stations WWV/H and for IRIG signals have been updated and capabilities added to allow direct connection of these signals to a Sun or FreeBSD audio port. See the <a href="audio.html">Reference Clock Audio Drivers</a> page for further information.
+ <li>In all except a very few cases, all timing intervals are randomized, so that the tendency for NTPv3 to self-synchronize and bunch messages, especially with a large number of configured associations, is minimized.
+ <li>In NTPv3 a large number of weeds and useless code had grown over the years since the original NTPv1 code was implemented almost twenty years ago. Using a powerful weedwacker, much of the shrubbery has been removed, with effect a substantial reduction in size of almost 40 percent.
+ <li>The entire distribution has been converted to gnu <tt>automake</tt>, which should greatly ease the task of porting to new and different programming environments, as well as reduce the incidence of bugs due to improper handling of idiosyncratic kernel functions. Version control is provided by <tt>Bitkeeper</tt> using an online repository at www.ntp.org.
+ <li>Several new options have been added for the <tt>ntpd</tt> command line. For the inveterate knob twiddlers several of the more important performance variables can be changed to fit actual or perceived special conditions. It is possible to operate the daemon in a one-time mode similar to <tt>ntpdate</tt>, which program is headed for retirement. See the <a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a> page for the new features.
+ </ol>
+ <h4>Nasty Surprises</h4>
+ <p>There are a few things different about this release that have changed since the latest NTP Version 3 release. Following are a few things to worry about:</p>
+ <ol>
+ <li>When both IPv4 and IPv6 address families are in use, the host's resolver library may not choose the intended address family if a server has an IPv4 and IPv6 address associated with the same DNS name. The solution is to use the IPv4 or IPv6 address directly in such cases or use another DNS name that only resolves to the intended address. Older versions of <tt>ntpdc</tt> will only show the IPv4 associations with the <tt>peers</tt> and other simular commands. Older versions of <tt>ntpq</tt> will show 0.0.0.0 for IPv6 associations with the <tt>peers</tt> and other simular commands.
+ <li>There is a minor change to the reference ID field of the NTP packet header when operating with IPv6 associations. In IPv4 associations this field contains the 32-bit IPv4 address of the server, in order to detect and avoid loops. In IPv6 associations this field contains the first 32-bits of a MD5 hash formed from the address (IPv4 or IPv6) each of the configured associations. Normally, this detail would not be of concern; however, the <tt>ntptrace</tt> program originally depended on that field in order to display a server traceback to the primary reference source. This program has now been replaced by a script that does the same function, but does not depend on the reference ID field. The <tt>ntpdc</tt> utility now uses a special version number to communicate with the <tt>ntpd</tt> server. The server uses this version number to select which address family to used in reply packets. The <tt>ntpdc</tt> program falls back to the older version behavior when communicating with older NTP versions.
+ <li>As required by Defense Trade Regulations (DTR), the cryptographic routines supporting the Data Encryption Standard (DES) have been removed from the base distribution of NTPv3. For NTPv4 a new interface has been implemented for the OpenSSL cryptographic library, which is widely available on the web at www.openssl.org. This library replaces the library formerly available from RSA Laboratories. Besides being somewhat faster and more widely available, the OpenSSL library supports many additional cryptographic algorithms, which are now selectable at run time. Directions for using OpenSSL are in the <a href="build.html">Building and Installing the Distribution</a> page.
+ <li>As the result of the above, the <tt>./authstuff</tt> directory, intended as a development and testing aid for porting cryptographic routines to exotic architectures, has been removed. Testing and conformance validation tools are in the OpenSSL software distrbution.
+ <li>The NTPv4 enable and disable commands have a few changes in the arguments. See the <tt>ntpd</tt> <a href="miscopt.html">Miscellaneous Options</a> page for details. Note that the <tt>authenticate</tt> command has been removed.
+ <li>To help reduce the level of spurious network traffic due to obsolete configuration files, a special control message called the <i>kiss-o'-death</i> packet has been implemented. If enabled and a packet is denied service or exceeds the client limits, a compliant server will send this message to the client. A compliant client will cease further transmission and send a message to the system log. See the <a href="accopt.html">Authentication Options</a> page for further information.
+ <li>The <tt>tty_clk</tt> and <tt>ppsclock</tt> pulse-per-second (PPS) line discipline/streams modules are no longer supported. The PPS function is now handled by the <a href="drivers/driver22.html">PPS Clock Discipline</a> driver, which uses the new PPSAPI application program interface proposed by the IETF. Note that the <tt>pps</tt> configuration file command has been obsoleted by the driver. See the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page for further information.
+ <li>Support for the NTPv1 symmetric mode has been discontinued, since it hasn't worked for years. Support continues for the NTPv1 client mode, which is used in some SNTP clients.
+ <li>The precision time support in stock Solaris 2.6 has bugs that were fixed in 2.7. A patch is available that fixes the 2.6 bugs. The 2.6 PPS kernel discipline has been disabled by default. For testing, the kernel can be enabled using the <tt>enable kernel</tt> command either in the configuration file or via <tt>ntpdc</tt>.
+ <li>The HTML documentation has been partially updated. However, most of the NTPv3 documentation continues to apply to NTPv4. Until a comprehensive update happens, what you see is what you get. We are always happy to accept comments, corrections and bug reports. However, we are most thrilled upon receipt of patches to fix the dang bugs. <b>Please send bug reports to <a href="mailto:bugs@ntp.org">bugs@ntp.org</a>, not the individual members on the team</b>. </ol>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/scripts/footer.txt b/contrib/ntp/html/scripts/footer.txt
new file mode 100644
index 000000000000..7fc6dd87a922
--- /dev/null
+++ b/contrib/ntp/html/scripts/footer.txt
@@ -0,0 +1,7 @@
+document.write("\
+<table><tr>\
+<td width='50%' ><img src='icons/home.gif' align='middle' alt='gif'>\
+<a href='index.html'>Home Page</a></td>\
+<td width='50%' ><img src='icons/mail2.gif' align='middle' alt='gif'>\
+<a href='http://www.ntp.org/contact.html'>Contacts</a></i></td>\
+</tr></table>") \ No newline at end of file
diff --git a/contrib/ntp/html/scripts/links10.txt b/contrib/ntp/html/scripts/links10.txt
new file mode 100644
index 000000000000..880e379fdbe2
--- /dev/null
+++ b/contrib/ntp/html/scripts/links10.txt
@@ -0,0 +1,5 @@
+document.write("<ul>\
+<li class='inline'><a href='refclock.html'>Reference Clock Drivers</a><br>\
+<li class='inline'><a href='prefer.html'>Mitigation Rules and the <tt>prefer</tt> Keyword</a><br>\
+<li class='inline'><a href='howto.html'>How to Write a Reference Clock Driver</a><br>\
+</ul>") \ No newline at end of file
diff --git a/contrib/ntp/html/scripts/links11.txt b/contrib/ntp/html/scripts/links11.txt
new file mode 100644
index 000000000000..2f497f04f988
--- /dev/null
+++ b/contrib/ntp/html/scripts/links11.txt
@@ -0,0 +1,5 @@
+document.write("<ul>\
+<li class='inline'><a href='refclock.html'>Reference Clock Drivers</a><br>\
+<li class='inline'><a href='pps.html'>Pulse-per-second (PPS) Signal Interfacing</a><br>\
+<li class='inline'><a href='ldisc.html'>Line Disciplines and Streams Modules</a><br>\
+</ul>") \ No newline at end of file
diff --git a/contrib/ntp/html/scripts/links12.txt b/contrib/ntp/html/scripts/links12.txt
new file mode 100644
index 000000000000..7ca9249b918c
--- /dev/null
+++ b/contrib/ntp/html/scripts/links12.txt
@@ -0,0 +1,5 @@
+document.write("<ul>\
+<li class='inline'><a href='debug.html'>NTP Debugging Techniques</a><br>\
+<li class='inline'><a href='rdebug.html'>Debugging Reference Clock Drivers</a><br>\
+<li class='inline'><a href='msyslog.html'><tt>ntpd</tt> System Log Messages</a><br>\
+</ul>") \ No newline at end of file
diff --git a/contrib/ntp/html/scripts/links7.txt b/contrib/ntp/html/scripts/links7.txt
new file mode 100644
index 000000000000..fa476e279c71
--- /dev/null
+++ b/contrib/ntp/html/scripts/links7.txt
@@ -0,0 +1,5 @@
+document.write("<ul>\
+<li class='inline'><a href='confopt.html'>Server Options</a><br>\
+<li class='inline'><a href='authopt.html'>Authentication Options</a><br>\
+<li class='inline'><a href='monopt.html'>Monitoring Options</a><br>\
+</ul>") \ No newline at end of file
diff --git a/contrib/ntp/html/scripts/links8.txt b/contrib/ntp/html/scripts/links8.txt
new file mode 100644
index 000000000000..51c3a38fdcc3
--- /dev/null
+++ b/contrib/ntp/html/scripts/links8.txt
@@ -0,0 +1,6 @@
+document.write("<ul>\
+<li class='inline'><a href='refclock.html'>Reference Clock Drivers</a><br>\
+<li class='inline'><a href='driver7.html'>Radio CHU Audio Demodulator/Decoder</a><br>\
+<li class='inline'><a href='driver36.html'>Radio WWV/H Audio Demodulator/Decoder</a><br>\
+<li class='inline'><a href='driver6.html'>IRIG Audio Decoder</a>\
+</ul>") \ No newline at end of file
diff --git a/contrib/ntp/html/scripts/links9.txt b/contrib/ntp/html/scripts/links9.txt
new file mode 100644
index 000000000000..06e3462e2444
--- /dev/null
+++ b/contrib/ntp/html/scripts/links9.txt
@@ -0,0 +1,7 @@
+document.write("<ul>\
+<li class='inline'><a href='authopt.html'>Authentication Options</a><br>\
+<li class='inline'><a href='manyopt.html'>Automatic NTP Configuration Options</a><br>\
+<li class='inline'><a href='confopt.html'>Server Options</a><br>\
+<li class='inline'><a href='keygen.html'><tt>ntp-keygen</tt> - generate public and private keys</a>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/autokey.html'>Autonomous Authentication</a>\
+</ul>") \ No newline at end of file
diff --git a/contrib/ntp/html/scripts/style.css b/contrib/ntp/html/scripts/style.css
new file mode 100644
index 000000000000..7d7b27640f84
--- /dev/null
+++ b/contrib/ntp/html/scripts/style.css
@@ -0,0 +1,64 @@
+body {background: #FDF1E1;
+ color: #006600;
+ font-family: "verdana", sans-serif;
+ text-align: justify;
+ margin-left: 5px;}
+
+p, h4, hr, li {margin-top: .6em; margin-bottom: .6em}
+li.inline {text-align: left; margin-top: 0; margin-bottom: 0}
+
+ul, dl, ol, {margin-top: .6em; margin-bottom: .6em; margin-left 5em}
+
+dt {margin-top: .6em}
+dd {margin-bottom: .6em}
+
+div.header {text-align: center;
+ font-style: italic;}
+
+div.footer {text-align: center;
+ font-size: 60%;}
+
+img.cell {align: left;}
+
+td.sidebar {width: 40px; align: center; valign: top;}
+img.sidebar {align: center; margin-top: 5px;}
+h4.sidebar {align: center;}
+
+p.top {background: #FDF1E1;
+ color: #006600;
+ position: absolute;
+ margin-left: -90px;
+ text-align: center;}
+
+a:link.sidebar {background: transparent;
+ color: #990033;
+ font-weight: bold;}
+
+a:visited.sidebar {background: transparent;
+ color: #990033;
+ font-weight: bold;}
+
+a:hover.sidebar {background: #FDF1E1;
+ color: #006600;}
+
+img {margin: 5px;}
+
+div {text-align: center;}
+
+h1 {text-align: center;
+ font-size: 250%;}
+
+caption {background: #EEEEEE;
+ color: #339999;}
+
+tx {text-align: center;}
+
+th {background: #FFFFCC;
+ color: #006600;
+ text-align: center;
+ text-decoration: underline;
+ padding-top: 5px;}
+
+th.caption {background: #EEEEEE;
+ color: #006600;
+ text-align: center;} \ No newline at end of file
diff --git a/contrib/ntp/html/sntp.html b/contrib/ntp/html/sntp.html
new file mode 100644
index 000000000000..de7b6f79ebab
--- /dev/null
+++ b/contrib/ntp/html/sntp.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>Simple Network Time Protocol (SNTP) Client</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Simple Network Time Protocol (SNTP) Client</h3>
+ <img src="pic/dogsnake.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+ <p>S is for snakeoil</p>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">23:27</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="250">Tuesday, February 11, 2003</csobj></p>
+ <br clear="left">
+ <hr>
+ <h4>Synopsis</h4>
+ <tt>sntp [{-h --help -?}][{ -v -V -W }][{-r -a}][-P <i>prompt</i>][-e <i>minerr</i>][-E <i>maxerr</i>][-c <i>count</i>][-d <i>delay</i>][address(es)]</tt>
+ <h4>Description</h4>
+ <p>This program is a Simple Network Time Protocol (SNTP) client that can be used to query a Network TIme Protocol (NTP) server and display the time offset of the system clock relative to the server clock. Run as root it can correct the system clock to this offset as well. It can be run as an interactive command or from a script by a <tt>cron</tt> job. The program implements the SNTP protocol defined in RFC-2030, which is a subset of the NTP&nbsp;protocol defined in RFC-1305, but does not provide the sanity checks, access controls, security functions and mitigation algorithms as in the full NTP implementation.</p>
+ <p>While this program can do other things, including operation as a primitive server, some of these things are truly dangerous in a ubiquitous public time server network. A full disclosure is in the man page in the <tt>./sntp</tt> directory, but be truly advised RFC-2030 specifically <b>forbids</b> a SNTP client to operate as a server for other NTP or SNTP&nbsp;clients. If such operation is contemplated, do <b>not</b>&nbsp;allow access by clients on the public Internet.</p>
+ <p>By default, <tt>sntp</tt> writes the local date and time (i.e., not UTC) to the standard output in the format</p>
+ <p><tt>1996 Oct 15 20:17:25.123 + 4.567 +/- 0.089 secs</tt>,</p>
+ <p>where the <tt>+ 4.567 +/- 0.089 secs</tt> indicates the time offset and error bound of the system clock relative to the server clock.</p>
+ <p>If a NTP&nbsp;server <i>address</i> is explicitly specified, the program sends a single message to the server and waits up to <i>delay</i> seconds for a unicast server message. Otherwise, it sends no message and waits up to <i>delay</i> seconds for a broadcast server message.</p>
+ <h4>Options</h4>
+ <p><tt>sntp</tt> recognizes the following options:</p>
+ <dl>
+ <dt><tt>-h, --help</tt>
+ <dd>displays usage information.
+ <dt><tt>-v</tt>
+ <dd>writes diagnostic messages and a limited amount of tracing to standard error. The <tt>-v, -V</tt> and <tt>-W</tt> give increasing levels of detail.
+ <dt><tt>-r</tt>
+ <dd>steps the system clock to the correct time by the Unix <tt>settimeofday</tt> system call. Requires root priviledge.
+ <dt><tt>-a</tt>
+ <dd>slews the system clock to the correct time by the Unix <tt>adjtime</tt> system call. Requires root priviledge.
+ <dt><tt>-e <i>minerr</i></tt>
+ <dd>sets the minimum offset to <tt><i>minerr</i></tt> seconds. Measured offsets less than this are ignored. Acceptable values are from 0.001 to 1 with default 0.1 if unicast mode and 0.5 for broadcast mode.
+ <dt><tt>-E <i>maxerr</i></tt>
+ <dd>sets the maximum offset to <tt><i>maxerr</i></tt> seconds. Measured offsets greater than this are ignored. Acceptable values are from 1 to 60 with default 5.
+ <dt><tt>-P <i>prompt</i></tt>
+ <dd>sets the maximum automatic offset to <tt><i>maxerr</i></tt> seconds. Acceptable values are from 1 to 3600 or <tt>no</tt>, with default 30. If the program is being run interactively, measured offsets greater than this will prompt the user for confirmation. Specifying <tt>no</tt> will disable this and the correction will be made regardless.
+ <dt><tt>-c <i>count</i></tt>
+ <dd>sets the maximum number of NTP packets required to <i>count</i>. Acceptable values are from 1 to 25 in unicast mode and 5 to 25 in broadcast mode. The default is 5 in either mode.
+ <dt><tt>-d <i>delay</i></tt>
+ <dd>sets the maximum waiting time in broadcast mode to <i>delay</i> seconds. Acceptable values are from 1 to 3600, with default 15 in unicast mode and 300 in broadcast mode.
+ </dl>
+ <h4>Return Value</h4>
+ <p>The program returns an exit status of zero for success and non-zero otherwise.</p>
+ <h4>Author</h4>
+ <p><tt>sntp</tt> was developed by N.M. Maclaren of the University of Cambridge Computing Service.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/html/tickadj.html b/contrib/ntp/html/tickadj.html
new file mode 100644
index 000000000000..7153f7785a40
--- /dev/null
+++ b/contrib/ntp/html/tickadj.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>tickadj - set time-related kernel variables</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3><tt>tickadj</tt> - set time-related kernel variables</h3>
+ <p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">20:11</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="257">Monday, December 02, 2002</csobj></p>
+ <hr>
+ <h4>Synopsis</h4>
+ <tt>tickadj [ -Aqs ] [ -a <i>tickadj</i> ] [ -t <i>tick</i> ]</tt>
+ <h4>Description</h4>
+ <p>The <tt>tickadj</tt> program reads, and optionally modifies, several timekeeping-related variables in older kernels that do not have support for precision ttimekeeping, including HP-UX, SunOS, Ultrix, SGI and probably others. Those machines provide means to patch the kernel <tt>/dev/kmem</tt>. Newer machines with precision time support, including Solaris, Tru64, FreeBSD and Linux (with PPSkit patch) should NOT use the program. The particular variables that can be changed with <tt>tickadj</tt> include <tt>tick</tt>, which is the number of microseconds added to the system time for a clock interrupt, <tt>tickadj</tt>, which sets the slew rate and resolution used by the <tt>adjtime</tt> system call, and <tt>dosynctodr</tt>, which indicates to the kernels on some machines whether they should internally adjust the system clock to keep it in line with time-of-day clock or not.</p>
+ <p>By default, with no arguments, <tt>tickadj</tt> reads the variables of interest in the kernel and displays them. At the same time, it determines an &quot;optimal&quot; value for the value of the <tt>tickadj</tt> variable if the intent is to run the <tt>ntpd</tt> Network Time Protocol (NTP) daemon, and prints this as well. Since the operation of <tt>tickadj</tt> when reading the kernel mimics the operation of similar parts of the <tt>ntpd</tt> program fairly closely, this can be useful when debugging problems with <tt>ntpd</tt>.</p>
+ <p>Note that <tt>tickadj</tt> should be run with some caution when being used for the first time on different types of machines. The operations which <tt>tickadj</tt> tries to perform are not guaranteed to work on all Unix machines and may in rare cases cause the kernel to crash.</p>
+ <h4>Command Line Options</h4>
+ <dl>
+ <dt><tt>-a <i>tickadj</i></tt>
+ <dd>Set the kernel variable <tt>tickadj</tt> to the value <i><tt>tickadj</tt></i>specified.
+ <dt><tt>-A</tt>
+ <dd>Set the kernel variable <tt>tickadj</tt> to an internally computed &quot;optimal&quot; value.
+ <dt><tt>-t <i>tick</i></tt>
+ <dd>Set the kernel variable <tt>tick</tt> to the value <i><tt>tick</tt></i> specified.
+ <dt><tt>-s</tt>
+ <dd>Set the kernel variable <tt>dosynctodr</tt> to zero, which disables the hardware time-of-year clock, a prerequisite for running the <tt>ntpd</tt> daemon under SunOS4.
+ <dt><tt>-q</tt>
+ <dd>Normally, <tt>tickadj</tt> is quite verbose about what it is doing. The <tt>-q</tt> flag tells it to shut up about everything except errors.
+ </dl>
+ <h4>Files</h4>
+ <pre>
+/vmunix
+
+/unix
+
+/dev/kmem
+</pre>
+ <h4>Bugs</h4>
+ Fiddling with kernel variables at run time as a part of ordinary operations is a hideous practice which is only necessary to make up for deficiencies in the implementation of <tt>adjtime</tt> in many kernels and/or brokenness of the system clock in some vendors' kernels. It would be much better if the kernels were fixed and the <tt>tickadj</tt> program went away.
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html> \ No newline at end of file
diff --git a/contrib/ntp/include/Makefile.am b/contrib/ntp/include/Makefile.am
index 44301eefe60b..8f8b934afeb4 100644
--- a/contrib/ntp/include/Makefile.am
+++ b/contrib/ntp/include/Makefile.am
@@ -3,6 +3,8 @@ AUTOMAKE_OPTIONS = ../util/ansi2knr
ETAGS_ARGS = $(srcdir)/Makefile.am
#EXTRA_DIST = TAGS
+SUBDIRS = isc
+
noinst_HEADERS = \
adjtime.h \
audio.h \
@@ -17,7 +19,6 @@ noinst_HEADERS = \
iosignal.h \
l_stdlib.h \
mbg_gps166.h \
- md5.h \
mx4200.h \
ntif.h \
ntp.h \
@@ -33,10 +34,13 @@ noinst_HEADERS = \
ntp_io.h \
ntp_machine.h \
ntp_malloc.h \
+ ntp_md5.h \
ntp_proto.h \
ntp_refclock.h \
ntp_request.h \
+ ntp_rfc2553.h \
ntp_select.h \
+ ntp_sprintf.h \
ntp_stdlib.h \
ntp_string.h \
ntp_syscall.h \
@@ -45,9 +49,10 @@ noinst_HEADERS = \
ntp_types.h \
ntp_unixtime.h \
ntpd.h \
+ ntpsim.h \
parse.h \
parse_conf.h \
recvbuff.h \
+ rsa_md5.h \
trimble.h
-
diff --git a/contrib/ntp/include/Makefile.in b/contrib/ntp/include/Makefile.in
index 136e6dd91373..d0a688243ec3 100644
--- a/contrib/ntp/include/Makefile.in
+++ b/contrib/ntp/include/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,25 +94,71 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
ETAGS_ARGS = $(srcdir)/Makefile.am
#EXTRA_DIST = TAGS
+SUBDIRS = isc
+
noinst_HEADERS = \
adjtime.h \
audio.h \
@@ -129,7 +173,6 @@ noinst_HEADERS = \
iosignal.h \
l_stdlib.h \
mbg_gps166.h \
- md5.h \
mx4200.h \
ntif.h \
ntp.h \
@@ -145,10 +188,13 @@ noinst_HEADERS = \
ntp_io.h \
ntp_machine.h \
ntp_malloc.h \
+ ntp_md5.h \
ntp_proto.h \
ntp_refclock.h \
ntp_request.h \
+ ntp_rfc2553.h \
ntp_select.h \
+ ntp_sprintf.h \
ntp_stdlib.h \
ntp_string.h \
ntp_syscall.h \
@@ -157,101 +203,226 @@ noinst_HEADERS = \
ntp_types.h \
ntp_unixtime.h \
ntpd.h \
+ ntpsim.h \
parse.h \
parse_conf.h \
recvbuff.h \
+ rsa_md5.h \
trimble.h
subdir = include
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
HEADERS = $(noinst_HEADERS)
-DIST_COMMON = README $(noinst_HEADERS) Makefile.am Makefile.in
-all: all-am
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+ ps-recursive install-info-recursive uninstall-info-recursive \
+ all-recursive install-data-recursive install-exec-recursive \
+ installdirs-recursive install-recursive uninstall-recursive \
+ check-recursive installcheck-recursive
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
+ Makefile.am
+DIST_SUBDIRS = $(SUBDIRS)
+all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu include/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
uninstall-info-am:
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if (etags --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ else \
+ include_option=--include; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" \
+ distdir=../$(distdir)/$$subdir \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
check-am: all-am
-check: check-am
+check: check-recursive
all-am: Makefile $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
-installdirs:
-
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-installcheck: installcheck-am
+installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -259,24 +430,24 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+clean: clean-recursive
clean-am: clean-generic mostlyclean-am
-distclean: distclean-am
-
+distclean: distclean-recursive
+ -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
-dvi: dvi-am
+dvi: dvi-recursive
dvi-am:
-info: info-am
+info: info-recursive
info-am:
@@ -284,30 +455,46 @@ install-data-am:
install-exec-am:
-install-info: install-info-am
+install-info: install-info-recursive
install-man:
installcheck-am:
-maintainer-clean: maintainer-clean-am
-
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
uninstall-am: uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-generic distclean \
- distclean-generic distclean-tags distdir dvi dvi-am info \
- info-am install install-am install-data install-data-am \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic tags uninstall uninstall-am \
- uninstall-info-am
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+ clean-generic clean-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-recursive distclean-tags distdir \
+ dvi dvi-am dvi-recursive info info-am info-recursive install \
+ install-am install-data install-data-am install-data-recursive \
+ install-exec install-exec-am install-exec-recursive \
+ install-info install-info-am install-info-recursive install-man \
+ install-recursive install-strip installcheck installcheck-am \
+ installdirs installdirs-am installdirs-recursive \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-generic \
+ mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
+ ps-recursive tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am uninstall-info-recursive uninstall-recursive
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/ntp/include/adjtime.h b/contrib/ntp/include/adjtime.h
index 74d91eb2719d..b6e2a3e99541 100644
--- a/contrib/ntp/include/adjtime.h
+++ b/contrib/ntp/include/adjtime.h
@@ -39,6 +39,10 @@
#include "ntp_types.h"
+#ifdef __QNXNTO__
+int adjtime( const struct timeval * oldtime, struct timeval * newtime );
+#else /* not __QNXNTO__ */
+
#define KEY 659847L
typedef union {
@@ -61,3 +65,5 @@ typedef union {
*/
#define DELTA1 0
#define DELTA2 1
+
+#endif /* not __QNXNTO__ */
diff --git a/contrib/ntp/include/audio.h b/contrib/ntp/include/audio.h
index 9f728ddbba6e..6d16347ec80d 100644
--- a/contrib/ntp/include/audio.h
+++ b/contrib/ntp/include/audio.h
@@ -3,11 +3,12 @@
*/
#include "ntp_types.h"
-#define AUDIO_BUFSIZ 160 /* codec buffer size (Solaris only) */
+#define MAXGAIN 255 /* max codec gain */
+#define MONGAIN 127 /* codec monitor gain */
/*
* Function prototypes
*/
-int audio_init P((char *));
-int audio_gain P((int, int));
+int audio_init P((char *, int, int));
+int audio_gain P((int, int, int));
void audio_show P((void));
diff --git a/contrib/ntp/include/isc/Makefile.am b/contrib/ntp/include/isc/Makefile.am
new file mode 100644
index 000000000000..a5b253c9ddc6
--- /dev/null
+++ b/contrib/ntp/include/isc/Makefile.am
@@ -0,0 +1,34 @@
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
+AUTOMAKE_OPTIONS = ../util/ansi2knr
+ETAGS_ARGS = $(srcdir)/Makefile.am
+#EXTRA_DIST = TAGS
+
+noinst_HEADERS = \
+ app.h \
+ assertions.h \
+ boolean.h \
+ error.h \
+ formatcheck.h \
+ int.h \
+ interfaceiter.h \
+ ipv6.h \
+ lang.h \
+ lib.h \
+ list.h \
+ magic.h \
+ mem.h \
+ msgcat.h \
+ msgs.h \
+ mutex.h \
+ net.h \
+ netaddr.h \
+ offset.h \
+ once.h \
+ platform.h \
+ print.h \
+ result.h \
+ sockaddr.h \
+ strerror.h \
+ string.h \
+ types.h \
+ util.h
diff --git a/contrib/ntp/include/isc/Makefile.in b/contrib/ntp/include/isc/Makefile.in
new file mode 100644
index 000000000000..3270f4a9f726
--- /dev/null
+++ b/contrib/ntp/include/isc/Makefile.in
@@ -0,0 +1,380 @@
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHUTEST = @CHUTEST@
+CLKTEST = @CLKTEST@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EF_LIBS = @EF_LIBS@
+EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+OBJEXT = @OBJEXT@
+OPENSSL = @OPENSSL@
+OPENSSL_INC = @OPENSSL_INC@
+OPENSSL_LIB = @OPENSSL_LIB@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_SH = @PATH_SH@
+PROPDELAY = @PROPDELAY@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+U = @U@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
+AUTOMAKE_OPTIONS = ../util/ansi2knr
+ETAGS_ARGS = $(srcdir)/Makefile.am
+
+#EXTRA_DIST = TAGS
+noinst_HEADERS = \
+ app.h \
+ assertions.h \
+ boolean.h \
+ error.h \
+ formatcheck.h \
+ int.h \
+ interfaceiter.h \
+ ipv6.h \
+ lang.h \
+ lib.h \
+ list.h \
+ magic.h \
+ mem.h \
+ msgcat.h \
+ msgs.h \
+ mutex.h \
+ net.h \
+ netaddr.h \
+ offset.h \
+ once.h \
+ platform.h \
+ print.h \
+ result.h \
+ sockaddr.h \
+ strerror.h \
+ string.h \
+ types.h \
+ util.h
+
+subdir = include/isc
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+HEADERS = $(noinst_HEADERS)
+
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.in Makefile.am
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/isc/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic ctags \
+ distclean distclean-generic distclean-tags distdir dvi dvi-am \
+ info info-am install install-am install-data install-data-am \
+ install-exec install-exec-am install-info install-info-am \
+ install-man install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/ntp/include/isc/app.h b/contrib/ntp/include/isc/app.h
new file mode 100644
index 000000000000..5aa3d23acaca
--- /dev/null
+++ b/contrib/ntp/include/isc/app.h
@@ -0,0 +1,212 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: app.h,v 1.1 2001/07/06 19:50:03 gson Exp $ */
+
+#ifndef ISC_APP_H
+#define ISC_APP_H 1
+
+/*****
+ ***** Module Info
+ *****/
+
+/*
+ * ISC Application Support
+ *
+ * Dealing with program termination can be difficult, especially in a
+ * multithreaded program. The routines in this module help coordinate
+ * the shutdown process. They are used as follows by the initial (main)
+ * thread of the application:
+ *
+ * isc_app_start(); Call very early in main(), before
+ * any other threads have been created.
+ *
+ * isc_app_run(); This will post any on-run events,
+ * and then block until application
+ * shutdown is requested. A shutdown
+ * request is made by calling
+ * isc_app_shutdown(), or by sending
+ * SIGINT or SIGTERM to the process.
+ * After isc_app_run() returns, the
+ * application should shutdown itself.
+ *
+ * isc_app_finish(); Call very late in main().
+ *
+ * Applications that want to use SIGHUP/isc_app_reload() to trigger reloading
+ * should check the result of isc_app_run() and call the reload routine if
+ * the result is ISC_R_RELOAD. They should then call isc_app_run() again
+ * to resume waiting for reload or termination.
+ *
+ * Use of this module is not required. In particular, isc_app_start() is
+ * NOT an ISC library initialization routine.
+ *
+ * MP:
+ * Clients must ensure that isc_app_start(), isc_app_run(), and
+ * isc_app_finish() are called at most once. isc_app_shutdown()
+ * is safe to use by any thread (provided isc_app_start() has been
+ * called previously).
+ *
+ * Reliability:
+ * No anticipated impact.
+ *
+ * Resources:
+ * None.
+ *
+ * Security:
+ * No anticipated impact.
+ *
+ * Standards:
+ * None.
+ */
+
+#include <isc/eventclass.h>
+#include <isc/lang.h>
+#include <isc/result.h>
+
+typedef isc_event_t isc_appevent_t;
+
+#define ISC_APPEVENT_FIRSTEVENT (ISC_EVENTCLASS_APP + 0)
+#define ISC_APPEVENT_SHUTDOWN (ISC_EVENTCLASS_APP + 1)
+#define ISC_APPEVENT_LASTEVENT (ISC_EVENTCLASS_APP + 65535)
+
+ISC_LANG_BEGINDECLS
+
+isc_result_t
+isc_app_start(void);
+/*
+ * Start an ISC library application.
+ *
+ * Notes:
+ * This call should be made before any other ISC library call, and as
+ * close to the beginning of the application as possible.
+ */
+
+isc_result_t
+isc_app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
+ void *arg);
+/*
+ * Request delivery of an event when the application is run.
+ *
+ * Requires:
+ * isc_app_start() has been called.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_NOMEMORY
+ */
+
+isc_result_t
+isc_app_run(void);
+/*
+ * Run an ISC library application.
+ *
+ * Notes:
+ * The caller (typically the initial thread of an application) will
+ * block until shutdown is requested. When the call returns, the
+ * caller should start shutting down the application.
+ *
+ * Requires:
+ * isc_app_start() has been called.
+ *
+ * Ensures:
+ * Any events requested via isc_app_onrun() will have been posted (in
+ * FIFO order) before isc_app_run() blocks.
+ *
+ * Returns:
+ * ISC_R_SUCCESS Shutdown has been requested.
+ * ISC_R_RELOAD Reload has been requested.
+ */
+
+isc_result_t
+isc_app_shutdown(void);
+/*
+ * Request application shutdown.
+ *
+ * Notes:
+ * It is safe to call isc_app_shutdown() multiple times. Shutdown will
+ * only be triggered once.
+ *
+ * Requires:
+ * isc_app_run() has been called.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_UNEXPECTED
+ */
+
+isc_result_t
+isc_app_reload(void);
+/*
+ * Request application reload.
+ *
+ * Requires:
+ * isc_app_run() has been called.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_UNEXPECTED
+ */
+
+void
+isc_app_finish(void);
+/*
+ * Finish an ISC library application.
+ *
+ * Notes:
+ * This call should be made at or near the end of main().
+ *
+ * Requires:
+ * isc_app_start() has been called.
+ *
+ * Ensures:
+ * Any resources allocated by isc_app_start() have been released.
+ */
+
+void
+isc_app_block(void);
+/*
+ * Indicate that a blocking operation will be performed.
+ *
+ * Notes:
+ * If a blocking operation is in process, a call to isc_app_shutdown()
+ * or an external signal will abort the program, rather than allowing
+ * clean shutdown. This is primarily useful for reading user input.
+ *
+ * Requires:
+ * isc_app_start() has been called.
+ * No other blocking operations are in progress.
+ */
+
+void
+isc_app_unblock(void);
+/*
+ * Indicate that a blocking operation is complete.
+ *
+ * Notes:
+ * When a blocking operation has completed, return the program to a
+ * state where a call to isc_app_shutdown() or an external signal will
+ * shutdown normally.
+ *
+ * Requires:
+ * isc_app_start() has been called.
+ * isc_app_block() has been called by the same thread.
+ */
+
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_APP_H */
diff --git a/contrib/ntp/include/isc/assertions.h b/contrib/ntp/include/isc/assertions.h
new file mode 100644
index 000000000000..45855c663180
--- /dev/null
+++ b/contrib/ntp/include/isc/assertions.h
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 1997-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * $Id: assertions.h,v 1.17 2001/07/12 05:58:21 mayer Exp $
+ */
+
+#ifndef ISC_ASSERTIONS_H
+#define ISC_ASSERTIONS_H 1
+
+#include <isc/lang.h>
+#include <isc/platform.h>
+
+ISC_LANG_BEGINDECLS
+
+typedef enum {
+ isc_assertiontype_require,
+ isc_assertiontype_ensure,
+ isc_assertiontype_insist,
+ isc_assertiontype_invariant
+} isc_assertiontype_t;
+
+typedef void (*isc_assertioncallback_t)(const char *, int, isc_assertiontype_t,
+ const char *);
+
+LIBISC_EXTERNAL_DATA extern isc_assertioncallback_t isc_assertion_failed;
+
+void
+isc_assertion_setcallback(isc_assertioncallback_t);
+
+const char *
+isc_assertion_typetotext(isc_assertiontype_t type);
+
+#ifdef ISC_CHECK_ALL
+#define ISC_CHECK_REQUIRE 1
+#define ISC_CHECK_ENSURE 1
+#define ISC_CHECK_INSIST 1
+#define ISC_CHECK_INVARIANT 1
+#endif
+
+#ifdef ISC_CHECK_NONE
+#define ISC_CHECK_REQUIRE 0
+#define ISC_CHECK_ENSURE 0
+#define ISC_CHECK_INSIST 0
+#define ISC_CHECK_INVARIANT 0
+#endif
+
+#ifndef ISC_CHECK_REQUIRE
+#define ISC_CHECK_REQUIRE 1
+#endif
+
+#ifndef ISC_CHECK_ENSURE
+#define ISC_CHECK_ENSURE 1
+#endif
+
+#ifndef ISC_CHECK_INSIST
+#define ISC_CHECK_INSIST 1
+#endif
+
+#ifndef ISC_CHECK_INVARIANT
+#define ISC_CHECK_INVARIANT 1
+#endif
+
+#if ISC_CHECK_REQUIRE != 0
+#define ISC_REQUIRE(cond) \
+ ((void) ((cond) || \
+ ((isc_assertion_failed)(__FILE__, __LINE__, \
+ isc_assertiontype_require, \
+ #cond), 0)))
+#else
+#define ISC_REQUIRE(cond) ((void) 0)
+#endif /* ISC_CHECK_REQUIRE */
+
+#if ISC_CHECK_ENSURE != 0
+#define ISC_ENSURE(cond) \
+ ((void) ((cond) || \
+ ((isc_assertion_failed)(__FILE__, __LINE__, \
+ isc_assertiontype_ensure, \
+ #cond), 0)))
+#else
+#define ISC_ENSURE(cond) ((void) 0)
+#endif /* ISC_CHECK_ENSURE */
+
+#if ISC_CHECK_INSIST != 0
+#define ISC_INSIST(cond) \
+ ((void) ((cond) || \
+ ((isc_assertion_failed)(__FILE__, __LINE__, \
+ isc_assertiontype_insist, \
+ #cond), 0)))
+#else
+#define ISC_INSIST(cond) ((void) 0)
+#endif /* ISC_CHECK_INSIST */
+
+#if ISC_CHECK_INVARIANT != 0
+#define ISC_INVARIANT(cond) \
+ ((void) ((cond) || \
+ ((isc_assertion_failed)(__FILE__, __LINE__, \
+ isc_assertiontype_invariant, \
+ #cond), 0)))
+#else
+#define ISC_INVARIANT(cond) ((void) 0)
+#endif /* ISC_CHECK_INVARIANT */
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_ASSERTIONS_H */
diff --git a/contrib/ntp/include/isc/boolean.h b/contrib/ntp/include/isc/boolean.h
new file mode 100644
index 000000000000..d10007b5802a
--- /dev/null
+++ b/contrib/ntp/include/isc/boolean.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 1998-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: boolean.h,v 1.12 2001/01/09 21:56:45 bwelling Exp $ */
+
+#ifndef ISC_BOOLEAN_H
+#define ISC_BOOLEAN_H 1
+
+typedef enum { isc_boolean_false = 0, isc_boolean_true = 1 } isc_boolean_t;
+
+#define ISC_FALSE isc_boolean_false
+#define ISC_TRUE isc_boolean_true
+#define ISC_TF(x) ((x) ? ISC_TRUE : ISC_FALSE)
+
+#endif /* ISC_BOOLEAN_H */
diff --git a/contrib/ntp/include/isc/error.h b/contrib/ntp/include/isc/error.h
new file mode 100644
index 000000000000..1dc07748c21d
--- /dev/null
+++ b/contrib/ntp/include/isc/error.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 1998-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: error.h,v 1.13 2001/01/09 21:56:51 bwelling Exp $ */
+
+#ifndef ISC_ERROR_H
+#define ISC_ERROR_H 1
+
+#include <stdarg.h>
+
+#include <isc/formatcheck.h>
+#include <isc/lang.h>
+
+ISC_LANG_BEGINDECLS
+
+typedef void (*isc_errorcallback_t)(const char *, int, const char *, va_list);
+
+void
+isc_error_setunexpected(isc_errorcallback_t);
+
+void
+isc_error_setfatal(isc_errorcallback_t);
+
+void
+isc_error_unexpected(const char *, int, const char *, ...)
+ ISC_FORMAT_PRINTF(3, 4);
+
+void
+isc_error_fatal(const char *, int, const char *, ...)
+ ISC_FORMAT_PRINTF(3, 4);
+
+void
+isc_error_runtimecheck(const char *, int, const char *);
+
+#define ISC_ERROR_RUNTIMECHECK(cond) \
+ ((void) ((cond) || \
+ ((isc_error_runtimecheck)(__FILE__, __LINE__, #cond), 0)))
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_ERROR_H */
diff --git a/contrib/ntp/include/isc/formatcheck.h b/contrib/ntp/include/isc/formatcheck.h
new file mode 100644
index 000000000000..e9b91698e979
--- /dev/null
+++ b/contrib/ntp/include/isc/formatcheck.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2000, 2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: formatcheck.h,v 1.6 2001/01/09 21:56:55 bwelling Exp $ */
+
+#ifndef ISC_FORMATCHECK_H
+#define ISC_FORMATCHECK_H 1
+
+/*
+ * fmt is the location of the format string parameter.
+ * args is the location of the first argument (or 0 for no argument checking).
+ * Note: the first parameter is 1, not 0.
+ */
+#ifdef __GNUC__
+#define ISC_FORMAT_PRINTF(fmt, args) __attribute__((__format__(__printf__, fmt, args)))
+#else
+#define ISC_FORMAT_PRINTF(fmt, args)
+#endif
+
+#endif /* ISC_FORMATCHECK_H */
diff --git a/contrib/ntp/include/isc/int.h b/contrib/ntp/include/isc/int.h
new file mode 100644
index 000000000000..d30e6dcc6290
--- /dev/null
+++ b/contrib/ntp/include/isc/int.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: int.h,v 1.11 2001/01/09 21:58:39 bwelling Exp $ */
+
+#ifndef ISC_INT_H
+#define ISC_INT_H 1
+
+typedef char isc_int8_t;
+typedef unsigned char isc_uint8_t;
+typedef short isc_int16_t;
+typedef unsigned short isc_uint16_t;
+typedef int isc_int32_t;
+typedef unsigned int isc_uint32_t;
+typedef long long isc_int64_t;
+typedef unsigned long long isc_uint64_t;
+
+#define ISC_INT8_MIN -128
+#define ISC_INT8_MAX 127
+#define ISC_UINT8_MAX 255
+
+#define ISC_INT16_MIN -32768
+#define ISC_INT16_MAX 32767
+#define ISC_UINT16_MAX 65535
+
+/*
+ * Note that "int" is 32 bits on all currently supported Unix-like operating
+ * systems, but "long" can be either 32 bits or 64 bits, thus the 32 bit
+ * constants are not qualified with "L".
+ */
+#define ISC_INT32_MIN -2147483648
+#define ISC_INT32_MAX 2147483647
+#define ISC_UINT32_MAX 4294967295U
+
+#define ISC_INT64_MIN -9223372036854775808LL
+#define ISC_INT64_MAX 9223372036854775807LL
+#define ISC_UINT64_MAX 18446744073709551615ULL
+
+#endif /* ISC_INT_H */
diff --git a/contrib/ntp/include/isc/interfaceiter.h b/contrib/ntp/include/isc/interfaceiter.h
new file mode 100644
index 000000000000..fbd1b8224615
--- /dev/null
+++ b/contrib/ntp/include/isc/interfaceiter.h
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: interfaceiter.h,v 1.10 2001/01/09 21:57:01 bwelling Exp $ */
+
+#ifndef ISC_INTERFACEITER_H
+#define ISC_INTERFACEITER_H 1
+
+/*****
+ ***** Module Info
+ *****/
+
+/*
+ * Interface iterator
+ *
+ * Iterate over the list of network interfaces.
+ *
+ * Interfaces whose address family is not supported are ignored and never
+ * returned by the iterator. Interfaces whose netmask, interface flags,
+ * or similar cannot be obtained are also ignored, and the failure is logged.
+ *
+ * Standards:
+ * The API for scanning varies greatly among operating systems.
+ * This module attempts to hide the differences.
+ */
+
+/***
+ *** Imports
+ ***/
+
+#include <isc/lang.h>
+#include <isc/netaddr.h>
+#include <isc/types.h>
+
+/*
+ * Public structure describing a network interface.
+ */
+
+struct isc_interface {
+ char name[32]; /* Interface name, null-terminated. */
+ unsigned int af; /* Address family. */
+ isc_netaddr_t address; /* Local address. */
+ isc_netaddr_t netmask; /* Network mask. */
+ isc_netaddr_t broadcast; /* Broadcast address. */
+ isc_netaddr_t dstaddress; /* Destination address
+ (point-to-point only). */
+ isc_uint32_t flags; /* Flags; see below. */
+};
+
+/* Interface flags. */
+
+#define INTERFACE_F_UP 0x00000001U /* Interface is up */
+#define INTERFACE_F_POINTTOPOINT 0x00000002U /*this is point-to-point interface*/
+#define INTERFACE_F_LOOPBACK 0x00000004U /* this is loopback interface */
+#define INTERFACE_F_BROADCAST 0x00000008U /* Broadcast is supported */
+#define INTERFACE_F_MULTICAST 0x00000010U /* multicast is supported */
+
+/***
+ *** Functions
+ ***/
+
+ISC_LANG_BEGINDECLS
+
+isc_result_t
+isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp);
+/*
+ * Create an iterator for traversing the operating system's list
+ * of network interfaces.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_NOMEMORY
+ * Various network-related errors
+ */
+
+isc_result_t
+isc_interfaceiter_first(isc_interfaceiter_t *iter);
+/*
+ * Position the iterator on the first interface.
+ *
+ * Returns:
+ * ISC_R_SUCCESS Success.
+ * ISC_R_NOMORE There are no interfaces.
+ */
+
+isc_result_t
+isc_interfaceiter_current(isc_interfaceiter_t *iter,
+ isc_interface_t *ifdata);
+/*
+ * Get information about the interface the iterator is currently
+ * positioned at and store it at *ifdata.
+ *
+ * Requires:
+ * The iterator has been successfully positioned using
+ * isc_interface_iter_first() / isc_interface_iter_next().
+ *
+ * Returns:
+ * ISC_R_SUCCESS Success.
+ */
+
+isc_result_t
+isc_interfaceiter_next(isc_interfaceiter_t *iter);
+/*
+ * Position the iterator on the next interface.
+ *
+ * Requires:
+ * The iterator has been successfully positioned using
+ * isc_interface_iter_first() / isc_interface_iter_next().
+ *
+ * Returns:
+ * ISC_R_SUCCESS Success.
+ * ISC_R_NOMORE There are no more interfaces.
+ */
+
+void
+isc_interfaceiter_destroy(isc_interfaceiter_t **iterp);
+/*
+ * Destroy the iterator.
+ */
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_INTERFACEITER_H */
diff --git a/contrib/ntp/include/isc/ipv6.h b/contrib/ntp/include/isc/ipv6.h
new file mode 100644
index 000000000000..18893b7003ce
--- /dev/null
+++ b/contrib/ntp/include/isc/ipv6.h
@@ -0,0 +1,153 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: ipv6.h,v 1.19 2002/04/03 06:38:33 marka Exp $ */
+
+#ifndef ISC_IPV6_H
+#define ISC_IPV6_H 1
+
+/*
+ * Also define LWRES_IPV6_H to keep it from being included if liblwres is
+ * being used, or redefinition errors will occur.
+ */
+#define LWRES_IPV6_H 1
+
+/*****
+ ***** Module Info
+ *****/
+
+/*
+ * IPv6 definitions for systems which do not support IPv6.
+ *
+ * MP:
+ * No impact.
+ *
+ * Reliability:
+ * No anticipated impact.
+ *
+ * Resources:
+ * N/A.
+ *
+ * Security:
+ * No anticipated impact.
+ *
+ * Standards:
+ * RFC 2553.
+ */
+
+/***
+ *** Imports.
+ ***/
+
+#include <isc/int.h>
+#include <isc/platform.h>
+
+/*
+ * We probably don't need this on NTP
+ */
+#ifdef ISC_ONLY_IPV6
+/***
+ *** Types.
+ ***/
+
+struct in6_addr {
+ union {
+ isc_uint8_t _S6_u8[16];
+ isc_uint16_t _S6_u16[8];
+ isc_uint32_t _S6_u32[4];
+ } _S6_un;
+};
+#define s6_addr _S6_un._S6_u8
+#define s6_addr8 _S6_un._S6_u8
+#define s6_addr16 _S6_un._S6_u16
+#define s6_addr32 _S6_un._S6_u32
+
+#define IN6ADDR_ANY_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}}
+#define IN6ADDR_LOOPBACK_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}}
+
+LIBISC_EXTERNAL_DATA extern const struct in6_addr in6addr_any;
+LIBISC_EXTERNAL_DATA extern const struct in6_addr in6addr_loopback;
+
+struct sockaddr_in6 {
+#ifdef ISC_PLATFORM_HAVESALEN
+ isc_uint8_t sin6_len;
+ isc_uint8_t sin6_family;
+#else
+ isc_uint16_t sin6_family;
+#endif
+ isc_uint16_t sin6_port;
+ isc_uint32_t sin6_flowinfo;
+ struct in6_addr sin6_addr;
+ isc_uint32_t sin6_scope_id;
+};
+
+#ifdef ISC_PLATFORM_HAVESALEN
+#define SIN6_LEN 1
+#endif
+
+/*
+ * Unspecified
+ */
+#define IN6_IS_ADDR_UNSPECIFIED(a) \
+ (((a)->s6_addr32[0] == 0) && \
+ ((a)->s6_addr32[1] == 0) && \
+ ((a)->s6_addr32[2] == 0) && \
+ ((a)->s6_addr32[3] == 0))
+
+/*
+ * Loopback
+ */
+#define IN6_IS_ADDR_LOOPBACK(a) \
+ (((a)->s6_addr32[0] == 0) && \
+ ((a)->s6_addr32[1] == 0) && \
+ ((a)->s6_addr32[2] == 0) && \
+ ((a)->s6_addr32[3] == htonl(1)))
+
+/*
+ * IPv4 compatible
+ */
+#define IN6_IS_ADDR_V4COMPAT(a) \
+ (((a)->s6_addr32[0] == 0) && \
+ ((a)->s6_addr32[1] == 0) && \
+ ((a)->s6_addr32[2] == 0) && \
+ ((a)->s6_addr32[3] != 0) && \
+ ((a)->s6_addr32[3] != htonl(1)))
+
+/*
+ * Mapped
+ */
+#define IN6_IS_ADDR_V4MAPPED(a) \
+ (((a)->s6_addr32[0] == 0) && \
+ ((a)->s6_addr32[1] == 0) && \
+ ((a)->s6_addr32[2] == htonl(0x0000ffff)))
+
+/*
+ * Multicast
+ */
+#define IN6_IS_ADDR_MULTICAST(a) \
+ ((a)->s6_addr8[0] == 0xffU)
+
+/*
+ * Unicast link / site local.
+ */
+#define IN6_IS_ADDR_LINKLOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
+#define IN6_IS_ADDR_SITELOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
+
+#endif /* ISC_ONLY_IPV6 */
+#endif /* ISC_IPV6_H */
diff --git a/contrib/ntp/include/isc/lang.h b/contrib/ntp/include/isc/lang.h
new file mode 100644
index 000000000000..b3ba5908fe14
--- /dev/null
+++ b/contrib/ntp/include/isc/lang.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: lang.h,v 1.6 2001/01/09 21:57:03 bwelling Exp $ */
+
+#ifndef ISC_LANG_H
+#define ISC_LANG_H 1
+
+#ifdef __cplusplus
+#define ISC_LANG_BEGINDECLS extern "C" {
+#define ISC_LANG_ENDDECLS }
+#else
+#define ISC_LANG_BEGINDECLS
+#define ISC_LANG_ENDDECLS
+#endif
+
+#endif /* ISC_LANG_H */
diff --git a/contrib/ntp/include/isc/lib.h b/contrib/ntp/include/isc/lib.h
new file mode 100644
index 000000000000..7feef43c5ebe
--- /dev/null
+++ b/contrib/ntp/include/isc/lib.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: lib.h,v 1.7 2001/11/19 03:08:25 mayer Exp $ */
+
+#ifndef ISC_LIB_H
+#define ISC_LIB_H 1
+
+#include <isc/types.h>
+#include <isc/lang.h>
+
+ISC_LANG_BEGINDECLS
+
+LIBISC_EXTERNAL_DATA extern isc_msgcat_t *isc_msgcat;
+
+void
+isc_lib_initmsgcat(void);
+/*
+ * Initialize the ISC library's message catalog, isc_msgcat, if it
+ * has not already been initialized.
+ */
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_LIB_H */
diff --git a/contrib/ntp/include/isc/list.h b/contrib/ntp/include/isc/list.h
new file mode 100644
index 000000000000..d0ae7a91a6f3
--- /dev/null
+++ b/contrib/ntp/include/isc/list.h
@@ -0,0 +1,180 @@
+/*
+ * Copyright (C) 1997-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: list.h,v 1.19 2002/05/09 07:09:30 marka Exp $ */
+
+#ifndef ISC_LIST_H
+#define ISC_LIST_H 1
+#include <isc/boolean.h>
+#include <isc/assertions.h>
+
+#ifdef ISC_LIST_CHECKINIT
+#define ISC_LINK_INSIST(x) ISC_INSIST(x)
+#else
+#define ISC_LINK_INSIST(x)
+#endif
+
+#define ISC_LIST(type) struct { type *head, *tail; }
+#define ISC_LIST_INIT(list) \
+ do { (list).head = NULL; (list).tail = NULL; } while (0)
+
+#define ISC_LINK(type) struct { type *prev, *next; }
+#define ISC_LINK_INIT_TYPE(elt, link, type) \
+ do { \
+ (elt)->link.prev = (type *)(-1); \
+ (elt)->link.next = (type *)(-1); \
+ } while (0)
+#define ISC_LINK_INIT(elt, link) \
+ ISC_LINK_INIT_TYPE(elt, link, void)
+#define ISC_LINK_LINKED(elt, link) ((void *)((elt)->link.prev) != (void *)(-1))
+
+#define ISC_LIST_HEAD(list) ((list).head)
+#define ISC_LIST_TAIL(list) ((list).tail)
+#define ISC_LIST_EMPTY(list) ISC_TF((list).head == NULL)
+
+#define __ISC_LIST_PREPENDUNSAFE(list, elt, link) \
+ do { \
+ if ((list).head != NULL) \
+ (list).head->link.prev = (elt); \
+ else \
+ (list).tail = (elt); \
+ (elt)->link.prev = NULL; \
+ (elt)->link.next = (list).head; \
+ (list).head = (elt); \
+ } while (0)
+
+#define ISC_LIST_PREPEND(list, elt, link) \
+ do { \
+ ISC_LINK_INSIST(!ISC_LINK_LINKED(elt, link)); \
+ __ISC_LIST_PREPENDUNSAFE(list, elt, link); \
+ } while (0)
+
+#define ISC_LIST_INITANDPREPEND(list, elt, link) \
+ __ISC_LIST_PREPENDUNSAFE(list, elt, link)
+
+#define __ISC_LIST_APPENDUNSAFE(list, elt, link) \
+ do { \
+ if ((list).tail != NULL) \
+ (list).tail->link.next = (elt); \
+ else \
+ (list).head = (elt); \
+ (elt)->link.prev = (list).tail; \
+ (elt)->link.next = NULL; \
+ (list).tail = (elt); \
+ } while (0)
+
+#define ISC_LIST_APPEND(list, elt, link) \
+ do { \
+ ISC_LINK_INSIST(!ISC_LINK_LINKED(elt, link)); \
+ __ISC_LIST_APPENDUNSAFE(list, elt, link); \
+ } while (0)
+
+#define ISC_LIST_INITANDAPPEND(list, elt, link) \
+ __ISC_LIST_APPENDUNSAFE(list, elt, link)
+
+#define __ISC_LIST_UNLINKUNSAFE_TYPE(list, elt, link, type) \
+ do { \
+ if ((elt)->link.next != NULL) \
+ (elt)->link.next->link.prev = (elt)->link.prev; \
+ else \
+ (list).tail = (elt)->link.prev; \
+ if ((elt)->link.prev != NULL) \
+ (elt)->link.prev->link.next = (elt)->link.next; \
+ else \
+ (list).head = (elt)->link.next; \
+ (elt)->link.prev = (type *)(-1); \
+ (elt)->link.next = (type *)(-1); \
+ } while (0)
+
+#define __ISC_LIST_UNLINKUNSAFE(list, elt, link) \
+ __ISC_LIST_UNLINKUNSAFE_TYPE(list, elt, link, void)
+
+#define ISC_LIST_UNLINK_TYPE(list, elt, link, type) \
+ do { \
+ ISC_LINK_INSIST(ISC_LINK_LINKED(elt, link)); \
+ __ISC_LIST_UNLINKUNSAFE_TYPE(list, elt, link, type); \
+ } while (0)
+#define ISC_LIST_UNLINK(list, elt, link) \
+ ISC_LIST_UNLINK_TYPE(list, elt, link, void)
+
+#define ISC_LIST_PREV(elt, link) ((elt)->link.prev)
+#define ISC_LIST_NEXT(elt, link) ((elt)->link.next)
+
+#define __ISC_LIST_INSERTBEFOREUNSAFE(list, before, elt, link) \
+ do { \
+ if ((before)->link.prev == NULL) \
+ ISC_LIST_PREPEND(list, elt, link); \
+ else { \
+ (elt)->link.prev = (before)->link.prev; \
+ (before)->link.prev = (elt); \
+ (elt)->link.prev->link.next = (elt); \
+ (elt)->link.next = (before); \
+ } \
+ } while (0)
+
+#define ISC_LIST_INSERTBEFORE(list, before, elt, link) \
+ do { \
+ ISC_LINK_INSIST(ISC_LINK_LINKED(before, link)); \
+ ISC_LINK_INSIST(!ISC_LINK_LINKED(elt, link)); \
+ __ISC_LIST_INSERTBEFOREUNSAFE(list, before, elt, link); \
+ } while (0)
+
+#define __ISC_LIST_INSERTAFTERUNSAFE(list, after, elt, link) \
+ do { \
+ if ((after)->link.next == NULL) \
+ ISC_LIST_APPEND(list, elt, link); \
+ else { \
+ (elt)->link.next = (after)->link.next; \
+ (after)->link.next = (elt); \
+ (elt)->link.next->link.prev = (elt); \
+ (elt)->link.prev = (after); \
+ } \
+ } while (0)
+
+#define ISC_LIST_INSERTAFTER(list, after, elt, link) \
+ do { \
+ ISC_LINK_INSIST(ISC_LINK_LINKED(after, link)); \
+ ISC_LINK_INSIST(!ISC_LINK_LINKED(elt, link)); \
+ __ISC_LIST_INSERTAFTERUNSAFE(list, after, elt, link); \
+ } while (0)
+
+#define ISC_LIST_APPENDLIST(list1, list2, link) \
+ do { \
+ if (ISC_LIST_EMPTY(list1)) \
+ (list1) = (list2); \
+ else if (!ISC_LIST_EMPTY(list2)) { \
+ (list1).tail->link.next = (list2).head; \
+ (list2).head->link.prev = (list1).tail; \
+ (list1).tail = (list2).tail; \
+ } \
+ (list2).head = NULL; \
+ (list2).tail = NULL; \
+ } while (0)
+
+#define ISC_LIST_ENQUEUE(list, elt, link) ISC_LIST_APPEND(list, elt, link)
+#define __ISC_LIST_ENQUEUEUNSAFE(list, elt, link) \
+ __ISC_LIST_APPENDUNSAFE(list, elt, link)
+#define ISC_LIST_DEQUEUE(list, elt, link) \
+ ISC_LIST_UNLINK_TYPE(list, elt, link, void)
+#define ISC_LIST_DEQUEUE_TYPE(list, elt, link, type) \
+ ISC_LIST_UNLINK_TYPE(list, elt, link, type)
+#define __ISC_LIST_DEQUEUEUNSAFE(list, elt, link) \
+ __ISC_LIST_UNLINKUNSAFE_TYPE(list, elt, link, void)
+#define __ISC_LIST_DEQUEUEUNSAFE_TYPE(list, elt, link, type) \
+ __ISC_LIST_UNLINKUNSAFE_TYPE(list, elt, link, type)
+
+#endif /* ISC_LIST_H */
diff --git a/contrib/ntp/include/isc/magic.h b/contrib/ntp/include/isc/magic.h
new file mode 100644
index 000000000000..ff3df24bdfc8
--- /dev/null
+++ b/contrib/ntp/include/isc/magic.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: magic.h,v 1.11 2001/01/09 21:57:10 bwelling Exp $ */
+
+#ifndef ISC_MAGIC_H
+#define ISC_MAGIC_H 1
+
+typedef struct {
+ unsigned int magic;
+} isc__magic_t;
+
+
+/*
+ * To use this macro the magic number MUST be the first thing in the
+ * structure, and MUST be of type "unsigned int".
+ *
+ * The intent of this is to allow magic numbers to be checked even though
+ * the object is otherwise opaque.
+ */
+#define ISC_MAGIC_VALID(a,b) (((a) != NULL) && \
+ (((const isc__magic_t *)(a))->magic == (b)))
+
+#define ISC_MAGIC(a, b, c, d) ((a) << 24 | (b) << 16 | (c) << 8 | (d))
+
+#endif /* ISC_MAGIC_H */
diff --git a/contrib/ntp/include/isc/mem.h b/contrib/ntp/include/isc/mem.h
new file mode 100644
index 000000000000..f8e73d0e73d8
--- /dev/null
+++ b/contrib/ntp/include/isc/mem.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 1997-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: mem.h,v 1.58 2001/09/07 00:51:51 marka Exp $ */
+
+#ifndef ISC_MEM_H
+#define ISC_MEM_H 1
+
+#include <stdio.h>
+#include <isc/types.h>
+
+void *
+isc_mem_get(isc_mem_t *, size_t);
+void
+isc_mem_put(isc_mem_t *, void *, size_t);
+
+#endif /* ISC_MEM_H */
diff --git a/contrib/ntp/include/isc/msgcat.h b/contrib/ntp/include/isc/msgcat.h
new file mode 100644
index 000000000000..d2bf1e1622d9
--- /dev/null
+++ b/contrib/ntp/include/isc/msgcat.h
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: msgcat.h,v 1.8 2001/01/09 21:57:13 bwelling Exp $ */
+
+#ifndef ISC_MSGCAT_H
+#define ISC_MSGCAT_H 1
+
+/*****
+ ***** Module Info
+ *****/
+
+/*
+ * ISC Message Catalog
+ *
+ * Message catalogs aid internationalization of applications by allowing
+ * messages to be retrieved from locale-specific files instead of
+ * hardwiring them into the application. This allows translations of
+ * messages appropriate to the locale to be supplied without recompiling
+ * the application.
+ *
+ * Notes:
+ * It's very important that message catalogs work, even if only the
+ * default_text can be used.
+ *
+ * MP:
+ * The caller must ensure appropriate synchronization of
+ * isc_msgcat_open() and isc_msgcat_close(). isc_msgcat_get()
+ * ensures appropriate synchronization.
+ *
+ * Reliability:
+ * No anticipated impact.
+ *
+ * Resources:
+ * <TBS>
+ *
+ * Security:
+ * No anticipated impact.
+ *
+ * Standards:
+ * None.
+ */
+
+/*****
+ ***** Imports
+ *****/
+
+#include <isc/lang.h>
+#include <isc/types.h>
+
+ISC_LANG_BEGINDECLS
+
+/*****
+ ***** Methods
+ *****/
+
+void
+isc_msgcat_open(const char *name, isc_msgcat_t **msgcatp);
+/*
+ * Open a message catalog.
+ *
+ * Notes:
+ *
+ * If memory cannot be allocated or other failures occur, *msgcatp
+ * will be set to NULL. If a NULL msgcat is given to isc_msgcat_get(),
+ * the default_text will be returned, ensuring that some message text
+ * will be available, no matter what's going wrong.
+ *
+ * Requires:
+ *
+ * 'name' is a valid string.
+ *
+ * msgcatp != NULL && *msgcatp == NULL
+ */
+
+void
+isc_msgcat_close(isc_msgcat_t **msgcatp);
+/*
+ * Close a message catalog.
+ *
+ * Notes:
+ *
+ * Any string pointers returned by prior calls to isc_msgcat_get() are
+ * invalid after isc_msgcat_close() has been called and must not be
+ * used.
+ *
+ * Requires:
+ *
+ * *msgcatp is a valid message catalog or is NULL.
+ *
+ * Ensures:
+ *
+ * All resources associated with the message catalog are released.
+ *
+ * *msgcatp == NULL
+ */
+
+const char *
+isc_msgcat_get(isc_msgcat_t *msgcat, int set, int message,
+ const char *default_text);
+/*
+ * Get message 'message' from message set 'set' in 'msgcat'. If it
+ * is not available, use 'default_text'.
+ *
+ * Requires:
+ *
+ * 'msgcat' is a valid message catalog or is NULL.
+ *
+ * set > 0
+ *
+ * message > 0
+ *
+ * 'default_text' is a valid string.
+ */
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_MSGCAT_H */
diff --git a/contrib/ntp/include/isc/msgs.h b/contrib/ntp/include/isc/msgs.h
new file mode 100644
index 000000000000..b166199e8f0d
--- /dev/null
+++ b/contrib/ntp/include/isc/msgs.h
@@ -0,0 +1,181 @@
+/*
+ * Copyright (C) 2000, 2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: msgs.h,v 1.7 2002/05/27 00:40:18 marka Exp $ */
+
+#ifndef ISC_MSGS_H
+#define ISC_MSGS_H 1
+
+#include <isc/lib.h> /* Provide isc_msgcat global variable. */
+#include <isc/msgcat.h> /* Provide isc_msgcat_*() functions. */
+
+/*
+ * Message sets, named per source file, excepting "GENERAL".
+ * IMPORTANT: The original list is alphabetical, but any new sets must
+ * be added to the end.
+ */
+#define ISC_MSGSET_GENERAL 1
+/* ISC_RESULT_RESULTSET 2 */ /* XXX */
+/* ISC_RESULT_UNAVAILABLESET 3 */ /* XXX */
+#define ISC_MSGSET_APP 4
+#define ISC_MSGSET_COMMANDLINE 5
+#define ISC_MSGSET_ENTROPY 6
+#define ISC_MSGSET_IFITERIOCTL 7
+#define ISC_MSGSET_IFITERSYSCTL 8
+#define ISC_MSGSET_LEX 9
+#define ISC_MSGSET_LOG 10
+#define ISC_MSGSET_MEM 11
+#define ISC_MSGSET_NETADDR 12
+#define ISC_MSGSET_PRINT 13
+#define ISC_MSGSET_RESULT 14
+#define ISC_MSGSET_RWLOCK 15
+#define ISC_MSGSET_SOCKADDR 16
+#define ISC_MSGSET_SOCKET 17
+#define ISC_MSGSET_TASK 18
+#define ISC_MSGSET_TIMER 19
+#define ISC_MSGSET_UTIL 20
+
+/*
+ * Message numbers. They are only required to be unique per message set,
+ * but are unique throughout the entire catalog to not be as confusing when
+ * debugging.
+ *
+ * The initial numbering was done by multiply by 100 the set number the
+ * message appears in then adding the incremental message number.
+ */
+#define ISC_MSG_FAILED 101 /* "failed" */
+#define ISC_MSG_SUCCEEDED 102 /* Compatible with "failed" */
+#define ISC_MSG_SUCCESS 103 /* More usual way to say "success" */
+#define ISC_MSG_STARTING 104 /* As in "daemon: starting" */
+#define ISC_MSG_STOPING 105 /* As in "daemon: stopping" */
+#define ISC_MSG_ENTERING 106 /* As in "some_subr: entering" */
+#define ISC_MSG_EXITING 107 /* As in "some_subr: exiting" */
+#define ISC_MSG_CALLING 108 /* As in "calling some_subr()" */
+#define ISC_MSG_RETURNED 109 /* As in "some_subr: returned <foo>" */
+#define ISC_MSG_FATALERROR 110 /* "fatal error" */
+#define ISC_MSG_SHUTTINGDOWN 111 /* "shutting down" */
+#define ISC_MSG_RUNNING 112 /* "running" */
+#define ISC_MSG_WAIT 113 /* "wait" */
+#define ISC_MSG_WAITUNTIL 114 /* "waituntil" */
+
+#define ISC_MSG_SIGNALSETUP 201 /* "handle_signal() %d setup: %s" */
+
+#define ISC_MSG_ILLEGALOPT 301 /* "illegal option" */
+#define ISC_MSG_OPTNEEDARG 302 /* "option requires an argument" */
+
+#define ISC_MSG_ENTROPYSTATS 401 /* "Entropy pool %p: refcnt %u ..." */
+
+#define ISC_MSG_MAKESCANSOCKET 501 /* "making interface scan socket: %s" */
+#define ISC_MSG_GETIFCONFIG 502 /* "get interface configuration: %s" */
+#define ISC_MSG_BUFFERMAX 503 /* "... maximum buffer size exceeded" */
+#define ISC_MSG_GETDESTADDR 504 /* "%s: getting destination address: %s" */
+#define ISC_MSG_GETNETMASK 505 /* "%s: getting netmask: %s" */
+
+#define ISC_MSG_GETIFLISTSIZE 601 /* "getting interface list size: ..." */
+#define ISC_MSG_GETIFLIST 602 /* "getting interface list: ..." */
+#define ISC_MSG_UNEXPECTEDTYPE 603 /* "... unexpected ... message type" */
+
+#define ISC_MSG_UNEXPECTEDSTATE 701 /* "Unexpected state %d" */
+
+#define ISC_MSG_BADTIME 801 /* "Bad 00 99:99:99.999 " */
+#define ISC_MSG_LEVEL 802 /* "level %d: " */
+
+#define ISC_MSG_ADDTRACE 901 /* "add %p size %u " */
+#define ISC_MSG_DELTRACE 902 /* "del %p size %u " */
+#define ISC_MSG_POOLSTATS 903 /* "[Pool statistics]\n" */
+#define ISC_MSG_POOLNAME 904 /* "name" */
+#define ISC_MSG_POOLSIZE 905 /* "size" */
+#define ISC_MSG_POOLMAXALLOC 906 /* "maxalloc" */
+#define ISC_MSG_POOLALLOCATED 907 /* "allocated" */
+#define ISC_MSG_POOLFREECOUNT 908 /* "freecount" */
+#define ISC_MSG_POOLFREEMAX 909 /* "freemax" */
+#define ISC_MSG_POOLFILLCOUNT 910 /* "fillcount" */
+#define ISC_MSG_POOLGETS 911 /* "gets" */
+#define ISC_MSG_DUMPALLOC 912 /* "DUMP OF ALL OUTSTANDING MEMORY ..." */
+#define ISC_MSG_NONE 913 /* "\tNone.\n" */
+#define ISC_MSG_PTRFILELINE 914 /* "\tptr %p file %s line %u\n" */
+
+#define ISC_MSG_UNKNOWNADDR 1001 /* "<unknown address, family %u>" */
+
+#define ISC_MSG_NOLONGDBL 1104 /* "long doubles are not supported" */
+
+#define ISC_MSG_PRINTLOCK 1201 /* "rwlock %p thread %lu ..." */
+#define ISC_MSG_READ 1202 /* "read" */
+#define ISC_MSG_WRITE 1203 /* "write" */
+#define ISC_MSG_READING 1204 /* "reading" */
+#define ISC_MSG_WRITING 1205 /* "writing" */
+#define ISC_MSG_PRELOCK 1206 /* "prelock" */
+#define ISC_MSG_POSTLOCK 1207 /* "postlock" */
+#define ISC_MSG_PREUNLOCK 1208 /* "preunlock" */
+#define ISC_MSG_POSTUNLOCK 1209 /* "postunlock" */
+
+#define ISC_MSG_UNKNOWNFAMILY 1301 /* "unknown address family: %d" */
+
+#define ISC_MSG_WRITEFAILED 1401 /* "write() failed during watcher ..." */
+#define ISC_MSG_READFAILED 1402 /* "read() failed during watcher ... " */
+#define ISC_MSG_PROCESSCMSG 1403 /* "processing cmsg %p" */
+#define ISC_MSG_IFRECEIVED 1404 /* "interface received on ifindex %u" */
+#define ISC_MSG_SENDTODATA 1405 /* "sendto pktinfo data, ifindex %u" */
+#define ISC_MSG_DOIORECV 1406 /* "doio_recv: recvmsg(%d) %d bytes ..." */
+#define ISC_MSG_PKTRECV 1407 /* "packet received correctly" */
+#define ISC_MSG_DESTROYING 1408 /* "destroying" */
+#define ISC_MSG_CREATED 1409 /* "created" */
+#define ISC_MSG_ACCEPTLOCK 1410 /* "internal_accept called, locked ..." */
+#define ISC_MSG_ACCEPTEDCXN 1411 /* "accepted connection, new socket %p" */
+#define ISC_MSG_INTERNALRECV 1412 /* "internal_recv: task %p got event %p" */
+#define ISC_MSG_INTERNALSEND 1413 /* "internal_send: task %p got event %p" */
+#define ISC_MSG_WATCHERMSG 1414 /* "watcher got message %d" */
+#define ISC_MSG_SOCKETSREMAIN 1415 /* "sockets exist" */
+#define ISC_MSG_PKTINFOPROVIDED 1416 /* "pktinfo structure provided, ..." */
+#define ISC_MSG_BOUND 1417 /* "bound" */
+#define ISC_MSG_ACCEPTRETURNED 1418 /* accept() returned %d/%s */
+#define ISC_MSG_TOOMANYFDS 1419 /* %s: too many open file descriptors */
+#define ISC_MSG_ZEROPORT 1420 /* dropping source port zero packet */
+#define ISC_MSG_FILTER 1420 /* setsockopt(SO_ACCEPTFILTER): %s */
+
+#define ISC_MSG_AWAKE 1502 /* "awake" */
+#define ISC_MSG_WORKING 1503 /* "working" */
+#define ISC_MSG_EXECUTE 1504 /* "execute action" */
+#define ISC_MSG_EMPTY 1505 /* "empty" */
+#define ISC_MSG_DONE 1506 /* "done" */
+#define ISC_MSG_QUANTUM 1507 /* "quantum" */
+
+#define ISC_MSG_SCHEDULE 1601 /* "schedule" */
+#define ISC_MSG_SIGNALSCHED 1602 /* "signal (schedule)" */
+#define ISC_MSG_SIGNALDESCHED 1603 /* "signal (deschedule)" */
+#define ISC_MSG_SIGNALDESTROY 1604 /* "signal (destroy)" */
+#define ISC_MSG_IDLERESCHED 1605 /* "idle reschedule" */
+#define ISC_MSG_EVENTNOTALLOC 1606 /* "couldn't allocate event" */
+#define ISC_MSG_SCHEDFAIL 1607 /* "couldn't schedule timer: %u" */
+#define ISC_MSG_POSTING 1608 /* "posting" */
+#define ISC_MSG_WAKEUP 1609 /* "wakeup" */
+
+#define ISC_MSG_LOCK 1701 /* "LOCK" */
+#define ISC_MSG_LOCKING 1702 /* "LOCKING" */
+#define ISC_MSG_LOCKED 1703 /* "LOCKED" */
+#define ISC_MSG_UNLOCKED 1704 /* "UNLOCKED" */
+#define ISC_MSG_RWLOCK 1705 /* "RWLOCK" */
+#define ISC_MSG_RWLOCKED 1706 /* "RWLOCKED" */
+#define ISC_MSG_RWUNLOCK 1707 /* "RWUNLOCK" */
+#define ISC_MSG_BROADCAST 1708 /* "BROADCAST" */
+#define ISC_MSG_SIGNAL 1709 /* "SIGNAL" */
+#define ISC_MSG_UTILWAIT 1710 /* "WAIT" */
+#define ISC_MSG_WAITED 1711 /* "WAITED" */
+
+
+
+#endif /* ISC_MSGS_H */
diff --git a/contrib/ntp/include/isc/mutex.h b/contrib/ntp/include/isc/mutex.h
new file mode 100644
index 000000000000..fd6f3ec5ea1a
--- /dev/null
+++ b/contrib/ntp/include/isc/mutex.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2000, 2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: mutex.h,v 1.3 2001/01/09 21:57:55 bwelling Exp $ */
+
+#ifndef ISC_MUTEX_H
+#define ISC_MUTEX_H 1
+
+#include <isc/result.h> /* for ISC_R_ codes */
+
+typedef int isc_mutex_t;
+
+#define isc_mutex_init(mp) \
+ (*(mp) = 0, ISC_R_SUCCESS)
+#define isc_mutex_lock(mp) \
+ ((*(mp))++ == 0 ? ISC_R_SUCCESS : ISC_R_UNEXPECTED)
+#define isc_mutex_unlock(mp) \
+ (--(*(mp)) == 0 ? ISC_R_SUCCESS : ISC_R_UNEXPECTED)
+#define isc_mutex_trylock(mp) \
+ (*(mp) == 0 ? ((*(mp))++, ISC_R_SUCCESS) : ISC_R_LOCKBUSY)
+#define isc_mutex_destroy(mp) \
+ (*(mp) == 0 ? (*(mp) = -1, ISC_R_SUCCESS) : ISC_R_UNEXPECTED)
+#define isc_mutex_stats(fp)
+
+#endif /* ISC_MUTEX_H */
diff --git a/contrib/ntp/include/isc/net.h b/contrib/ntp/include/isc/net.h
new file mode 100644
index 000000000000..25924febca38
--- /dev/null
+++ b/contrib/ntp/include/isc/net.h
@@ -0,0 +1,284 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: net.h,v 1.34 2002/04/03 06:38:38 marka Exp $ */
+
+#ifndef ISC_NET_H
+#define ISC_NET_H 1
+
+/*****
+ ***** Module Info
+ *****/
+
+/*
+ * Basic Networking Types
+ *
+ * This module is responsible for defining the following basic networking
+ * types:
+ *
+ * struct in_addr
+ * struct in6_addr
+ * struct in6_pktinfo
+ * struct sockaddr
+ * struct sockaddr_in
+ * struct sockaddr_in6
+ * in_port_t
+ *
+ * It ensures that the AF_ and PF_ macros are defined.
+ *
+ * It declares ntoh[sl]() and hton[sl]().
+ *
+ * It declares inet_aton(), inet_ntop(), and inet_pton().
+ *
+ * It ensures that INADDR_LOOPBACK, INADDR_ANY, IN6ADDR_ANY_INIT,
+ * in6addr_any, and in6addr_loopback are available.
+ *
+ * It ensures that IN_MULTICAST() is available to check for multicast
+ * addresses.
+ *
+ * MP:
+ * No impact.
+ *
+ * Reliability:
+ * No anticipated impact.
+ *
+ * Resources:
+ * N/A.
+ *
+ * Security:
+ * No anticipated impact.
+ *
+ * Standards:
+ * BSD Socket API
+ * RFC 2553
+ */
+
+/***
+ *** Imports.
+ ***/
+#include <isc/platform.h>
+
+#include <sys/types.h>
+#include <sys/socket.h> /* Contractual promise. */
+
+#include <netinet/in.h> /* Contractual promise. */
+#include <arpa/inet.h> /* Contractual promise. */
+#ifdef ISC_PLATFORM_NEEDNETINETIN6H
+#include <netinet/in6.h> /* Required on UnixWare. */
+#endif
+#ifdef ISC_PLATFORM_NEEDNETINET6IN6H
+#include <netinet6/in6.h> /* Required on BSD/OS for in6_pktinfo. */
+#endif
+
+#ifndef ISC_PLATFORM_HAVEIPV6
+#include <isc/ipv6.h> /* Contractual promise. */
+#endif
+
+#include <isc/lang.h>
+#include <isc/types.h>
+
+#ifdef ISC_PLATFORM_HAVEINADDR6
+#define in6_addr in_addr6 /* Required for pre RFC2133 implementations. */
+#endif
+
+#ifdef ISC_PLATFORM_HAVEIPV6
+/*
+ * Required for some pre RFC2133 implementations.
+ * IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT were added in
+ * draft-ietf-ipngwg-bsd-api-04.txt or draft-ietf-ipngwg-bsd-api-05.txt.
+ * If 's6_addr' is defined then assume that there is a union and three
+ * levels otherwise assume two levels required.
+ */
+#ifndef IN6ADDR_ANY_INIT
+#ifdef s6_addr
+#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
+#else
+#define IN6ADDR_ANY_INIT { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } }
+#endif
+#endif
+
+#ifndef IN6ADDR_LOOPBACK_INIT
+#ifdef s6_addr
+#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
+#else
+#define IN6ADDR_LOOPBACK_INIT { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } }
+#endif
+#endif
+
+#ifndef IN6_IS_ADDR_V4MAPPED
+#define IN6_IS_ADDR_V4MAPPED(x) \
+ (memcmp((x)->s6_addr, in6addr_any.s6_addr, 10) == 0 && \
+ (x)->s6_addr[10] == 0xff && (x)->s6_addr[11] == 0xff)
+#endif
+
+#ifndef IN6_IS_ADDR_V4COMPAT
+#define IN6_IS_ADDR_V4COMPAT(x) \
+ (memcmp((x)->s6_addr, in6addr_any.s6_addr, 12) == 0 && \
+ ((x)->s6_addr[12] != 0 || (x)->s6_addr[13] != 0 || \
+ (x)->s6_addr[14] != 0 || \
+ ((x)->s6_addr[15] != 0 && (x)->s6_addr[15] != 1)))
+#endif
+
+#ifndef IN6_IS_ADDR_MULTICAST
+#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
+#endif
+
+#ifndef IN6_IS_ADDR_LINKLOCAL
+#define IN6_IS_ADDR_LINKLOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
+#endif
+
+#ifndef IN6_IS_ADDR_SITELOCAL
+#define IN6_IS_ADDR_SITELOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
+#endif
+
+
+#ifndef IN6_IS_ADDR_LOOPBACK
+#define IN6_IS_ADDR_LOOPBACK(x) \
+ (memcmp((x)->s6_addr, in6addr_loopback.s6_addr, 16) == 0)
+#endif
+#endif
+
+#ifndef AF_INET6
+#define AF_INET6 99
+#endif
+
+#ifndef PF_INET6
+#define PF_INET6 AF_INET6
+#endif
+
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK 0x7f000001UL
+#endif
+
+#if 0
+#ifndef ISC_PLATFORM_HAVEIN6PKTINFO
+struct in6_pktinfo {
+ struct in6_addr ipi6_addr; /* src/dst IPv6 address */
+ unsigned int ipi6_ifindex; /* send/recv interface index */
+};
+#endif
+#endif
+
+/*
+ * Cope with a missing in6addr_any and in6addr_loopback.
+ */
+#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
+extern const struct in6_addr isc_net_in6addrany;
+#define in6addr_any isc_net_in6addrany
+#endif
+
+#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
+extern const struct in6_addr isc_net_in6addrloop;
+#define in6addr_loopback isc_net_in6addrloop
+#endif
+
+/*
+ * Fix UnixWare 7.1.1's broken IN6_IS_ADDR_* definitions.
+ */
+#ifdef ISC_PLATFORM_FIXIN6ISADDR
+#undef IN6_IS_ADDR_GEOGRAPHIC
+#define IN6_IS_ADDR_GEOGRAPHIC(a) (((a)->S6_un.S6_l[0] & 0xE0) == 0x80)
+#undef IN6_IS_ADDR_IPX
+#define IN6_IS_ADDR_IPX(a) (((a)->S6_un.S6_l[0] & 0xFE) == 0x04)
+#undef IN6_IS_ADDR_LINKLOCAL
+#define IN6_IS_ADDR_LINKLOCAL(a) (((a)->S6_un.S6_l[0] & 0xC0FF) == 0x80FE)
+#undef IN6_IS_ADDR_MULTICAST
+#define IN6_IS_ADDR_MULTICAST(a) (((a)->S6_un.S6_l[0] & 0xFF) == 0xFF)
+#undef IN6_IS_ADDR_NSAP
+#define IN6_IS_ADDR_NSAP(a) (((a)->S6_un.S6_l[0] & 0xFE) == 0x02)
+#undef IN6_IS_ADDR_PROVIDER
+#define IN6_IS_ADDR_PROVIDER(a) (((a)->S6_un.S6_l[0] & 0xE0) == 0x40)
+#undef IN6_IS_ADDR_SITELOCAL
+#define IN6_IS_ADDR_SITELOCAL(a) (((a)->S6_un.S6_l[0] & 0xC0FF) == 0xC0FE)
+#endif /* ISC_PLATFORM_FIXIN6ISADDR */
+
+/*
+ * Ensure type in_port_t is defined.
+ */
+#ifdef ISC_PLATFORM_NEEDPORTT
+typedef isc_uint16_t in_port_t;
+#endif
+
+/*
+ * If this system does not have MSG_TRUNC (as returned from recvmsg())
+ * ISC_PLATFORM_RECVOVERFLOW will be defined. This will enable the MSG_TRUNC
+ * faking code in socket.c.
+ */
+#ifndef MSG_TRUNC
+#define ISC_PLATFORM_RECVOVERFLOW
+#endif
+
+#define ISC__IPADDR(x) ((isc_uint32_t)htonl((isc_uint32_t)(x)))
+
+#define ISC_IPADDR_ISMULTICAST(i) \
+ (((isc_uint32_t)(i) & ISC__IPADDR(0xf0000000)) \
+ == ISC__IPADDR(0xe0000000))
+
+/***
+ *** Functions.
+ ***/
+
+ISC_LANG_BEGINDECLS
+
+isc_result_t
+isc_net_probeipv4(void);
+/*
+ * Check if the system's kernel supports IPv4.
+ *
+ * Returns:
+ *
+ * ISC_R_SUCCESS IPv4 is supported.
+ * ISC_R_NOTFOUND IPv4 is not supported.
+ * ISC_R_UNEXPECTED
+ */
+
+isc_result_t
+isc_net_probeipv6(void);
+/*
+ * Check if the system's kernel supports IPv6.
+ *
+ * Returns:
+ *
+ * ISC_R_SUCCESS IPv6 is supported.
+ * ISC_R_NOTFOUND IPv6 is not supported.
+ * ISC_R_UNEXPECTED
+ */
+
+const char *
+isc_net_ntop(int af, const void *src, char *dst, size_t size);
+#ifdef ISC_PLATFORM_NEEDNTOP
+#define inet_ntop isc_net_ntop
+#endif
+
+int
+isc_net_pton(int af, const char *src, void *dst);
+#ifdef ISC_PLATFORM_NEEDPTON
+#undef inet_pton
+#define inet_pton isc_net_pton
+#endif
+
+int
+isc_net_aton(const char *cp, struct in_addr *addr);
+#ifdef ISC_PLATFORM_NEEDATON
+#define inet_aton isc_net_aton
+#endif
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_NET_H */
diff --git a/contrib/ntp/include/isc/netaddr.h b/contrib/ntp/include/isc/netaddr.h
new file mode 100644
index 000000000000..811e8dd48e0c
--- /dev/null
+++ b/contrib/ntp/include/isc/netaddr.h
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 1998-2002 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: netaddr.h,v 1.21 2002/04/03 06:38:35 marka Exp $ */
+
+#ifndef ISC_NETADDR_H
+#define ISC_NETADDR_H 1
+
+#include <isc/lang.h>
+#include <isc/net.h>
+#include <isc/types.h>
+#include "ntp_rfc2553.h"
+
+
+
+ISC_LANG_BEGINDECLS
+
+struct isc_netaddr {
+ unsigned int family;
+ union {
+ struct in_addr in;
+ struct in6_addr in6;
+ } type;
+};
+
+isc_boolean_t
+isc_netaddr_equal(const isc_netaddr_t *a, const isc_netaddr_t *b);
+
+isc_boolean_t
+isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
+ unsigned int prefixlen);
+/*
+ * Compare the 'prefixlen' most significant bits of the network
+ * addresses 'a' and 'b'. Return ISC_TRUE if they are equal,
+ * ISC_FALSE if not.
+ */
+
+isc_result_t
+isc_netaddr_masktoprefixlen(const isc_netaddr_t *s, unsigned int *lenp);
+/*
+ * Convert a netmask in 's' into a prefix length in '*lenp'.
+ * The mask should consist of zero or more '1' bits in the most
+ * most significant part of the address, followed by '0' bits.
+ * If this is not the case, ISC_R_MASKNONCONTIG is returned.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_MASKNONCONTIG
+ */
+
+isc_result_t
+isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target);
+/*
+ * Append a text representation of 'sockaddr' to the buffer 'target'.
+ * The text is NOT null terminated. Handles IPv4 and IPv6 addresses.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_NOSPACE The text or the null termination did not fit.
+ * ISC_R_FAILURE Unspecified failure
+ */
+
+void
+isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size);
+/*
+ * Format a human-readable representation of the network address '*na'
+ * into the character array 'array', which is of size 'size'.
+ * The resulting string is guaranteed to be null-terminated.
+ */
+
+#define ISC_NETADDR_FORMATSIZE \
+ sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX")
+/*
+ * Minimum size of array to pass to isc_netaddr_format().
+ */
+
+void
+isc_netaddr_fromsockaddr(isc_netaddr_t *netaddr, const isc_sockaddr_t *source);
+
+void
+isc_netaddr_fromin(isc_netaddr_t *netaddr, const struct in_addr *ina);
+
+void
+isc_netaddr_fromin6(isc_netaddr_t *netaddr, const struct in6_addr *ina6);
+
+void
+isc_netaddr_any(isc_netaddr_t *netaddr);
+/*
+ * Return the IPv4 wildcard address.
+ */
+
+void
+isc_netaddr_any6(isc_netaddr_t *netaddr);
+/*
+ * Return the IPv6 wildcard address.
+ */
+
+isc_boolean_t
+isc_netaddr_ismulticast(isc_netaddr_t *na);
+/*
+ * Returns ISC_TRUE if the address is a multicast address.
+ */
+
+isc_boolean_t
+isc_netaddr_islinklocal(isc_netaddr_t *na);
+/*
+ * Returns ISC_TRUE if the address is a link local address.
+ */
+
+isc_boolean_t
+isc_netaddr_issitelocal(isc_netaddr_t *na);
+/*
+ * Returns ISC_TRUE if the address is a site local address.
+ */
+
+void
+isc_netaddr_fromv4mapped(isc_netaddr_t *t, const isc_netaddr_t *s);
+/*
+ * Convert an IPv6 v4mapped address into an IPv4 address.
+ */
+
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_NETADDR_H */
diff --git a/contrib/ntp/include/isc/offset.h b/contrib/ntp/include/isc/offset.h
new file mode 100644
index 000000000000..709bde4e07be
--- /dev/null
+++ b/contrib/ntp/include/isc/offset.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2000, 2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: offset.h,v 1.10 2001/01/09 21:58:43 bwelling Exp $ */
+
+#ifndef ISC_OFFSET_H
+#define ISC_OFFSET_H 1
+
+/*
+ * File offsets are operating-system dependent.
+ */
+#include <limits.h> /* Required for CHAR_BIT. */
+#include <sys/types.h>
+
+typedef off_t isc_offset_t;
+
+/*
+ * POSIX says "Additionally, blkcnt_t and off_t are extended signed integral
+ * types", so the maximum value is all 1s except for the high bit.
+ * This definition is more complex than it really needs to be because it was
+ * crafted to keep both the SunOS 5.6 and the HP/UX 11 compilers quiet about
+ * integer overflow. For example, though this is equivalent to just left
+ * shifting 1 to the high bit and then inverting the bits, the SunOS compiler
+ * is unhappy about shifting a positive "1" to negative in a signed integer.
+ */
+#define ISC_OFFSET_MAXIMUM \
+ (~(((off_t)-1 >> (sizeof(off_t) * CHAR_BIT - 1)) \
+ << (sizeof(off_t) * CHAR_BIT - 1)))
+
+#endif /* ISC_OFFSET_H */
diff --git a/contrib/ntp/include/isc/once.h b/contrib/ntp/include/isc/once.h
new file mode 100644
index 000000000000..f57d6215fe3e
--- /dev/null
+++ b/contrib/ntp/include/isc/once.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2000, 2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: once.h,v 1.3 2001/01/09 21:57:56 bwelling Exp $ */
+
+#ifndef ISC_ONCE_H
+#define ISC_ONCE_H 1
+
+#include <isc/result.h>
+
+typedef isc_boolean_t isc_once_t;
+
+#define ISC_ONCE_INIT ISC_FALSE
+
+#define isc_once_do(op, f) \
+ (!*(op) ? (f(), *(op) = ISC_TRUE, ISC_R_SUCCESS) : ISC_R_SUCCESS)
+
+#endif /* ISC_ONCE_H */
diff --git a/contrib/ntp/include/isc/platform.h b/contrib/ntp/include/isc/platform.h
new file mode 100644
index 000000000000..bd11a25503a5
--- /dev/null
+++ b/contrib/ntp/include/isc/platform.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: platform.h.in,v 1.28 2001/11/19 03:08:26 mayer Exp $ */
+
+#ifndef ISC_PLATFORM_H
+#define ISC_PLATFORM_H 1
+
+
+#ifndef ISC_PLATFORM_USEDECLSPEC
+#define LIBISC_EXTERNAL_DATA
+#define LIBDNS_EXTERNAL_DATA
+#define LIBISCCC_EXTERNAL_DATA
+#define LIBISCCFG_EXTERNAL_DATA
+#define LIBBIND9_EXTERNAL_DATA
+#endif /* ISC_PLATFORM_USEDECLSPEC */
+
+/*
+ * Tell emacs to use C mode for this file.
+ *
+ * Local Variables:
+ * mode: c
+ * End:
+ */
+
+#endif /* ISC_PLATFORM_H */
diff --git a/contrib/ntp/include/isc/print.h b/contrib/ntp/include/isc/print.h
new file mode 100644
index 000000000000..7a1bc83b6741
--- /dev/null
+++ b/contrib/ntp/include/isc/print.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: print.h,v 1.17 2001/02/27 02:19:33 gson Exp $ */
+
+#ifndef ISC_PRINT_H
+#define ISC_PRINT_H 1
+
+/***
+ *** Imports
+ ***/
+
+#include <isc/formatcheck.h> /* Required for ISC_FORMAT_PRINTF() macro. */
+#include <isc/lang.h>
+#include <isc/platform.h>
+
+/*
+ * This block allows lib/isc/print.c to be cleanly compiled even if
+ * the platform does not need it. The standard Makefile will still
+ * not compile print.c or archive print.o, so this is just to make test
+ * compilation ("make print.o") easier.
+ */
+#if !defined(ISC_PLATFORM_NEEDVSNPRINTF) && defined(ISC__PRINT_SOURCE)
+#define ISC_PLATFORM_NEEDVSNPRINTF
+#endif
+
+/***
+ *** Macros
+ ***/
+#define ISC_PRINT_QUADFORMAT ISC_PLATFORM_QUADFORMAT
+
+/***
+ *** Functions
+ ***/
+
+#ifdef ISC_PLATFORM_NEEDVSNPRINTF
+#include <stdarg.h>
+#include <stddef.h>
+
+ISC_LANG_BEGINDECLS
+
+int
+isc_print_vsnprintf(char *str, size_t size, const char *format, va_list ap)
+ ISC_FORMAT_PRINTF(3, 0);
+#define vsnprintf isc_print_vsnprintf
+
+int
+isc_print_snprintf(char *str, size_t size, const char *format, ...)
+ ISC_FORMAT_PRINTF(3, 4);
+#define snprintf isc_print_snprintf
+
+ISC_LANG_ENDDECLS
+#endif /* ISC_PLATFORM_NEEDVSNPRINTF */
+
+#endif /* ISC_PRINT_H */
diff --git a/contrib/ntp/include/isc/result.h b/contrib/ntp/include/isc/result.h
new file mode 100644
index 000000000000..bf6b99258732
--- /dev/null
+++ b/contrib/ntp/include/isc/result.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 1998-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: result.h,v 1.59 2001/11/30 01:02:17 gson Exp $ */
+
+#ifndef ISC_RESULT_H
+#define ISC_RESULT_H 1
+
+#include <isc/lang.h>
+#include <isc/types.h>
+
+#define ISC_R_SUCCESS 0 /* success */
+#define ISC_R_NOMEMORY 1 /* out of memory */
+#define ISC_R_TIMEDOUT 2 /* timed out */
+#define ISC_R_NOTHREADS 3 /* no available threads */
+#define ISC_R_ADDRNOTAVAIL 4 /* address not available */
+#define ISC_R_ADDRINUSE 5 /* address in use */
+#define ISC_R_NOPERM 6 /* permission denied */
+#define ISC_R_NOCONN 7 /* no pending connections */
+#define ISC_R_NETUNREACH 8 /* network unreachable */
+#define ISC_R_HOSTUNREACH 9 /* host unreachable */
+#define ISC_R_NETDOWN 10 /* network down */
+#define ISC_R_HOSTDOWN 11 /* host down */
+#define ISC_R_CONNREFUSED 12 /* connection refused */
+#define ISC_R_NORESOURCES 13 /* not enough free resources */
+#define ISC_R_EOF 14 /* end of file */
+#define ISC_R_BOUND 15 /* socket already bound */
+#define ISC_R_RELOAD 16 /* reload */
+#define ISC_R_LOCKBUSY 17 /* lock busy */
+#define ISC_R_EXISTS 18 /* already exists */
+#define ISC_R_NOSPACE 19 /* ran out of space */
+#define ISC_R_CANCELED 20 /* operation canceled */
+#define ISC_R_NOTBOUND 21 /* socket is not bound */
+#define ISC_R_SHUTTINGDOWN 22 /* shutting down */
+#define ISC_R_NOTFOUND 23 /* not found */
+#define ISC_R_UNEXPECTEDEND 24 /* unexpected end of input */
+#define ISC_R_FAILURE 25 /* generic failure */
+#define ISC_R_IOERROR 26 /* I/O error */
+#define ISC_R_NOTIMPLEMENTED 27 /* not implemented */
+#define ISC_R_UNBALANCED 28 /* unbalanced parentheses */
+#define ISC_R_NOMORE 29 /* no more */
+#define ISC_R_INVALIDFILE 30 /* invalid file */
+#define ISC_R_BADBASE64 31 /* bad base64 encoding */
+#define ISC_R_UNEXPECTEDTOKEN 32 /* unexpected token */
+#define ISC_R_QUOTA 33 /* quota reached */
+#define ISC_R_UNEXPECTED 34 /* unexpected error */
+#define ISC_R_ALREADYRUNNING 35 /* already running */
+#define ISC_R_IGNORE 36 /* ignore */
+#define ISC_R_MASKNONCONTIG 37 /* addr mask not contiguous */
+#define ISC_R_FILENOTFOUND 38 /* file not found */
+#define ISC_R_FILEEXISTS 39 /* file already exists */
+#define ISC_R_NOTCONNECTED 40 /* socket is not connected */
+#define ISC_R_RANGE 41 /* out of range */
+#define ISC_R_NOENTROPY 42 /* out of entropy */
+#define ISC_R_MULTICAST 43 /* invalid use of multicast */
+#define ISC_R_NOTFILE 44 /* not a file */
+#define ISC_R_NOTDIRECTORY 45 /* not a directory */
+#define ISC_R_QUEUEFULL 46 /* queue is full */
+#define ISC_R_FAMILYMISMATCH 47 /* address family mismatch */
+#define ISC_R_FAMILYNOSUPPORT 48 /* AF not supported */
+#define ISC_R_BADHEX 49 /* bad hex encoding */
+#define ISC_R_TOOMANYOPENFILES 50 /* too many open files */
+#define ISC_R_NOTBLOCKING 51 /* not blocking */
+#define ISC_R_UNBALANCEDQUOTES 52 /* unbalanced quotes */
+#define ISC_R_INPROGRESS 53 /* operation in progress */
+#define ISC_R_CONNECTIONRESET 54 /* connection reset */
+#define ISC_R_SOFTQUOTA 55 /* soft quota reached */
+#define ISC_R_BADNUMBER 56 /* not a valid number */
+
+/*
+ * Not a result code: the number of results.
+ */
+#define ISC_R_NRESULTS 57
+
+ISC_LANG_BEGINDECLS
+
+const char *
+isc_result_totext(isc_result_t);
+/*
+ * Convert an isc_result_t into a string message describing the result.
+ */
+
+isc_result_t
+isc_result_register(unsigned int base, unsigned int nresults,
+ const char **text, isc_msgcat_t *msgcat, int set);
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_RESULT_H */
diff --git a/contrib/ntp/include/isc/sockaddr.h b/contrib/ntp/include/isc/sockaddr.h
new file mode 100644
index 000000000000..5257b059de01
--- /dev/null
+++ b/contrib/ntp/include/isc/sockaddr.h
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 1998-2002 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: sockaddr.h,v 1.39 2002/04/03 06:38:36 marka Exp $ */
+
+#ifndef ISC_SOCKADDR_H
+#define ISC_SOCKADDR_H 1
+
+#include <isc/lang.h>
+#include <isc/net.h>
+#include <isc/types.h>
+
+struct isc_sockaddr {
+ union {
+ struct sockaddr sa;
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+ } type;
+ unsigned int length; /* XXXRTH beginning? */
+ ISC_LINK(struct isc_sockaddr) link;
+};
+
+typedef ISC_LIST(struct isc_sockaddr) isc_sockaddrlist_t;
+
+ISC_LANG_BEGINDECLS
+
+isc_boolean_t
+isc_sockaddr_equal(const isc_sockaddr_t *a, const isc_sockaddr_t *b);
+/*
+ * Return ISC_TRUE iff the socket addresses 'a' and 'b' are equal.
+ */
+
+isc_boolean_t
+isc_sockaddr_eqaddr(const isc_sockaddr_t *a, const isc_sockaddr_t *b);
+/*
+ * Return ISC_TRUE iff the address parts of the socket addresses
+ * 'a' and 'b' are equal, ignoring the ports.
+ */
+
+isc_boolean_t
+isc_sockaddr_eqaddrprefix(const isc_sockaddr_t *a, const isc_sockaddr_t *b,
+ unsigned int prefixlen);
+/*
+ * Return ISC_TRUE iff the most significant 'prefixlen' bits of the
+ * socket addresses 'a' and 'b' are equal, ignoring the ports.
+ */
+
+unsigned int
+isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, isc_boolean_t address_only);
+/*
+ * Return a hash value for the socket address 'sockaddr'. If 'address_only'
+ * is ISC_TRUE, the hash value will not depend on the port.
+ *
+ * IPv6 addresses containing mapped IPv4 addresses generate the same hash
+ * value as the equivalent IPv4 address.
+ */
+
+void
+isc_sockaddr_any(isc_sockaddr_t *sockaddr);
+/*
+ * Return the IPv4 wildcard address.
+ */
+
+void
+isc_sockaddr_any6(isc_sockaddr_t *sockaddr);
+/*
+ * Return the IPv6 wildcard address.
+ */
+
+void
+isc_sockaddr_anyofpf(isc_sockaddr_t *sockaddr, int family);
+/*
+ * Set '*sockaddr' to the wildcard address of protocol family
+ * 'family'.
+ *
+ * Requires:
+ * 'family' is AF_INET or AF_INET6.
+ */
+
+void
+isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina,
+ in_port_t port);
+/*
+ * Construct an isc_sockaddr_t from an IPv4 address and port.
+ */
+
+void
+isc_sockaddr_fromin6(isc_sockaddr_t *sockaddr, const struct in6_addr *ina6,
+ in_port_t port);
+/*
+ * Construct an isc_sockaddr_t from an IPv6 address and port.
+ */
+
+void
+isc_sockaddr_v6fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina,
+ in_port_t port);
+/*
+ * Construct an IPv6 isc_sockaddr_t representing a mapped IPv4 address.
+ */
+
+void
+isc_sockaddr_fromnetaddr(isc_sockaddr_t *sockaddr, const isc_netaddr_t *na,
+ in_port_t port);
+/*
+ * Construct an isc_sockaddr_t from an isc_netaddr_t and port.
+ */
+
+int
+isc_sockaddr_pf(const isc_sockaddr_t *sockaddr);
+/*
+ * Get the protocol family of 'sockaddr'.
+ *
+ * Requires:
+ *
+ * 'sockaddr' is a valid sockaddr with an address family of AF_INET
+ * or AF_INET6.
+ *
+ * Returns:
+ *
+ * The protocol family of 'sockaddr', e.g. PF_INET or PF_INET6.
+ */
+
+void
+isc_sockaddr_setport(isc_sockaddr_t *sockaddr, in_port_t port);
+/*
+ * Set the port of 'sockaddr' to 'port'.
+ */
+
+in_port_t
+isc_sockaddr_getport(isc_sockaddr_t *sockaddr);
+/*
+ * Get the port stored in 'sockaddr'.
+ */
+
+isc_result_t
+isc_sockaddr_totext(const isc_sockaddr_t *sockaddr, isc_buffer_t *target);
+/*
+ * Append a text representation of 'sockaddr' to the buffer 'target'.
+ * The text will include both the IP address (v4 or v6) and the port.
+ * The text is null terminated, but the terminating null is not
+ * part of the buffer's used region.
+ *
+ * Returns:
+ * ISC_R_SUCCESS
+ * ISC_R_NOSPACE The text or the null termination did not fit.
+ */
+
+void
+isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size);
+/*
+ * Format a human-readable representation of the socket address '*sa'
+ * into the character array 'array', which is of size 'size'.
+ * The resulting string is guaranteed to be null-terminated.
+ */
+
+isc_boolean_t
+isc_sockaddr_ismulticast(isc_sockaddr_t *sa);
+/*
+ * Returns ISC_TRUE if the address is a multicast address.
+ */
+
+isc_boolean_t
+isc_sockaddr_islinklocal(isc_sockaddr_t *sa);
+/*
+ * Returns ISC_TRUE if the address is a link local addresss.
+ */
+
+isc_boolean_t
+isc_sockaddr_issitelocal(isc_sockaddr_t *sa);
+/*
+ * Returns ISC_TRUE if the address is a sitelocal address.
+ */
+
+#define ISC_SOCKADDR_FORMATSIZE \
+ sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX#YYYYY")
+/*
+ * Minimum size of array to pass to isc_sockaddr_format().
+ */
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_SOCKADDR_H */
diff --git a/contrib/ntp/include/isc/strerror.h b/contrib/ntp/include/isc/strerror.h
new file mode 100644
index 000000000000..ca428af9553f
--- /dev/null
+++ b/contrib/ntp/include/isc/strerror.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: strerror.h,v 1.3 2001/11/20 01:45:47 gson Exp $ */
+
+#ifndef ISC_STRERROR_H
+#define ISC_STRERROR_H
+
+#include <sys/types.h>
+
+#include <isc/lang.h>
+
+ISC_LANG_BEGINDECLS
+
+#define ISC_STRERRORSIZE 128
+
+/*
+ * Provide a thread safe wrapper to strerrror().
+ *
+ * Requires:
+ * 'buf' to be non NULL.
+ */
+void
+isc__strerror(int num, char *buf, size_t bufsize);
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_STRERROR_H */
diff --git a/contrib/ntp/include/isc/string.h b/contrib/ntp/include/isc/string.h
new file mode 100644
index 000000000000..e16219fdaad0
--- /dev/null
+++ b/contrib/ntp/include/isc/string.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2000, 2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: string.h,v 1.9 2001/01/09 21:57:37 bwelling Exp $ */
+
+#ifndef ISC_STRING_H
+#define ISC_STRING_H 1
+
+#include <string.h>
+
+#include <isc/int.h>
+#include <isc/lang.h>
+#include <isc/platform.h>
+
+ISC_LANG_BEGINDECLS
+
+isc_uint64_t
+isc_string_touint64(char *source, char **endp, int base);
+/*
+ * Convert the string pointed to by 'source' to isc_uint64_t.
+ *
+ * On successful conversion 'endp' points to the first character
+ * after conversion is complete.
+ *
+ * 'base': 0 or 2..36
+ *
+ * If base is 0 the base is computed from the string type.
+ *
+ * On error 'endp' points to 'source'.
+ */
+
+
+char *
+isc_string_separate(char **stringp, const char *delim);
+
+#ifdef ISC_PLATFORM_NEEDSTRSEP
+#define strsep isc_string_separate
+#endif
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_STRING_H */
diff --git a/contrib/ntp/include/isc/types.h b/contrib/ntp/include/isc/types.h
new file mode 100644
index 000000000000..b30f55ee7fe9
--- /dev/null
+++ b/contrib/ntp/include/isc/types.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: types.h,v 1.33 2002/07/19 03:39:44 marka Exp $ */
+
+#ifndef ISC_TYPES_H
+#define ISC_TYPES_H 1
+
+/*
+ * OS-specific types, from the OS-specific include directories.
+ */
+#include <isc/int.h>
+#include <isc/offset.h>
+
+/*
+ * XXXDCL should isc_boolean_t be moved here, requiring an explicit include
+ * of <isc/boolean.h> when ISC_TRUE/ISC_FALSE/ISC_TF() are desired?
+ */
+#include <isc/boolean.h>
+/*
+ * XXXDCL This is just for ISC_LIST and ISC_LINK, but gets all of the other
+ * list macros too.
+ */
+#include <isc/list.h>
+
+/***
+ *** Core Types. Alphabetized by defined type.
+ ***/
+
+typedef struct isc_bitstring isc_bitstring_t;
+typedef struct isc_buffer isc_buffer_t;
+typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t;
+typedef struct isc_constregion isc_constregion_t;
+typedef struct isc_consttextregion isc_consttextregion_t;
+typedef struct isc_entropy isc_entropy_t;
+typedef struct isc_entropysource isc_entropysource_t;
+typedef struct isc_event isc_event_t;
+typedef ISC_LIST(isc_event_t) isc_eventlist_t;
+typedef unsigned int isc_eventtype_t;
+typedef isc_uint32_t isc_fsaccess_t;
+typedef struct isc_interface isc_interface_t;
+typedef struct isc_interfaceiter isc_interfaceiter_t;
+typedef struct isc_interval isc_interval_t;
+typedef struct isc_lex isc_lex_t;
+typedef struct isc_log isc_log_t;
+typedef struct isc_logcategory isc_logcategory_t;
+typedef struct isc_logconfig isc_logconfig_t;
+typedef struct isc_logmodule isc_logmodule_t;
+typedef struct isc_mem isc_mem_t;
+typedef struct isc_mempool isc_mempool_t;
+typedef struct isc_msgcat isc_msgcat_t;
+typedef struct isc_ondestroy isc_ondestroy_t;
+typedef struct isc_netaddr isc_netaddr_t;
+typedef struct isc_quota isc_quota_t;
+typedef struct isc_random isc_random_t;
+typedef struct isc_ratelimiter isc_ratelimiter_t;
+typedef struct isc_region isc_region_t;
+typedef isc_uint64_t isc_resourcevalue_t;
+typedef unsigned int isc_result_t;
+typedef struct isc_rwlock isc_rwlock_t;
+typedef struct isc_sockaddr isc_sockaddr_t;
+typedef struct isc_socket isc_socket_t;
+typedef struct isc_socketevent isc_socketevent_t;
+typedef struct isc_socketmgr isc_socketmgr_t;
+typedef struct isc_symtab isc_symtab_t;
+typedef struct isc_task isc_task_t;
+typedef ISC_LIST(isc_task_t) isc_tasklist_t;
+typedef struct isc_taskmgr isc_taskmgr_t;
+typedef struct isc_textregion isc_textregion_t;
+typedef struct isc_time isc_time_t;
+typedef struct isc_timer isc_timer_t;
+typedef struct isc_timermgr isc_timermgr_t;
+
+typedef void (*isc_taskaction_t)(isc_task_t *, isc_event_t *);
+
+typedef enum {
+ isc_resource_coresize = 1,
+ isc_resource_cputime,
+ isc_resource_datasize,
+ isc_resource_filesize,
+ isc_resource_lockedmemory,
+ isc_resource_openfiles,
+ isc_resource_processes,
+ isc_resource_residentsize,
+ isc_resource_stacksize
+} isc_resource_t;
+
+#endif /* ISC_TYPES_H */
diff --git a/contrib/ntp/include/isc/util.h b/contrib/ntp/include/isc/util.h
new file mode 100644
index 000000000000..6144e11ba863
--- /dev/null
+++ b/contrib/ntp/include/isc/util.h
@@ -0,0 +1,225 @@
+/*
+ * Copyright (C) 1998-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: util.h,v 1.23 2001/11/30 01:59:38 gson Exp $ */
+
+#ifndef ISC_UTIL_H
+#define ISC_UTIL_H 1
+
+/*
+ * NOTE:
+ *
+ * This file is not to be included from any <isc/???.h> (or other) library
+ * files.
+ *
+ * Including this file puts several macros in your name space that are
+ * not protected (as all the other ISC functions/macros do) by prepending
+ * ISC_ or isc_ to the name.
+ */
+
+/***
+ *** General Macros.
+ ***/
+
+/*
+ * Use this to hide unused function arguments.
+ *
+ * int
+ * foo(char *bar)
+ * {
+ * UNUSED(bar);
+ * }
+ */
+#define UNUSED(x) (void)(x)
+
+#define ISC_MAX(a, b) ((a) > (b) ? (a) : (b))
+#define ISC_MIN(a, b) ((a) < (b) ? (a) : (b))
+
+/*
+ * Use this to remove the const qualifier of a variable to assign it to
+ * a non-const variable or pass it as a non-const function argument ...
+ * but only when you are sure it won't then be changed!
+ * This is necessary to sometimes shut up some compilers
+ * (as with gcc -Wcast-qual) when there is just no other good way to avoid the
+ * situation.
+ */
+#define DE_CONST(konst, var) \
+ do { \
+ union { const void *k; void *v; } _u; \
+ _u.k = konst; \
+ var = _u.v; \
+ } while (0)
+
+/*
+ * Use this in translation units that would otherwise be empty, to
+ * suppress compiler warnings.
+ */
+#define EMPTY_TRANSLATION_UNIT static void isc__empty(void) { isc__empty(); }
+
+/*
+ * We use macros instead of calling the routines directly because
+ * the capital letters make the locking stand out.
+ *
+ * We RUNTIME_CHECK for success since in general there's no way
+ * for us to continue if they fail.
+ */
+
+#ifdef ISC_UTIL_TRACEON
+#define ISC_UTIL_TRACE(a) a
+#include <stdio.h> /* Required for fprintf/stderr when tracing. */
+#include <isc/msgs.h> /* Required for isc_msgcat when tracing. */
+#else
+#define ISC_UTIL_TRACE(a)
+#endif
+
+#include <isc/result.h> /* Contractual promise. */
+
+#define LOCK(lp) do { \
+ ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_LOCKING, "LOCKING"), \
+ (lp), __FILE__, __LINE__)); \
+ RUNTIME_CHECK(isc_mutex_lock((lp)) == ISC_R_SUCCESS); \
+ ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_LOCKED, "LOCKED"), \
+ (lp), __FILE__, __LINE__)); \
+ } while (0)
+#define UNLOCK(lp) do { \
+ RUNTIME_CHECK(isc_mutex_unlock((lp)) == ISC_R_SUCCESS); \
+ ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_UNLOCKED, "UNLOCKED"), \
+ (lp), __FILE__, __LINE__)); \
+ } while (0)
+#define ISLOCKED(lp) (1)
+#define DESTROYLOCK(lp) \
+ RUNTIME_CHECK(isc_mutex_destroy((lp)) == ISC_R_SUCCESS)
+
+
+#define BROADCAST(cvp) do { \
+ ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_BROADCAST, "BROADCAST"),\
+ (cvp), __FILE__, __LINE__)); \
+ RUNTIME_CHECK(isc_condition_broadcast((cvp)) == ISC_R_SUCCESS); \
+ } while (0)
+#define SIGNAL(cvp) do { \
+ ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %d\n", \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_SIGNAL, "SIGNAL"), \
+ (cvp), __FILE__, __LINE__)); \
+ RUNTIME_CHECK(isc_condition_signal((cvp)) == ISC_R_SUCCESS); \
+ } while (0)
+#define WAIT(cvp, lp) do { \
+ ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %p %s %d\n", \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_UTILWAIT, "WAIT"), \
+ (cvp), \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_LOCK, "LOCK"), \
+ (lp), __FILE__, __LINE__)); \
+ RUNTIME_CHECK(isc_condition_wait((cvp), (lp)) == ISC_R_SUCCESS); \
+ ISC_UTIL_TRACE(fprintf(stderr, "%s %p %s %p %s %d\n", \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_WAITED, "WAITED"), \
+ (cvp), \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_LOCKED, "LOCKED"), \
+ (lp), __FILE__, __LINE__)); \
+ } while (0)
+
+/*
+ * isc_condition_waituntil can return ISC_R_TIMEDOUT, so we
+ * don't RUNTIME_CHECK the result.
+ *
+ * XXX Also, can't really debug this then...
+ */
+
+#define WAITUNTIL(cvp, lp, tp) \
+ isc_condition_waituntil((cvp), (lp), (tp))
+
+#define RWLOCK(lp, t) do { \
+ ISC_UTIL_TRACE(fprintf(stderr, "%s %p, %d %s %d\n", \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_RWLOCK, "RWLOCK"), \
+ (lp), (t), __FILE__, __LINE__)); \
+ RUNTIME_CHECK(isc_rwlock_lock((lp), (t)) == ISC_R_SUCCESS); \
+ ISC_UTIL_TRACE(fprintf(stderr, "%s %p, %d %s %d\n", \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_RWLOCKED, "RWLOCKED"), \
+ (lp), (t), __FILE__, __LINE__)); \
+ } while (0)
+#define RWUNLOCK(lp, t) do { \
+ ISC_UTIL_TRACE(fprintf(stderr, "%s %p, %d %s %d\n", \
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_UTIL, \
+ ISC_MSG_RWUNLOCK, "RWUNLOCK"), \
+ (lp), (t), __FILE__, __LINE__)); \
+ RUNTIME_CHECK(isc_rwlock_unlock((lp), (t)) == ISC_R_SUCCESS); \
+ } while (0)
+
+#define DESTROYMUTEXBLOCK(bp, n) \
+ RUNTIME_CHECK(isc_mutexblock_destroy((bp), (n)) == ISC_R_SUCCESS)
+
+/*
+ * List Macros.
+ */
+#include <isc/list.h> /* Contractual promise. */
+
+#define LIST(type) ISC_LIST(type)
+#define INIT_LIST(type) ISC_LIST_INIT(type)
+#define LINK(type) ISC_LINK(type)
+#define INIT_LINK(elt, link) ISC_LINK_INIT(elt, link)
+#define HEAD(list) ISC_LIST_HEAD(list)
+#define TAIL(list) ISC_LIST_TAIL(list)
+#define EMPTY(list) ISC_LIST_EMPTY(list)
+#define PREV(elt, link) ISC_LIST_PREV(elt, link)
+#define NEXT(elt, link) ISC_LIST_NEXT(elt, link)
+#define APPEND(list, elt, link) ISC_LIST_APPEND(list, elt, link)
+#define PREPEND(list, elt, link) ISC_LIST_PREPEND(list, elt, link)
+#define UNLINK(list, elt, link) ISC_LIST_UNLINK(list, elt, link)
+#define ENQUEUE(list, elt, link) ISC_LIST_APPEND(list, elt, link)
+#define DEQUEUE(list, elt, link) ISC_LIST_UNLINK(list, elt, link)
+#define INSERTBEFORE(li, b, e, ln) ISC_LIST_INSERTBEFORE(li, b, e, ln)
+#define INSERTAFTER(li, a, e, ln) ISC_LIST_INSERTAFTER(li, a, e, ln)
+#define APPENDLIST(list1, list2, link) ISC_LIST_APPENDLIST(list1, list2, link)
+
+/*
+ * Assertions
+ */
+#include <isc/assertions.h> /* Contractual promise. */
+
+#define REQUIRE(e) ISC_REQUIRE(e)
+#define ENSURE(e) ISC_ENSURE(e)
+#define INSIST(e) ISC_INSIST(e)
+#define INVARIANT(e) ISC_INVARIANT(e)
+
+/*
+ * Errors
+ */
+#include <isc/error.h> /* Contractual promise. */
+
+#define UNEXPECTED_ERROR isc_error_unexpected
+#define FATAL_ERROR isc_error_fatal
+#define RUNTIME_CHECK(cond) ISC_ERROR_RUNTIMECHECK(cond)
+
+/*
+ * Time
+ */
+#define TIME_NOW(tp) RUNTIME_CHECK(isc_time_now((tp)) == ISC_R_SUCCESS)
+
+#endif /* ISC_UTIL_H */
diff --git a/contrib/ntp/include/l_stdlib.h b/contrib/ntp/include/l_stdlib.h
index 89eb54535e3a..3f242b7994a0 100644
--- a/contrib/ntp/include/l_stdlib.h
+++ b/contrib/ntp/include/l_stdlib.h
@@ -14,6 +14,12 @@
# include <stdlib.h>
#endif
+#if defined(__STDC__) || defined(HAVE_STDARG_H)
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -145,6 +151,11 @@ extern int sigvec P((int, struct sigvec *, struct sigvec *));
extern int snprintf P((char *, size_t, const char *, ...));
#endif
+/* HMS: does this need further protection? */
+#ifndef HAVE_VSNPRINTF
+extern int vsnprintf P((char *, size_t, const char *, va_list));
+#endif
+
#ifdef DECL_SRAND48_0
extern void srand48 P((long));
#endif
diff --git a/contrib/ntp/include/ntp.h b/contrib/ntp/include/ntp.h
index 5708b7c315a4..1ce302b7be98 100644
--- a/contrib/ntp/include/ntp.h
+++ b/contrib/ntp/include/ntp.h
@@ -1,12 +1,14 @@
/*
* ntp.h - NTP definitions for the masses
*/
-
#ifndef NTP_H
#define NTP_H
#include "ntp_types.h"
#include <math.h>
+#ifdef OPENSSL
+#include "ntp_crypto.h"
+#endif /* OPENSSL */
/*
* Calendar arithmetic - contributed by G. Healton
@@ -92,24 +94,53 @@ typedef char s_char;
*/
#define NTP_VERSION ((u_char)4) /* current version number */
#define NTP_OLDVERSION ((u_char)1) /* oldest credible version */
-#define NTP_PORT 123 /* included for sake of non-unix machines */
+#define NTP_PORT 123 /* included for non-unix machines */
+
+/*
+ * Poll interval parameters
+ */
#define NTP_UNREACH 16 /* poll interval backoff count */
-#define NTP_MINDPOLL 6 /* log2 default min poll interval (64 s) */
-#define NTP_MAXDPOLL 10 /* log2 default max poll interval (~17 m) */
#define NTP_MINPOLL 4 /* log2 min poll interval (16 s) */
-#define NTP_MAXPOLL 17 /* log2 max poll interval (~4.5 h) */
-#define NTP_MINCLOCK 3 /* minimum survivors */
-#define NTP_MAXCLOCK 10 /* maximum candidates */
-#define NTP_SHIFT 8 /* 8 suitable for crystal time base */
-#define NTP_MAXKEY 65535 /* maximum authentication key number */
-#define NTP_MAXSESSION 100 /* maximum session key list entries */
-#define NTP_AUTOMAX 13 /* log2 default max session key lifetime */
-#define KEY_REVOKE 16 /* log2 default key revoke timeout */
+#define NTP_MINDPOLL 6 /* log2 default min poll (64 s) */
+#define NTP_MAXDPOLL 10 /* log2 default max poll (~17 m) */
+#define NTP_MAXPOLL 17 /* log2 max poll interval (~36 h) */
+#define NTP_BURST 8 /* packets in burst */
+#define BURST_DELAY 2 /* interburst delay (s) */
+#define RESP_DELAY 1 /* crypto response delay (s) */
+
+/*
+ * Clock filter algorithm tuning parameters
+ */
+#define MINDISPERSE .01 /* min dispersion */
+#define MAXDISPERSE 16. /* max dispersion */
+#define NTP_SHIFT 8 /* clock filter stages */
#define NTP_FWEIGHT .5 /* clock filter weight */
-#define CLOCK_SGATE 4. /* popcorn spike gate */
-#define BURST_INTERVAL1 4 /* first interburst interval (log2) */
-#define BURST_INTERVAL2 1 /* succeeding interburst intervals (log2) */
+
+/*
+ * Selection algorithm tuning parameters
+ */
+#define NTP_MINCLOCK 4 /* minimum survivors */
+#define NTP_MAXCLOCK 50 /* maximum candidates */
+#define MAXDISTANCE 1. /* max root distance */
+#define CLOCK_SGATE 3. /* popcorn spike gate */
#define HUFFPUFF 900 /* huff-n'-puff sample interval (s) */
+#define HYST .5 /* anti-clockhop hysteresis */
+#define HYST_TC .875 /* anti-clockhop hysteresis decay */
+#define MAX_TTL 8 /* max ttl mapping vector size */
+#define NTP_MAXEXTEN 1024 /* maximum extension field size */
+
+/*
+ * Miscellaneous stuff
+ */
+#define NTP_MAXKEY 65535 /* maximum authentication key number */
+
+/*
+ * Limits of things
+ */
+#define MAXFILENAME 128 /* max length of file name */
+#define MAXHOSTNAME 512 /* max length of host/node name */
+#define NTP_MAXSTRLEN 256 /* maximum string length */
+#define MAXINTERFACES 512 /* max number of interfaces */
/*
* Operations for jitter calculations (these use doubles).
@@ -129,67 +160,24 @@ typedef char s_char;
1L << (int)(a)) /* log2 to double */
#define UNIVAR(x) (SQUARE(.28867513 * LOGTOD(x))) /* std uniform distr */
#define ULOGTOD(a) (1L << (int)(a)) /* ulog2 to double */
-#define MAXDISPERSE 16. /* max dispersion (square) */
-#define MINDISPERSE .01 /* min dispersion */
-#define MAXDISTANCE 1. /* max root distance */
#define EVENT_TIMEOUT 0 /* one second, that is */
-#ifdef AUTOKEY
-/*
- * The following structures are used in the autokey protocol.
- *
- * The autokey structure holds the values used to authenticate key IDs.
- */
-struct autokey { /* network byte order */
- tstamp_t tstamp; /* timestamp */
- keyid_t key; /* key ID */
- int32 seq; /* key number */
- u_int32 siglen; /* signature length */
- u_int32 pkt[1]; /* start of signature field */
- u_char *sig; /* signature */
-};
-
-/*
- * The cookie structure holds the current private value used to
- * construct session keys.
- */
-struct cookie { /* network byte order */
- tstamp_t tstamp; /* timestamp */
- keyid_t key; /* key ID */
- u_int32 siglen; /* signature length */
- u_int32 pkt[1]; /* start of signature field */
- u_char *sig; /* signature */
-};
-
-/*
- * The value structure holds variable length data such as public
- * key, agreement parameters, public valule and leapsecond table.
- */
-struct value { /* network byte order */
- tstamp_t tstamp; /* timestamp */
- tstamp_t fstamp; /* filestamp */
- u_int32 vallen; /* value length */
- u_int32 pkt[1]; /* start of value field */
- u_char *ptr; /* data pointer */
- u_int32 siglen; /* signature length */
- u_char *sig; /* signature */
-};
-#endif /* AUTOKEY */
-
/*
* The interface structure is used to hold the addresses and socket
* numbers of each of the interfaces we are using.
*/
struct interface {
- int fd; /* socket this is opened on */
- int bfd; /* socket for receiving broadcasts */
- struct sockaddr_in sin; /* interface address */
- struct sockaddr_in bcast; /* broadcast address */
- struct sockaddr_in mask; /* interface mask */
- char name[8]; /* name of interface */
+ SOCKET fd; /* socket this is opened on */
+ SOCKET bfd; /* socket for receiving broadcasts */
+ struct sockaddr_storage sin; /* interface address */
+ struct sockaddr_storage bcast; /* broadcast address */
+ struct sockaddr_storage mask; /* interface mask */
+ char name[32]; /* name of interface */
int flags; /* interface flags */
int last_ttl; /* last TTL specified */
+ u_int addr_refid; /* IPv4 addr or IPv6 hash */
+ int num_mcast; /* No. of IP addresses in multicast socket */
volatile long received; /* number of incoming packets */
long sent; /* number of outgoing packets */
long notsent; /* number of send failures */
@@ -198,10 +186,12 @@ struct interface {
/*
* Flags for interfaces
*/
-#define INT_BROADCAST 1 /* can broadcast out this interface */
-#define INT_BCASTOPEN 2 /* broadcast socket is open */
-#define INT_LOOPBACK 4 /* the loopback interface */
-#define INT_MULTICAST 8 /* multicasting enabled */
+#define INT_UP 1 /* Interface is up */
+#define INT_PPP 2 /* Point-to-point interface */
+#define INT_LOOPBACK 4 /* the loopback interface */
+#define INT_BROADCAST 8 /* can broadcast out this interface */
+#define INT_MULTICAST 16 /* multicasting enabled */
+#define INT_BCASTOPEN 32 /* broadcast socket is open */
/*
* Define flasher bits (tests 1 through 11 in packet procedure)
@@ -229,7 +219,7 @@ struct interface {
struct peer {
struct peer *next; /* pointer to next association */
struct peer *ass_next; /* link pointer in associd hash */
- struct sockaddr_in srcadr; /* address of remote host */
+ struct sockaddr_storage srcadr; /* address of remote host */
struct interface *dstadr; /* pointer to address on local host */
associd_t associd; /* association ID */
u_char version; /* version number */
@@ -244,7 +234,7 @@ struct peer {
u_int flash; /* protocol error test tally bits */
u_char last_event; /* last peer error code */
u_char num_events; /* number of error events */
- u_char ttlmax; /* max ttl/refclock mode */
+ u_char ttl; /* ttl/refclock mode */
/*
* Variables used by reference clock support
@@ -269,38 +259,41 @@ struct peer {
* Variables used by authenticated client
*/
keyid_t keyid; /* current key ID */
-#ifdef AUTOKEY
+#ifdef OPENSSL
#define clear_to_zero assoc
associd_t assoc; /* peer association ID */
u_int32 crypto; /* peer status word */
-#ifdef PUBKEY
- struct value pubkey; /* public key */
- struct value certif; /* certificate */
- u_char *keystr; /* host name */
-#endif /* PUBKEY */
+ EVP_PKEY *pkey; /* public key */
+ const EVP_MD *digest; /* message digest algorithm */
+ char *subject; /* certificate subject name */
+ char *issuer; /* certificate issuer name */
keyid_t pkeyid; /* previous key ID */
- keyid_t hcookie; /* host cookie */
- struct cookie pcookie; /* peer cookie */
- struct autokey recauto; /* autokey */
- u_int32 cmmd; /* peer command */
+ keyid_t pcookie; /* peer cookie */
+ EVP_PKEY *ident_pkey; /* identity key */
+ tstamp_t fstamp; /* identity filestamp */
+ BIGNUM *iffval; /* IFF/GQ challenge */
+ BIGNUM *grpkey; /* GQ group key */
+ struct value cookval; /* cookie values */
+ struct value recval; /* receive autokey values */
+ struct value tai_leap; /* leapseconds values */
+ struct exten *cmmd; /* extension pointer */
+
/*
* Variables used by authenticated server
*/
keyid_t *keylist; /* session key ID list */
int keynumber; /* current key number */
- struct autokey sndauto; /* autokey */
-#else /* AUTOKEY */
+ struct value encrypt; /* send encrypt values */
+ struct value sndval; /* send autokey values */
+#else /* OPENSSL */
#define clear_to_zero status
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
/*
* Ephemeral state variables
*/
u_char status; /* peer status */
- u_char pollsw; /* what it says */
- u_char ttl; /* ttl for manycast mode */
u_char reach; /* reachability register */
- u_char unreach; /* unreachable count */
u_long epoch; /* reference epoch */
u_short filter_nextpt; /* index into filter shift register */
double filter_delay[NTP_SHIFT]; /* delay shift register */
@@ -316,6 +309,7 @@ struct peer {
double jitter; /* peer jitter (squares) */
double disp; /* peer dispersion */
double estbdelay; /* clock offset to broadcast server */
+ double hyst; /* anti-clockhop hysteresis */
/*
* Variables set by received packet
@@ -328,10 +322,11 @@ struct peer {
*/
u_long update; /* receive epoch */
#define end_clear_to_zero update
+ u_int unreach; /* unreachable count */
u_long outdate; /* send time last packet */
u_long nextdate; /* send time next packet */
- u_long nextaction; /* peer local activity timeout (refclocks mainly) */
- void (*action) P((struct peer *)); /* action timeout function */
+ u_long nextaction; /* peer local activity timeout (refclocks mainly) */
+ void (*action) P((struct peer *)); /* action timeout function */
/*
* Statistic counters
*/
@@ -347,6 +342,7 @@ struct peer {
u_long oldpkt; /* packets duplicate packet */
u_long seldisptoolarge; /* packets dispersion to large*/
u_long selbroken; /* not used */
+ u_long rank; /* number of times selected or in cluster */
};
/*
@@ -360,7 +356,7 @@ struct peer {
/*
* Values for peer.mode
*/
-#define MODE_UNSPEC 0 /* unspecified (probably old NTP version) */
+#define MODE_UNSPEC 0 /* unspecified (old version) */
#define MODE_ACTIVE 1 /* symmetric active */
#define MODE_PASSIVE 2 /* symmetric passive */
#define MODE_CLIENT 3 /* client mode */
@@ -373,7 +369,7 @@ struct peer {
/*
* Values for peer.stratum, sys_stratum
*/
-#define STRATUM_REFCLOCK ((u_char)0) /* stratum claimed by primary clock */
+#define STRATUM_REFCLOCK ((u_char)0) /* default stratum */
/* A stratum of 0 in the packet is mapped to 16 internally */
#define STRATUM_PKT_UNSPEC ((u_char)0) /* unspecified in packet */
#define STRATUM_UNSPEC ((u_char)16) /* unspecified */
@@ -392,9 +388,7 @@ struct peer {
#define FLAG_BURST 0x0100 /* burst mode */
#define FLAG_IBURST 0x0200 /* initial burst mode */
#define FLAG_NOSELECT 0x0400 /* this is a "noselect" peer */
-#define FLAG_AUTOKEY 0x0800 /* autokey confirmed */
-#define FLAG_ASSOC 0x1000 /* autokey reqeust */
-#define FLAG_PROVEN 0x2000 /* proventic confirmed */
+#define FLAG_ASSOC 0x0800 /* autokey request */
/*
* Definitions for the clear() routine. We use memset() to clear
@@ -405,9 +399,9 @@ struct peer {
#define END_CLEAR_TO_ZERO(p) ((char *)&((p)->end_clear_to_zero))
#define LEN_CLEAR_TO_ZERO (END_CLEAR_TO_ZERO((struct peer *)0) \
- CLEAR_TO_ZERO((struct peer *)0))
-#define CRYPTO_TO_ZERO(p) ((char *)&((p)->clear_to_zero))
-#define END_CRYPTO_TO_ZERO(p) ((char *)&((p)->end_clear_to_zero))
-#define LEN_CRYPTO_TO_ZERO (END_CRYPTO_TO_ZERO((struct peer *)0) \
+#define CRYPTO_TO_ZERO(p) ((char *)&((p)->clear_to_zero))
+#define END_CRYPTO_TO_ZERO(p) ((char *)&((p)->end_clear_to_zero))
+#define LEN_CRYPTO_TO_ZERO (END_CRYPTO_TO_ZERO((struct peer *)0) \
- CRYPTO_TO_ZERO((struct peer *)0))
/*
@@ -424,7 +418,7 @@ struct peer {
#define REFCLK_WWV_PST 3 /* PST/Traconex 1020 WWV/H */
#define REFCLK_SPECTRACOM 4 /* Spectracom (generic) Receivers */
#define REFCLK_TRUETIME 5 /* TrueTime (generic) Receivers */
-#define REFCLK_IRIG_AUDIO 6 /* IRIG-B/W audio decoder */
+#define REFCLK_IRIG_AUDIO 6 /* IRIG-B/W audio decoder */
#define REFCLK_CHU_AUDIO 7 /* CHU audio demodulator/decoder */
#define REFCLK_PARSE 8 /* generic driver (usually DCF77,GPS,MSF) */
#define REFCLK_GPS_MX4200 9 /* Magnavox MX4200 GPS */
@@ -444,25 +438,57 @@ struct peer {
#define REFCLK_PTB_ACTS 23 /* PTB Auto Computer Time Service */
#define REFCLK_USNO 24 /* Naval Observatory dialup */
#define REFCLK_GPS_HP 26 /* HP 58503A Time/Frequency Receiver */
-#define REFCLK_ARCRON_MSF 27 /* ARCRON MSF radio clock. */
+#define REFCLK_ARCRON_MSF 27 /* ARCRON MSF radio clock. */
#define REFCLK_SHM 28 /* clock attached thru shared memory */
#define REFCLK_PALISADE 29 /* Trimble Navigation Palisade GPS */
#define REFCLK_ONCORE 30 /* Motorola UT Oncore GPS */
#define REFCLK_GPS_JUPITER 31 /* Rockwell Jupiter GPS receiver */
-#define REFCLK_CHRONOLOG 32 /* Chrono-log K WWVB receiver */
-#define REFCLK_DUMBCLOCK 33 /* Dumb localtime clock */
-#define REFCLK_ULINK 34 /* Ultralink M320 WWVB receiver */
+#define REFCLK_CHRONOLOG 32 /* Chrono-log K WWVB receiver */
+#define REFCLK_DUMBCLOCK 33 /* Dumb localtime clock */
+#define REFCLK_ULINK 34 /* Ultralink M320 WWVB receiver */
#define REFCLK_PCF 35 /* Conrad parallel port radio clock */
#define REFCLK_WWV_AUDIO 36 /* WWV/H audio demodulator/decoder */
#define REFCLK_FG 37 /* Forum Graphic GPS */
-#define REFCLK_HOPF_SERIAL 38 /* hopf DCF77/GPS serial line receiver */
+#define REFCLK_HOPF_SERIAL 38 /* hopf DCF77/GPS serial receiver */
#define REFCLK_HOPF_PCI 39 /* hopf DCF77/GPS PCI receiver */
#define REFCLK_JJY 40 /* JJY receiver */
#define REFCLK_TT560 41 /* TrueTime 560 IRIG-B decoder */
#define REFCLK_ZYFER 42 /* Zyfer GPStarplus receiver */
#define REFCLK_RIPENCC 43 /* RIPE NCC Trimble driver */
-#define REFCLK_NEOCLOCK4X 44 /* NeoClock4X DCF77 or TDF receiver */
-#define REFCLK_MAX 44 /* Grow as needed... */
+#define REFCLK_NEOCLOCK4X 44 /* NeoClock4X DCF77 or TDF receiver */
+#define REFCLK_MAX 44 /* NeoClock4X DCF77 or TDF receiver */
+
+ /*
+ * Macro for sockaddr_storage structures operations
+ */
+#define SOCKCMP(sock1, sock2) \
+ (((struct sockaddr_storage *)sock1)->ss_family \
+ == ((struct sockaddr_storage *)sock2)->ss_family ? \
+ ((struct sockaddr_storage *)sock1)->ss_family == AF_INET ? \
+ memcmp(&((struct sockaddr_in *)sock1)->sin_addr, \
+ &((struct sockaddr_in *)sock2)->sin_addr, \
+ sizeof(struct in_addr)) == 0 : \
+ memcmp(&((struct sockaddr_in6 *)sock1)->sin6_addr, \
+ &((struct sockaddr_in6 *)sock2)->sin6_addr, \
+ sizeof(struct in6_addr)) == 0 : \
+ 0)
+
+#define SOCKNUL(sock1) \
+ (((struct sockaddr_storage *)sock1)->ss_family == AF_INET ? \
+ (((struct sockaddr_in *)sock1)->sin_addr.s_addr == 0) : \
+ (IN6_IS_ADDR_UNSPECIFIED(&((struct sockaddr_in6 *)sock1)->sin6_addr)))
+
+#define SOCKLEN(sock) \
+ (((struct sockaddr_storage *)sock)->ss_family == AF_INET ? \
+ (sizeof(struct sockaddr_in)) : (sizeof(struct sockaddr_in6)))
+
+#define ANYSOCK(sock) \
+ memset(((struct sockaddr_in *)sock), 0, \
+ sizeof(struct sockaddr_storage))
+
+#define ANY_INTERFACE_CHOOSE(sock) \
+ (((struct sockaddr_storage *)sock)->ss_family == AF_INET ? \
+ any_interface : any6_interface)
/*
* We tell reference clocks from real peers by giving the reference
@@ -492,11 +518,27 @@ struct peer {
/*
* Utilities for manipulating addresses and port numbers
*/
-#define NSRCADR(src) ((src)->sin_addr.s_addr) /* address in net byte order */
-#define NSRCPORT(src) ((src)->sin_port) /* port in net byte order */
+#define NSRCADR(src) (((struct sockaddr_in *)src)->sin_addr.s_addr) /* address in net byte order */
+#define NSRCPORT(src) (((struct sockaddr_in *)src)->sin_port) /* port in net byte order */
#define SRCADR(src) (ntohl(NSRCADR((src)))) /* address in host byte order */
#define SRCPORT(src) (ntohs(NSRCPORT((src)))) /* host port */
+#define CAST_V4(src) ((struct sockaddr_in *)&(src))
+#define CAST_V6(src) ((struct sockaddr_in6 *)&(src))
+#define GET_INADDR(src) (CAST_V4(src)->sin_addr.s_addr)
+#define GET_INADDR6(src) (CAST_V6(src)->sin6_addr)
+
+#define SET_HOSTMASK(addr, family) \
+ do { \
+ memset((char *)(addr), 0, sizeof(struct sockaddr_storage)); \
+ (addr)->ss_family = (family); \
+ if ((family) == AF_INET) \
+ GET_INADDR(*(addr)) = 0xffffffff; \
+ else \
+ memset(&GET_INADDR6(*(addr)), 0xff, \
+ sizeof(struct in6_addr)); \
+ } while(0)
+
/*
* NTP packet format. The mac field is optional. It isn't really
* an l_fp either, but for now declaring it that way is convenient.
@@ -533,15 +575,11 @@ struct pkt {
* octets. But, to handle humungus certificates, the bank must
* be broke.
*/
-#ifdef AUTOKEY
-#ifdef PUBKEY
- u_int32 exten[5000 / 4]; /* max extension field */
-#else
- u_int32 exten[672 / 4]; /* max extension field */
-#endif /* PUBKEY */
-#else /* AUTOKEY */
+#ifdef OPENSSL
+ u_int32 exten[NTP_MAXEXTEN / 4]; /* max extension field */
+#else /* OPENSSL */
u_int32 exten[1]; /* misused */
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
u_char mac[MAX_MAC_LEN]; /* mac */
};
@@ -572,7 +610,8 @@ struct pkt {
/*
* Event codes. Used for reporting errors/events to the control module
*/
-#define PEER_EVENT 0x80 /* this is a peer event */
+#define PEER_EVENT 0x080 /* this is a peer event */
+#define CRPT_EVENT 0x100 /* this is a crypto event */
/*
* System event codes
@@ -617,9 +656,9 @@ struct pkt {
* To speed lookups, peers are hashed by the low order bits of the
* remote IP address. These definitions relate to that.
*/
-#define HASH_SIZE 32
+#define HASH_SIZE 128
#define HASH_MASK (HASH_SIZE-1)
-#define HASH_ADDR(src) ((SRCADR((src))^(SRCADR((src))>>8)) & HASH_MASK)
+#define HASH_ADDR(src) sock_hash(src)
/*
* How we randomize polls. The poll interval is a power of two.
@@ -666,6 +705,13 @@ struct pkt {
#define PROTO_FILEGEN 11
#define PROTO_PPS 12
#define PROTO_CAL 13
+#define PROTO_MINCLOCK 14
+#define PROTO_MINSANE 15
+#define PROTO_FLOOR 16
+#define PROTO_CEILING 17
+#define PROTO_COHORT 18
+#define PROTO_CALLDELAY 19
+#define PROTO_ADJ 20
/*
* Configuration items for the loop filter
@@ -679,6 +725,7 @@ struct pkt {
#define LOOP_MINPOLL 7 /* set min poll interval (log2 s) */
#define LOOP_ALLAN 8 /* set minimum Allan intercept */
#define LOOP_HUFFPUFF 9 /* set huff-n'-puff filter length */
+#define LOOP_FREQ 10 /* set initial frequency */
/*
* Configuration items for the stats printer
@@ -687,7 +734,7 @@ struct pkt {
#define STATS_STATSDIR 2 /* directory prefix for stats files */
#define STATS_PID_FILE 3 /* configure ntpd PID file */
-#define MJD_1970 40587 /* MJD for 1 Jan 1970 */
+#define MJD_1900 15020 /* MJD for 1 Jan 1900 */
/*
* Default parameters. We use these in the absence of something better.
@@ -702,13 +749,11 @@ struct mon_data {
struct mon_data *hash_next; /* next structure in hash list */
struct mon_data *mru_next; /* next structure in MRU list */
struct mon_data *mru_prev; /* previous structure in MRU list */
- struct mon_data *fifo_next; /* next structure in FIFO list */
- struct mon_data *fifo_prev; /* previous structure in FIFO list */
- u_long lastdrop; /* last time dropped due to RES_LIMIT*/
- u_long lasttime; /* last time data updated */
- u_long firsttime; /* time structure initialized */
- u_long count; /* count we have seen */
- u_int32 rmtadr; /* address of remote host */
+ u_long drop_count; /* dropped due RESLIMIT*/
+ double avg_interval; /* average interpacket interval */
+ u_long lasttime; /* interval since last packet */
+ u_long count; /* total packet count */
+ struct sockaddr_storage rmtadr; /* address of remote host */
struct interface *interface; /* interface on which this arrived */
u_short rmtport; /* remote port last came from */
u_char mode; /* mode of incoming packet */
@@ -725,6 +770,7 @@ struct mon_data {
#define MDF_LCAST 0x08 /* localcast */
#define MDF_ACAST 0x10 /* manycast */
#define MDF_BCLNT 0x20 /* broadcast client */
+#define MDF_ACLNT 0x40 /* manycast client */
/*
* Values used with mon_enabled to indicate reason for enabling monitoring
@@ -737,32 +783,49 @@ struct mon_data {
*/
struct restrictlist {
struct restrictlist *next; /* link to next entry */
- u_int32 addr; /* host address (host byte order) */
- u_int32 mask; /* mask for address (host byte order) */
+ u_int32 addr; /* Ipv4 host address (host byte order) */
+ u_int32 mask; /* Ipv4 mask for address (host byte order) */
+ u_long count; /* number of packets matched */
+ u_short flags; /* accesslist flags */
+ u_short mflags; /* match flags */
+};
+
+struct restrictlist6 {
+ struct restrictlist6 *next; /* link to next entry */
+ struct in6_addr addr6; /* Ipv6 host address */
+ struct in6_addr mask6; /* Ipv6 mask address */
u_long count; /* number of packets matched */
u_short flags; /* accesslist flags */
u_short mflags; /* match flags */
};
+
/*
* Access flags
*/
-#define RES_IGNORE 0x001 /* ignore if matched */
-#define RES_DONTSERVE 0x002 /* don't give him any time */
-#define RES_DONTTRUST 0x004 /* don't trust if matched */
-#define RES_NOQUERY 0x008 /* don't allow queries if matched */
-#define RES_NOMODIFY 0x010 /* don't allow him to modify server */
-#define RES_NOPEER 0x020 /* don't allocate memory resources */
-#define RES_NOTRAP 0x040 /* don't allow him to set traps */
-#define RES_LPTRAP 0x080 /* traps set by him are low priority */
-#define RES_LIMITED 0x100 /* limit per net number of clients */
-#define RES_VERSION 0x200 /* serve only current version */
-#define RES_DEMOBILIZE 0x400 /* demobilize association */
+#define RES_IGNORE 0x001 /* ignore packet */
+#define RES_DONTSERVE 0x002 /* access denied */
+#define RES_DONTTRUST 0x004 /* authentication required */
+#define RES_VERSION 0x008 /* version mismatch */
+#define RES_NOPEER 0x010 /* new association denied */
+#define RES_LIMITED 0x020 /* packet rate exceeded */
+
+#define RES_FLAGS (RES_IGNORE | RES_DONTSERVE |\
+ RES_DONTTRUST | RES_VERSION |\
+ RES_NOPEER | RES_LIMITED)
-#define RES_ALLFLAGS \
- (RES_IGNORE | RES_DONTSERVE | RES_DONTTRUST | RES_NOQUERY | \
- RES_NOMODIFY | RES_NOPEER | RES_NOTRAP | RES_LPTRAP | \
- RES_LIMITED | RES_VERSION | RES_DEMOBILIZE)
+#define RES_NOQUERY 0x040 /* mode 6/7 packet denied */
+#define RES_NOMODIFY 0x080 /* mode 6/7 modify denied */
+#define RES_NOTRAP 0x100 /* mode 6/7 set trap denied */
+#define RES_LPTRAP 0x200 /* mode 6/7 low priority trap */
+
+#define RES_DEMOBILIZE 0x400 /* send kiss of death packet */
+#define RES_TIMEOUT 0x800 /* timeout this entry */
+
+#define RES_ALLFLAGS (RES_FLAGS | RES_NOQUERY |\
+ RES_NOMODIFY | RES_NOTRAP |\
+ RES_LPTRAP | RES_DEMOBILIZE |\
+ RES_TIMEOUT)
/*
* Match flags
@@ -777,16 +840,6 @@ struct restrictlist {
#define RESTRICT_UNFLAG 2 /* remove flags from restrict entry */
#define RESTRICT_REMOVE 3 /* remove a restrict entry */
-
-/*
- * Experimental alternate selection algorithm identifiers
- */
-#define SELECT_1 1
-#define SELECT_2 2
-#define SELECT_3 3
-#define SELECT_4 4
-#define SELECT_5 5
-
/*
* Endpoint structure for the select algorithm
*/
diff --git a/contrib/ntp/include/ntp_config.h b/contrib/ntp/include/ntp_config.h
index 92f5cd116c1d..01478d2b6b07 100644
--- a/contrib/ntp/include/ntp_config.h
+++ b/contrib/ntp/include/ntp_config.h
@@ -7,6 +7,7 @@
# else /* SYS_WINNT */
# define CONFIG_FILE "%windir%\\system32\\drivers\\etc\\ntp.conf"
# define ALT_CONFIG_FILE "%windir%\\ntp.conf"
+# define NTP_KEYSDIR "%windir%\\system32\\drivers\\etc"
# endif /* SYS_WINNT */
#endif /* not CONFIG_FILE */
@@ -41,8 +42,8 @@
#define CONFIG_STATISTICS 21
#define CONFIG_PIDFILE 22
#define CONFIG_SETVAR 23
-#define CONFIG_CLIENTLIMIT 24
-#define CONFIG_CLIENTPERIOD 25
+#define CONFIG_DISCARD 24
+#define CONFIG_ADJ 25
#define CONFIG_MULTICASTCLIENT 26
#define CONFIG_ENABLE 27
#define CONFIG_DISABLE 28
@@ -51,11 +52,14 @@
#define CONFIG_LOGCONFIG 31
#define CONFIG_MANYCASTCLIENT 32
#define CONFIG_MANYCASTSERVER 33
-#ifdef PUBKEY
-#define CONFIG_CRYPTO 34
-#define CONFIG_KEYSDIR 35
-#endif /* PUBKEY */
-#define CONFIG_INCLUDEFILE 36
+#define CONFIG_TOS 34
+#define CONFIG_TTL 35
+#define CONFIG_INCLUDEFILE 36
+#define CONFIG_KEYSDIR 37
+#define CONFIG_CDELAY 38
+#ifdef OPENSSL
+#define CONFIG_CRYPTO 39
+#endif /* OPENSSL */
/*
* "peer", "server", "broadcast" modifier keywords
@@ -71,9 +75,6 @@
#define CONF_MOD_TTL 9
#define CONF_MOD_MODE 10
#define CONF_MOD_NOSELECT 11
-#ifdef PUBKEY
-#define CONF_MOD_PUBLICKEY 12
-#endif /* PUBKEY */
/*
* "restrict" modifier keywords
@@ -128,24 +129,50 @@
#define CONF_PPS_HARDPPS 3
/*
+ * "discard" modifier keywords
+ */
+#define CONF_DISCARD_AVERAGE 1
+#define CONF_DISCARD_MINIMUM 2
+#define CONF_DISCARD_MONITOR 3
+
+/*
* "tinker" modifier keywords
*/
#define CONF_CLOCK_MAX 1
#define CONF_CLOCK_PANIC 2
#define CONF_CLOCK_PHI 3
#define CONF_CLOCK_MINSTEP 4
-#define CONF_CLOCK_MINPOLL 5
-#define CONF_CLOCK_ALLAN 6
-#define CONF_CLOCK_HUFFPUFF 7
+#define CONF_CLOCK_ALLAN 5
+#define CONF_CLOCK_HUFFPUFF 6
+#define CONF_CLOCK_FREQ 7
-#ifdef PUBKEY
+/*
+ * "tos" modifier keywords
+ */
+#define CONF_TOS_MINCLOCK 1
+#define CONF_TOS_MINSANE 2
+#define CONF_TOS_FLOOR 3
+#define CONF_TOS_CEILING 4
+#define CONF_TOS_COHORT 5
+
+#ifdef OPENSSL
/*
* "crypto" modifier keywords
*/
-#define CONF_CRYPTO_DH 1
-#define CONF_CRYPTO_PRIVATEKEY 2
-#define CONF_CRYPTO_PUBLICKEY 3
-#define CONF_CRYPTO_LEAP 4
-#define CONF_CRYPTO_FLAGS 5
-#define CONF_CRYPTO_CERT 6
-#endif /* PUBKEY */
+#define CONF_CRYPTO_RSA 1
+#define CONF_CRYPTO_SIGN 2
+#define CONF_CRYPTO_LEAP 3
+#define CONF_CRYPTO_CERT 4
+#define CONF_CRYPTO_RAND 5
+#define CONF_CRYPTO_KEYS 6
+#define CONF_CRYPTO_IFFPAR 7
+#define CONF_CRYPTO_GQPAR 8
+#define CONF_CRYPTO_MVPAR 9
+#define CONF_CRYPTO_PW 10
+#endif /* OPENSSL */
+
+/*
+ * Address selection, IPv4 or IPv6
+ */
+#define CONF_ADDR_IPV4 1
+#define CONF_ADDR_IPV6 2
diff --git a/contrib/ntp/include/ntp_control.h b/contrib/ntp/include/ntp_control.h
index e31a2fdde236..c75d38b31ad6 100644
--- a/contrib/ntp/include/ntp_control.h
+++ b/contrib/ntp/include/ntp_control.h
@@ -164,19 +164,19 @@ struct ntp_control {
#define CS_VERSION 17
#define CS_STABIL 18
#define CS_VARLIST 19
-#ifdef PUBKEY
+#ifdef OPENSSL
#define CS_FLAGS 20
#define CS_HOST 21
#define CS_PUBLIC 22
#define CS_CERTIF 23
-#define CS_DHPARAMS 24
-#define CS_REVTIME 25
-#define CS_LEAPTAB 26
-#define CS_TAI 27
-#define CS_MAXCODE CS_TAI
+#define CS_REVTIME 24
+#define CS_LEAPTAB 25
+#define CS_TAI 26
+#define CS_DIGEST 27
+#define CS_MAXCODE CS_DIGEST
#else
#define CS_MAXCODE CS_VARLIST
-#endif /* PUBKEY */
+#endif /* OPENSSL */
/*
* Peer variables we understand
@@ -217,22 +217,20 @@ struct ntp_control {
#define CP_FILTERROR 34
#define CP_FLASH 35
#define CP_TTL 36
-#define CP_TTLMAX 37
+#define CP_RANK 37
#define CP_VARLIST 38
-#ifdef PUBKEY
+#ifdef OPENSSL
#define CP_FLAGS 39
#define CP_HOST 40
-#define CP_PUBLIC 41
-#define CP_CERTIF 42
-#define CP_SESKEY 43
-#define CP_SASKEY 44
-#define CP_INITSEQ 45
-#define CP_INITKEY 46
-#define CP_INITTSP 47
-#define CP_MAXCODE CP_INITTSP
+#define CP_INITSEQ 41
+#define CP_INITKEY 42
+#define CP_INITTSP 43
+#define CP_DIGEST 44
+#define CP_IDENT 45
+#define CP_MAXCODE CP_IDENT
#else
#define CP_MAXCODE CP_VARLIST
-#endif /* PUBKEY */
+#endif /* OPENSSL */
/*
* Clock variables we understand
@@ -258,7 +256,7 @@ struct ntp_control {
* ntp_request.c wants to see this.
*/
struct ctl_trap {
- struct sockaddr_in tr_addr; /* address of trap recipient */
+ struct sockaddr_storage tr_addr;/* address of trap recipient */
struct interface *tr_localaddr; /* interface to send this through */
u_long tr_settime; /* time trap was set */
u_long tr_count; /* async messages sent to this guy */
diff --git a/contrib/ntp/include/ntp_crypto.h b/contrib/ntp/include/ntp_crypto.h
index a4e6d70d6577..fb1955ce4064 100644
--- a/contrib/ntp/include/ntp_crypto.h
+++ b/contrib/ntp/include/ntp_crypto.h
@@ -1,93 +1,166 @@
/*
* ntp_crypto.h - definitions for cryptographic operations
*/
-#ifdef AUTOKEY
-#include "global.h"
-#include "md5.h"
-#ifdef RSAREF
-#include "rsaref.h"
-#include "rsa.h"
-
-#define EVP_SignInit(a, b) R_SignInit(a, b)
-#define EVP_SignUpdate(a, b, c) R_SignUpdate(a, b, c);
-#define EVP_SignFinal(a, b, c, d) R_SignFinal(a, b, c, d);
-#define EVP_VerifyInit(a, b) R_VerifyInit(a, b)
-#define EVP_VerifyUpdate(a, b, c) R_VerifyUpdate(a, b, c);
-#define EVP_VerifyFinal(a, b, c, d) R_VerifyFinal(a, b, c, d);
+#ifdef OPENSSL
+#include "openssl/evp.h"
+/*
+ * The following bits are set by the CRYPTO_ASSOC message from
+ * the server and are not modified by the client.
+ */
+#define CRYPTO_FLAG_ENAB 0x0001 /* crypto enable */
+#define CRYPTO_FLAG_TAI 0x0002 /* leapseconds table */
-#endif /* RSAREF */
+#define CRYPTO_FLAG_PRIV 0x0010 /* PC identity scheme */
+#define CRYPTO_FLAG_IFF 0x0020 /* IFF identity scheme */
+#define CRYPTO_FLAG_GQ 0x0040 /* GQ identity scheme */
+#define CRYPTO_FLAG_MV 0x0080 /* MV identity scheme */
+#define CRYPTO_FLAG_MASK 0x00f0 /* identity scheme mask */
+
+/*
+ * The following bits are used by the client during the protocol
+ * exchange.
+ */
+#define CRYPTO_FLAG_VALID 0x0100 /* public key verified */
+#define CRYPTO_FLAG_VRFY 0x0200 /* identity verified */
+#define CRYPTO_FLAG_PROV 0x0400 /* signature verified */
+#define CRYPTO_FLAG_AGREE 0x0800 /* cookie verifed */
+#define CRYPTO_FLAG_AUTO 0x1000 /* autokey verified */
+#define CRYPTO_FLAG_SIGN 0x2000 /* certificate signed */
+#define CRYPTO_FLAG_LEAP 0x4000 /* leapseconds table verified */
/*
- * Cryptostatus word
+ * Flags used for certificate management
*/
-#define CRYPTO_FLAG_ENAB 0x01 /* crypto enable */
-#define CRYPTO_FLAG_RSA 0x02 /* public/private keys */
-#define CRYPTO_FLAG_CERT 0x04 /* certificate */
-#define CRYPTO_FLAG_DH 0x08 /* agreement parameters */
-#define CRYPTO_FLAG_TAI 0x10 /* leapseconds table */
+#define CERT_SIGN 0x01 /* certificate is signed */
+#define CERT_TRUST 0x02 /* certificate is trusted */
+#define CERT_PRIV 0x04 /* certificate is private */
+#define CERT_ERROR 0x80 /* certificate has errors */
/*
* Extension field definitions
*/
-#define CRYPTO_VN 1 /* current protocol version number */
+#define CRYPTO_MAXLEN 1024 /* max extension field length */
+#define CRYPTO_VN 2 /* current protocol version number */
+#define CRYPTO_CMD(x) (((CRYPTO_VN << 8) | (x)) << 16)
+#define CRYPTO_NULL CRYPTO_CMD(0) /* no operation */
+#define CRYPTO_ASSOC CRYPTO_CMD(1) /* association */
+#define CRYPTO_CERT CRYPTO_CMD(2) /* certificate */
+#define CRYPTO_COOK CRYPTO_CMD(3) /* cookie value */
+#define CRYPTO_AUTO CRYPTO_CMD(4) /* autokey values */
+#define CRYPTO_TAI CRYPTO_CMD(5) /* leapseconds table */
+#define CRYPTO_SIGN CRYPTO_CMD(6) /* certificate sign */
+#define CRYPTO_IFF CRYPTO_CMD(7) /* IFF identity scheme */
+#define CRYPTO_GQ CRYPTO_CMD(8) /* GQ identity scheme */
+#define CRYPTO_MV CRYPTO_CMD(9) /* MV identity scheme */
+#define CRYPTO_RESP 0x80000000 /* response */
+#define CRYPTO_ERROR 0x40000000 /* error */
-#define CRYPTO_NULL ((CRYPTO_VN << 8) | 0) /* no operation */
-#define CRYPTO_STAT ((CRYPTO_VN << 8) | 1) /* status */
-#define CRYPTO_ASSOC ((CRYPTO_VN << 8) | 2) /* association ID */
-#define CRYPTO_AUTO ((CRYPTO_VN << 8) | 3) /* autokey values */
-#define CRYPTO_PRIV ((CRYPTO_VN << 8) | 4) /* cookie value */
-#define CRYPTO_DHPAR ((CRYPTO_VN << 8) | 5) /* agreement params */
-#define CRYPTO_DH ((CRYPTO_VN << 8) | 6) /* public value */
-#define CRYPTO_NAME ((CRYPTO_VN << 8) | 7) /* host name/pub key */
-#define CRYPTO_CERT ((CRYPTO_VN << 8) | 8) /* PKI certificate */
-#define CRYPTO_TAI ((CRYPTO_VN << 8) | 9) /* leapseconds table */
-#define CRYPTO_RESP 0x8000 /* response */
-#define CRYPTO_ERROR 0x4000 /* error */
+/*
+ * Autokey event codes
+ */
+#define XEVNT_CMD(x) (CRPT_EVENT | (x))
+#define XEVNT_OK XEVNT_CMD(0) /* success */
+#define XEVNT_LEN XEVNT_CMD(1) /* bad field format or length */
+#define XEVNT_TSP XEVNT_CMD(2) /* bad timestamp */
+#define XEVNT_FSP XEVNT_CMD(3) /* bad filestamp */
+#define XEVNT_PUB XEVNT_CMD(4) /* bad procedure or data */
+#define XEVNT_MD XEVNT_CMD(5) /* unsupported digest type */
+#define XEVNT_KEY XEVNT_CMD(6) /* unsupported identity type */
+#define XEVNT_SGL XEVNT_CMD(7) /* bad signature length */
+#define XEVNT_SIG XEVNT_CMD(8) /* signature not verified */
+#define XEVNT_VFY XEVNT_CMD(9) /* certificate not verified */
+#define XEVNT_PER XEVNT_CMD(10) /* certificate expired */
+#define XEVNT_CKY XEVNT_CMD(11) /* bad or missing cookie */
+#define XEVNT_DAT XEVNT_CMD(12) /* bad or missing leapseconds table */
+#define XEVNT_CRT XEVNT_CMD(13) /* bad or missing certificate */
+#define XEVNT_ID XEVNT_CMD(14) /* bad or missing identification */
-#ifdef PUBKEY
/*
* Configuration codes
*/
#define CRYPTO_CONF_NONE 0 /* nothing doing */
-#define CRYPTO_CONF_FLAGS 1 /* initialize flags */
-#define CRYPTO_CONF_PRIV 2 /* load private key from file */
-#define CRYPTO_CONF_PUBL 3 /* load public key from file */
-#define CRYPTO_CONF_DH 4 /* load Diffie_Hellman pars from file */
-#define CRYPTO_CONF_LEAP 5 /* load leapsecond table */
-#define CRYPTO_CONF_KEYS 6 /* set keys directory path */
-#define CRYPTO_CONF_CERT 7 /* load PKI certificate from file */
-#endif /* PUBKEY */
+#define CRYPTO_CONF_PRIV 1 /* host keys file name */
+#define CRYPTO_CONF_SIGN 2 /* signature keys file name */
+#define CRYPTO_CONF_LEAP 3 /* leapseconds table file name */
+#define CRYPTO_CONF_KEYS 4 /* keys directory path */
+#define CRYPTO_CONF_CERT 5 /* certificate file name */
+#define CRYPTO_CONF_RAND 6 /* random seed file name */
+#define CRYPTO_CONF_TRST 7 /* specify trust */
+#define CRYPTO_CONF_IFFPAR 8 /* IFF parameters file name */
+#define CRYPTO_CONF_GQPAR 9 /* GQ parameters file name */
+#define CRYPTO_CONF_MVPAR 10 /* GQ parameters file name */
+#define CRYPTO_CONF_PW 11 /* private key password */
+
+/*
+ * Miscellaneous crypto stuff
+ */
+#define NTP_MAXSESSION 100 /* maximum session key list entries */
+#define NTP_AUTOMAX 13 /* log2 default max session key life */
+#define KEY_REVOKE 16 /* log2 default key revoke timeout */
+#define NTP_MAXEXTEN 1024 /* maximum extension field size */
+
+/*
+ * The autokey structure holds the values used to authenticate key IDs.
+ */
+struct autokey { /* network byte order */
+ keyid_t key; /* key ID */
+ int32 seq; /* key number */
+};
+
+/*
+ * The value structure holds variable length data such as public
+ * key, agreement parameters, public valule and leapsecond table.
+ * They are in network byte order.
+ */
+struct value { /* network byte order */
+ tstamp_t tstamp; /* timestamp */
+ tstamp_t fstamp; /* filestamp */
+ u_int32 vallen; /* value length */
+ u_char *ptr; /* data pointer (various) */
+ u_int32 siglen; /* signature length */
+ u_char *sig; /* signature */
+};
+
+/*
+ * The packet extension field structures are used to hold values
+ * and signatures in network byte order.
+ */
+struct exten {
+ u_int32 opcode; /* opcode */
+ u_int32 associd; /* association ID */
+ u_int32 tstamp; /* timestamp */
+ u_int32 fstamp; /* filestamp */
+ u_int32 vallen; /* value length */
+ u_int32 pkt[1]; /* start of value field */
+};
/*
- * Function prototypes
+ * The certificate info/value structure
*/
-extern void crypto_recv P((struct peer *, struct recvbuf *));
-extern int crypto_xmit P((u_int32 *, int, u_int, keyid_t,
- u_int));
-extern keyid_t session_key P((struct sockaddr_in *, struct
- sockaddr_in *, keyid_t, keyid_t,
- u_long));
-extern void make_keylist P((struct peer *, struct interface *));
-extern void key_expire P((struct peer *));
-extern void crypto_agree P((void));
-#ifdef PUBKEY
-extern void crypto_config P((int, char *));
-extern void crypto_setup P((void));
-extern int crypto_public P((struct peer *, u_char *, u_int));
-#endif /* PUBKEY */
+struct cert_info {
+ struct cert_info *link; /* forward link */
+ u_int flags; /* flags that wave */
+ EVP_PKEY *pkey; /* generic key */
+ long version; /* X509 version */
+ int nid; /* signature/digest ID */
+ const EVP_MD *digest; /* message digest algorithm */
+ u_long serial; /* serial number */
+ tstamp_t first; /* valid not before */
+ tstamp_t last; /* valid not after */
+ char *subject; /* subject common name */
+ char *issuer; /* issuer common name */
+ u_char *grpkey; /* GQ group key */
+ u_int grplen; /* GQ group key length */
+ struct value cert; /* certificate/value */
+};
/*
* Cryptographic values
*/
+extern char *keysdir; /* crypto keys directory */
extern u_int crypto_flags; /* status word */
-#ifdef PUBKEY
-extern R_DH_PARAMS dh_params;
-extern struct value host; /* host name/public key */
-extern struct value certif; /* certificate */
-extern struct value dhparam; /* agreement parameters */
-extern struct value dhpub; /* public value */
+extern struct value hostval; /* host name/value */
+extern struct cert_info *cinfo; /* host certificate information */
extern struct value tai_leap; /* leapseconds table */
-extern u_int crypto_flags; /* status word */
extern u_int sys_tai; /* current UTC offset from TAI */
-#endif /* PUBKEY */
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
diff --git a/contrib/ntp/include/ntp_fp.h b/contrib/ntp/include/ntp_fp.h
index 027add32d9ba..256bab830a04 100644
--- a/contrib/ntp/include/ntp_fp.h
+++ b/contrib/ntp/include/ntp_fp.h
@@ -7,6 +7,7 @@
#include <sys/types.h>
#include <sys/socket.h>
+#include "ntp_rfc2553.h"
#include <netinet/in.h>
#include "ntp_types.h"
@@ -338,14 +339,13 @@ typedef u_int32 u_fp;
/*
* Prototypes
*/
-extern char * dofptoa P((u_fp, int, int, int));
-extern char * dolfptoa P((u_long, u_long, int, int, int));
+extern char * dofptoa P((u_fp, int, short, int));
+extern char * dolfptoa P((u_long, u_long, int, short, int));
extern int atolfp P((const char *, l_fp *));
extern int buftvtots P((const char *, l_fp *));
-extern char * fptoa P((s_fp, int));
-extern char * fptoms P((s_fp, int));
-extern char * fptoms P((s_fp, int));
+extern char * fptoa P((s_fp, short));
+extern char * fptoms P((s_fp, short));
extern int hextolfp P((const char *, l_fp *));
extern void gpstolfp P((int, int, unsigned long, l_fp *));
extern int mstolfp P((const char *, l_fp *));
@@ -361,8 +361,11 @@ extern int adj_systime P((double));
#define lfptoa(_fpv, _ndec) mfptoa((_fpv)->l_ui, (_fpv)->l_uf, (_ndec))
#define lfptoms(_fpv, _ndec) mfptoms((_fpv)->l_ui, (_fpv)->l_uf, (_ndec))
-#define ntoa(_sin) numtoa((_sin)->sin_addr.s_addr)
-#define ntohost(_sin) numtohost((_sin)->sin_addr.s_addr)
+#define stoa(_sin) socktoa((_sin))
+#define stohost(_sin) socktohost((_sin))
+
+#define ntoa(_sin) stoa(_sin)
+#define ntohost(_sin) stohost(_sin)
#define ufptoa(_fpv, _ndec) dofptoa((_fpv), 0, (_ndec), 0)
#define ufptoms(_fpv, _ndec) dofptoa((_fpv), 0, (_ndec), 1)
diff --git a/contrib/ntp/include/ntp_if.h b/contrib/ntp/include/ntp_if.h
index 91362d83106a..3af5865ffae2 100644
--- a/contrib/ntp/include/ntp_if.h
+++ b/contrib/ntp/include/ntp_if.h
@@ -22,27 +22,6 @@
# include <sys/stropts.h>
#endif
-/* Was: #if defined(SYS_SVR4) */
-#if defined(USE_STREAMS_DEVICE_FOR_IF_CONFIG)
-# include <netinet/ip.h>
-# undef SIOCGIFCONF
-# undef SIOCGIFFLAGS
-# undef SIOCGIFADDR
-# undef SIOCGIFBRDADDR
-# undef SIOCGIFNETMASK
-# define SIOCGIFCONF IPIOC_GETIFCONF
-# define SIOCGIFFLAGS IPIOC_GETIFFLAGS
-# define SIOCGIFADDR IPIOC_GETIFADDR
-# define SIOCGIFBRDADDR IPIOC_GETIFBRDADDR
-# define SIOCGIFNETMASK IPIOC_GETIFNETMASK
-#if 0 /* We don't need this now that sys/sockio.h is handled above */
-# else /* USE_STREAMS_DEVICE_FOR_IF_CONFIG */
-# include <sys/sockio.h>
-#endif
-# endif /* USE_STREAMS_DEVICE_FOR_IF_CONFIG */
-/* was #endif SYS_SVR4 */
-
-
#ifdef HAVE_NET_IF_H
# include <net/if.h>
#endif /* HAVE_NET_IF_H */
diff --git a/contrib/ntp/include/ntp_io.h b/contrib/ntp/include/ntp_io.h
index 0ef4fa65386f..983c6c7dce85 100644
--- a/contrib/ntp/include/ntp_io.h
+++ b/contrib/ntp/include/ntp_io.h
@@ -30,4 +30,21 @@
# include "win32_io.h"
#endif
+/*
+ * Define FNDELAY and FASYNC using O_NONBLOCK and O_ASYNC if we need
+ * to (and can). This is here initially for QNX, but may help for
+ * others as well...
+ */
+#ifndef FNDELAY
+# ifdef O_NONBLOCK
+# define FNDELAY O_NONBLOCK
+# endif
+#endif
+
+#ifndef FASYNC
+# ifdef O_ASYNC
+# define FASYNC O_ASYNC
+# endif
+#endif
+
#endif
diff --git a/contrib/ntp/include/ntp_machine.h b/contrib/ntp/include/ntp_machine.h
index 17026a776e6c..65ef5be88e3d 100644
--- a/contrib/ntp/include/ntp_machine.h
+++ b/contrib/ntp/include/ntp_machine.h
@@ -235,29 +235,60 @@ typedef unsigned long u_long;
#endif /* 0 */
/*
+ * Define these here for non-Windows NT systems
+ * SOCKET and INVALID_SOCKET are native macros
+ * on Windows NT and since they have different
+ * requirements we use them in the code and
+ * make them macros for everyone else
+ */
+#ifndef SYS_WINNT
+# define SOCKET int
+# define INVALID_SOCKET -1
+# define closesocket close
+#endif
+/*
* Windows NT
*/
#if defined(SYS_WINNT)
# if !defined(HAVE_CONFIG_H) || !defined(__config)
- error "NT requires config.h to be included"
+# include <config.h>
# endif /* HAVE_CONFIG_H) */
+# include <windows.h>
+# include <ws2tcpip.h>
+# include <winsock2.h>
# define ifreq _INTERFACE_INFO
# define ifr_flags iiFlags
# define ifr_addr iiAddress.AddressIn
# define ifr_broadaddr iiBroadcastAddress.AddressIn
# define ifr_mask iiNetmask.AddressIn
+# define zz_family sin_family
+# define S_IFREG _S_IFREG
+# define stat _stat
# define isascii __isascii
# define isatty _isatty
# define mktemp _mktemp
-# if 0
-# define getpid GetCurrentProcessId
-# endif
-# include <windows.h>
-# include <ws2tcpip.h>
+# define unlink _unlink
+# define fileno _fileno
+# define write _write
+# define vsnprintf _vsnprintf
+# define snprintf _snprintf
+#ifndef close
+# define close _close
+#endif
# undef interface
+# include <process.h>
+#define getpid _getpid
+/*
+ * Defining registers are not a good idea on Windows
+ * This gets rid of the usage
+ */
+#ifndef register
+# define register
+#endif
typedef char *caddr_t;
+# define vsnprintf _vsnprintf
#endif /* SYS_WINNT */
int ntp_set_tod P((struct timeval *tvp, void *tzp));
@@ -518,6 +549,10 @@ extern char *strdup(const char *);
# undef HAVE_SYSV_TTYS
#endif
+#ifndef HAVE_TIMEGM
+extern time_t timegm P((struct tm *));
+#endif
+
#ifdef HAVE_SYSV_TTYS
# undef HAVE_BSD_TTYS
#endif
@@ -537,8 +572,8 @@ extern char *strdup(const char *);
#endif
/*
- * Byte order woes. The DES code is sensitive to byte order. This
- * used to be resolved by calling ntohl() and htonl() to swap things
+ * Byte order woes.
+ * This used to be resolved by calling ntohl() and htonl() to swap things
* around, but this turned out to be quite costly on Vaxes where those
* things are actual functions. The code now straightens out byte
* order troubles on its own, with no performance penalty for little
diff --git a/contrib/ntp/include/ntp_md5.h b/contrib/ntp/include/ntp_md5.h
new file mode 100644
index 000000000000..bb6985a2f367
--- /dev/null
+++ b/contrib/ntp/include/ntp_md5.h
@@ -0,0 +1,9 @@
+/*
+ * ntp_md5.h: deal with md5.h headers
+ */
+
+#ifdef HAVE_MD5_H
+# include <md5.h>
+#else
+# include "rsa_md5.h"
+#endif
diff --git a/contrib/ntp/include/ntp_refclock.h b/contrib/ntp/include/ntp_refclock.h
index 3995e9a1af7d..5e33a8ce25a1 100644
--- a/contrib/ntp/include/ntp_refclock.h
+++ b/contrib/ntp/include/ntp_refclock.h
@@ -44,9 +44,10 @@
#define BSD_TTYS
#endif /* SYSV_TTYS STREAM BSD_TTYS */
-#define SAMPLE(x) pp->filter[pp->coderecv++ % MAXSTAGE] = (x); \
- if (pp->coderecv % MAXSTAGE == pp->codeproc % MAXSTAGE) \
- pp->codeproc++;
+#define SAMPLE(x) pp->coderecv = (pp->coderecv + 1) % MAXSTAGE; \
+ pp->filter[pp->coderecv] = (x); \
+ if (pp->coderecv == pp->codeproc) \
+ pp->codeproc = (pp->codeproc + 1) % MAXSTAGE;
/*
* Macros to determine the clock type and unit numbers from a
@@ -128,7 +129,7 @@ struct refclockio {
of refclock input data */
caddr_t srcclock; /* pointer to clock structure */
int datalen; /* lenth of data */
- int fd; /* file descriptor */
+ SOCKET fd; /* file descriptor */
u_long recvcount; /* count of receive completions */
};
@@ -187,13 +188,12 @@ struct refclockproc {
int hour; /* hour of day */
int minute; /* minute of hour */
int second; /* second of minute */
- int msec; /* millisecond of second */
- long usec; /* microsecond of second (alt) */
+ long nsec; /* nanosecond of second */
u_long yearstart; /* beginning of year */
int coderecv; /* put pointer */
int codeproc; /* get pointer */
- l_fp lastref; /* timecode timestamp */
- l_fp lastrec; /* local timestamp */
+ l_fp lastref; /* reference timestamp */
+ l_fp lastrec; /* receive timestamp */
double offset; /* mean offset */
double disp; /* sample dispersion */
double jitter; /* jitter (mean squares) */
@@ -204,6 +204,7 @@ struct refclockproc {
*/
double fudgetime1; /* fudge time1 */
double fudgetime2; /* fudge time2 */
+ u_char stratum; /* server stratum */
u_int32 refid; /* reference identifier */
u_char sloppyclockflag; /* fudge flags */
@@ -248,9 +249,9 @@ extern int io_addclock P((struct refclockio *));
extern void io_closeclock P((struct refclockio *));
#ifdef REFCLOCK
-extern void refclock_buginfo P((struct sockaddr_in *,
+extern void refclock_buginfo P((struct sockaddr_storage *,
struct refclockbug *));
-extern void refclock_control P((struct sockaddr_in *,
+extern void refclock_control P((struct sockaddr_storage *,
struct refclockstat *,
struct refclockstat *));
extern int refclock_open P((char *, int, int));
diff --git a/contrib/ntp/include/ntp_request.h b/contrib/ntp/include/ntp_request.h
index 9e76df58e64d..8166a4df2c5f 100644
--- a/contrib/ntp/include/ntp_request.h
+++ b/contrib/ntp/include/ntp_request.h
@@ -2,6 +2,9 @@
* ntp_request.h - definitions for the ntpd remote query facility
*/
+#ifndef _NTP_REQUEST_H
+#define _NTP_REQUEST_H
+
#include "ntp_types.h"
/*
@@ -111,10 +114,6 @@
/*
* A request packet. These are almost a fixed length.
*/
-
-#define MAXFILENAME 128 /* max key file name length */
- /* NOTE: also in ntp.h */
-
struct req_pkt {
u_char rm_vn_mode; /* response, more, version, mode */
u_char auth_seq; /* key, sequence number */
@@ -122,7 +121,8 @@ struct req_pkt {
u_char request; /* request number */
u_short err_nitems; /* error code/number of data items */
u_short mbz_itemsize; /* item size */
- char data[MAXFILENAME + 16]; /* data area [32 prev](144 byte max) */
+ char data[MAXFILENAME + 48]; /* data area [32 prev](176 byte max) */
+ /* struct conf_peer must fit */
l_fp tstamp; /* time stamp, for authentication */
keyid_t keyid; /* encryption key */
char mac[MAX_MAC_LEN-sizeof(u_int32)]; /* (optional) 8 byte auth code */
@@ -207,7 +207,7 @@ struct resp_pkt {
|((u_short)(nitems)&0xfff))))
#define INFO_MBZ(mbz_itemsize) ((ntohs(mbz_itemsize)>>12)&0xf)
-#define INFO_ITEMSIZE(mbz_itemsize) (ntohs(mbz_itemsize)&0xfff)
+#define INFO_ITEMSIZE(mbz_itemsize) ((u_short)(ntohs(mbz_itemsize)&0xfff))
#define MBZ_ITEMSIZE(itemsize) (htons((u_short)(itemsize)))
@@ -215,7 +215,8 @@ struct resp_pkt {
* Implementation numbers. One for universal use and one for ntpd.
*/
#define IMPL_UNIV 0
-#define IMPL_XNTPD 2
+#define IMPL_XNTPD_OLD 2 /* Used by pre ipv6 ntpdc */
+#define IMPL_XNTPD 3 /* Used by post ipv6 ntpdc */
/*
* Some limits related to authentication. Frames which are
@@ -275,6 +276,9 @@ struct resp_pkt {
#define REQ_MON_GETLIST_1 42 /* return collected v1 monitor data */
#define REQ_HOSTNAME_ASSOCID 43 /* Here is a hostname + assoc_id */
+/* Determine size of pre-v6 version of structures */
+#define v4sizeof(type) offsetof(type, v6_flag)
+
/*
* Flags in the peer information returns
*/
@@ -305,10 +309,13 @@ struct resp_pkt {
* Well, it *would* have gone without saying, but somebody said it.
*/
struct info_peer_list {
- u_int32 address; /* address of peer */
+ u_int32 addr; /* address of peer */
u_short port; /* port number of peer */
u_char hmode; /* mode for this peer */
u_char flags; /* flags (from above) */
+ u_int v6_flag; /* is this v6 or not */
+ u_int unused1; /* (unused) padding for addr6 */
+ struct in6_addr addr6; /* v6 address of peer */
};
@@ -328,6 +335,10 @@ struct info_peer_summary {
s_fp delay; /* peer.estdelay */
l_fp offset; /* peer.estoffset */
u_fp dispersion; /* peer.estdisp */
+ u_int v6_flag; /* is this v6 or not */
+ u_int unused1; /* (unused) padding for dstadr6 */
+ struct in6_addr dstadr6; /* local address (v6) */
+ struct in6_addr srcadr6; /* source address (v6) */
};
@@ -336,7 +347,7 @@ struct info_peer_summary {
*/
struct info_peer {
u_int32 dstadr; /* local address */
- u_int32 srcadr; /* remote address */
+ u_int32 srcadr; /* source address */
u_short srcport; /* remote port */
u_char flags; /* peer flags */
u_char leap; /* peer.leap */
@@ -379,6 +390,10 @@ struct info_peer {
int32 unused6;
int32 unused7;
s_fp estbdelay; /* broadcast offset */
+ u_int v6_flag; /* is this v6 or not */
+ u_int unused9; /* (unused) padding for dstadr6 */
+ struct in6_addr dstadr6; /* local address (v6-like) */
+ struct in6_addr srcadr6; /* sources address (v6-like) */
};
@@ -410,6 +425,10 @@ struct info_peer_stats {
u_char unused6; /* (unused) */
u_char unused7; /* (unused) */
u_char unused8; /* (unused) */
+ u_int v6_flag; /* is this v6 or not */
+ u_int unused9; /* (unused) padding for dstadr6 */
+ struct in6_addr dstadr6; /* local address */
+ struct in6_addr srcadr6; /* remote address */
};
@@ -429,7 +448,7 @@ struct info_loop {
* the implementation.
*/
struct info_sys {
- u_int32 peer; /* system peer address */
+ u_int32 peer; /* system peer address (v4) */
u_char peer_mode; /* mode we are syncing to peer in */
u_char leap; /* system leap bits */
u_char stratum; /* our stratum */
@@ -447,6 +466,9 @@ struct info_sys {
s_fp frequency; /* frequency residual (scaled ppm) */
l_fp authdelay; /* default authentication delay */
u_fp stability; /* clock stability (scaled ppm) */
+ u_int v6_flag; /* is this v6 or not */
+ u_int unused4; /* unused, padding for peer6 */
+ struct in6_addr peer6; /* system peer address (v6) */
};
@@ -454,17 +476,17 @@ struct info_sys {
* System stats. These are collected in the protocol module
*/
struct info_sys_stats {
- u_int32 timeup; /* time we have been up and running */
- u_int32 timereset; /* time since these were last cleared */
- u_int32 badstratum; /* packets claiming an invalid stratum */
- u_int32 oldversionpkt; /* old version packets received */
- u_int32 newversionpkt; /* new version packets received */
- u_int32 unknownversion; /* don't know version packets */
- u_int32 badlength; /* packets with bad length */
+ u_int32 timeup; /* time since restart */
+ u_int32 timereset; /* time since reset */
+ u_int32 denied; /* access denied */
+ u_int32 oldversionpkt; /* recent version */
+ u_int32 newversionpkt; /* current version */
+ u_int32 unknownversion; /* bad version */
+ u_int32 badlength; /* bad length or format */
u_int32 processed; /* packets processed */
- u_int32 badauth; /* packets dropped because of authorization */
- u_int32 wanderhold; /* (obsolete) */
- u_int32 limitrejected; /* rejected because of client limitation */
+ u_int32 badauth; /* bad authentication */
+ u_int32 received; /* packets received */
+ u_int32 limitrejected; /* rate exceeded */
};
@@ -472,16 +494,16 @@ struct info_sys_stats {
* System stats - old version
*/
struct old_info_sys_stats {
- u_int32 timeup; /* time we have been up and running */
- u_int32 timereset; /* time since these were last cleared */
- u_int32 badstratum; /* packets claiming an invalid stratum */
- u_int32 oldversionpkt; /* old version packets received */
- u_int32 newversionpkt; /* new version packets received */
- u_int32 unknownversion; /* don't know version packets */
- u_int32 badlength; /* packets with bad length */
+ u_int32 timeup; /* time since restart */
+ u_int32 timereset; /* time since reset */
+ u_int32 denied; /* access denied */
+ u_int32 oldversionpkt; /* recent version */
+ u_int32 newversionpkt; /* current version */
+ u_int32 unknownversion; /* bad version */
+ u_int32 badlength; /* bad length or format */
u_int32 processed; /* packets processed */
- u_int32 badauth; /* packets dropped because of authorization */
- u_int32 wanderhold;
+ u_int32 badauth; /* bad authentication */
+ u_int32 wanderhold; /* (not used) */
};
@@ -552,9 +574,12 @@ struct conf_peer {
u_char maxpoll; /* max host poll interval */
u_char flags; /* flags for this request */
u_char ttl; /* time to live (multicast) or refclock mode */
- u_short unused; /* unused */
+ u_short unused1; /* unused */
keyid_t keyid; /* key to use for this association */
char keystr[MAXFILENAME]; /* public key file name*/
+ u_int v6_flag; /* is this v6 or not */
+ u_int unused2; /* unused, padding for peeraddr6 */
+ struct in6_addr peeraddr6; /* ipv6 address to poll */
};
#define CONF_FLAG_AUTHENABLE 0x01
@@ -570,7 +595,9 @@ struct conf_peer {
* this addess.
*/
struct conf_unpeer {
- u_int32 peeraddr; /* address of peer */
+ u_int32 peeraddr; /* address of peer */
+ u_int v6_flag; /* is this v6 or not */
+ struct in6_addr peeraddr6; /* address of peer (v6) */
};
/*
@@ -601,6 +628,10 @@ struct info_restrict {
u_int32 count; /* number of packets matched */
u_short flags; /* restrict flags */
u_short mflags; /* match flags */
+ u_int v6_flag; /* is this v6 or not */
+ u_int unused1; /* unused, padding for addr6 */
+ struct in6_addr addr6; /* match address (v6) */
+ struct in6_addr mask6; /* match mask (v6) */
};
@@ -608,10 +639,13 @@ struct info_restrict {
* Structure used for specifying restrict entries
*/
struct conf_restrict {
- u_int32 addr; /* match address */
+ u_int32 addr; /* match address */
u_int32 mask; /* match mask */
u_short flags; /* restrict flags */
u_short mflags; /* match flags */
+ u_int v6_flag; /* is this v6 or not */
+ struct in6_addr addr6; /* match address (v6) */
+ struct in6_addr mask6; /* match mask (v6) */
};
@@ -623,12 +657,16 @@ struct info_monitor_1 {
u_int32 firsttime; /* first time we received a packet */
u_int32 lastdrop; /* last time we rejected a packet due to client limitation policy */
u_int32 count; /* count of packets received */
- u_int32 addr; /* host address */
+ u_int32 addr; /* host address V4 style */
u_int32 daddr; /* destination host address */
u_int32 flags; /* flags about destination */
u_short port; /* port number of last reception */
u_char mode; /* mode of last packet */
u_char version; /* version number of last packet */
+ u_int v6_flag; /* is this v6 or not */
+ u_int unused1; /* unused, padding for addr6 */
+ struct in6_addr addr6; /* host address V6 style */
+ struct in6_addr daddr6; /* host address V6 style */
};
@@ -644,6 +682,9 @@ struct info_monitor {
u_short port; /* port number of last reception */
u_char mode; /* mode of last packet */
u_char version; /* version number of last packet */
+ u_int v6_flag; /* is this v6 or not */
+ u_int unused1; /* unused, padding for addr6 */
+ struct in6_addr addr6; /* host v6 address */
};
/*
@@ -657,6 +698,8 @@ struct old_info_monitor {
u_short port; /* port number of last reception */
u_char mode; /* mode of last packet */
u_char version; /* version number of last packet */
+ u_int v6_flag; /* is this v6 or not */
+ struct in6_addr addr6; /* host address (v6)*/
};
/*
@@ -699,24 +742,30 @@ struct info_auth {
* Structure used to pass trap information to the client
*/
struct info_trap {
- u_int32 local_address; /* local interface address */
- u_int32 trap_address; /* remote client's address */
+ u_int32 local_address; /* local interface addres (v4) */
+ u_int32 trap_address; /* remote client's addres (v4) */
u_short trap_port; /* remote port number */
u_short sequence; /* sequence number */
u_int32 settime; /* time trap last set */
u_int32 origtime; /* time trap originally set */
u_int32 resets; /* number of resets on this trap */
u_int32 flags; /* trap flags, as defined in ntp_control.h */
+ u_int v6_flag; /* is this v6 or not */
+ struct in6_addr local_address6; /* local interface address (v6) */
+ struct in6_addr trap_address6; /* remote client's address (v6) */
};
/*
* Structure used to pass add/clear trap information to the client
*/
struct conf_trap {
- u_int32 local_address; /* local interface address */
- u_int32 trap_address; /* remote client's address */
+ u_int32 local_address; /* remote client's address */
+ u_int32 trap_address; /* local interface address */
u_short trap_port; /* remote client's port */
u_short unused; /* (unused) */
+ u_int v6_flag; /* is this v6 or not */
+ struct in6_addr local_address6; /* local interface address (v6) */
+ struct in6_addr trap_address6; /* remote client's address (v6) */
};
@@ -832,3 +881,4 @@ struct info_dns_assoc {
associd_t associd; /* association ID */
char hostname[NTP_MAXHOSTNAME]; /* hostname */
};
+#endif /* NTP_REQUEST_H */
diff --git a/contrib/ntp/include/ntp_rfc2553.h b/contrib/ntp/include/ntp_rfc2553.h
new file mode 100644
index 000000000000..28ff004b8808
--- /dev/null
+++ b/contrib/ntp/include/ntp_rfc2553.h
@@ -0,0 +1,254 @@
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)in.h 8.3 (Berkeley) 1/3/94
+ */
+
+/*
+ * Compatability shims with the rfc2553 API to simplify ntp.
+ */
+#ifndef _NTP_RFC2553_H_
+#define _NTP_RFC2553_H_
+
+#if defined(_SS_MAXSIZE) || defined(_SS_SIZE)
+#define HAVE_IPV6
+#else
+
+#include <sys/types.h>
+#include "ntp_types.h"
+
+#ifndef AF_INET6
+#define AF_INET6 AF_MAX
+#define PF_INET6 AF_INET6
+#endif
+
+#ifndef HAVE_TYPE_U_INT8_T
+typedef u_char u_int8_t;
+typedef u_short u_int16_t;
+typedef u_int32 u_int32_t;
+#endif /* HAVE_TYPE_U_INT8_T */
+
+#ifndef HAVE_TYPE_U_INT64_T
+typedef struct u_int64_t { u_int32 val[2]; } u_int64_t;
+#endif /* HAVE_TYPE_U_INT64_T */
+
+/*
+ * IPv6 address
+ */
+#ifdef SYS_WINNT
+#define in6_addr in_addr6
+#else
+/*
+ * Don't include any additional IPv6 definitions
+ * We are defining our own here.
+ */
+#define ISC_IPV6_H 1
+
+struct in6_addr {
+ union {
+ u_int8_t __u6_addr8[16];
+ u_int16_t __u6_addr16[8];
+ u_int32_t __u6_addr32[4];
+ } __u6_addr; /* 128-bit IP6 address */
+};
+
+#define s6_addr __u6_addr.__u6_addr8
+#endif
+
+/*
+ * Definition of some useful macros to handle IP6 addresses
+ */
+#ifdef SYS_WINNT
+#define IN6ADDR_ANY_INIT {{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}
+#else
+#define IN6ADDR_ANY_INIT \
+ {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
+#endif
+
+extern const struct in6_addr in6addr_any;
+
+#define SIN6_LEN
+#ifndef HAVE_SOCKADDR_IN6
+struct sockaddr_in6 {
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ u_int8_t sin6_len; /* length of this struct(sa_family_t)*/
+ u_int8_t sin6_family; /* AF_INET6 (sa_family_t) */
+#else
+ short sin6_family; /* AF_INET6 (sa_family_t) */
+#endif
+ u_int16_t sin6_port; /* Transport layer port # (in_port_t)*/
+ u_int32_t sin6_flowinfo; /* IP6 flow information */
+ struct in6_addr sin6_addr; /* IP6 address */
+ u_int32_t sin6_scope_id; /* scope zone index */
+};
+#endif
+
+/*
+ * Unspecified
+ */
+#ifndef IN6_IS_ADDR_UNSPECIFIED
+#define IN6_IS_ADDR_UNSPECIFIED(a) \
+ ((*(const u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const u_int32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const u_int32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
+#endif
+/*
+ * Multicast
+ */
+#ifndef IN6_IS_ADDR_MULTICAST
+#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
+#endif
+
+/*
+ * RFC 2553: protocol-independent placeholder for socket addresses
+ */
+#define _SS_MAXSIZE 128
+#define _SS_ALIGNSIZE (sizeof(u_int64_t))
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_char) - sizeof(u_int8_t))
+#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(u_char) - sizeof(u_int8_t) - \
+ _SS_PAD1SIZE - _SS_ALIGNSIZE)
+#else
+#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(short))
+#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(short) - \
+ _SS_PAD1SIZE - _SS_ALIGNSIZE)
+#endif /* HAVE_SA_LEN_IN_STRUCT_SOCKADDR */
+
+struct sockaddr_storage {
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ u_int8_t ss_len; /* address length */
+ u_int8_t ss_family; /* address family */
+#else
+ short ss_family; /* address family */
+#endif
+ char __ss_pad1[_SS_PAD1SIZE];
+ u_int64_t __ss_align; /* force desired structure storage alignment */
+ char __ss_pad2[_SS_PAD2SIZE];
+};
+
+struct addrinfo {
+ int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
+ int ai_family; /* PF_xxx */
+ int ai_socktype; /* SOCK_xxx */
+ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+ size_t ai_addrlen; /* length of ai_addr */
+ char *ai_canonname; /* canonical name for hostname */
+ struct sockaddr *ai_addr; /* binary address */
+ struct addrinfo *ai_next; /* next structure in linked list */
+};
+
+/*
+ * Error return codes from getaddrinfo()
+ */
+#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
+#define EAI_AGAIN 2 /* temporary failure in name resolution */
+#define EAI_BADFLAGS 3 /* invalid value for ai_flags */
+#define EAI_FAIL 4 /* non-recoverable failure in name resolution */
+#define EAI_FAMILY 5 /* ai_family not supported */
+#define EAI_MEMORY 6 /* memory allocation failure */
+#define EAI_NODATA 7 /* no address associated with hostname */
+#define EAI_NONAME 8 /* hostname nor servname provided, or not known */
+#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
+#define EAI_SOCKTYPE 10 /* ai_socktype not supported */
+#define EAI_SYSTEM 11 /* system error returned in errno */
+#define EAI_BADHINTS 12
+#define EAI_PROTOCOL 13
+#define EAI_MAX 14
+
+/*
+ * Flag values for getaddrinfo()
+ */
+#define AI_PASSIVE 0x00000001 /* get address to use bind() */
+#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
+#define AI_NUMERICHOST 0x00000004 /* prevent name resolution */
+/* valid flags for addrinfo */
+#define AI_MASK \
+ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_ADDRCONFIG)
+
+#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */
+
+/*
+ * Constants for getnameinfo()
+ */
+#define NI_MAXHOST 1025
+#define NI_MAXSERV 32
+
+/*
+ * Flag values for getnameinfo()
+ */
+#define NI_NOFQDN 0x00000001
+#define NI_NUMERICHOST 0x00000002
+#define NI_NAMEREQD 0x00000004
+#define NI_NUMERICSERV 0x00000008
+#define NI_DGRAM 0x00000010
+#define NI_WITHSCOPEID 0x00000020
+
+int getaddrinfo P((const char *, const char *,
+ const struct addrinfo *, struct addrinfo **));
+int getnameinfo P((const struct sockaddr *, u_int, char *,
+ size_t, char *, size_t, int));
+void freeaddrinfo P((struct addrinfo *));
+char *gai_strerror P((int));
+
+#endif /* _SS_MAXSIZE */
+#endif /* !_NTP_RFC2553_H_ */
diff --git a/contrib/ntp/include/ntp_sprintf.h b/contrib/ntp/include/ntp_sprintf.h
new file mode 100644
index 000000000000..a456a8925949
--- /dev/null
+++ b/contrib/ntp/include/ntp_sprintf.h
@@ -0,0 +1,13 @@
+/*
+ * Handle ancient char* *s*printf*() systems
+ */
+
+#ifdef SPRINTF_CHAR
+# define SPRINTF(x) strlen(sprintf/**/x)
+# define SNPRINTF(x) strlen(snprintf/**/x)
+# define VSNPRINTF(x) strlen(vsnprintf/**/x)
+#else
+# define SPRINTF(x) ((size_t)sprintf x)
+# define SNPRINTF(x) ((size_t)snprintf x)
+# define VSNPRINTF(x) ((size_t)vsnprintf x)
+#endif
diff --git a/contrib/ntp/include/ntp_stdlib.h b/contrib/ntp/include/ntp_stdlib.h
index d10f67946dd8..9d1d4c9bdcc0 100644
--- a/contrib/ntp/include/ntp_stdlib.h
+++ b/contrib/ntp/include/ntp_stdlib.h
@@ -2,6 +2,8 @@
* ntp_stdlib.h - Prototypes for NTP lib.
*/
#include <sys/types.h>
+#include <sys/socket.h>
+#include "ntp_rfc2553.h"
#include "ntp_types.h"
#include "ntp_string.h"
@@ -27,9 +29,12 @@
# include <stdarg.h>
extern void msyslog P((int, const char *, ...))
__attribute__((__format__(__printf__, 2, 3)));
+extern void netsyslog P((int, const char *, ...))
+ __attribute__((__format__(__printf__, 2, 3)));
#else
# include <varargs.h>
extern void msyslog P(());
+extern void netsyslog P(());
#endif
extern void auth_delkeys P((void));
@@ -60,18 +65,10 @@ extern struct savekey *auth_findkey P((keyid_t));
extern int auth_moremem P((void));
extern int ymd2yd P((int, int, int));
-#ifdef DES
-extern int DESauthdecrypt P((u_char *, u_int32 *, int, int));
-extern int DESauthencrypt P((u_char *, u_int32 *, int));
-extern void DESauth_setkey P((keyid_t, const u_int32 *));
-extern void DESauth_subkeys P((const u_int32 *, u_char *, u_char *));
-extern void DESauth_des P((u_int32 *, u_char *));
-extern int DESauth_parity P((u_int32 *));
-#endif /* DES */
-
extern int MD5authdecrypt P((u_char *, u_int32 *, int, int));
extern int MD5authencrypt P((u_char *, u_int32 *, int));
extern void MD5auth_setkey P((keyid_t, const u_char *, const int));
+extern u_int32 addr2refid P((struct sockaddr_storage *));
extern int atoint P((const char *, long *));
extern int atouint P((const char *, u_long *));
@@ -79,8 +76,8 @@ extern int hextoint P((const char *, u_long *));
extern char * humandate P((u_long));
extern char * humanlogtime P((void));
extern char * inttoa P((long));
-extern char * mfptoa P((u_long, u_long, int));
-extern char * mfptoms P((u_long, u_long, int));
+extern char * mfptoa P((u_long, u_long, short));
+extern char * mfptoms P((u_long, u_long, short));
extern const char * modetoa P((int));
extern const char * eventstr P((int));
extern const char * ceventstr P((int));
@@ -88,16 +85,18 @@ extern char * statustoa P((int, int));
extern const char * sysstatstr P((int));
extern const char * peerstatstr P((int));
extern const char * clockstatstr P((int));
-extern u_int32 netof P((u_int32));
+extern struct sockaddr_storage* netof P((struct sockaddr_storage*));
extern char * numtoa P((u_int32));
extern char * numtohost P((u_int32));
+extern char * socktoa P((struct sockaddr_storage *));
+extern char * socktohost P((struct sockaddr_storage *));
extern int octtoint P((const char *, u_long *));
extern u_long ranp2 P((int));
-extern char * refnumtoa P((u_int32));
+extern char * refnumtoa P((struct sockaddr_storage *));
extern int tsftomsu P((u_long, int));
extern char * uinttoa P((u_long));
-extern int decodenetnum P((const char *, u_int32 *));
+extern int decodenetnum P((const char *, struct sockaddr_storage *));
extern const char * FindConfig P((const char *));
@@ -151,7 +150,7 @@ extern HANDLE hServDoneEvent;
#endif
/* systime.c */
-extern int systime_10ms_ticks; /* adj sysclock in 10ms increments */
+extern double sys_tick; /* adjtime() resolution */
/* version.c */
extern const char *Version; /* version declaration */
diff --git a/contrib/ntp/include/ntp_unixtime.h b/contrib/ntp/include/ntp_unixtime.h
index bdc080e6edd2..ce96980209e9 100644
--- a/contrib/ntp/include/ntp_unixtime.h
+++ b/contrib/ntp/include/ntp_unixtime.h
@@ -5,6 +5,16 @@
#include "ntp_types.h"
+#ifdef SIM
+#include "ntpsim.h"
+#endif
+
+#ifdef SIM
+# define GETTIMEOFDAY(a, b) (node_gettime(&ntp_node, a))
+# define SETTIMEOFDAY(a, b) (node_settime(&ntp_node, a))
+# define ADJTIMEOFDAY(a, b) (node_adjtime(&ntp_node, a, b))
+#else
+# define ADJTIMEOFDAY(a, b) (adjtime(a, b))
/* gettimeofday() takes two args in BSD and only one in SYSV */
# if defined(HAVE_SYS_TIMERS_H) && defined(HAVE_GETCLOCK)
# include <sys/timers.h>
@@ -25,6 +35,7 @@ int getclock (int clock_type, struct timespec *tp);
#endif
# endif /* SYSV_TIMEOFDAY */
# endif /* not (HAVE_SYS_TIMERS_H && HAVE_GETCLOCK) */
+#endif /* SIM */
/*
* Time of day conversion constant. Ntp's time scale starts in 1900,
diff --git a/contrib/ntp/include/ntpd.h b/contrib/ntp/include/ntpd.h
index 2e030e68a1a6..cd3aad2d464d 100644
--- a/contrib/ntp/include/ntpd.h
+++ b/contrib/ntp/include/ntpd.h
@@ -10,9 +10,6 @@
#include "ntp_refclock.h"
#include "recvbuff.h"
-#define MAXINTERFACES 512
-#define MAXFILENAME 128 /* maximum length of a file name */
-
#ifdef SYS_WINNT
#define exit service_exit
extern void service_exit (int);
@@ -21,8 +18,6 @@ void service_main (DWORD, LPTSTR *);
void service_ctrl (DWORD);
void worker_thread (void *);
#define sleep(x) Sleep((DWORD) x * 1000 /* milliseconds */ );
-#else
-#define closesocket close
#endif /* SYS_WINNT */
/* ntp_config.c */
@@ -30,9 +25,9 @@ extern void getconfig P((int, char **));
/* ntp_config.c */
extern void ctl_clr_stats P((void));
-extern int ctlclrtrap P((struct sockaddr_in *, struct interface *, int));
+extern int ctlclrtrap P((struct sockaddr_storage *, struct interface *, int));
extern u_short ctlpeerstatus P((struct peer *));
-extern int ctlsettrap P((struct sockaddr_in *, struct interface *, int, int));
+extern int ctlsettrap P((struct sockaddr_storage *, struct interface *, int, int));
extern u_short ctlsysstatus P((void));
extern void init_control P((void));
extern void process_control P((struct recvbuf *, int));
@@ -65,30 +60,30 @@ struct ctl_var {
#define WO (CAN_WRITE)
#define RW (CAN_READ|CAN_WRITE)
-extern char * add_var P((struct ctl_var **, unsigned long, int));
+extern char * add_var P((struct ctl_var **, u_long, u_short));
extern void free_varlist P((struct ctl_var *));
-extern void set_var P((struct ctl_var **, const char *, unsigned long, int));
-extern void set_sys_var P((char *, unsigned long, int));
+extern void set_var P((struct ctl_var **, const char *, u_long, u_short));
+extern void set_sys_var P((char *, u_long, u_short));
/* ntp_intres.c */
-extern void ntp_res_name P((u_int32, u_short));
+extern void ntp_res_name P((struct sockaddr_storage, u_short));
extern void ntp_res_recv P((void));
extern void ntp_intres P((void));
/* ntp_io.c */
-extern struct interface *findinterface P((struct sockaddr_in *));
-extern struct interface *findbcastinter P((struct sockaddr_in *));
+extern struct interface *findinterface P((struct sockaddr_storage *));
+extern struct interface *findbcastinter P((struct sockaddr_storage *));
extern void init_io P((void));
extern void input_handler P((l_fp *));
extern void io_clr_stats P((void));
extern void io_setbclient P((void));
extern void io_unsetbclient P((void));
-extern void io_multicast_add P((u_int32));
-extern void io_multicast_del P((u_int32));
-extern void kill_asyncio P((void));
+extern void io_multicast_add P((struct sockaddr_storage));
+extern void io_multicast_del P((struct sockaddr_storage));
+extern void kill_asyncio P((int));
-extern void sendpkt P((struct sockaddr_in *, struct interface *, int, struct pkt *, int));
+extern void sendpkt P((struct sockaddr_storage *, struct interface *, int, struct pkt *, int));
#ifdef HAVE_SIGNALED_IO
extern void wait_for_signal P((void));
extern void unblock_io_and_alarm P((void));
@@ -122,29 +117,46 @@ extern void ntp_monitor P((struct recvbuf *));
/* ntp_peer.c */
extern void init_peer P((void));
-extern struct peer *findexistingpeer P((struct sockaddr_in *, struct peer *, int));
-extern struct peer *findpeer P((struct sockaddr_in *, struct interface *, int, int, int *));
+extern struct peer *findexistingpeer P((struct sockaddr_storage *, struct peer *, int));
+extern struct peer *findpeer P((struct sockaddr_storage *, struct interface *, int, int, int *));
extern struct peer *findpeerbyassoc P((u_int));
-extern struct peer *newpeer P((struct sockaddr_in *, struct interface *, int, int, int, int, u_int, u_int, int, keyid_t));
+extern struct peer *newpeer P((struct sockaddr_storage *, struct interface *, int, int, int, int, u_int, u_char, int, keyid_t));
extern void peer_all_reset P((void));
extern void peer_clr_stats P((void));
-extern struct peer *peer_config P((struct sockaddr_in *, struct interface *, int, int, int, int, u_int, int, keyid_t, u_char *));
+extern struct peer *peer_config P((struct sockaddr_storage *, struct interface *, int, int, int, int, u_int, int, keyid_t, u_char *));
extern void peer_reset P((struct peer *));
-extern int peer_unconfig P((struct sockaddr_in *, struct interface *, int));
+extern int peer_unconfig P((struct sockaddr_storage *, struct interface *, int));
extern void unpeer P((struct peer *));
extern void clear_all P((void));
-#ifdef AUTOKEY
+#ifdef OPENSSL
extern void expire_all P((void));
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
extern struct peer *findmanycastpeer P((struct recvbuf *));
extern void resetmanycast P((void));
+/* ntp_crypto.c */
+#ifdef OPENSSL
+extern int crypto_recv P((struct peer *, struct recvbuf *));
+extern int crypto_xmit P((struct pkt *, struct sockaddr_storage *, int, struct exten *, keyid_t));
+extern keyid_t session_key P((struct sockaddr_storage *, struct sockaddr_storage *, keyid_t, keyid_t, u_long));
+extern void make_keylist P((struct peer *, struct interface *));
+extern void key_expire P((struct peer *));
+extern void crypto_update P((void));
+extern void crypto_config P((int, char *));
+extern void crypto_setup P((void));
+extern u_int crypto_ident P((struct peer *));
+extern struct exten *crypto_args P((struct peer *, u_int, char *));
+extern int crypto_public P((struct peer *, u_char *, u_int));
+extern void value_free P((struct value *));
+#endif /* OPENSSL */
+
/* ntp_proto.c */
extern void transmit P((struct peer *));
extern void receive P((struct recvbuf *));
-extern void peer_clear P((struct peer *));
+extern void peer_clear P((struct peer *, char *));
extern void process_packet P((struct peer *, struct pkt *, l_fp *));
extern void clock_select P((void));
+extern void kod_proto P((void));
/*
* there seems to be a bug in the IRIX 4 compiler which prevents
@@ -157,7 +169,7 @@ extern void poll_update P((struct peer *, int));
extern void clear P((struct peer *));
extern void clock_filter P((struct peer *, double, double, double));
extern void init_proto P((void));
-extern void proto_config P((int, u_long, double));
+extern void proto_config P((int, u_long, double, struct sockaddr_storage*));
extern void proto_clr_stats P((void));
#ifdef REFCLOCK
@@ -175,26 +187,30 @@ extern void process_private P((struct recvbuf *, int));
/* ntp_restrict.c */
extern void init_restrict P((void));
-extern int restrictions P((struct sockaddr_in *));
-extern void hack_restrict P((int, struct sockaddr_in *, struct sockaddr_in *, int, int));
+extern int restrictions P((struct sockaddr_storage *));
+extern void hack_restrict P((int, struct sockaddr_storage *, struct sockaddr_storage *, int, int));
/* ntp_timer.c */
extern void init_timer P((void));
+extern void reinit_timer P((void));
extern void timer P((void));
extern void timer_clr_stats P((void));
-#ifdef AUTOKEY
+#ifdef OPENSSL
extern char *sys_hostname;
extern l_fp sys_revoketime;
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
/* ntp_util.c */
extern void init_util P((void));
extern void hourly_stats P((void));
extern void stats_config P((int, char *));
-extern void record_peer_stats P((struct sockaddr_in *, int, double, double, double, double));
+extern void record_peer_stats P((struct sockaddr_storage *, int, double, double, double, double));
extern void record_loop_stats P((double, double, double, double, int));
-extern void record_clock_stats P((struct sockaddr_in *, const char *));
-extern void record_raw_stats P((struct sockaddr_in *, struct sockaddr_in *, l_fp *, l_fp *, l_fp *, l_fp *));
+extern void record_clock_stats P((struct sockaddr_storage *, const char *));
+extern void record_raw_stats P((struct sockaddr_storage *, struct sockaddr_storage *, l_fp *, l_fp *, l_fp *, l_fp *));
+extern void record_sys_stats P((void));
+extern void record_crypto_stats P((struct sockaddr_storage *, const char *));
+extern int sock_hash P((struct sockaddr_storage *));
/*
* Variable declarations for ntpd.
@@ -254,7 +270,8 @@ extern u_long io_timereset; /* time counters were reset */
/*
* Interface stuff
*/
-extern struct interface *any_interface; /* default interface */
+extern struct interface *any_interface; /* default ipv4 interface */
+extern struct interface *any6_interface;/* default ipv6 interface */
extern struct interface *loopback_interface; /* loopback interface */
/*
@@ -284,21 +301,20 @@ extern int kern_enable; /* kernel support enabled */
extern int pps_enable; /* kernel PPS discipline enabled */
extern int ext_enable; /* external clock enabled */
extern int cal_enable; /* refclock calibrate enable */
-extern int allow_step; /* allow step correction */
extern int allow_panic; /* allow panic correction */
extern int mode_ntpdate; /* exit on first clock set */
extern int peer_ntpdate; /* count of ntpdate peers */
+extern int forground_process; /* run the process in the forground */
/*
* Clock state machine variables
*/
extern u_char sys_poll; /* system poll interval (log2 s) */
-extern u_char sys_minpoll; /* min system poll interval (log2 s) */
extern int state; /* clock discipline state */
extern int tc_counter; /* poll-adjust counter */
extern u_long last_time; /* time of last clock update (s) */
extern double last_offset; /* last clock offset (s) */
-extern u_char allan_xpt; /* Allan intercept (s) */
+extern double allan_xpt; /* Allan intercept (s) */
extern double sys_error; /* system RMS error (s) */
extern double sys_jitter; /* system RMS jitter (s) */
@@ -349,20 +365,27 @@ extern double sys_bdelay; /* broadcast client default delay */
extern int sys_authenticate; /* requre authentication for config */
extern l_fp sys_authdelay; /* authentication delay */
extern keyid_t sys_private; /* private value for session seed */
-extern int sys_manycastserver; /* 1 => respond to manycast client pkts */
+extern int sys_manycastserver; /* respond to manycast client pkts */
+extern int sys_minclock; /* minimum survivors */
+extern int sys_minsane; /* minimum candidates */
+extern int sys_floor; /* cluster stratum floor */
+extern int sys_ceiling; /* cluster stratum ceiling */
+extern u_char sys_ttl[]; /* ttl mapping vector */
+extern int sys_ttlmax; /* max ttl mapping vector index */
/*
* Statistics counters
*/
extern u_long sys_stattime; /* time when we started recording */
-extern u_long sys_badstratum; /* packets with invalid stratum */
-extern u_long sys_oldversionpkt; /* old version packets received */
-extern u_long sys_newversionpkt; /* new version packets received */
+extern u_long sys_restricted; /* restricted packets */
+extern u_long sys_oldversionpkt; /* old version packets */
+extern u_long sys_newversionpkt; /* new version packets */
extern u_long sys_unknownversion; /* don't know version packets */
-extern u_long sys_badlength; /* packets with bad length */
+extern u_long sys_badlength; /* bad length or format */
extern u_long sys_processed; /* packets processed */
-extern u_long sys_badauth; /* packets dropped because of auth */
-extern u_long sys_limitrejected; /* pkts rejected due to client count per net */
+extern u_long sys_badauth; /* bad authentication */
+extern u_long sys_limitrejected; /* rate limit exceeded */
+extern u_long sys_received; /* packets received */
/* ntp_refclock.c */
#ifdef REFCLOCK
@@ -375,13 +398,15 @@ extern int fdpps; /* pps file descriptor */
extern keyid_t info_auth_keyid; /* keyid used to authenticate requests */
/* ntp_restrict.c */
-extern struct restrictlist *restrictlist; /* the restriction list */
-extern u_long client_limit;
-extern u_long client_limit_period;
+extern struct restrictlist *restrictlist; /* the ipv4 restriction list */
+extern struct restrictlist6 *restrictlist6; /* the ipv6 restriction list */
+extern u_long res_min_interval;
+extern u_long res_avg_interval;
+extern u_long mon_age; /* monitor preempt age */
/* ntp_timer.c */
extern volatile int alarm_flag; /* alarm flag */
-extern u_long sys_revoke; /* keys revoke timeout */
+extern u_char sys_revoke; /* keys revoke timeout (log2 s) */
extern volatile u_long alarm_overflow;
extern u_long current_time; /* current time (s) */
extern u_long timer_timereset;
@@ -395,6 +420,11 @@ extern int stats_control; /* write stats to fileset? */
extern volatile int debug; /* debugging flag */
extern int nofork; /* no-fork flag */
extern int initializing; /* initializing flag */
+#ifdef HAVE_CLOCKCTL
+extern char *user; /* user to switch to */
+extern char *group; /* group to switch to */
+extern char *chrootdir; /* directory to chroot to */
+#endif
/* refclock_conf.c */
#ifdef REFCLOCK
diff --git a/contrib/ntp/include/ntpsim.h b/contrib/ntp/include/ntpsim.h
new file mode 100644
index 000000000000..c48dc59542be
--- /dev/null
+++ b/contrib/ntp/include/ntpsim.h
@@ -0,0 +1,93 @@
+/*
+ * ntpsim.h - Prototypes for ntpsim
+ */
+
+#ifndef __ntpsim_h
+#define __ntpsim_h
+
+#include <stdio.h>
+#include <math.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include "ntp_syslog.h"
+#include "ntp_fp.h"
+#include "ntp.h"
+#include "ntp_select.h"
+#include "ntp_malloc.h"
+#include "ntp_refclock.h"
+#include "recvbuff.h"
+#include "ntp_io.h"
+#include "ntp_stdlib.h"
+
+#define PI 3.1415926535
+
+/*
+ * ntpsim declarations
+ */
+typedef enum {
+ BEEP, CLOCK, TIMER, PACKET
+} funcTkn;
+
+typedef struct {
+ double time;
+ union {
+ struct pkt evnt_pkt;
+ struct recvbuf evnt_buf;
+ } buffer;
+#define ntp_pkt buffer.evnt_pkt
+#define rcv_buf buffer.evnt_buf
+ funcTkn function;
+} Event;
+
+typedef struct List {
+ Event event;
+ struct List *next;
+} *Queue;
+
+typedef struct nde {
+ double time; /* simulation time */
+ double sim_time; /* end simulation time */
+ double ntp_time; /* client disciplined time */
+ double adj; /* remaining time correction */
+ double slew; /* correction slew rate */
+
+ double clk_time; /* server time */
+ double ferr; /* frequency errort */
+ double fnse; /* random walk noise */
+ double ndly; /* network delay */
+ double snse; /* phase noise */
+ double pdly; /* processing delay */
+ double bdly; /* beep interval */
+
+ double last_time; /* last clock read time */
+ Queue events; /* Node Event Queue */
+ struct recvbuf *rbuflist; /* Node Receive Buffer */
+} Node;
+
+/*
+ * Function prototypes
+ */
+int ntpsim P((int argc, char *argv[]));
+Event event P((double, funcTkn));
+Queue queue P((Event, Queue ));
+Node node P((void));
+void push P((Event, Queue *));
+Event pop P((Queue *));
+void ndbeep P((Node *, Event));
+void ndeclk P((Node *, Event));
+void ntptmr P((Node *, Event));
+void netpkt P((Node *, Event));
+int srvr_rply P((Node *, struct sockaddr_storage *,
+ struct interface *, struct pkt *));
+double gauss P((double, double));
+double poisson P((double, double));
+int node_clock P((Node *, double));
+void abortsim P((char *));
+
+/*
+ * The global Node
+ */
+Node ntp_node;
+
+#endif
+
diff --git a/contrib/ntp/include/recvbuff.h b/contrib/ntp/include/recvbuff.h
index 687bc9659a6d..4fde7f19250a 100644
--- a/contrib/ntp/include/recvbuff.h
+++ b/contrib/ntp/include/recvbuff.h
@@ -39,16 +39,16 @@ extern HANDLE get_recv_buff_event P((void));
*/
/*
- * the maximum length NTP packet is a full length NTP control message with
- * the maximum length message authenticator. I hate to hard-code 468 and 12,
- * but only a few modules include ntp_control.h...
+ * the maximum length NTP packet contains the NTP header, one Autokey
+ * request, one Autokey response and the MAC. Assuming certificates don't
+ * get too big, the maximum packet length is set arbitrarily at 1000.
*/
-#define RX_BUFF_SIZE (468+12+MAX_MAC_LEN)
+#define RX_BUFF_SIZE 1000 /* hail Mary */
struct recvbuf {
struct recvbuf *next; /* next buffer in chain */
union {
- struct sockaddr_in X_recv_srcadr;
+ struct sockaddr_storage X_recv_srcadr;
caddr_t X_recv_srcclock;
struct peer *X_recv_peer;
} X_from_where;
@@ -60,10 +60,10 @@ struct recvbuf {
WSABUF wsabuff;
DWORD AddressLength;
#else
- struct sockaddr_in srcadr; /* where packet came from */
+ struct sockaddr_storage srcadr; /* where packet came from */
#endif
struct interface *dstadr; /* interface datagram arrived thru */
- int fd; /* fd on which it was received */
+ SOCKET fd; /* fd on which it was received */
l_fp recv_time; /* time of arrival */
void (*receiver) P((struct recvbuf *)); /* routine to receive buffer */
int recv_length; /* number of octets received */
diff --git a/contrib/ntp/include/rsa_md5.h b/contrib/ntp/include/rsa_md5.h
new file mode 100644
index 000000000000..8241647601b3
--- /dev/null
+++ b/contrib/ntp/include/rsa_md5.h
@@ -0,0 +1,51 @@
+/* MD5.H - header file for MD5C.C
+ */
+
+/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+ rights reserved.
+
+ License to copy and use this software is granted provided that it
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+ Algorithm" in all material mentioning or referencing this software
+ or this function.
+
+ License is also granted to make and use derivative works provided
+ that such works are identified as "derived from the RSA Data
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
+ mentioning or referencing the derived work.
+
+ RSA Data Security, Inc. makes no representations concerning either
+ the merchantability of this software or the suitability of this
+ software for any particular purpose. It is provided "as is"
+ without express or implied warranty of any kind.
+
+ These notices must be retained in any copies of any part of this
+ documentation and/or software.
+ */
+
+#ifndef _MD5_H_
+#define _MD5_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*#include "global.h" */
+
+/* MD5 context. */
+typedef struct {
+ UINT4 state[4]; /* state (ABCD) */
+ UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
+ unsigned char buffer[64]; /* input buffer */
+} MD5_CTX;
+
+void MD5Init PROTO_LIST ((MD5_CTX *));
+void MD5Update PROTO_LIST
+ ((MD5_CTX *, unsigned char *, unsigned int));
+void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/contrib/ntp/install-sh b/contrib/ntp/install-sh
index e9de23842dcd..6ce63b9f76bc 100755
--- a/contrib/ntp/install-sh
+++ b/contrib/ntp/install-sh
@@ -1,19 +1,37 @@
#!/bin/sh
#
# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
#
-# Copyright 1991 by the Massachusetts Institute of Technology
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -56,7 +74,7 @@ dir_arg=""
while [ x"$1" != x ]; do
case $1 in
- -c) instcmd="$cpprog"
+ -c) instcmd=$cpprog
shift
continue;;
@@ -79,7 +97,7 @@ while [ x"$1" != x ]; do
shift
continue;;
- -s) stripcmd="$stripprog"
+ -s) stripcmd=$stripprog
shift
continue;;
@@ -106,128 +124,132 @@ done
if [ x"$src" = x ]
then
- echo "install: no input file specified"
+ echo "$0: no input file specified" >&2
exit 1
else
- true
+ :
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
-
- if [ -d $dst ]; then
+
+ if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
- instcmd=mkdir
+ instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
+# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
- if [ -f $src -o -d $src ]
+ if [ -f "$src" ] || [ -d "$src" ]
then
- true
+ :
else
- echo "install: $src does not exist"
+ echo "$0: $src does not exist" >&2
exit 1
fi
-
+
if [ x"$dst" = x ]
then
- echo "install: no destination specified"
+ echo "$0: no destination specified" >&2
exit 1
else
- true
+ :
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
- if [ -d $dst ]
+ if [ -d "$dst" ]
then
- dst="$dst"/`basename $src`
+ dst=$dst/`basename "$src"`
else
- true
+ :
fi
fi
## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
+defaultIFS='
+ '
+IFS="${IFS-$defaultIFS}"
-oIFS="${IFS}"
+oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
+ pathcomp=$pathcomp$1
shift
- if [ ! -d "${pathcomp}" ] ;
+ if [ ! -d "$pathcomp" ] ;
then
- $mkdirprog "${pathcomp}"
+ $mkdirprog "$pathcomp"
else
- true
+ :
fi
- pathcomp="${pathcomp}/"
+ pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
- $doit $instcmd $dst &&
+ $doit $instcmd "$dst" &&
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
- if [ x"$transformarg" = x ]
+ if [ x"$transformarg" = x ]
then
- dstfile=`basename $dst`
+ dstfile=`basename "$dst"`
else
- dstfile=`basename $dst $transformbasename |
+ dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
- if [ x"$dstfile" = x ]
+ if [ x"$dstfile" = x ]
then
- dstfile=`basename $dst`
+ dstfile=`basename "$dst"`
else
- true
+ :
fi
-# Make a temp file name in the proper directory.
+# Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/#inst.$$#
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
-# Move or copy the file name to the temp name
+# Trap to clean up temp files at exit.
- $doit $instcmd $src $dsttmp &&
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
- trap "rm -f ${dsttmp}" 0 &&
+# Move or copy the file name to the temp name
+
+ $doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
@@ -235,17 +257,38 @@ else
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# Now remove or move aside any old file at destination location. We try this
+# two ways since rm can't unlink itself on some systems and the destination
+# file might be busy for other reasons. In this case, the final cleanup
+# might fail but the new file should still install successfully.
+
+{
+ if [ -f "$dstdir/$dstfile" ]
+ then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+ $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+ {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+} &&
# Now rename the file to the real destination.
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
+# The final little trick to "correctly" pass the exit status to the exit trap.
-exit 0
+{
+ (exit 0); exit
+}
diff --git a/contrib/ntp/kernel/Makefile.in b/contrib/ntp/kernel/Makefile.in
index ef204a810770..07eb3786d21a 100644
--- a/contrib/ntp/kernel/Makefile.in
+++ b/contrib/ntp/kernel/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,36 +94,82 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
SUBDIRS = sys
ETAGS_ARGS = Makefile.am
EXTRA_DIST = chuinit.c clkinit.c tty_chu.c tty_chu_STREAMS.c tty_clk.c tty_clk_STREAMS.c
subdir = kernel
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
-RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
- uninstall-info-recursive all-recursive install-data-recursive \
- install-exec-recursive installdirs-recursive install-recursive \
- uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = README Makefile.am Makefile.in
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+ ps-recursive install-info-recursive uninstall-info-recursive \
+ all-recursive install-data-recursive install-exec-recursive \
+ installdirs-recursive install-recursive uninstall-recursive \
+ check-recursive installcheck-recursive
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive
@@ -134,9 +178,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu kernel/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
@@ -146,7 +188,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -166,7 +208,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -193,66 +235,108 @@ tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if (etags --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ else \
+ include_option=--include; \
+ fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ test -f $$subdir/TAGS && \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
- for subdir in $(SUBDIRS); do \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
@@ -282,6 +366,7 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -289,7 +374,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -299,7 +384,7 @@ clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-
+ -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@@ -321,31 +406,39 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
-.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
- clean-generic clean-recursive distclean distclean-generic \
- distclean-recursive distclean-tags distdir dvi dvi-am \
- dvi-recursive info info-am info-recursive install install-am \
- install-data install-data-am install-data-recursive \
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+ clean-generic clean-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-recursive distclean-tags distdir \
+ dvi dvi-am dvi-recursive info info-am info-recursive install \
+ install-am install-data install-data-am install-data-recursive \
install-exec install-exec-am install-exec-recursive \
install-info install-info-am install-info-recursive install-man \
install-recursive install-strip installcheck installcheck-am \
installdirs installdirs-am installdirs-recursive \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-recursive tags tags-recursive uninstall \
- uninstall-am uninstall-info-am uninstall-info-recursive \
- uninstall-recursive
+ mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
+ ps-recursive tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am uninstall-info-recursive uninstall-recursive
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/ntp/kernel/sys/Makefile.am b/contrib/ntp/kernel/sys/Makefile.am
index ba405cdf49c0..e8465d90d311 100644
--- a/contrib/ntp/kernel/sys/Makefile.am
+++ b/contrib/ntp/kernel/sys/Makefile.am
@@ -1,7 +1,7 @@
#AUTOMAKE_OPTIONS = ../../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../../util/ansi2knr
noinst_HEADERS = bsd_audioirig.h chudefs.h clkdefs.h i8253.h parsestreams.h \
-pcl720.h ppsclock.h timex.h tpro.h
+ pcl720.h ppsclock.h timex.h tpro.h tt560_api.h
#EXTRA_DIST= TAGS
# HMS: Avoid bug in automake
#ETAGS_ARGS = ""
diff --git a/contrib/ntp/kernel/sys/Makefile.in b/contrib/ntp/kernel/sys/Makefile.in
index 58467a056af4..e8635a37adf5 100644
--- a/contrib/ntp/kernel/sys/Makefile.in
+++ b/contrib/ntp/kernel/sys/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../../util/ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,37 +94,83 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../../util/ansi2knr
noinst_HEADERS = bsd_audioirig.h chudefs.h clkdefs.h i8253.h parsestreams.h \
-pcl720.h ppsclock.h timex.h tpro.h
+ pcl720.h ppsclock.h timex.h tpro.h tt560_api.h
#EXTRA_DIST= TAGS
# HMS: Avoid bug in automake
#ETAGS_ARGS = ""
ETAGS_ARGS = Makefile.am
subdir = kernel/sys
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
HEADERS = $(noinst_HEADERS)
-DIST_COMMON = README $(noinst_HEADERS) Makefile.am Makefile.in
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
+ Makefile.am
all: all-am
.SUFFIXES:
@@ -134,58 +178,88 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu kernel/sys/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ../..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -197,7 +271,6 @@ check: check-am
all-am: Makefile $(HEADERS)
installdirs:
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -209,6 +282,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -216,7 +290,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -226,6 +300,7 @@ clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
+ -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
@@ -248,6 +323,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -255,16 +331,24 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-generic distclean \
- distclean-generic distclean-tags distdir dvi dvi-am info \
- info-am install install-am install-data install-data-am \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic ctags \
+ distclean distclean-generic distclean-tags distdir dvi dvi-am \
+ info info-am install install-am install-data install-data-am \
install-exec install-exec-am install-info install-info-am \
install-man install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic tags uninstall uninstall-am \
- uninstall-info-am
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/ntp/kernel/sys/parsestreams.h b/contrib/ntp/kernel/sys/parsestreams.h
index b12e92c338e2..47649b31611d 100644
--- a/contrib/ntp/kernel/sys/parsestreams.h
+++ b/contrib/ntp/kernel/sys/parsestreams.h
@@ -31,7 +31,9 @@
#include <sys/ppsclock.h>
+#ifndef NTP_NEED_BOPS
#define NTP_NEED_BOPS
+#endif
#if defined(PARSESTREAM) && (defined(_sun) || defined(__sun)) && defined(HAVE_SYS_STREAM_H)
/*
diff --git a/contrib/ntp/kernel/sys/tt560_api.h b/contrib/ntp/kernel/sys/tt560_api.h
new file mode 100644
index 000000000000..c87a7b13a429
--- /dev/null
+++ b/contrib/ntp/kernel/sys/tt560_api.h
@@ -0,0 +1,489 @@
+/***********************************************************************
+ *
+ * Module: ttime_api.h
+ *
+ * Author: SIS 1998
+ * LM NE&SS 2001
+ *
+ * Description
+ *
+ * This header file contains data necessary for the API to the
+ * True Time board. This contains all of the structure definitions
+ * for the individual registers.
+ *
+ ***********************************************************************/
+#ifndef TTIME_API_H
+#define TTIME_API_H
+
+#ifdef CPP
+extern "C" {
+#endif
+
+#include <time.h>
+
+typedef struct
+{
+ unsigned int micro_sec;
+ unsigned int milli_sec;
+ struct tm gps_tm;
+} gps_time_t;
+
+typedef struct
+{
+ unsigned char reserved_1;
+ unsigned unit_ms : 4;
+ unsigned filler_0 : 4;
+ unsigned hun_ms : 4;
+ unsigned tens_ms : 4;
+ unsigned tens_sec : 4;
+ unsigned unit_sec : 4;
+
+ unsigned tens_min : 4;
+ unsigned unit_min : 4;
+ unsigned tens_hour : 4;
+ unsigned unit_hour : 4;
+ unsigned tens_day : 4;
+ unsigned unit_day : 4;
+ unsigned filler_1 : 4;
+ unsigned hun_day : 4;
+
+ unsigned tens_year : 4;
+ unsigned unit_year : 4;
+ unsigned thou_year : 4;
+ unsigned hun_year : 4;
+ unsigned char reserved_2[2];
+} preset_time_reg_t;
+
+typedef struct
+{
+ unsigned n_d0 : 2;
+ unsigned antenna_short_stat : 1; /* 0 = fault */
+ unsigned antenna_open_stat : 1; /* 0 = fault */
+ unsigned n_d1 : 1;
+ unsigned rate_gen_pulse_stat : 1;
+ unsigned time_cmp_pulse_stat : 1;
+ unsigned ext_event_stat : 1;
+
+} hw_stat_reg_t;
+
+typedef struct
+{
+ unsigned tens_us : 4;
+ unsigned unit_us : 4;
+ unsigned unit_ms : 4;
+ unsigned hun_us : 4;
+ unsigned char hw_stat; /* hw_stat_reg_t hw_stat; */
+ unsigned char reserved_3;
+
+ unsigned hun_ms : 4;
+ unsigned tens_ms : 4;
+ unsigned tens_sec : 4;
+ unsigned unit_sec : 4;
+ unsigned tens_min : 4;
+ unsigned unit_min : 4;
+ unsigned tens_hour : 4;
+ unsigned unit_hour : 4;
+
+ unsigned tens_day : 4;
+ unsigned unit_day : 4;
+ unsigned status : 4;
+ unsigned hun_day : 4;
+ unsigned tens_year : 4;
+ unsigned unit_year : 4;
+ unsigned thou_year : 4;
+ unsigned hun_year : 4;
+} time_freeze_reg_t;
+
+typedef struct
+{
+ unsigned char off_low;
+ unsigned char off_high;
+ unsigned char reserved_4[2];
+} sync_gen_off_reg_t;
+
+typedef struct
+{
+ unsigned tens_min : 4;
+ unsigned unit_min : 4;
+ unsigned tens_hour : 4;
+ unsigned unit_hour : 4;
+ unsigned char sign_ascii; /* '+' or '-' */
+ unsigned char reserved_5;
+} local_off_t;
+
+/*
+ * This structure can be used for both the position freeze
+ * and position preset registers.
+ */
+typedef struct
+{
+ unsigned lat_tens_degee : 4;
+ unsigned lat_unit_degee : 4;
+ unsigned filler_0 : 4;
+ unsigned lat_hun_degree : 4;
+ unsigned lat_tens_min : 4;
+ unsigned lat_unit_min : 4;
+ unsigned char lat_north_south; /* 'N' or 'S' */
+
+ unsigned filler_1 : 4;
+ unsigned lat_tenth_sec : 4;
+ unsigned lat_tens_sec : 4;
+ unsigned lat_unit_sec : 4;
+ unsigned long_tens_degree : 4;
+ unsigned long_unit_degree : 4;
+ unsigned filler_2 : 4;
+ unsigned long_hun_degree : 4;
+
+ unsigned long_tens_min : 4;
+ unsigned long_unit_min : 4;
+ unsigned char long_east_west; /* 'E' or 'W' */
+ unsigned filler_3 : 4;
+ unsigned long_tenth_sec : 4;
+ unsigned long_tens_sec : 4;
+ unsigned long_unit_sec : 4;
+
+ unsigned elv_tens_km : 4;
+ unsigned elv_unit_km : 4;
+ unsigned char elv_sign; /* '+' or '-' */
+ unsigned elv_unit_m : 4;
+ unsigned elv_tenth_m : 4;
+ unsigned elv_hun_m : 4;
+ unsigned elv_tens_m : 4;
+} pos_reg_t;
+
+typedef struct
+{
+ unsigned char prn1_tens_units;
+ unsigned char prn1_reserved;
+ unsigned char lvl1_tenths_hundredths;
+ unsigned char lvl1_tens_units;
+
+ unsigned char prn2_tens_units;
+ unsigned char prn2_reserved;
+ unsigned char lvl2_tenths_hundredths;
+ unsigned char lvl2_tens_units;
+
+ unsigned char prn3_tens_units;
+ unsigned char prn3_reserved;
+ unsigned char lvl3_tenths_hundredths;
+ unsigned char lvl3_tens_units;
+
+ unsigned char prn4_tens_units;
+ unsigned char prn4_reserved;
+ unsigned char lvl4_tenths_hundredths;
+ unsigned char lvl4_tens_units;
+
+ unsigned char prn5_tens_units;
+ unsigned char prn5_reserved;
+ unsigned char lvl5_tenths_hundredths;
+ unsigned char lvl5_tens_units;
+
+ unsigned char prn6_tens_units;
+ unsigned char prn6_reserved;
+ unsigned char lvl6_tenths_hundredths;
+ unsigned char lvl6_tens_units;
+
+ unsigned char flag;
+ unsigned char reserved[3];
+} sig_levels_t;
+
+typedef struct
+{
+ unsigned tens_us : 4;
+ unsigned unit_us : 4;
+ unsigned unit_ms : 4;
+ unsigned hun_us : 4;
+ unsigned hun_ms : 4;
+ unsigned tens_ms : 4;
+ unsigned tens_sec : 4;
+ unsigned unit_sec : 4;
+
+ unsigned tens_min : 4;
+ unsigned unit_min : 4;
+ unsigned tens_hour : 4;
+ unsigned unit_hour : 4;
+ unsigned tens_day : 4;
+ unsigned unit_day : 4;
+ unsigned stat : 4;
+ unsigned hun_day : 4;
+
+ unsigned tens_year : 4;
+ unsigned unit_year : 4;
+ unsigned thou_year : 4;
+ unsigned hun_year : 4;
+ unsigned char reserved_5[2];
+} ext_time_event_reg_t;
+
+typedef struct
+{
+ unsigned tens_us : 4;
+ unsigned unit_us : 4;
+ unsigned unit_ms : 4;
+ unsigned hun_us : 4;
+ unsigned hun_ms : 4;
+ unsigned tens_ms : 4;
+ unsigned tens_sec : 4;
+ unsigned unit_sec : 4;
+
+ unsigned tens_min : 4;
+ unsigned unit_min : 4;
+ unsigned tens_hour : 4;
+ unsigned unit_hour : 4;
+ unsigned tens_day : 4;
+ unsigned unit_day : 4;
+ unsigned mask : 4;
+ unsigned hun_day : 4;
+} time_cmp_reg_t;
+
+typedef struct
+{
+ unsigned char err_stat;
+ unsigned char no_def;
+ unsigned char oscillator_stat[2];
+} diag_reg_t;
+
+typedef struct
+{
+ unsigned res :2;
+ unsigned rate_int_mask :1;
+ unsigned cmp_int_mask :1;
+ unsigned ext_int_mask :1;
+ unsigned rate_stat_clr :1;
+ unsigned cmp_stat_clr :1;
+ unsigned ext_stat_clr :1;
+ unsigned char reserved[3];
+} hw_ctl_reg_t;
+
+typedef struct
+{
+ unsigned preset_pos_rdy :1;
+ unsigned sel_pps_ref :1;
+ unsigned sel_gps_ref :1;
+ unsigned sel_time_code :1;
+ unsigned gen_stp_run :1;
+ unsigned preset_time_rdy :1;
+ unsigned dst :1;
+ unsigned mode_sel :1;
+
+ unsigned ctl_am_dc :1;
+ unsigned reserved :3;
+ unsigned input_code :4;
+
+ unsigned char rate_reserved;
+
+ unsigned rate_flag :4;
+ unsigned rate_reserved1 :4;
+} conf_reg_t;
+
+typedef struct
+{
+ unsigned char mem_reserved[0xf8];
+
+ hw_ctl_reg_t hw_ctl_reg;
+
+ time_freeze_reg_t time_freeze_reg;
+
+ pos_reg_t pos_freeze_reg;
+
+ conf_reg_t conf_reg;
+
+ diag_reg_t diag_reg;
+
+ local_off_t local_offset;
+
+ sync_gen_off_reg_t sync_gen_offset;
+
+ unsigned char reserved[4];
+
+ unsigned char config_reg2_ctl;
+
+ unsigned char reserved2[11];
+
+ time_cmp_reg_t time_compare_reg;
+
+ unsigned char reserved3[24];
+
+ preset_time_reg_t preset_time_reg;
+
+ pos_reg_t preset_pos_reg;
+
+ ext_time_event_reg_t extern_time_event_reg;
+
+ unsigned char reserved4[24];
+
+ sig_levels_t signal_levels_reg;
+
+ unsigned char reserved5[12];
+} tt_mem_space_t;
+
+#define TTIME_MEMORY_SIZE 0x200
+
+/*
+ * Defines for register offsets
+ */
+#define HW_CTL_REG 0x0f8
+#define TIME_FREEZE_REG 0x0fc
+#define HW_STAT_REG 0x0fe
+#define POS_FREEZE_REG 0x108
+#define CONFIG_REG_1 0x118
+#define DIAG_REG 0x11c
+#define LOCAL_OFF_REG 0x120
+#define SYNC_GEN_OFF_REG 0x124
+#define CONFIG_REG_2 0x12c
+#define TIME_CMP_REG 0x138
+#define PRESET_TIME_REG 0x158
+#define PRESET_POS_REG 0x164
+#define EXT_EVENT_REG 0x174
+#define SIG_LVL_PRN1 0x198
+#define SIG_LVL_PRN2 0x19c
+#define SIG_LVL_PRN3 0x1a0
+#define SIG_LVL_PRN4 0x1a4
+#define SIG_LVL_PRN5 0x1a8
+#define SIG_LVL_PRN6 0x1ac
+#define SIG_LVL_FLAG 0x1b0
+
+/*
+ * Defines for accessing the hardware status register.
+ */
+#define HW_STAT_ANTENNA_SHORT 0 /* access the antenna short bit */
+#define HW_STAT_ANTENNA_OPEN 1 /* access the antenna open bit */
+#define HW_STAT_RATE_GEN_PULSE_STAT 2 /* access the rate gen pulse bit */
+#define HW_STAT_TIME_CMP_PULSE_STAT 3 /* access the time cmp bit */
+#define HW_STAT_EXT_EVENT_STAT 4 /* access the external event bit */
+
+/*
+ * Defines for accessing the hardware control register
+ */
+
+#define HW_CTL_RATE_INT_MASK 0 /* access rate generator int mask */
+#define HW_CTL_CMP_INT_MASK 1 /* access compare interrupt mask */
+#define HW_CTL_EXT_INT_MASK 2 /* access external event interrupt mask */
+#define HW_CTL_RATE_GEN_INT_CLEAR 3 /* access rate gen. interrupt clear field */
+#define HW_CTL_TIME_CMP_INT_CLEAR 4 /* access time cmp interrupt clear field */
+#define HW_CTL_EXT_EVENT_INT_CLEAR 5 /* access external event int clear field */
+
+/*
+ * Defines for configuration register bit fields.
+ */
+#define PRESET_POS_RDY_BIT 0 /* access the preset pos. rdy. bit */
+#define SEL_1_PPS_REF_BIT 1 /* access the select 1 pps reference bit */
+#define SEL_GPS_REF_BIT 2 /* access the select gps reference bit */
+#define SEL_TIME_CODE_REF_BIT 3 /* access the select time code reference bit */
+#define GEN_STOP_BIT 4 /* access the generator start/stop bit */
+#define PRESET_TIME_RDY_BIT 5 /* access the preset time ready bit */
+#define DST_BIT 6 /* access the DST bit */
+#define MODE_SEL_BIT 7 /* access the mode select bit */
+#define AM_DC_BIT 8 /* access the code bits AM/DC bit */
+#define IN_CODE_SEL_BIT 9 /* access the input code select bit */
+#define FLAG_BIT 10 /* access the flag bit */
+
+/*
+ * The following defines are used to set modes in the
+ * configuration register.
+ */
+
+#define CONF_SET_AM 0 /* Set code to AM */
+#define CONF_SET_DC 1 /* Set code to DC */
+#define CONF_SET_IRIG_B 0 /* Set code IRIG B */
+#define CONF_SET_IRIG_A 1 /* Set code IRIG A */
+
+#define CONF_FLAG_DISABLE 0 /* Disable pulse */
+#define CONF_FLAG_10K_PPS 1 /* Set rate to 10k PPS */
+#define CONF_FLAG_1K_PPS 2 /* Set rate to 1k PPS */
+#define CONF_FLAG_100_PPS 3 /* Set rate to 100 PPS */
+#define CONF_FLAG_10_PPS 4 /* Set rate to 10 PPS */
+#define CONF_FLAG_1_PPS 5 /* Set rate to 1 PPS */
+
+/*
+ * Defines for read commands
+ */
+
+#define TT_RD_FREEZE_REG 0x01
+#define TT_RD_HW_CTL_REG 0x02
+#define TT_RD_CNFG_REG 0x03
+#define TT_RD_DIAG_REG 0x04
+#define TT_RD_LCL_OFFSET 0x05
+#define TT_RD_SYNC_GEN_OFF 0x06
+#define TT_RD_CNFG_REG_2 0x07
+#define TT_RD_TIME_CMP_REG 0x08
+#define TT_RD_PRESET_REG 0x09
+#define TT_RD_EXT_EVNT_REG 0x0a
+#define TT_RD_SIG_LVL_REG 0x0b
+
+/*
+ * Defines for write commands
+ */
+#define TT_WRT_FREEZE_REG 0x0c
+#define TT_WRT_HW_CTL_REG 0x0d
+#define TT_WRT_CNFG_REG 0x0e
+#define TT_WRT_DIAG_REG 0x0f
+#define TT_WRT_LCL_OFFSET 0x10
+#define TT_WRT_SYNC_GEN_OFF 0x11
+#define TT_WRT_CNFG_REG_2 0x12
+#define TT_WRT_TIME_CMP_REG 0x13
+#define TT_WRT_PRESET_REG 0x14
+#define TT_WRT_EXT_EVNT_REG 0x15
+#define TT_WRT_SIG_LVL_REG 0x16
+
+/*
+ * Define the length of the buffers to move (in 32 bit words).
+ */
+
+#define HW_CTL_REG_LEN 1
+#define CNFG_REG_1_LEN 1
+#define DIAG_REG_LEN 1
+#define LCL_OFFSET_LEN 1
+#define SYNC_GEN_OFF_LEN 1
+#define CNFG_REG_2_LEN 1
+
+#define TIME_CMP_REG_LEN 2
+#define PRESET_TIME_REG_LEN 3
+#define PRESET_POS_REG_LEN 4
+#define PRESET_REG_LEN (PRESET_TIME_REG_LEN+PRESET_POS_REG_LEN)
+#define TIME_FREEZE_REG_LEN 3
+#define POSN_FREEZE_REG_LEN 4
+#define FREEZE_REG_LEN (TIME_FREEZE_REG_LEN+POSN_FREEZE_REG_LEN)
+#define EXT_EVNT_REG_LEN 3
+#define SIG_LVL_REG_LEN 7
+#define GPS_TIME_LEN 7
+
+/*
+ * Define BCD - INT - BCD macros.
+ */
+
+#define BCDTOI(a) ( ( ( ( (a) & 0xf0 ) >> 4 ) * 10 ) + ( (a) & 0x0f ) )
+#define ITOBCD(a) ( ( ( ( (a) ) / 10) << 4 ) + ( ( (a) ) % 10) )
+#define LTOBCD(a) ( ( ( ( (uint64_t)(a) ) / 10) << 4 ) + ( ( (uint64_t)(a) ) % 10) )
+
+extern int init_560 ( );
+extern void close_560 ( );
+extern int write_hw_ctl_reg (hw_ctl_reg_t *);
+extern int write_hw_ctl_reg_bitfield (int, int );
+extern int read_conf_reg (conf_reg_t *);
+extern int read_conf_reg_bitfield (int );
+extern int write_conf_reg (conf_reg_t *);
+extern int write_conf_reg_bitfield (int, unsigned char );
+extern int read_hw_stat_reg_bitfield (int );
+extern int read_local_offset_reg (local_off_t *);
+extern int write_local_offset_reg (local_off_t *);
+extern int read_sync_offset_reg (sync_gen_off_reg_t *);
+extern int write_sync_offset_reg (sync_gen_off_reg_t *);
+extern int read_time_cmp_reg (time_cmp_reg_t *);
+extern int write_time_cmp_reg (time_cmp_reg_t *);
+extern int read_preset_time_reg (preset_time_reg_t *);
+extern int write_preset_time_reg (preset_time_reg_t *);
+extern int reset_time ( );
+extern int set_new_time (preset_time_reg_t *);
+extern int read_preset_position_reg (pos_reg_t *);
+extern int write_preset_position_reg (pos_reg_t *);
+extern int read_external_event_reg (ext_time_event_reg_t *);
+extern int read_signal_level_reg (sig_levels_t *);
+extern int freeze_time ( );
+extern int snapshot_time (time_freeze_reg_t *);
+extern int read_position_freeze_reg (pos_reg_t *);
+extern int read_diag_reg (diag_reg_t *);
+
+#ifdef CPP
+}
+#endif
+#endif
diff --git a/contrib/ntp/libisc/assertions.c b/contrib/ntp/libisc/assertions.c
new file mode 100644
index 000000000000..08dd5f3d51f7
--- /dev/null
+++ b/contrib/ntp/libisc/assertions.c
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 1997-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: assertions.c,v 1.16 2001/07/16 03:52:05 mayer Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <isc/assertions.h>
+#include <isc/msgs.h>
+
+/*
+ * Forward.
+ */
+
+static void
+default_callback(const char *, int, isc_assertiontype_t, const char *);
+
+/*
+ * Public.
+ */
+
+LIBISC_EXTERNAL_DATA isc_assertioncallback_t isc_assertion_failed =
+ default_callback;
+
+void
+isc_assertion_setcallback(isc_assertioncallback_t cb) {
+ if (cb == NULL)
+ isc_assertion_failed = default_callback;
+ else
+ isc_assertion_failed = cb;
+}
+
+const char *
+isc_assertion_typetotext(isc_assertiontype_t type) {
+ const char *result;
+
+ /*
+ * These strings have purposefully not been internationalized
+ * because they are considered to essentially be keywords of
+ * the ISC development environment.
+ */
+ switch (type) {
+ case isc_assertiontype_require:
+ result = "REQUIRE";
+ break;
+ case isc_assertiontype_ensure:
+ result = "ENSURE";
+ break;
+ case isc_assertiontype_insist:
+ result = "INSIST";
+ break;
+ case isc_assertiontype_invariant:
+ result = "INVARIANT";
+ break;
+ default:
+ result = NULL;
+ }
+ return (result);
+}
+
+/*
+ * Private.
+ */
+
+static void
+default_callback(const char *file, int line, isc_assertiontype_t type,
+ const char *cond)
+{
+ fprintf(stderr, "%s:%d: %s(%s) %s.\n",
+ file, line, isc_assertion_typetotext(type), cond,
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
+ ISC_MSG_FAILED, "failed"));
+ fflush(stderr);
+ abort();
+ /* NOTREACHED */
+}
diff --git a/contrib/ntp/libisc/error.c b/contrib/ntp/libisc/error.c
new file mode 100644
index 000000000000..ed0469d1017b
--- /dev/null
+++ b/contrib/ntp/libisc/error.c
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 1998-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: error.c,v 1.16 2001/08/08 22:54:49 gson Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <isc/error.h>
+#include <isc/msgs.h>
+
+static void
+default_unexpected_callback(const char *, int, const char *, va_list)
+ ISC_FORMAT_PRINTF(3, 0);
+
+static void
+default_fatal_callback(const char *, int, const char *, va_list)
+ ISC_FORMAT_PRINTF(3, 0);
+
+static isc_errorcallback_t unexpected_callback = default_unexpected_callback;
+static isc_errorcallback_t fatal_callback = default_fatal_callback;
+
+void
+isc_error_setunexpected(isc_errorcallback_t cb) {
+ if (cb == NULL)
+ unexpected_callback = default_unexpected_callback;
+ else
+ unexpected_callback = cb;
+}
+
+void
+isc_error_setfatal(isc_errorcallback_t cb) {
+ if (cb == NULL)
+ fatal_callback = default_fatal_callback;
+ else
+ fatal_callback = cb;
+}
+
+void
+isc_error_unexpected(const char *file, int line, const char *format, ...) {
+ va_list args;
+
+ va_start(args, format);
+ (unexpected_callback)(file, line, format, args);
+ va_end(args);
+}
+
+void
+isc_error_fatal(const char *file, int line, const char *format, ...) {
+ va_list args;
+
+ va_start(args, format);
+ (fatal_callback)(file, line, format, args);
+ va_end(args);
+ abort();
+}
+
+void
+isc_error_runtimecheck(const char *file, int line, const char *expression) {
+ isc_error_fatal(file, line, "RUNTIME_CHECK(%s) %s", expression,
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
+ ISC_MSG_FAILED, "failed"));
+}
+
+static void
+default_unexpected_callback(const char *file, int line, const char *format,
+ va_list args)
+{
+ fprintf(stderr, "%s:%d: ", file, line);
+ vfprintf(stderr, format, args);
+ fprintf(stderr, "\n");
+ fflush(stderr);
+}
+
+static void
+default_fatal_callback(const char *file, int line, const char *format,
+ va_list args)
+{
+ fprintf(stderr, "%s:%d: %s: ", file, line,
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
+ ISC_MSG_FATALERROR, "fatal error"));
+ vfprintf(stderr, format, args);
+ fprintf(stderr, "\n");
+ fflush(stderr);
+}
diff --git a/contrib/ntp/libisc/ifiter_ioctl.c b/contrib/ntp/libisc/ifiter_ioctl.c
new file mode 100644
index 000000000000..bf731e70d9b9
--- /dev/null
+++ b/contrib/ntp/libisc/ifiter_ioctl.c
@@ -0,0 +1,820 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: ifiter_ioctl.c,v 1.34 2002/08/16 00:05:57 marka Exp $ */
+
+/*
+ * Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
+ * See netintro(4).
+ */
+
+#if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR)
+#ifdef ISC_PLATFORM_HAVEIF_LADDRCONF
+#define lifc_len iflc_len
+#define lifc_buf iflc_buf
+#define lifc_req iflc_req
+#define LIFCONF if_laddrconf
+#else
+#define ISC_HAVE_LIFC_FAMILY 1
+#define ISC_HAVE_LIFC_FLAGS 1
+#define LIFCONF lifconf
+#endif
+
+#ifdef ISC_PLATFORM_HAVEIF_LADDRREQ
+#define lifr_addr iflr_addr
+#define lifr_name iflr_name
+#define lifr_dstaddr iflr_dstaddr
+#define lifr_broadaddr iflr_broadaddr
+#define lifr_flags iflr_flags
+#define ss_family sa_family
+#define LIFREQ if_laddrreq
+#else
+#define LIFREQ lifreq
+#endif
+#endif
+
+#define IFITER_MAGIC ISC_MAGIC('I', 'F', 'I', 'T')
+#define VALID_IFITER(t) ISC_MAGIC_VALID(t, IFITER_MAGIC)
+
+struct isc_interfaceiter {
+ unsigned int magic; /* Magic number. */
+ isc_mem_t *mctx;
+ int socket;
+ int mode;
+ struct ifconf ifc;
+#if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR)
+ struct LIFCONF lifc;
+#endif
+ void *buf; /* Buffer for sysctl data. */
+ unsigned int bufsize; /* Bytes allocated. */
+#ifdef HAVE_TRUCLUSTER
+ int clua_context; /* Cluster alias context */
+#endif
+ unsigned int pos; /* Current offset in
+ SIOCGLIFCONF data */
+ isc_interface_t current; /* Current interface data. */
+ isc_result_t result; /* Last result code. */
+};
+
+#ifdef HAVE_TRUCLUSTER
+#include <clua/clua.h>
+#include <sys/socket.h>
+#endif
+
+
+/*
+ * Size of buffer for SIOCGLIFCONF, in bytes. We assume no sane system
+ * will have more than a megabyte of interface configuration data.
+ */
+#define IFCONF_BUFSIZE_INITIAL 4096
+#define IFCONF_BUFSIZE_MAX 1048576
+
+static isc_result_t
+getbuf4(isc_interfaceiter_t *iter) {
+ char strbuf[ISC_STRERRORSIZE];
+
+ iter->bufsize = IFCONF_BUFSIZE_INITIAL;
+
+ for (;;) {
+ iter->buf = isc_mem_get(iter->mctx, iter->bufsize);
+ if (iter->buf == NULL)
+ return (ISC_R_NOMEMORY);
+
+ memset(&iter->ifc.ifc_len, 0, sizeof(iter->ifc.ifc_len));
+ iter->ifc.ifc_len = iter->bufsize;
+ iter->ifc.ifc_buf = iter->buf;
+ /*
+ * Ignore the HP/UX warning about "integer overflow during
+ * conversion". It comes from its own macro definition,
+ * and is really hard to shut up.
+ */
+ if (ioctl(iter->socket, SIOCGIFCONF, (char *)&iter->ifc)
+ == -1) {
+ if (errno != EINVAL) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_GETIFCONFIG,
+ "get interface "
+ "configuration: %s"),
+ strbuf);
+ goto unexpected;
+ }
+ /*
+ * EINVAL. Retry with a bigger buffer.
+ */
+ } else {
+ /*
+ * The ioctl succeeded.
+ * Some OS's just return what will fit rather
+ * than set EINVAL if the buffer is too small
+ * to fit all the interfaces in. If
+ * ifc.lifc_len is too near to the end of the
+ * buffer we will grow it just in case and
+ * retry.
+ */
+ if (iter->ifc.ifc_len + 2 * sizeof(struct ifreq)
+ < iter->bufsize)
+ break;
+ }
+ if (iter->bufsize >= IFCONF_BUFSIZE_MAX) {
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_BUFFERMAX,
+ "get interface "
+ "configuration: "
+ "maximum buffer "
+ "size exceeded"));
+ goto unexpected;
+ }
+ isc_mem_put(iter->mctx, iter->buf, iter->bufsize);
+
+ iter->bufsize *= 2;
+ }
+ iter->mode = 4;
+ return (ISC_R_SUCCESS);
+
+ unexpected:
+ isc_mem_put(iter->mctx, iter->buf, iter->bufsize);
+ iter->buf = NULL;
+ return (ISC_R_UNEXPECTED);
+}
+
+static isc_result_t
+getbuf6(isc_interfaceiter_t *iter) {
+#if !defined(SIOCGLIFCONF) || !defined(SIOCGLIFADDR)
+ UNUSED(iter);
+ return (ISC_R_NOTIMPLEMENTED);
+#else
+ char strbuf[ISC_STRERRORSIZE];
+ isc_result_t result;
+
+ iter->bufsize = IFCONF_BUFSIZE_INITIAL;
+
+ for (;;) {
+ iter->buf = isc_mem_get(iter->mctx, iter->bufsize);
+ if (iter->buf == NULL)
+ return (ISC_R_NOMEMORY);
+
+ memset(&iter->lifc.lifc_len, 0, sizeof(iter->lifc.lifc_len));
+#ifdef ISC_HAVE_LIFC_FAMILY
+ iter->lifc.lifc_family = AF_UNSPEC;
+#endif
+#ifdef ISC_HAVE_LIFC_FLAGS
+ iter->lifc.lifc_flags = 0;
+#endif
+ iter->lifc.lifc_len = iter->bufsize;
+ iter->lifc.lifc_buf = iter->buf;
+ /*
+ * Ignore the HP/UX warning about "integer overflow during
+ * conversion". It comes from its own macro definition,
+ * and is really hard to shut up.
+ */
+ if (ioctl(iter->socket, SIOCGLIFCONF, (char *)&iter->lifc)
+ == -1) {
+#ifdef __hpux
+ /*
+ * IPv6 interface scanning is not available on all
+ * kernels w/ IPv6 sockets.
+ */
+ if (errno == ENOENT) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_GETIFCONFIG,
+ "get interface "
+ "configuration: %s"),
+ strbuf);
+ result = ISC_R_FAILURE;
+ goto cleanup;
+ }
+#endif
+ if (errno != EINVAL) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_GETIFCONFIG,
+ "get interface "
+ "configuration: %s"),
+ strbuf);
+ result = ISC_R_UNEXPECTED;
+ goto cleanup;
+ }
+ /*
+ * EINVAL. Retry with a bigger buffer.
+ */
+ } else {
+ /*
+ * The ioctl succeeded.
+ * Some OS's just return what will fit rather
+ * than set EINVAL if the buffer is too small
+ * to fit all the interfaces in. If
+ * ifc.ifc_len is too near to the end of the
+ * buffer we will grow it just in case and
+ * retry.
+ */
+ if (iter->lifc.lifc_len + 2 * sizeof(struct LIFREQ)
+ < iter->bufsize)
+ break;
+ }
+ if (iter->bufsize >= IFCONF_BUFSIZE_MAX) {
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_BUFFERMAX,
+ "get interface "
+ "configuration: "
+ "maximum buffer "
+ "size exceeded"));
+ result = ISC_R_UNEXPECTED;
+ goto cleanup;
+ }
+ isc_mem_put(iter->mctx, iter->buf, iter->bufsize);
+
+ iter->bufsize *= 2;
+ }
+
+ iter->mode = 6;
+ return (ISC_R_SUCCESS);
+
+ cleanup:
+ isc_mem_put(iter->mctx, iter->buf, iter->bufsize);
+ iter->buf = NULL;
+ return (result);
+#endif
+}
+
+isc_result_t
+isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
+ isc_interfaceiter_t *iter;
+ isc_result_t result;
+ char strbuf[ISC_STRERRORSIZE];
+
+ REQUIRE(iterp != NULL);
+ REQUIRE(*iterp == NULL);
+
+ iter = isc_mem_get(mctx, sizeof(*iter));
+ if (iter == NULL)
+ return (ISC_R_NOMEMORY);
+
+ iter->mctx = mctx;
+ iter->buf = NULL;
+ iter->mode = 0;
+
+ /*
+ * Create an unbound datagram socket to do the SIOCGLIFADDR ioctl on.
+ */
+ if ((iter->socket = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_MAKESCANSOCKET,
+ "making interface "
+ "scan socket: %s"),
+ strbuf);
+ result = ISC_R_UNEXPECTED;
+ goto socket_failure;
+ }
+
+ /*
+ * Get the interface configuration, allocating more memory if
+ * necessary.
+ */
+
+ result = isc_net_probeipv6();
+ if (result == ISC_R_SUCCESS)
+ result = getbuf6(iter);
+ if (result != ISC_R_SUCCESS)
+ result = getbuf4(iter);
+ if (result != ISC_R_SUCCESS)
+ goto ioctl_failure;
+
+ /*
+ * A newly created iterator has an undefined position
+ * until isc_interfaceiter_first() is called.
+ */
+#ifdef HAVE_TRUCLUSTER
+ iter->clua_context = -1;
+#endif
+ iter->pos = (unsigned int) -1;
+ iter->result = ISC_R_FAILURE;
+
+ iter->magic = IFITER_MAGIC;
+ *iterp = iter;
+ return (ISC_R_SUCCESS);
+
+ ioctl_failure:
+ if (iter->buf != NULL)
+ isc_mem_put(mctx, iter->buf, iter->bufsize);
+ (void) close(iter->socket);
+
+ socket_failure:
+ isc_mem_put(mctx, iter, sizeof(*iter));
+ return (result);
+}
+
+#ifdef HAVE_TRUCLUSTER
+static void
+get_inaddr(isc_netaddr_t *dst, struct in_addr *src) {
+ dst->family = AF_INET;
+ memcpy(&dst->type.in, src, sizeof(struct in_addr));
+}
+
+static isc_result_t
+internal_current_clusteralias(isc_interfaceiter_t *iter) {
+ struct sockaddr sa;
+ struct clua_info ci;
+ while (clua_getaliasaddress(&sa, &iter->clua_context) == CLUA_SUCCESS) {
+ if (clua_getaliasinfo(&sa, &ci) != CLUA_SUCCESS)
+ continue;
+ memset(&iter->current, 0, sizeof(iter->current));
+ iter->current.af = sa.sa_family;
+ memset(iter->current.name, 0, sizeof(iter->current.name));
+ sprintf(iter->current.name, "clua%d", ci.aliasid);
+ iter->current.flags = INTERFACE_F_UP;
+ get_inaddr(&iter->current.address, &ci.addr);
+ get_inaddr(&iter->current.netmask, &ci.netmask);
+ return (ISC_R_SUCCESS);
+ }
+ return (ISC_R_NOMORE);
+}
+#endif
+
+/*
+ * Get information about the current interface to iter->current.
+ * If successful, return ISC_R_SUCCESS.
+ * If the interface has an unsupported address family, or if
+ * some operation on it fails, return ISC_R_IGNORE to make
+ * the higher-level iterator code ignore it.
+ */
+
+static isc_result_t
+internal_current4(isc_interfaceiter_t *iter) {
+ struct ifreq *ifrp;
+ struct ifreq ifreq;
+ int family;
+ char strbuf[ISC_STRERRORSIZE];
+#if !defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR)
+ struct if_laddrreq if_laddrreq;
+ int i, bits;
+#endif
+
+ REQUIRE(VALID_IFITER(iter));
+ REQUIRE (iter->pos < (unsigned int) iter->ifc.ifc_len);
+
+ ifrp = (struct ifreq *)((char *) iter->ifc.ifc_req + iter->pos);
+
+ memset(&ifreq, 0, sizeof(ifreq));
+ memcpy(&ifreq, ifrp, sizeof(ifreq));
+
+ family = ifreq.ifr_addr.sa_family;
+#if !defined (SIOCGLIFCONF) && defined(SIOCGLIFADDR) && \
+ defined(ISC_PLATFORM_HAVEIPV6)
+ if (family != AF_INET && family != AF_INET6)
+#else
+ if (family != AF_INET)
+#endif
+ return (ISC_R_IGNORE);
+
+ memset(&iter->current, 0, sizeof(iter->current));
+ iter->current.af = family;
+
+ INSIST(sizeof(ifreq.ifr_name) <= sizeof(iter->current.name));
+ memset(iter->current.name, 0, sizeof(iter->current.name));
+ memcpy(iter->current.name, ifreq.ifr_name, sizeof(ifreq.ifr_name));
+
+ get_addr(family, &iter->current.address,
+ (struct sockaddr *)&ifrp->ifr_addr);
+
+ /*
+ * If the interface does not have a address ignore it.
+ */
+ switch (family) {
+ case AF_INET:
+ if (iter->current.address.type.in.s_addr == htonl(INADDR_ANY))
+ return (ISC_R_IGNORE);
+ break;
+ case AF_INET6:
+ if (memcmp(&iter->current.address.type.in6, &in6addr_any,
+ sizeof(in6addr_any)) == 0)
+ return (ISC_R_IGNORE);
+ break;
+ }
+
+ /*
+ * Get interface flags.
+ */
+
+ iter->current.flags = 0;
+
+ /*
+ * Ignore the HP/UX warning about "integer overflow during
+ * conversion. It comes from its own macro definition,
+ * and is really hard to shut up.
+ */
+ if (ioctl(iter->socket, SIOCGIFFLAGS, (char *) &ifreq) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "%s: getting interface flags: %s",
+ ifreq.ifr_name, strbuf);
+ return (ISC_R_IGNORE);
+ }
+
+ if ((ifreq.ifr_flags & IFF_UP) != 0)
+ iter->current.flags |= INTERFACE_F_UP;
+
+ if ((ifreq.ifr_flags & IFF_POINTOPOINT) != 0)
+ iter->current.flags |= INTERFACE_F_POINTTOPOINT;
+
+ if ((ifreq.ifr_flags & IFF_LOOPBACK) != 0)
+ iter->current.flags |= INTERFACE_F_LOOPBACK;
+
+ if ((ifreq.ifr_flags & IFF_BROADCAST) != 0) {
+ iter->current.flags |= INTERFACE_F_BROADCAST;
+ }
+
+#ifdef IFF_MULTICAST
+ if ((ifreq.ifr_flags & IFF_MULTICAST) != 0) {
+ iter->current.flags |= INTERFACE_F_MULTICAST;
+ }
+#endif
+
+#if !defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR)
+ if (family == AF_INET)
+ goto inet;
+
+ memset(&if_laddrreq, 0, sizeof(if_laddrreq));
+ memcpy(if_laddrreq.iflr_name, iter->current.name,
+ sizeof(if_laddrreq.iflr_name));
+ memcpy(&if_laddrreq.addr, &iter->current.address.type.in6,
+ sizeof(iter->current.address.type.in6));
+
+ if (ioctl(iter->socket, SIOCGLIFADDR, &if_laddrreq) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "%s: getting interface address: %s",
+ ifreq.ifr_name, strbuf);
+ return (ISC_R_IGNORE);
+ }
+
+ /*
+ * Netmask already zeroed.
+ */
+ iter->current.netmask.family = family;
+ for (i = 0; i < 16; i++) {
+ if (if_laddrreq.prefixlen > 8) {
+ bits = 0;
+ if_laddrreq.prefixlen -= 8;
+ } else {
+ bits = 8 - if_laddrreq.prefixlen;
+ if_laddrreq.prefixlen = 0;
+ }
+ iter->current.netmask.type.in6.s6_addr[i] = (~0 << bits) & 0xff;
+ }
+ return (ISC_R_SUCCESS);
+
+ inet:
+#endif
+ if (family != AF_INET)
+ return (ISC_R_IGNORE);
+ /*
+ * If the interface is point-to-point, get the destination address.
+ */
+ if ((iter->current.flags & INTERFACE_F_POINTTOPOINT) != 0) {
+ /*
+ * Ignore the HP/UX warning about "integer overflow during
+ * conversion. It comes from its own macro definition,
+ * and is really hard to shut up.
+ */
+ if (ioctl(iter->socket, SIOCGIFDSTADDR, (char *)&ifreq)
+ < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_GETDESTADDR,
+ "%s: getting "
+ "destination address: %s"),
+ ifreq.ifr_name, strbuf);
+ return (ISC_R_IGNORE);
+ }
+ get_addr(family, &iter->current.dstaddress,
+ (struct sockaddr *)&ifreq.ifr_dstaddr);
+ }
+
+ if ((iter->current.flags & INTERFACE_F_BROADCAST) != 0) {
+ /*
+ * Ignore the HP/UX warning about "integer overflow during
+ * conversion. It comes from its own macro definition,
+ * and is really hard to shut up.
+ */
+ if (ioctl(iter->socket, SIOCGIFBRDADDR, (char *)&ifreq)
+ < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_GETDESTADDR,
+ "%s: getting "
+ "broadcast address: %s"),
+ ifreq.ifr_name, strbuf);
+ return (ISC_R_IGNORE);
+ }
+ get_addr(family, &iter->current.broadcast,
+ (struct sockaddr *)&ifreq.ifr_broadaddr);
+ }
+ /*
+ * Get the network mask.
+ */
+ memset(&ifreq, 0, sizeof(ifreq));
+ memcpy(&ifreq, ifrp, sizeof(ifreq));
+ /*
+ * Ignore the HP/UX warning about "integer overflow during
+ * conversion. It comes from its own macro definition,
+ * and is really hard to shut up.
+ */
+ if (ioctl(iter->socket, SIOCGIFNETMASK, (char *)&ifreq)
+ < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_GETNETMASK,
+ "%s: getting netmask: %s"),
+ ifreq.ifr_name, strbuf);
+ return (ISC_R_IGNORE);
+ }
+ get_addr(family, &iter->current.netmask,
+ (struct sockaddr *)&ifreq.ifr_addr);
+ return (ISC_R_SUCCESS);
+}
+
+static isc_result_t
+internal_current6(isc_interfaceiter_t *iter) {
+#if !defined(SIOCGLIFCONF) || !defined(SIOCGLIFADDR)
+ UNUSED(iter);
+ return (ISC_R_NOTIMPLEMENTED);
+#else
+ struct LIFREQ *ifrp;
+ struct LIFREQ lifreq;
+ int family;
+ char strbuf[ISC_STRERRORSIZE];
+
+ REQUIRE(VALID_IFITER(iter));
+ REQUIRE (iter->pos < (unsigned int) iter->lifc.lifc_len);
+
+ ifrp = (struct LIFREQ *)((char *) iter->lifc.lifc_req + iter->pos);
+
+ memset(&lifreq, 0, sizeof(lifreq));
+ memcpy(&lifreq, ifrp, sizeof(lifreq));
+
+ family = lifreq.lifr_addr.ss_family;
+#ifdef ISC_PLATFORM_HAVEIPV6
+ if (family != AF_INET && family != AF_INET6)
+#else
+ if (family != AF_INET)
+#endif
+ return (ISC_R_IGNORE);
+
+ memset(&iter->current, 0, sizeof(iter->current));
+ iter->current.af = family;
+
+ INSIST(sizeof(lifreq.lifr_name) <= sizeof(iter->current.name));
+ memset(iter->current.name, 0, sizeof(iter->current.name));
+ memcpy(iter->current.name, lifreq.lifr_name, sizeof(lifreq.lifr_name));
+
+ get_addr(family, &iter->current.address,
+ (struct sockaddr *)&lifreq.lifr_addr);
+
+ /*
+ * If the interface does not have a address ignore it.
+ */
+ switch (family) {
+ case AF_INET:
+ if (iter->current.address.type.in.s_addr == htonl(INADDR_ANY))
+ return (ISC_R_IGNORE);
+ break;
+ case AF_INET6:
+ if (memcmp(&iter->current.address.type.in6, &in6addr_any,
+ sizeof(in6addr_any)) == 0)
+ return (ISC_R_IGNORE);
+ break;
+ }
+
+ /*
+ * Get interface flags.
+ */
+
+ iter->current.flags = 0;
+
+ /*
+ * Ignore the HP/UX warning about "integer overflow during
+ * conversion. It comes from its own macro definition,
+ * and is really hard to shut up.
+ */
+ if (ioctl(iter->socket, SIOCGLIFFLAGS, (char *) &lifreq) < 0) {
+
+ /*
+ * XXX This should be looked at further since it looks strange.
+ * If we get an ENXIO then we ignore the error and not worry
+ * about the flags.
+ */
+ if (errno != ENXIO) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "%s: getting interface flags: %s",
+ lifreq.lifr_name, strbuf);
+ return (ISC_R_IGNORE);
+ }
+ }
+
+ if ((lifreq.lifr_flags & IFF_UP) != 0)
+ iter->current.flags |= INTERFACE_F_UP;
+
+ if ((lifreq.lifr_flags & IFF_POINTOPOINT) != 0)
+ iter->current.flags |= INTERFACE_F_POINTTOPOINT;
+
+ if ((lifreq.lifr_flags & IFF_LOOPBACK) != 0)
+ iter->current.flags |= INTERFACE_F_LOOPBACK;
+
+ /*
+ * Note that IPv6 broadcast does not exist
+ * so don't check for IPv6 broadcast flag
+ */
+
+#ifdef IFF_MULTICAST
+ if ((lifreq.lifr_flags & IFF_MULTICAST) != 0) {
+ iter->current.flags |= INTERFACE_F_MULTICAST;
+ }
+#endif
+
+ /*
+ * If the interface is point-to-point, get the destination address.
+ */
+ if ((iter->current.flags & INTERFACE_F_POINTTOPOINT) != 0) {
+ /*
+ * Ignore the HP/UX warning about "interger overflow during
+ * conversion. It comes from its own macro definition,
+ * and is really hard to shut up.
+ */
+ if (ioctl(iter->socket, SIOCGLIFDSTADDR, (char *)&lifreq)
+ < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_GETDESTADDR,
+ "%s: getting "
+ "destination address: %s"),
+ lifreq.lifr_name, strbuf);
+ return (ISC_R_IGNORE);
+ }
+ get_addr(family, &iter->current.dstaddress,
+ (struct sockaddr *)&lifreq.lifr_dstaddr);
+ }
+
+
+ /*
+ * Get the network mask.
+ */
+ memset(&lifreq, 0, sizeof(lifreq));
+ memcpy(&lifreq, ifrp, sizeof(lifreq));
+ switch (family) {
+ case AF_INET:
+ /*
+ * Ignore the HP/UX warning about "integer overflow during
+ * conversion. It comes from its own macro definition,
+ * and is really hard to shut up.
+ */
+ if (ioctl(iter->socket, SIOCGLIFNETMASK, (char *)&lifreq)
+ < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERIOCTL,
+ ISC_MSG_GETNETMASK,
+ "%s: getting netmask: %s"),
+ lifreq.lifr_name, strbuf);
+ return (ISC_R_IGNORE);
+ }
+ get_addr(family, &iter->current.netmask,
+ (struct sockaddr *)&lifreq.lifr_addr);
+ break;
+ case AF_INET6: {
+#ifdef lifr_addrlen
+ int i, bits;
+
+ /*
+ * Netmask already zeroed.
+ */
+ iter->current.netmask.family = family;
+ for (i = 0; i < lifreq.lifr_addrlen; i += 8) {
+ bits = lifreq.lifr_addrlen - i;
+ bits = (bits < 8) ? (8 - bits) : 0;
+ iter->current.netmask.type.in6.s6_addr[i / 8] =
+ (~0 << bits) & 0xff;
+ }
+#endif
+ break;
+ }
+ }
+
+ return (ISC_R_SUCCESS);
+#endif
+}
+
+static isc_result_t
+internal_current(isc_interfaceiter_t *iter) {
+ if (iter->mode == 6)
+ return (internal_current6(iter));
+ return (internal_current4(iter));
+}
+
+/*
+ * Step the iterator to the next interface. Unlike
+ * isc_interfaceiter_next(), this may leave the iterator
+ * positioned on an interface that will ultimately
+ * be ignored. Return ISC_R_NOMORE if there are no more
+ * interfaces, otherwise ISC_R_SUCCESS.
+ */
+static isc_result_t
+internal_next4(isc_interfaceiter_t *iter) {
+ struct ifreq *ifrp;
+
+ REQUIRE (iter->pos < (unsigned int) iter->ifc.ifc_len);
+
+#ifdef HAVE_TRUCLUSTER
+ if (internal_current_clusteralias(iter) == ISC_R_SUCCESS)
+ return (ISC_R_SUCCESS);
+#endif
+ ifrp = (struct ifreq *)((char *) iter->ifc.ifc_req + iter->pos);
+
+#ifdef ISC_PLATFORM_HAVESALEN
+ if (ifrp->ifr_addr.sa_len > sizeof(struct sockaddr))
+ iter->pos += sizeof(ifrp->ifr_name) + ifrp->ifr_addr.sa_len;
+ else
+#endif
+ iter->pos += sizeof(*ifrp);
+
+ if (iter->pos >= (unsigned int) iter->ifc.ifc_len)
+ return (ISC_R_NOMORE);
+
+ return (ISC_R_SUCCESS);
+}
+
+static isc_result_t
+internal_next6(isc_interfaceiter_t *iter) {
+#if !defined(SIOCGLIFCONF) || !defined(SIOCGLIFADDR)
+ UNUSED(iter);
+ return (ISC_R_NOTIMPLEMENTED);
+#else
+ struct LIFREQ *ifrp;
+
+ REQUIRE (iter->pos < (unsigned int) iter->lifc.lifc_len);
+
+ ifrp = (struct LIFREQ *)((char *) iter->lifc.lifc_req + iter->pos);
+
+#ifdef ISC_PLATFORM_HAVESALEN
+ if (ifrp->lifr_addr.sa_len > sizeof(struct sockaddr))
+ iter->pos += sizeof(ifrp->lifr_name) + ifrp->lifr_addr.sa_len;
+ else
+#endif
+ iter->pos += sizeof(*ifrp);
+
+ if (iter->pos >= (unsigned int) iter->lifc.lifc_len)
+ return (ISC_R_NOMORE);
+
+ return (ISC_R_SUCCESS);
+#endif
+}
+
+static isc_result_t
+internal_next(isc_interfaceiter_t *iter) {
+ if (iter->mode == 6)
+ return (internal_next6(iter));
+ return (internal_next4(iter));
+}
+
+static void
+internal_destroy(isc_interfaceiter_t *iter) {
+ (void) close(iter->socket);
+}
diff --git a/contrib/ntp/libisc/ifiter_sysctl.c b/contrib/ntp/libisc/ifiter_sysctl.c
new file mode 100644
index 000000000000..74440fa934bd
--- /dev/null
+++ b/contrib/ntp/libisc/ifiter_sysctl.c
@@ -0,0 +1,305 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: ifiter_sysctl.c,v 1.17 2002/05/30 01:24:12 marka Exp $ */
+
+/*
+ * Obtain the list of network interfaces using sysctl.
+ * See TCP/IP Illustrated Volume 2, sections 19.8, 19.14,
+ * and 19.16.
+ */
+
+#include <sys/param.h>
+#include <sys/sysctl.h>
+
+#include <net/route.h>
+#include <net/if_dl.h>
+
+/* XXX what about Alpha? */
+#ifdef sgi
+#define ROUNDUP(a) ((a) > 0 ? \
+ (1 + (((a) - 1) | (sizeof(__uint64_t) - 1))) : \
+ sizeof(__uint64_t))
+#else
+#define ROUNDUP(a) ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) \
+ : sizeof(long))
+#endif
+
+#define IFITER_MAGIC ISC_MAGIC('I', 'F', 'I', 'S')
+#define VALID_IFITER(t) ISC_MAGIC_VALID(t, IFITER_MAGIC)
+
+struct isc_interfaceiter {
+ unsigned int magic; /* Magic number. */
+ isc_mem_t *mctx;
+ void *buf; /* Buffer for sysctl data. */
+ unsigned int bufsize; /* Bytes allocated. */
+ unsigned int bufused; /* Bytes used. */
+ unsigned int pos; /* Current offset in
+ sysctl data. */
+ isc_interface_t current; /* Current interface data. */
+ isc_result_t result; /* Last result code. */
+};
+
+static int mib[6] = {
+ CTL_NET,
+ PF_ROUTE,
+ 0,
+ 0, /* Any address family. */
+ NET_RT_IFLIST,
+ 0 /* Flags. */
+};
+
+isc_result_t
+isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
+ isc_interfaceiter_t *iter;
+ isc_result_t result;
+ size_t bufsize;
+ size_t bufused;
+ char strbuf[ISC_STRERRORSIZE];
+
+ REQUIRE(iterp != NULL);
+ REQUIRE(*iterp == NULL);
+
+ iter = isc_mem_get(mctx, sizeof(*iter));
+ if (iter == NULL)
+ return (ISC_R_NOMEMORY);
+
+ iter->mctx = mctx;
+ iter->buf = 0;
+
+ /*
+ * Determine the amount of memory needed.
+ */
+ bufsize = 0;
+ if (sysctl(mib, 6, NULL, &bufsize, NULL, (size_t) 0) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERSYSCTL,
+ ISC_MSG_GETIFLISTSIZE,
+ "getting interface "
+ "list size: sysctl: %s"),
+ strbuf);
+ result = ISC_R_UNEXPECTED;
+ goto failure;
+ }
+ iter->bufsize = bufsize;
+
+ iter->buf = isc_mem_get(iter->mctx, iter->bufsize);
+ if (iter->buf == NULL) {
+ result = ISC_R_NOMEMORY;
+ goto failure;
+ }
+
+ bufused = bufsize;
+ if (sysctl(mib, 6, iter->buf, &bufused, NULL, (size_t) 0) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERSYSCTL,
+ ISC_MSG_GETIFLIST,
+ "getting interface list: "
+ "sysctl: %s"),
+ strbuf);
+ result = ISC_R_UNEXPECTED;
+ goto failure;
+ }
+ iter->bufused = bufused;
+ INSIST(iter->bufused <= iter->bufsize);
+
+ /*
+ * A newly created iterator has an undefined position
+ * until isc_interfaceiter_first() is called.
+ */
+ iter->pos = (unsigned int) -1;
+ iter->result = ISC_R_FAILURE;
+
+ iter->magic = IFITER_MAGIC;
+ *iterp = iter;
+ return (ISC_R_SUCCESS);
+
+ failure:
+ if (iter->buf != NULL)
+ isc_mem_put(mctx, iter->buf, iter->bufsize);
+ isc_mem_put(mctx, iter, sizeof(*iter));
+ return (result);
+}
+
+/*
+ * Get information about the current interface to iter->current.
+ * If successful, return ISC_R_SUCCESS.
+ * If the interface has an unsupported address family,
+ * return ISC_R_IGNORE. In case of other failure,
+ * return ISC_R_UNEXPECTED.
+ */
+
+static isc_result_t
+internal_current(isc_interfaceiter_t *iter) {
+ struct ifa_msghdr *ifam, *ifam_end;
+
+ REQUIRE(VALID_IFITER(iter));
+ REQUIRE (iter->pos < (unsigned int) iter->bufused);
+
+ ifam = (struct ifa_msghdr *) ((char *) iter->buf + iter->pos);
+ ifam_end = (struct ifa_msghdr *) ((char *) iter->buf + iter->bufused);
+
+ if (ifam->ifam_type == RTM_IFINFO) {
+ struct if_msghdr *ifm = (struct if_msghdr *) ifam;
+ struct sockaddr_dl *sdl = (struct sockaddr_dl *) (ifm + 1);
+ unsigned int namelen;
+
+ memset(&iter->current, 0, sizeof(iter->current));
+
+ namelen = sdl->sdl_nlen;
+ if (namelen > sizeof(iter->current.name) - 1)
+ namelen = sizeof(iter->current.name) - 1;
+
+ memset(iter->current.name, 0, sizeof(iter->current.name));
+ memcpy(iter->current.name, sdl->sdl_data, namelen);
+
+ iter->current.flags = 0;
+
+ if ((ifam->ifam_flags & IFF_UP) != 0)
+ iter->current.flags |= INTERFACE_F_UP;
+
+ if ((ifam->ifam_flags & IFF_POINTOPOINT) != 0)
+ iter->current.flags |= INTERFACE_F_POINTTOPOINT;
+
+ if ((ifam->ifam_flags & IFF_LOOPBACK) != 0)
+ iter->current.flags |= INTERFACE_F_LOOPBACK;
+
+ if ((ifam->ifam_flags & IFF_BROADCAST) != 0) {
+ iter->current.flags |= INTERFACE_F_BROADCAST;
+ }
+#ifdef IFF_MULTICAST
+ if ((ifam->ifam_flags & IFF_MULTICAST) != 0) {
+ iter->current.flags |= INTERFACE_F_MULTICAST;
+ }
+#endif
+
+ /*
+ * This is not an interface address.
+ * Force another iteration.
+ */
+ return (ISC_R_IGNORE);
+ } else if (ifam->ifam_type == RTM_NEWADDR) {
+ int i;
+ int family;
+ struct sockaddr *mask_sa = NULL;
+ struct sockaddr *addr_sa = NULL;
+ struct sockaddr *dst_sa = NULL;
+
+ struct sockaddr *sa = (struct sockaddr *)(ifam + 1);
+ family = sa->sa_family;
+
+ for (i = 0; i < RTAX_MAX; i++)
+ {
+ if ((ifam->ifam_addrs & (1 << i)) == 0)
+ continue;
+
+ INSIST(sa < (struct sockaddr *) ifam_end);
+
+ switch (i) {
+ case RTAX_NETMASK: /* Netmask */
+ mask_sa = sa;
+ break;
+ case RTAX_IFA: /* Interface address */
+ addr_sa = sa;
+ break;
+ case RTAX_BRD: /* Broadcast or destination address */
+ dst_sa = sa;
+ break;
+ }
+#ifdef ISC_PLATFORM_HAVESALEN
+ sa = (struct sockaddr *)((char*)(sa)
+ + ROUNDUP(sa->sa_len));
+#else
+#ifdef sgi
+ /*
+ * Do as the contributed SGI code does.
+ */
+ sa = (struct sockaddr *)((char*)(sa)
+ + ROUNDUP(_FAKE_SA_LEN_DST(sa)));
+#else
+ /* XXX untested. */
+ sa = (struct sockaddr *)((char*)(sa)
+ + ROUNDUP(sizeof(struct sockaddr)));
+#endif
+#endif
+ }
+
+ if (addr_sa == NULL)
+ return (ISC_R_IGNORE);
+
+ family = addr_sa->sa_family;
+ if (family != AF_INET && family != AF_INET6)
+ return (ISC_R_IGNORE);
+
+ iter->current.af = family;
+
+ get_addr(family, &iter->current.address, addr_sa);
+
+ if (mask_sa != NULL)
+ get_addr(family, &iter->current.netmask, mask_sa);
+
+ if (dst_sa != NULL &&
+ (iter->current.flags & INTERFACE_F_POINTTOPOINT) != 0)
+ get_addr(family, &iter->current.dstaddress, dst_sa);
+ if (dst_sa != NULL &&
+ (iter->current.flags & INTERFACE_F_BROADCAST) != 0)
+ get_addr(family, &iter->current.broadcast, dst_sa);
+
+ return (ISC_R_SUCCESS);
+ } else {
+ printf(isc_msgcat_get(isc_msgcat, ISC_MSGSET_IFITERSYSCTL,
+ ISC_MSG_UNEXPECTEDTYPE,
+ "warning: unexpected interface list "
+ "message type\n"));
+ return (ISC_R_IGNORE);
+ }
+}
+
+/*
+ * Step the iterator to the next interface. Unlike
+ * isc_interfaceiter_next(), this may leave the iterator
+ * positioned on an interface that will ultimately
+ * be ignored. Return ISC_R_NOMORE if there are no more
+ * interfaces, otherwise ISC_R_SUCCESS.
+ */
+static isc_result_t
+internal_next(isc_interfaceiter_t *iter) {
+ struct ifa_msghdr *ifam;
+ REQUIRE (iter->pos < (unsigned int) iter->bufused);
+
+ ifam = (struct ifa_msghdr *) ((char *) iter->buf + iter->pos);
+
+ iter->pos += ifam->ifam_msglen;
+
+ if (iter->pos >= iter->bufused)
+ return (ISC_R_NOMORE);
+
+ return (ISC_R_SUCCESS);
+}
+
+static void
+internal_destroy(isc_interfaceiter_t *iter) {
+ UNUSED(iter); /* Unused. */
+ /*
+ * Do nothing.
+ */
+}
+
diff --git a/contrib/ntp/libisc/inet_ntop.c b/contrib/ntp/libisc/inet_ntop.c
new file mode 100644
index 000000000000..395d0e50db60
--- /dev/null
+++ b/contrib/ntp/libisc/inet_ntop.c
@@ -0,0 +1,198 @@
+/*
+ * Copyright (C) 1996-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char rcsid[] =
+ "$Id: inet_ntop.c,v 1.13 2001/11/27 01:56:00 gson Exp $";
+#endif /* LIBC_SCCS and not lint */
+
+#include <config.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <isc/net.h>
+
+#include "ntp_sprintf.h"
+
+#define NS_INT16SZ 2
+#define NS_IN6ADDRSZ 16
+
+/*
+ * WARNING: Don't even consider trying to compile this on a system where
+ * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
+ */
+
+static const char *inet_ntop4(const unsigned char *src, char *dst,
+ size_t size);
+
+#ifdef AF_INET6
+static const char *inet_ntop6(const unsigned char *src, char *dst,
+ size_t size);
+#endif
+
+/* char *
+ * isc_net_ntop(af, src, dst, size)
+ * convert a network format address to presentation format.
+ * return:
+ * pointer to presentation format address (`dst'), or NULL (see errno).
+ * author:
+ * Paul Vixie, 1996.
+ */
+const char *
+isc_net_ntop(int af, const void *src, char *dst, size_t size)
+{
+ switch (af) {
+ case AF_INET:
+ return (inet_ntop4(src, dst, size));
+#ifdef AF_INET6
+ case AF_INET6:
+ return (inet_ntop6(src, dst, size));
+#endif
+ default:
+ errno = EAFNOSUPPORT;
+ return (NULL);
+ }
+ /* NOTREACHED */
+}
+
+/* const char *
+ * inet_ntop4(src, dst, size)
+ * format an IPv4 address
+ * return:
+ * `dst' (as a const)
+ * notes:
+ * (1) uses no statics
+ * (2) takes a unsigned char* not an in_addr as input
+ * author:
+ * Paul Vixie, 1996.
+ */
+static const char *
+inet_ntop4(const unsigned char *src, char *dst, size_t size)
+{
+ static const char *fmt = "%u.%u.%u.%u";
+ char tmp[sizeof("255.255.255.255")];
+
+ if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) >= size)
+ {
+ errno = ENOSPC;
+ return (NULL);
+ }
+ strcpy(dst, tmp);
+
+ return (dst);
+}
+
+/* const char *
+ * isc_inet_ntop6(src, dst, size)
+ * convert IPv6 binary address into presentation (printable) format
+ * author:
+ * Paul Vixie, 1996.
+ */
+#ifdef AF_INET6
+static const char *
+inet_ntop6(const unsigned char *src, char *dst, size_t size)
+{
+ /*
+ * Note that int32_t and int16_t need only be "at least" large enough
+ * to contain a value of the specified size. On some systems, like
+ * Crays, there is no such thing as an integer variable with 16 bits.
+ * Keep this in mind if you think this function should have been coded
+ * to use pointer overlays. All the world's not a VAX.
+ */
+ char tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")], *tp;
+ struct { int base, len; } best, cur;
+ unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ];
+ int i;
+
+ /*
+ * Preprocess:
+ * Copy the input (bytewise) array into a wordwise array.
+ * Find the longest run of 0x00's in src[] for :: shorthanding.
+ */
+ memset(words, '\0', sizeof(words));
+ for (i = 0; i < NS_IN6ADDRSZ; i++)
+ words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
+ best.base = -1;
+ best.len = 0;
+ cur.base = -1;
+ cur.len = 0;
+ for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
+ if (words[i] == 0) {
+ if (cur.base == -1)
+ cur.base = i, cur.len = 1;
+ else
+ cur.len++;
+ } else {
+ if (cur.base != -1) {
+ if (best.base == -1 || cur.len > best.len)
+ best = cur;
+ cur.base = -1;
+ }
+ }
+ }
+ if (cur.base != -1) {
+ if (best.base == -1 || cur.len > best.len)
+ best = cur;
+ }
+ if (best.base != -1 && best.len < 2)
+ best.base = -1;
+
+ /*
+ * Format the result.
+ */
+ tp = tmp;
+ for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
+ /* Are we inside the best run of 0x00's? */
+ if (best.base != -1 && i >= best.base &&
+ i < (best.base + best.len)) {
+ if (i == best.base)
+ *tp++ = ':';
+ continue;
+ }
+ /* Are we following an initial run of 0x00s or any real hex? */
+ if (i != 0)
+ *tp++ = ':';
+ /* Is this address an encapsulated IPv4? */
+ if (i == 6 && best.base == 0 &&
+ (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
+ if (!inet_ntop4(src+12, tp,
+ sizeof(tmp) - (tp - tmp)))
+ return (NULL);
+ tp += strlen(tp);
+ break;
+ }
+ tp += SPRINTF((tp, "%x", words[i]));
+ }
+ /* Was it a trailing run of 0x00's? */
+ if (best.base != -1 && (best.base + best.len) ==
+ (NS_IN6ADDRSZ / NS_INT16SZ))
+ *tp++ = ':';
+ *tp++ = '\0';
+
+ /*
+ * Check for overflow, copy, and we're done.
+ */
+ if ((size_t)(tp - tmp) > size) {
+ errno = ENOSPC;
+ return (NULL);
+ }
+ strcpy(dst, tmp);
+ return (dst);
+}
+#endif /* AF_INET6 */
diff --git a/contrib/ntp/libisc/interfaceiter.c b/contrib/ntp/libisc/interfaceiter.c
new file mode 100644
index 000000000000..37af9f38ccff
--- /dev/null
+++ b/contrib/ntp/libisc/interfaceiter.c
@@ -0,0 +1,159 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: interfaceiter.c,v 1.27 2002/07/02 05:51:43 marka Exp $ */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#ifdef HAVE_SYS_SOCKIO_H
+#include <sys/sockio.h> /* Required for ifiter_ioctl.c. */
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <isc/interfaceiter.h>
+#include <isc/magic.h>
+#include <isc/mem.h>
+#include <isc/msgs.h>
+#include <isc/net.h>
+#include <isc/result.h>
+#include <isc/strerror.h>
+#include <isc/string.h>
+#include <isc/types.h>
+#include <isc/util.h>
+
+/* Must follow <isc/net.h>. */
+#ifdef HAVE_NET_IF6_H
+#include <net/if6.h>
+#endif
+#include <net/if.h>
+
+/* Common utility functions */
+
+/*
+ * Extract the network address part from a "struct sockaddr".
+ *
+ * The address family is given explicity
+ * instead of using src->sa_family, because the latter does not work
+ * for copying a network mask obtained by SIOCGIFNETMASK (it does
+ * not have a valid address family).
+ */
+
+static void
+get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src) {
+ dst->family = family;
+ switch (family) {
+ case AF_INET:
+ memcpy(&dst->type.in,
+ &((struct sockaddr_in *) src)->sin_addr,
+ sizeof(struct in_addr));
+ break;
+ case AF_INET6:
+ memcpy(&dst->type.in6,
+ &((struct sockaddr_in6 *) src)->sin6_addr,
+ sizeof(struct in6_addr));
+ break;
+ default:
+ INSIST(0);
+ break;
+ }
+}
+
+/*
+ * Include system-dependent code.
+ */
+
+#if HAVE_IFLIST_SYSCTL
+#include "ifiter_sysctl.c"
+#else
+#include "ifiter_ioctl.c"
+#endif
+
+/*
+ * The remaining code is common to the sysctl and ioctl case.
+ */
+
+isc_result_t
+isc_interfaceiter_current(isc_interfaceiter_t *iter,
+ isc_interface_t *ifdata)
+{
+ REQUIRE(iter->result == ISC_R_SUCCESS);
+ memcpy(ifdata, &iter->current, sizeof(*ifdata));
+ return (ISC_R_SUCCESS);
+}
+
+isc_result_t
+isc_interfaceiter_first(isc_interfaceiter_t *iter) {
+ isc_result_t result;
+
+ REQUIRE(VALID_IFITER(iter));
+
+ iter->pos = 0;
+#ifdef HAVE_TRUCLUSTER
+ iter->clua_context = 0;
+#endif
+ for (;;) {
+ result = internal_current(iter);
+ if (result != ISC_R_IGNORE)
+ break;
+ result = internal_next(iter);
+ if (result != ISC_R_SUCCESS)
+ break;
+ }
+ iter->result = result;
+ return (result);
+}
+
+isc_result_t
+isc_interfaceiter_next(isc_interfaceiter_t *iter) {
+ isc_result_t result;
+
+ REQUIRE(VALID_IFITER(iter));
+ REQUIRE(iter->result == ISC_R_SUCCESS);
+
+ for (;;) {
+ result = internal_next(iter);
+ if (result != ISC_R_SUCCESS)
+ break;
+ result = internal_current(iter);
+ if (result != ISC_R_IGNORE)
+ break;
+ }
+ iter->result = result;
+ return (result);
+}
+
+void
+isc_interfaceiter_destroy(isc_interfaceiter_t **iterp)
+{
+ isc_interfaceiter_t *iter;
+ REQUIRE(iterp != NULL);
+ iter = *iterp;
+ REQUIRE(VALID_IFITER(iter));
+
+ internal_destroy(iter);
+ isc_mem_put(iter->mctx, iter->buf, iter->bufsize);
+
+ iter->magic = 0;
+ isc_mem_put(iter->mctx, iter, sizeof(*iter));
+ *iterp = NULL;
+}
diff --git a/contrib/ntp/libisc/isc_strerror.c b/contrib/ntp/libisc/isc_strerror.c
new file mode 100644
index 000000000000..9ec4a2f1535a
--- /dev/null
+++ b/contrib/ntp/libisc/isc_strerror.c
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: strerror.c,v 1.3 2001/11/20 01:45:45 gson Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include <isc/mutex.h>
+#include <isc/once.h>
+#include <isc/print.h>
+#include <isc/strerror.h>
+#include <isc/util.h>
+
+#include "l_stdlib.h"
+
+#ifdef HAVE_STRERROR
+/*
+ * We need to do this this way for profiled locks.
+ */
+static isc_mutex_t isc_strerror_lock;
+static void init_lock(void) {
+ RUNTIME_CHECK(isc_mutex_init(&isc_strerror_lock) == ISC_R_SUCCESS);
+}
+#else
+extern const char * const sys_errlist[];
+extern const int sys_nerr;
+#endif
+
+void
+isc__strerror(int num, char *buf, size_t size) {
+#ifdef HAVE_STRERROR
+ char *msg;
+ unsigned int unum = num;
+ static isc_once_t once = ISC_ONCE_INIT;
+
+ REQUIRE(buf != NULL);
+
+ RUNTIME_CHECK(isc_once_do(&once, init_lock) == ISC_R_SUCCESS);
+
+ LOCK(&isc_strerror_lock);
+ msg = strerror(num);
+ if (msg != NULL)
+ snprintf(buf, size, "%s", msg);
+ else
+ snprintf(buf, size, "Unknown error: %u", unum);
+ UNLOCK(&isc_strerror_lock);
+#else
+ unsigned int unum = num;
+
+ REQUIRE(buf != NULL);
+
+ if (num >= 0 && num < sys_nerr)
+ snprintf(buf, size, "%s", sys_errlist[num]);
+ else
+ snprintf(buf, size, "Unknown error: %u", unum);
+#endif
+}
diff --git a/contrib/ntp/libisc/lib.c b/contrib/ntp/libisc/lib.c
new file mode 100644
index 000000000000..95dd479001a6
--- /dev/null
+++ b/contrib/ntp/libisc/lib.c
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: lib.c,v 1.9 2001/11/19 03:08:23 mayer Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <isc/once.h>
+#include <isc/msgs.h>
+#include <isc/lib.h>
+
+/***
+ *** Globals
+ ***/
+
+LIBISC_EXTERNAL_DATA isc_msgcat_t * isc_msgcat = NULL;
+
+
+/***
+ *** Private
+ ***/
+
+static isc_once_t msgcat_once = ISC_ONCE_INIT;
+
+
+/***
+ *** Functions
+ ***/
+
+static void
+open_msgcat(void) {
+ isc_msgcat_open("libisc.cat", &isc_msgcat);
+}
+
+void
+isc_lib_initmsgcat(void) {
+ isc_result_t result;
+
+ /*
+ * Initialize the ISC library's message catalog, isc_msgcat, if it
+ * has not already been initialized.
+ */
+
+ result = isc_once_do(&msgcat_once, open_msgcat);
+ if (result != ISC_R_SUCCESS) {
+ /*
+ * Normally we'd use RUNTIME_CHECK() or FATAL_ERROR(), but
+ * we can't do that here, since they might call us!
+ * (Note that the catalog might be open anyway, so we might
+ * as well try to provide an internationalized message.)
+ */
+ fprintf(stderr, "%s:%d: %s: isc_once_do() %s.\n",
+ __FILE__, __LINE__,
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
+ ISC_MSG_FATALERROR, "fatal error"),
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
+ ISC_MSG_FAILED, "failed"));
+ abort();
+ }
+}
diff --git a/contrib/ntp/libisc/mem.c b/contrib/ntp/libisc/mem.c
new file mode 100644
index 000000000000..39f1e5c7ce45
--- /dev/null
+++ b/contrib/ntp/libisc/mem.c
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 1997-2002 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: mem.c,v 1.113 2002/05/23 04:32:30 marka Exp $ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+
+#include <isc/mem.h>
+#include <isc/util.h>
+
+void *
+isc_mem_get(isc_mem_t *ctx, size_t size) {
+ UNUSED(ctx);
+ if(size == 0)
+ size = 1;
+ return (malloc(size));
+}
+
+void
+isc_mem_put(isc_mem_t *ctx, void *ptr, size_t size)
+{
+ UNUSED(ctx);
+ UNUSED(size);
+ free(ptr);
+}
+
diff --git a/contrib/ntp/libisc/msgcat.c b/contrib/ntp/libisc/msgcat.c
new file mode 100644
index 000000000000..8253a0613b21
--- /dev/null
+++ b/contrib/ntp/libisc/msgcat.c
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: msgcat.c,v 1.12 2001/11/30 01:59:39 gson Exp $ */
+
+/*
+ * Principal Author: Bob Halley
+ */
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <isc/magic.h>
+#include <isc/msgcat.h>
+#include <isc/util.h>
+
+#ifdef HAVE_CATGETS
+#include <nl_types.h> /* Required for nl_catd. */
+#endif
+
+/*
+ * Implementation Notes:
+ *
+ * We use malloc() and free() instead of isc_mem_get() and isc_mem_put()
+ * because we don't want to require a memory context to be specified
+ * in order to use a message catalog.
+ */
+
+struct isc_msgcat {
+ unsigned int magic;
+#ifdef HAVE_CATGETS
+ nl_catd catalog;
+#endif
+};
+
+#define MSGCAT_MAGIC ISC_MAGIC('M', 'C', 'a', 't')
+#define VALID_MSGCAT(m) ISC_MAGIC_VALID(m, MSGCAT_MAGIC)
+
+void
+isc_msgcat_open(const char *name, isc_msgcat_t **msgcatp) {
+ isc_msgcat_t *msgcat;
+
+ /*
+ * Open a message catalog.
+ */
+
+ REQUIRE(name != NULL);
+ REQUIRE(msgcatp != NULL && *msgcatp == NULL);
+
+ msgcat = malloc(sizeof(*msgcat));
+ if (msgcat == NULL) {
+ *msgcatp = NULL;
+ return;
+ }
+
+#ifdef HAVE_CATGETS
+ /*
+ * We don't check if catopen() fails because we don't care.
+ * If it does fail, then when we call catgets(), it will use
+ * the default string.
+ */
+ msgcat->catalog = catopen(name, 0);
+#endif
+ msgcat->magic = MSGCAT_MAGIC;
+
+ *msgcatp = msgcat;
+}
+
+void
+isc_msgcat_close(isc_msgcat_t **msgcatp) {
+ isc_msgcat_t *msgcat;
+
+ /*
+ * Close a message catalog.
+ */
+
+ REQUIRE(msgcatp != NULL);
+ msgcat = *msgcatp;
+ REQUIRE(VALID_MSGCAT(msgcat) || msgcat == NULL);
+
+ if (msgcat != NULL) {
+#ifdef HAVE_CATGETS
+ if (msgcat->catalog != (nl_catd)(-1))
+ (void)catclose(msgcat->catalog);
+#endif
+ msgcat->magic = 0;
+ free(msgcat);
+ }
+
+ *msgcatp = NULL;
+}
+
+const char *
+isc_msgcat_get(isc_msgcat_t *msgcat, int set, int message,
+ const char *default_text)
+{
+ /*
+ * Get message 'message' from message set 'set' in 'msgcat'. If it
+ * is not available, use 'default'.
+ */
+
+ REQUIRE(VALID_MSGCAT(msgcat) || msgcat == NULL);
+ REQUIRE(set > 0);
+ REQUIRE(message > 0);
+ REQUIRE(default_text != NULL);
+
+#ifdef HAVE_CATGETS
+ if (msgcat == NULL)
+ return (default_text);
+ return (catgets(msgcat->catalog, set, message, default_text));
+#else
+ return (default_text);
+#endif
+}
diff --git a/contrib/ntp/libisc/net.c b/contrib/ntp/libisc/net.c
new file mode 100644
index 000000000000..6c51f1c973fd
--- /dev/null
+++ b/contrib/ntp/libisc/net.c
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: net.c,v 1.25 2001/11/30 01:59:45 gson Exp $ */
+
+#include <config.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <isc/net.h>
+#include <isc/strerror.h>
+#include <isc/string.h>
+#include <isc/util.h>
+
+#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
+const struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
+#endif
+
+static isc_boolean_t once = ISC_FALSE;
+static isc_result_t ipv4_result = ISC_R_NOTFOUND;
+static isc_result_t ipv6_result = ISC_R_NOTFOUND;
+
+static isc_result_t
+try_proto(int domain) {
+ int s;
+ isc_result_t result = ISC_R_SUCCESS;
+ char strbuf[ISC_STRERRORSIZE];
+
+ s = socket(domain, SOCK_STREAM, 0);
+ if (s == -1) {
+ switch (errno) {
+#ifdef EAFNOSUPPORT
+ case EAFNOSUPPORT:
+#endif
+#ifdef EPROTONOSUPPORT
+ case EPROTONOSUPPORT:
+#endif
+#ifdef EINVAL
+ case EINVAL:
+#endif
+ return (ISC_R_NOTFOUND);
+ default:
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "socket() %s failed",
+ strbuf);
+ return (ISC_R_UNEXPECTED);
+ }
+ }
+
+#ifdef ISC_PLATFORM_HAVEIPV6
+#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
+ if (domain == PF_INET6) {
+ struct sockaddr_in6 sin6;
+ unsigned int len;
+
+ /*
+ * Check to see if IPv6 is broken, as is common on Linux.
+ */
+ len = sizeof(sin6);
+ if (getsockname(s, (struct sockaddr *)&sin6, (void *)&len) < 0)
+ {
+ result = ISC_R_NOTFOUND;
+ } else {
+ if (len == sizeof(struct sockaddr_in6))
+ result = ISC_R_SUCCESS;
+ else {
+ result = ISC_R_NOTFOUND;
+ }
+ }
+ }
+#endif
+#endif
+
+ (void)close(s);
+
+ return (result);
+}
+
+static void
+initialize_action(void) {
+ ipv4_result = try_proto(PF_INET);
+#ifdef ISC_PLATFORM_HAVEIPV6
+#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
+ ipv6_result = try_proto(PF_INET6);
+#endif
+#endif
+}
+
+static void
+initialize(void) {
+ if(once == ISC_FALSE) {
+ initialize_action();
+ once = ISC_TRUE;
+ }
+}
+
+isc_result_t
+isc_net_probeipv4(void) {
+ initialize();
+ return (ipv4_result);
+}
+
+isc_result_t
+isc_net_probeipv6(void) {
+ initialize();
+ return (ipv6_result);
+}
diff --git a/contrib/ntp/libisc/strerror.c b/contrib/ntp/libisc/strerror.c
new file mode 100644
index 000000000000..4a0f8d80ca20
--- /dev/null
+++ b/contrib/ntp/libisc/strerror.c
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: strerror.c,v 1.3 2001/11/20 01:45:45 gson Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include <isc/mutex.h>
+#include <isc/once.h>
+#include <isc/print.h>
+#include <isc/strerror.h>
+#include <isc/util.h>
+
+#ifdef HAVE_STRERROR
+/*
+ * We need to do this this way for profiled locks.
+ */
+static isc_mutex_t isc_strerror_lock;
+static void init_lock(void) {
+ RUNTIME_CHECK(isc_mutex_init(&isc_strerror_lock) == ISC_R_SUCCESS);
+}
+#else
+extern const char * const sys_errlist[];
+extern const int sys_nerr;
+#endif
+
+void
+isc__strerror(int num, char *buf, size_t size) {
+#ifdef HAVE_STRERROR
+ char *msg;
+ unsigned int unum = num;
+ static isc_once_t once = ISC_ONCE_INIT;
+
+ REQUIRE(buf != NULL);
+
+ RUNTIME_CHECK(isc_once_do(&once, init_lock) == ISC_R_SUCCESS);
+
+ LOCK(&isc_strerror_lock);
+ msg = strerror(num);
+ if (msg != NULL)
+ snprintf(buf, size, "%s", msg);
+ else
+ snprintf(buf, size, "Unknown error: %u", unum);
+ UNLOCK(&isc_strerror_lock);
+#else
+ unsigned int unum = num;
+
+ REQUIRE(buf != NULL);
+
+ if (num >= 0 && num < sys_nerr)
+ snprintf(buf, size, "%s", sys_errlist[num]);
+ else
+ snprintf(buf, size, "Unknown error: %u", unum);
+#endif
+}
diff --git a/contrib/ntp/libntp/Makefile.am b/contrib/ntp/libntp/Makefile.am
index bf3dc996c2da..75b5505b1bf1 100644
--- a/contrib/ntp/libntp/Makefile.am
+++ b/contrib/ntp/libntp/Makefile.am
@@ -1,20 +1,29 @@
#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
-noinst_LIBRARIES = libntp.a
-libntp_a_SOURCES = a_md5encrypt.c adjtime.c atoint.c atolfp.c atouint.c \
- audio.c authencrypt.c authkeys.c authparity.c authreadkeys.c \
- authusekey.c binio.c buftvtots.c caljulian.c calleapwhen.c caltontp.c \
- calyearstart.c clocktime.c clocktypes.c decodenetnum.c dofptoa.c \
- dolfptoa.c emalloc.c findconfig.c fptoa.c fptoms.c getopt.c \
- gpstolfp.c hextoint.c hextolfp.c humandate.c icom.c ieee754io.c \
- inttoa.c iosignal.c lib_strbuf.c machines.c md5c.c memmove.c \
- mfp_mul.c mfptoa.c mfptoms.c mktime.c modetoa.c mstolfp.c msutotsf.c \
- msyslog.c netof.c numtoa.c numtohost.c octtoint.c prettydate.c \
- ranny.c recvbuff.c refnumtoa.c snprintf.c statestr.c strdup.c \
- strerror.c syssignal.c systime.c tsftomsu.c tstotv.c tvtoa.c tvtots.c \
- uglydate.c uinttoa.c utvtoa.c ymd2yd.c
+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 \
+ clocktypes.c decodenetnum.c dofptoa.c dolfptoa.c emalloc.c \
+ findconfig.c fptoa.c fptoms.c getopt.c gpstolfp.c hextoint.c \
+ hextolfp.c humandate.c icom.c ieee754io.c inttoa.c iosignal.c \
+ lib_strbuf.c machines.c md5c.c memmove.c mfp_mul.c mfptoa.c \
+ mfptoms.c mktime.c modetoa.c mstolfp.c msutotsf.c msyslog.c netof.c \
+ ntp_rfc2553.c numtoa.c numtohost.c octtoint.c prettydate.c \
+ ranny.c recvbuff.c refnumtoa.c snprintf.c socktoa.c socktohost.c \
+ statestr.c strdup.c strerror.c strstr.c \
+ syssignal.c tsftomsu.c tstotv.c tvtoa.c tvtots.c \
+ uglydate.c uinttoa.c utvtoa.c ymd2yd.c \
+ $(srcdir)/../libisc/assertions.c $(srcdir)/../libisc/error.c \
+ $(srcdir)/../libisc/interfaceiter.c $(srcdir)/../libisc/lib.c \
+ $(srcdir)/../libisc/mem.c $(srcdir)/../libisc/msgcat.c \
+ $(srcdir)/../libisc/net.c $(srcdir)/../libisc/isc_strerror.c \
+ $(srcdir)/../libisc/inet_ntop.c
+libntp_a_SOURCES = systime.c $(libntp_a_SRCS)
+libntpsim_a_SOURCES = systime_s.c $(libntp_a_SRCS)
EXTRA_libntp_a_SOURCES = adjtimex.c log.c random.c
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/librsaref
+INCLUDES = -I$(top_srcdir)/include -I../include
ETAGS_ARGS = Makefile.am
noinst_HEADERS = lib_strbuf.h log.h
@@ -24,8 +33,3 @@ noinst_HEADERS = lib_strbuf.h log.h
EXTRA_DIST = README
-#mktime_.c: mktime.c $(ANSI2KNR)
-# $(ANSI2KNR) $< mktime_.c
-
-#strerror_.c: strerror.c $(ANSI2KNR)
-# $(ANSI2KNR) $< strerror_.c
diff --git a/contrib/ntp/libntp/Makefile.in b/contrib/ntp/libntp/Makefile.in
index 8b4049e67a62..1565b0b75747 100644
--- a/contrib/ntp/libntp/Makefile.in
+++ b/contrib/ntp/libntp/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,44 +94,98 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
-noinst_LIBRARIES = libntp.a
-libntp_a_SOURCES = a_md5encrypt.c adjtime.c atoint.c atolfp.c atouint.c \
- audio.c authencrypt.c authkeys.c authparity.c authreadkeys.c \
- authusekey.c binio.c buftvtots.c caljulian.c calleapwhen.c caltontp.c \
- calyearstart.c clocktime.c clocktypes.c decodenetnum.c dofptoa.c \
- dolfptoa.c emalloc.c findconfig.c fptoa.c fptoms.c getopt.c \
- gpstolfp.c hextoint.c hextolfp.c humandate.c icom.c ieee754io.c \
- inttoa.c iosignal.c lib_strbuf.c machines.c md5c.c memmove.c \
- mfp_mul.c mfptoa.c mfptoms.c mktime.c modetoa.c mstolfp.c msutotsf.c \
- msyslog.c netof.c numtoa.c numtohost.c octtoint.c prettydate.c \
- ranny.c recvbuff.c refnumtoa.c snprintf.c statestr.c strdup.c \
- strerror.c syssignal.c systime.c tsftomsu.c tstotv.c tvtoa.c tvtots.c \
- uglydate.c uinttoa.c utvtoa.c ymd2yd.c
-
+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 \
+ clocktypes.c decodenetnum.c dofptoa.c dolfptoa.c emalloc.c \
+ findconfig.c fptoa.c fptoms.c getopt.c gpstolfp.c hextoint.c \
+ hextolfp.c humandate.c icom.c ieee754io.c inttoa.c iosignal.c \
+ lib_strbuf.c machines.c md5c.c memmove.c mfp_mul.c mfptoa.c \
+ mfptoms.c mktime.c modetoa.c mstolfp.c msutotsf.c msyslog.c netof.c \
+ ntp_rfc2553.c numtoa.c numtohost.c octtoint.c prettydate.c \
+ ranny.c recvbuff.c refnumtoa.c snprintf.c socktoa.c socktohost.c \
+ statestr.c strdup.c strerror.c strstr.c \
+ syssignal.c tsftomsu.c tstotv.c tvtoa.c tvtots.c \
+ uglydate.c uinttoa.c utvtoa.c ymd2yd.c \
+ $(srcdir)/../libisc/assertions.c $(srcdir)/../libisc/error.c \
+ $(srcdir)/../libisc/interfaceiter.c $(srcdir)/../libisc/lib.c \
+ $(srcdir)/../libisc/mem.c $(srcdir)/../libisc/msgcat.c \
+ $(srcdir)/../libisc/net.c $(srcdir)/../libisc/isc_strerror.c \
+ $(srcdir)/../libisc/inet_ntop.c
+
+libntp_a_SOURCES = systime.c $(libntp_a_SRCS)
+libntpsim_a_SOURCES = systime_s.c $(libntp_a_SRCS)
EXTRA_libntp_a_SOURCES = adjtimex.c log.c random.c
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/librsaref
+INCLUDES = -I$(top_srcdir)/include -I../include
ETAGS_ARGS = Makefile.am
noinst_HEADERS = lib_strbuf.h log.h
EXTRA_DIST = README
subdir = libntp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -141,10 +193,9 @@ LIBRARIES = $(noinst_LIBRARIES)
libntp_a_AR = $(AR) cru
libntp_a_LIBADD =
-am_libntp_a_OBJECTS = a_md5encrypt$U.$(OBJEXT) adjtime$U.$(OBJEXT) \
+am__objects_1 = a_md5encrypt$U.$(OBJEXT) adjtime$U.$(OBJEXT) \
atoint$U.$(OBJEXT) atolfp$U.$(OBJEXT) atouint$U.$(OBJEXT) \
- audio$U.$(OBJEXT) authencrypt$U.$(OBJEXT) authkeys$U.$(OBJEXT) \
- authparity$U.$(OBJEXT) authreadkeys$U.$(OBJEXT) \
+ audio$U.$(OBJEXT) authkeys$U.$(OBJEXT) authreadkeys$U.$(OBJEXT) \
authusekey$U.$(OBJEXT) binio$U.$(OBJEXT) buftvtots$U.$(OBJEXT) \
caljulian$U.$(OBJEXT) calleapwhen$U.$(OBJEXT) \
caltontp$U.$(OBJEXT) calyearstart$U.$(OBJEXT) \
@@ -159,68 +210,90 @@ am_libntp_a_OBJECTS = a_md5encrypt$U.$(OBJEXT) adjtime$U.$(OBJEXT) \
mfp_mul$U.$(OBJEXT) mfptoa$U.$(OBJEXT) mfptoms$U.$(OBJEXT) \
mktime$U.$(OBJEXT) modetoa$U.$(OBJEXT) mstolfp$U.$(OBJEXT) \
msutotsf$U.$(OBJEXT) msyslog$U.$(OBJEXT) netof$U.$(OBJEXT) \
- numtoa$U.$(OBJEXT) numtohost$U.$(OBJEXT) octtoint$U.$(OBJEXT) \
+ ntp_rfc2553$U.$(OBJEXT) numtoa$U.$(OBJEXT) \
+ numtohost$U.$(OBJEXT) octtoint$U.$(OBJEXT) \
prettydate$U.$(OBJEXT) ranny$U.$(OBJEXT) recvbuff$U.$(OBJEXT) \
- refnumtoa$U.$(OBJEXT) snprintf$U.$(OBJEXT) statestr$U.$(OBJEXT) \
- strdup$U.$(OBJEXT) strerror$U.$(OBJEXT) syssignal$U.$(OBJEXT) \
- systime$U.$(OBJEXT) tsftomsu$U.$(OBJEXT) tstotv$U.$(OBJEXT) \
- tvtoa$U.$(OBJEXT) tvtots$U.$(OBJEXT) uglydate$U.$(OBJEXT) \
- uinttoa$U.$(OBJEXT) utvtoa$U.$(OBJEXT) ymd2yd$U.$(OBJEXT)
+ refnumtoa$U.$(OBJEXT) snprintf$U.$(OBJEXT) socktoa$U.$(OBJEXT) \
+ socktohost$U.$(OBJEXT) statestr$U.$(OBJEXT) strdup$U.$(OBJEXT) \
+ strerror$U.$(OBJEXT) strstr$U.$(OBJEXT) syssignal$U.$(OBJEXT) \
+ tsftomsu$U.$(OBJEXT) tstotv$U.$(OBJEXT) tvtoa$U.$(OBJEXT) \
+ tvtots$U.$(OBJEXT) uglydate$U.$(OBJEXT) uinttoa$U.$(OBJEXT) \
+ utvtoa$U.$(OBJEXT) ymd2yd$U.$(OBJEXT) assertions$U.$(OBJEXT) \
+ error$U.$(OBJEXT) interfaceiter$U.$(OBJEXT) lib$U.$(OBJEXT) \
+ mem$U.$(OBJEXT) msgcat$U.$(OBJEXT) net$U.$(OBJEXT) \
+ isc_strerror$U.$(OBJEXT) inet_ntop$U.$(OBJEXT)
+am_libntp_a_OBJECTS = systime$U.$(OBJEXT) $(am__objects_1)
libntp_a_OBJECTS = $(am_libntp_a_OBJECTS)
+libntpsim_a_AR = $(AR) cru
+libntpsim_a_LIBADD =
+am_libntpsim_a_OBJECTS = systime_s$U.$(OBJEXT) $(am__objects_1)
+libntpsim_a_OBJECTS = $(am_libntpsim_a_OBJECTS)
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/a_md5encrypt$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/adjtime$U.Po $(DEPDIR)/adjtimex$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/atoint$U.Po $(DEPDIR)/atolfp$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/atouint$U.Po $(DEPDIR)/audio$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/authencrypt$U.Po $(DEPDIR)/authkeys$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/authparity$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/authreadkeys$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/authusekey$U.Po $(DEPDIR)/binio$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/buftvtots$U.Po $(DEPDIR)/caljulian$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/calleapwhen$U.Po $(DEPDIR)/caltontp$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/calyearstart$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clocktime$U.Po $(DEPDIR)/clocktypes$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/decodenetnum$U.Po $(DEPDIR)/dofptoa$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/dolfptoa$U.Po $(DEPDIR)/emalloc$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/findconfig$U.Po $(DEPDIR)/fptoa$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/fptoms$U.Po $(DEPDIR)/getopt$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/gpstolfp$U.Po $(DEPDIR)/hextoint$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/hextolfp$U.Po $(DEPDIR)/humandate$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/icom$U.Po $(DEPDIR)/ieee754io$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/inttoa$U.Po $(DEPDIR)/iosignal$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/lib_strbuf$U.Po $(DEPDIR)/log$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/machines$U.Po $(DEPDIR)/md5c$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/memmove$U.Po $(DEPDIR)/mfp_mul$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/mfptoa$U.Po $(DEPDIR)/mfptoms$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/mktime$U.Po $(DEPDIR)/modetoa$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/mstolfp$U.Po $(DEPDIR)/msutotsf$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/msyslog$U.Po $(DEPDIR)/netof$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/numtoa$U.Po $(DEPDIR)/numtohost$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/octtoint$U.Po $(DEPDIR)/prettydate$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/random$U.Po $(DEPDIR)/ranny$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/recvbuff$U.Po $(DEPDIR)/refnumtoa$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/snprintf$U.Po $(DEPDIR)/statestr$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/strdup$U.Po $(DEPDIR)/strerror$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/syssignal$U.Po $(DEPDIR)/systime$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/tsftomsu$U.Po $(DEPDIR)/tstotv$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/tvtoa$U.Po $(DEPDIR)/tvtots$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/uglydate$U.Po $(DEPDIR)/uinttoa$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/utvtoa$U.Po $(DEPDIR)/ymd2yd$U.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/a_md5encrypt$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/adjtime$U.Po ./$(DEPDIR)/adjtimex$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/assertions$U.Po ./$(DEPDIR)/atoint$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/atolfp$U.Po ./$(DEPDIR)/atouint$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/audio$U.Po ./$(DEPDIR)/authkeys$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/authreadkeys$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/authusekey$U.Po ./$(DEPDIR)/binio$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/buftvtots$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/caljulian$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/calleapwhen$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/caltontp$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/calyearstart$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clocktime$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clocktypes$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/decodenetnum$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/dofptoa$U.Po ./$(DEPDIR)/dolfptoa$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/emalloc$U.Po ./$(DEPDIR)/error$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/findconfig$U.Po ./$(DEPDIR)/fptoa$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/fptoms$U.Po ./$(DEPDIR)/getopt$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/gpstolfp$U.Po ./$(DEPDIR)/hextoint$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/hextolfp$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/humandate$U.Po ./$(DEPDIR)/icom$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ieee754io$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/inet_ntop$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/interfaceiter$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/inttoa$U.Po ./$(DEPDIR)/iosignal$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/isc_strerror$U.Po ./$(DEPDIR)/lib$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/lib_strbuf$U.Po ./$(DEPDIR)/log$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/machines$U.Po ./$(DEPDIR)/md5c$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mem$U.Po ./$(DEPDIR)/memmove$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mfp_mul$U.Po ./$(DEPDIR)/mfptoa$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mfptoms$U.Po ./$(DEPDIR)/mktime$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/modetoa$U.Po ./$(DEPDIR)/msgcat$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mstolfp$U.Po ./$(DEPDIR)/msutotsf$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/msyslog$U.Po ./$(DEPDIR)/net$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/netof$U.Po ./$(DEPDIR)/ntp_rfc2553$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/numtoa$U.Po ./$(DEPDIR)/numtohost$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/octtoint$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/prettydate$U.Po ./$(DEPDIR)/random$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ranny$U.Po ./$(DEPDIR)/recvbuff$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refnumtoa$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/snprintf$U.Po ./$(DEPDIR)/socktoa$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/socktohost$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/statestr$U.Po ./$(DEPDIR)/strdup$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/strerror$U.Po ./$(DEPDIR)/strstr$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/syssignal$U.Po ./$(DEPDIR)/systime$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/systime_s$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/tsftomsu$U.Po ./$(DEPDIR)/tstotv$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/tvtoa$U.Po ./$(DEPDIR)/tvtots$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/uglydate$U.Po ./$(DEPDIR)/uinttoa$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/utvtoa$U.Po ./$(DEPDIR)/ymd2yd$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(libntp_a_SOURCES) $(EXTRA_libntp_a_SOURCES)
+DIST_SOURCES = $(libntp_a_SOURCES) $(EXTRA_libntp_a_SOURCES) \
+ $(libntpsim_a_SOURCES)
HEADERS = $(noinst_HEADERS)
-DIST_COMMON = README $(noinst_HEADERS) Makefile.am Makefile.in
-SOURCES = $(libntp_a_SOURCES) $(EXTRA_libntp_a_SOURCES)
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
+ Makefile.am
+SOURCES = $(libntp_a_SOURCES) $(EXTRA_libntp_a_SOURCES) $(libntpsim_a_SOURCES)
all: all-am
@@ -230,9 +303,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu libntp/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
AR = ar
@@ -242,6 +313,10 @@ libntp.a: $(libntp_a_OBJECTS) $(libntp_a_DEPENDENCIES)
-rm -f libntp.a
$(libntp_a_AR) libntp.a $(libntp_a_OBJECTS) $(libntp_a_LIBADD)
$(RANLIB) libntp.a
+libntpsim.a: $(libntpsim_a_OBJECTS) $(libntpsim_a_DEPENDENCIES)
+ -rm -f libntpsim.a
+ $(libntpsim_a_AR) libntpsim.a $(libntpsim_a_OBJECTS) $(libntpsim_a_LIBADD)
+ $(RANLIB) libntpsim.a
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
@@ -254,313 +329,786 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/a_md5encrypt$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/adjtime$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/adjtimex$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atoint$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atolfp$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atouint$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/audio$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/authencrypt$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/authkeys$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/authparity$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/authreadkeys$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/authusekey$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/binio$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/buftvtots$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/caljulian$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/calleapwhen$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/caltontp$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/calyearstart$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clocktime$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clocktypes$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/decodenetnum$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dofptoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dolfptoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/emalloc$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/findconfig$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fptoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fptoms$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gpstolfp$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hextoint$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hextolfp$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/humandate$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/icom$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ieee754io$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/inttoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/iosignal$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lib_strbuf$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/log$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/machines$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/md5c$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memmove$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mfp_mul$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mfptoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mfptoms$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mktime$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/modetoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mstolfp$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/msutotsf$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/msyslog$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/netof$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/numtoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/numtohost$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/octtoint$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/prettydate$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/random$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ranny$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/recvbuff$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refnumtoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/statestr$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strdup$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/syssignal$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/systime$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tsftomsu$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tstotv$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tvtoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tvtots$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/uglydate$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/uinttoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/utvtoa$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ymd2yd$U.Po@am__quote@
-
-distclean-depend:
- -rm -rf $(DEPDIR)
+ -test "$U" = "" || rm -f *_.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/a_md5encrypt$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtime$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimex$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assertions$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atoint$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atolfp$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atouint$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authkeys$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authreadkeys$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authusekey$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binio$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buftvtots$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caljulian$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calleapwhen$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caltontp$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calyearstart$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clocktime$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clocktypes$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decodenetnum$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dofptoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dolfptoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emalloc$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findconfig$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fptoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fptoms$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpstolfp$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextoint$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextolfp$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/humandate$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icom$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieee754io$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interfaceiter$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inttoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iosignal$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isc_strerror$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_strbuf$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machines$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5c$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmove$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfp_mul$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfptoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfptoms$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modetoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgcat$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mstolfp$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msutotsf$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msyslog$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netof$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_rfc2553$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtohost$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/octtoint$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prettydate$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ranny$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvbuff$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refnumtoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socktoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socktohost$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statestr$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syssignal$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systime$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systime_s$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsftomsu$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstotv$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvtoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvtots$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uglydate$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uinttoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utvtoa$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ymd2yd$U.Po@am__quote@
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+
+assertions_.o: assertions_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assertions_.o -MD -MP -MF "$(DEPDIR)/assertions_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o assertions_.o `test -f 'assertions_.c' || echo '$(srcdir)/'`assertions_.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/assertions_.Tpo" "$(DEPDIR)/assertions_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/assertions_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='assertions_.c' object='assertions_.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/assertions_.Po' tmpdepfile='$(DEPDIR)/assertions_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assertions_.o `test -f 'assertions_.c' || echo '$(srcdir)/'`assertions_.c
+
+assertions_.obj: assertions_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assertions_.obj -MD -MP -MF "$(DEPDIR)/assertions_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o assertions_.obj `if test -f 'assertions_.c'; then $(CYGPATH_W) 'assertions_.c'; else $(CYGPATH_W) '$(srcdir)/assertions_.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/assertions_.Tpo" "$(DEPDIR)/assertions_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/assertions_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='assertions_.c' object='assertions_.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/assertions_.Po' tmpdepfile='$(DEPDIR)/assertions_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assertions_.obj `if test -f 'assertions_.c'; then $(CYGPATH_W) 'assertions_.c'; else $(CYGPATH_W) '$(srcdir)/assertions_.c'; fi`
+
+assertions.o: $(srcdir)/../libisc/assertions.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assertions.o -MD -MP -MF "$(DEPDIR)/assertions.Tpo" \
+@am__fastdepCC_TRUE@ -c -o assertions.o `test -f '$(srcdir)/../libisc/assertions.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/assertions.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/assertions.Tpo" "$(DEPDIR)/assertions.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/assertions.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/assertions.c' object='assertions.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/assertions.Po' tmpdepfile='$(DEPDIR)/assertions.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assertions.o `test -f '$(srcdir)/../libisc/assertions.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/assertions.c
+
+assertions.obj: $(srcdir)/../libisc/assertions.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assertions.obj -MD -MP -MF "$(DEPDIR)/assertions.Tpo" \
+@am__fastdepCC_TRUE@ -c -o assertions.obj `if test -f '$(srcdir)/../libisc/assertions.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/assertions.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/assertions.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/assertions.Tpo" "$(DEPDIR)/assertions.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/assertions.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/assertions.c' object='assertions.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/assertions.Po' tmpdepfile='$(DEPDIR)/assertions.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assertions.obj `if test -f '$(srcdir)/../libisc/assertions.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/assertions.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/assertions.c'; fi`
+
+error_.o: error_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error_.o -MD -MP -MF "$(DEPDIR)/error_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o error_.o `test -f 'error_.c' || echo '$(srcdir)/'`error_.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/error_.Tpo" "$(DEPDIR)/error_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/error_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error_.c' object='error_.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/error_.Po' tmpdepfile='$(DEPDIR)/error_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error_.o `test -f 'error_.c' || echo '$(srcdir)/'`error_.c
+
+error_.obj: error_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error_.obj -MD -MP -MF "$(DEPDIR)/error_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o error_.obj `if test -f 'error_.c'; then $(CYGPATH_W) 'error_.c'; else $(CYGPATH_W) '$(srcdir)/error_.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/error_.Tpo" "$(DEPDIR)/error_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/error_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error_.c' object='error_.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/error_.Po' tmpdepfile='$(DEPDIR)/error_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error_.obj `if test -f 'error_.c'; then $(CYGPATH_W) 'error_.c'; else $(CYGPATH_W) '$(srcdir)/error_.c'; fi`
+
+error.o: $(srcdir)/../libisc/error.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.o -MD -MP -MF "$(DEPDIR)/error.Tpo" \
+@am__fastdepCC_TRUE@ -c -o error.o `test -f '$(srcdir)/../libisc/error.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/error.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/error.Tpo" "$(DEPDIR)/error.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/error.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/error.c' object='error.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/error.Po' tmpdepfile='$(DEPDIR)/error.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.o `test -f '$(srcdir)/../libisc/error.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/error.c
+
+error.obj: $(srcdir)/../libisc/error.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.obj -MD -MP -MF "$(DEPDIR)/error.Tpo" \
+@am__fastdepCC_TRUE@ -c -o error.obj `if test -f '$(srcdir)/../libisc/error.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/error.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/error.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/error.Tpo" "$(DEPDIR)/error.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/error.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/error.c' object='error.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/error.Po' tmpdepfile='$(DEPDIR)/error.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.obj `if test -f '$(srcdir)/../libisc/error.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/error.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/error.c'; fi`
+
+interfaceiter_.o: interfaceiter_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interfaceiter_.o -MD -MP -MF "$(DEPDIR)/interfaceiter_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o interfaceiter_.o `test -f 'interfaceiter_.c' || echo '$(srcdir)/'`interfaceiter_.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/interfaceiter_.Tpo" "$(DEPDIR)/interfaceiter_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/interfaceiter_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='interfaceiter_.c' object='interfaceiter_.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/interfaceiter_.Po' tmpdepfile='$(DEPDIR)/interfaceiter_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interfaceiter_.o `test -f 'interfaceiter_.c' || echo '$(srcdir)/'`interfaceiter_.c
+
+interfaceiter_.obj: interfaceiter_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interfaceiter_.obj -MD -MP -MF "$(DEPDIR)/interfaceiter_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o interfaceiter_.obj `if test -f 'interfaceiter_.c'; then $(CYGPATH_W) 'interfaceiter_.c'; else $(CYGPATH_W) '$(srcdir)/interfaceiter_.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/interfaceiter_.Tpo" "$(DEPDIR)/interfaceiter_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/interfaceiter_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='interfaceiter_.c' object='interfaceiter_.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/interfaceiter_.Po' tmpdepfile='$(DEPDIR)/interfaceiter_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interfaceiter_.obj `if test -f 'interfaceiter_.c'; then $(CYGPATH_W) 'interfaceiter_.c'; else $(CYGPATH_W) '$(srcdir)/interfaceiter_.c'; fi`
+
+interfaceiter.o: $(srcdir)/../libisc/interfaceiter.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interfaceiter.o -MD -MP -MF "$(DEPDIR)/interfaceiter.Tpo" \
+@am__fastdepCC_TRUE@ -c -o interfaceiter.o `test -f '$(srcdir)/../libisc/interfaceiter.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/interfaceiter.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/interfaceiter.Tpo" "$(DEPDIR)/interfaceiter.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/interfaceiter.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/interfaceiter.c' object='interfaceiter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/interfaceiter.Po' tmpdepfile='$(DEPDIR)/interfaceiter.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interfaceiter.o `test -f '$(srcdir)/../libisc/interfaceiter.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/interfaceiter.c
+
+interfaceiter.obj: $(srcdir)/../libisc/interfaceiter.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interfaceiter.obj -MD -MP -MF "$(DEPDIR)/interfaceiter.Tpo" \
+@am__fastdepCC_TRUE@ -c -o interfaceiter.obj `if test -f '$(srcdir)/../libisc/interfaceiter.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/interfaceiter.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/interfaceiter.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/interfaceiter.Tpo" "$(DEPDIR)/interfaceiter.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/interfaceiter.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/interfaceiter.c' object='interfaceiter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/interfaceiter.Po' tmpdepfile='$(DEPDIR)/interfaceiter.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interfaceiter.obj `if test -f '$(srcdir)/../libisc/interfaceiter.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/interfaceiter.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/interfaceiter.c'; fi`
+
+lib_.o: lib_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_.o -MD -MP -MF "$(DEPDIR)/lib_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o lib_.o `test -f 'lib_.c' || echo '$(srcdir)/'`lib_.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib_.Tpo" "$(DEPDIR)/lib_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/lib_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib_.c' object='lib_.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/lib_.Po' tmpdepfile='$(DEPDIR)/lib_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_.o `test -f 'lib_.c' || echo '$(srcdir)/'`lib_.c
+
+lib_.obj: lib_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_.obj -MD -MP -MF "$(DEPDIR)/lib_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o lib_.obj `if test -f 'lib_.c'; then $(CYGPATH_W) 'lib_.c'; else $(CYGPATH_W) '$(srcdir)/lib_.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib_.Tpo" "$(DEPDIR)/lib_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/lib_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib_.c' object='lib_.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/lib_.Po' tmpdepfile='$(DEPDIR)/lib_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_.obj `if test -f 'lib_.c'; then $(CYGPATH_W) 'lib_.c'; else $(CYGPATH_W) '$(srcdir)/lib_.c'; fi`
+
+lib.o: $(srcdir)/../libisc/lib.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib.o -MD -MP -MF "$(DEPDIR)/lib.Tpo" \
+@am__fastdepCC_TRUE@ -c -o lib.o `test -f '$(srcdir)/../libisc/lib.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/lib.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib.Tpo" "$(DEPDIR)/lib.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/lib.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/lib.c' object='lib.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/lib.Po' tmpdepfile='$(DEPDIR)/lib.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib.o `test -f '$(srcdir)/../libisc/lib.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/lib.c
+
+lib.obj: $(srcdir)/../libisc/lib.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib.obj -MD -MP -MF "$(DEPDIR)/lib.Tpo" \
+@am__fastdepCC_TRUE@ -c -o lib.obj `if test -f '$(srcdir)/../libisc/lib.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/lib.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/lib.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lib.Tpo" "$(DEPDIR)/lib.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/lib.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/lib.c' object='lib.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/lib.Po' tmpdepfile='$(DEPDIR)/lib.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib.obj `if test -f '$(srcdir)/../libisc/lib.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/lib.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/lib.c'; fi`
+
+mem_.o: mem_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mem_.o -MD -MP -MF "$(DEPDIR)/mem_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o mem_.o `test -f 'mem_.c' || echo '$(srcdir)/'`mem_.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mem_.Tpo" "$(DEPDIR)/mem_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/mem_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mem_.c' object='mem_.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/mem_.Po' tmpdepfile='$(DEPDIR)/mem_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mem_.o `test -f 'mem_.c' || echo '$(srcdir)/'`mem_.c
+
+mem_.obj: mem_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mem_.obj -MD -MP -MF "$(DEPDIR)/mem_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o mem_.obj `if test -f 'mem_.c'; then $(CYGPATH_W) 'mem_.c'; else $(CYGPATH_W) '$(srcdir)/mem_.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mem_.Tpo" "$(DEPDIR)/mem_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/mem_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mem_.c' object='mem_.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/mem_.Po' tmpdepfile='$(DEPDIR)/mem_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mem_.obj `if test -f 'mem_.c'; then $(CYGPATH_W) 'mem_.c'; else $(CYGPATH_W) '$(srcdir)/mem_.c'; fi`
+
+mem.o: $(srcdir)/../libisc/mem.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mem.o -MD -MP -MF "$(DEPDIR)/mem.Tpo" \
+@am__fastdepCC_TRUE@ -c -o mem.o `test -f '$(srcdir)/../libisc/mem.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/mem.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mem.Tpo" "$(DEPDIR)/mem.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/mem.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/mem.c' object='mem.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/mem.Po' tmpdepfile='$(DEPDIR)/mem.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mem.o `test -f '$(srcdir)/../libisc/mem.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/mem.c
+
+mem.obj: $(srcdir)/../libisc/mem.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mem.obj -MD -MP -MF "$(DEPDIR)/mem.Tpo" \
+@am__fastdepCC_TRUE@ -c -o mem.obj `if test -f '$(srcdir)/../libisc/mem.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/mem.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/mem.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mem.Tpo" "$(DEPDIR)/mem.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/mem.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/mem.c' object='mem.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/mem.Po' tmpdepfile='$(DEPDIR)/mem.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mem.obj `if test -f '$(srcdir)/../libisc/mem.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/mem.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/mem.c'; fi`
+
+msgcat_.o: msgcat_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msgcat_.o -MD -MP -MF "$(DEPDIR)/msgcat_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o msgcat_.o `test -f 'msgcat_.c' || echo '$(srcdir)/'`msgcat_.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msgcat_.Tpo" "$(DEPDIR)/msgcat_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/msgcat_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msgcat_.c' object='msgcat_.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/msgcat_.Po' tmpdepfile='$(DEPDIR)/msgcat_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msgcat_.o `test -f 'msgcat_.c' || echo '$(srcdir)/'`msgcat_.c
+
+msgcat_.obj: msgcat_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msgcat_.obj -MD -MP -MF "$(DEPDIR)/msgcat_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o msgcat_.obj `if test -f 'msgcat_.c'; then $(CYGPATH_W) 'msgcat_.c'; else $(CYGPATH_W) '$(srcdir)/msgcat_.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msgcat_.Tpo" "$(DEPDIR)/msgcat_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/msgcat_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msgcat_.c' object='msgcat_.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/msgcat_.Po' tmpdepfile='$(DEPDIR)/msgcat_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msgcat_.obj `if test -f 'msgcat_.c'; then $(CYGPATH_W) 'msgcat_.c'; else $(CYGPATH_W) '$(srcdir)/msgcat_.c'; fi`
+
+msgcat.o: $(srcdir)/../libisc/msgcat.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msgcat.o -MD -MP -MF "$(DEPDIR)/msgcat.Tpo" \
+@am__fastdepCC_TRUE@ -c -o msgcat.o `test -f '$(srcdir)/../libisc/msgcat.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/msgcat.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msgcat.Tpo" "$(DEPDIR)/msgcat.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/msgcat.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/msgcat.c' object='msgcat.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/msgcat.Po' tmpdepfile='$(DEPDIR)/msgcat.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msgcat.o `test -f '$(srcdir)/../libisc/msgcat.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/msgcat.c
+
+msgcat.obj: $(srcdir)/../libisc/msgcat.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msgcat.obj -MD -MP -MF "$(DEPDIR)/msgcat.Tpo" \
+@am__fastdepCC_TRUE@ -c -o msgcat.obj `if test -f '$(srcdir)/../libisc/msgcat.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/msgcat.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/msgcat.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msgcat.Tpo" "$(DEPDIR)/msgcat.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/msgcat.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/msgcat.c' object='msgcat.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/msgcat.Po' tmpdepfile='$(DEPDIR)/msgcat.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msgcat.obj `if test -f '$(srcdir)/../libisc/msgcat.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/msgcat.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/msgcat.c'; fi`
+
+net_.o: net_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net_.o -MD -MP -MF "$(DEPDIR)/net_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o net_.o `test -f 'net_.c' || echo '$(srcdir)/'`net_.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/net_.Tpo" "$(DEPDIR)/net_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/net_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='net_.c' object='net_.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/net_.Po' tmpdepfile='$(DEPDIR)/net_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o net_.o `test -f 'net_.c' || echo '$(srcdir)/'`net_.c
+
+net_.obj: net_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net_.obj -MD -MP -MF "$(DEPDIR)/net_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o net_.obj `if test -f 'net_.c'; then $(CYGPATH_W) 'net_.c'; else $(CYGPATH_W) '$(srcdir)/net_.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/net_.Tpo" "$(DEPDIR)/net_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/net_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='net_.c' object='net_.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/net_.Po' tmpdepfile='$(DEPDIR)/net_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o net_.obj `if test -f 'net_.c'; then $(CYGPATH_W) 'net_.c'; else $(CYGPATH_W) '$(srcdir)/net_.c'; fi`
+
+net.o: $(srcdir)/../libisc/net.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net.o -MD -MP -MF "$(DEPDIR)/net.Tpo" \
+@am__fastdepCC_TRUE@ -c -o net.o `test -f '$(srcdir)/../libisc/net.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/net.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/net.Tpo" "$(DEPDIR)/net.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/net.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/net.c' object='net.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/net.Po' tmpdepfile='$(DEPDIR)/net.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o net.o `test -f '$(srcdir)/../libisc/net.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/net.c
+
+net.obj: $(srcdir)/../libisc/net.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net.obj -MD -MP -MF "$(DEPDIR)/net.Tpo" \
+@am__fastdepCC_TRUE@ -c -o net.obj `if test -f '$(srcdir)/../libisc/net.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/net.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/net.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/net.Tpo" "$(DEPDIR)/net.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/net.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/net.c' object='net.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/net.Po' tmpdepfile='$(DEPDIR)/net.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o net.obj `if test -f '$(srcdir)/../libisc/net.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/net.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/net.c'; fi`
+
+isc_strerror_.o: isc_strerror_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isc_strerror_.o -MD -MP -MF "$(DEPDIR)/isc_strerror_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o isc_strerror_.o `test -f 'isc_strerror_.c' || echo '$(srcdir)/'`isc_strerror_.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/isc_strerror_.Tpo" "$(DEPDIR)/isc_strerror_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/isc_strerror_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isc_strerror_.c' object='isc_strerror_.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/isc_strerror_.Po' tmpdepfile='$(DEPDIR)/isc_strerror_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isc_strerror_.o `test -f 'isc_strerror_.c' || echo '$(srcdir)/'`isc_strerror_.c
+
+isc_strerror_.obj: isc_strerror_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isc_strerror_.obj -MD -MP -MF "$(DEPDIR)/isc_strerror_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o isc_strerror_.obj `if test -f 'isc_strerror_.c'; then $(CYGPATH_W) 'isc_strerror_.c'; else $(CYGPATH_W) '$(srcdir)/isc_strerror_.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/isc_strerror_.Tpo" "$(DEPDIR)/isc_strerror_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/isc_strerror_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isc_strerror_.c' object='isc_strerror_.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/isc_strerror_.Po' tmpdepfile='$(DEPDIR)/isc_strerror_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isc_strerror_.obj `if test -f 'isc_strerror_.c'; then $(CYGPATH_W) 'isc_strerror_.c'; else $(CYGPATH_W) '$(srcdir)/isc_strerror_.c'; fi`
+
+isc_strerror.o: $(srcdir)/../libisc/isc_strerror.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isc_strerror.o -MD -MP -MF "$(DEPDIR)/isc_strerror.Tpo" \
+@am__fastdepCC_TRUE@ -c -o isc_strerror.o `test -f '$(srcdir)/../libisc/isc_strerror.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/isc_strerror.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/isc_strerror.Tpo" "$(DEPDIR)/isc_strerror.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/isc_strerror.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/isc_strerror.c' object='isc_strerror.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/isc_strerror.Po' tmpdepfile='$(DEPDIR)/isc_strerror.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isc_strerror.o `test -f '$(srcdir)/../libisc/isc_strerror.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/isc_strerror.c
+
+isc_strerror.obj: $(srcdir)/../libisc/isc_strerror.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isc_strerror.obj -MD -MP -MF "$(DEPDIR)/isc_strerror.Tpo" \
+@am__fastdepCC_TRUE@ -c -o isc_strerror.obj `if test -f '$(srcdir)/../libisc/isc_strerror.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/isc_strerror.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/isc_strerror.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/isc_strerror.Tpo" "$(DEPDIR)/isc_strerror.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/isc_strerror.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/isc_strerror.c' object='isc_strerror.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/isc_strerror.Po' tmpdepfile='$(DEPDIR)/isc_strerror.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isc_strerror.obj `if test -f '$(srcdir)/../libisc/isc_strerror.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/isc_strerror.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/isc_strerror.c'; fi`
+
+inet_ntop_.o: inet_ntop_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_ntop_.o -MD -MP -MF "$(DEPDIR)/inet_ntop_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o inet_ntop_.o `test -f 'inet_ntop_.c' || echo '$(srcdir)/'`inet_ntop_.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/inet_ntop_.Tpo" "$(DEPDIR)/inet_ntop_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/inet_ntop_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_ntop_.c' object='inet_ntop_.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/inet_ntop_.Po' tmpdepfile='$(DEPDIR)/inet_ntop_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inet_ntop_.o `test -f 'inet_ntop_.c' || echo '$(srcdir)/'`inet_ntop_.c
+
+inet_ntop_.obj: inet_ntop_.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_ntop_.obj -MD -MP -MF "$(DEPDIR)/inet_ntop_.Tpo" \
+@am__fastdepCC_TRUE@ -c -o inet_ntop_.obj `if test -f 'inet_ntop_.c'; then $(CYGPATH_W) 'inet_ntop_.c'; else $(CYGPATH_W) '$(srcdir)/inet_ntop_.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/inet_ntop_.Tpo" "$(DEPDIR)/inet_ntop_.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/inet_ntop_.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_ntop_.c' object='inet_ntop_.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/inet_ntop_.Po' tmpdepfile='$(DEPDIR)/inet_ntop_.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inet_ntop_.obj `if test -f 'inet_ntop_.c'; then $(CYGPATH_W) 'inet_ntop_.c'; else $(CYGPATH_W) '$(srcdir)/inet_ntop_.c'; fi`
+
+inet_ntop.o: $(srcdir)/../libisc/inet_ntop.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_ntop.o -MD -MP -MF "$(DEPDIR)/inet_ntop.Tpo" \
+@am__fastdepCC_TRUE@ -c -o inet_ntop.o `test -f '$(srcdir)/../libisc/inet_ntop.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/inet_ntop.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/inet_ntop.Tpo" "$(DEPDIR)/inet_ntop.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/inet_ntop.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/inet_ntop.c' object='inet_ntop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/inet_ntop.Po' tmpdepfile='$(DEPDIR)/inet_ntop.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inet_ntop.o `test -f '$(srcdir)/../libisc/inet_ntop.c' || echo '$(srcdir)/'`$(srcdir)/../libisc/inet_ntop.c
+
+inet_ntop.obj: $(srcdir)/../libisc/inet_ntop.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_ntop.obj -MD -MP -MF "$(DEPDIR)/inet_ntop.Tpo" \
+@am__fastdepCC_TRUE@ -c -o inet_ntop.obj `if test -f '$(srcdir)/../libisc/inet_ntop.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/inet_ntop.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/inet_ntop.Tpo" "$(DEPDIR)/inet_ntop.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/inet_ntop.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../libisc/inet_ntop.c' object='inet_ntop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/inet_ntop.Po' tmpdepfile='$(DEPDIR)/inet_ntop.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inet_ntop.obj `if test -f '$(srcdir)/../libisc/inet_ntop.c'; then $(CYGPATH_W) '$(srcdir)/../libisc/inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libisc/inet_ntop.c'; fi`
a_md5encrypt_.c: a_md5encrypt.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/a_md5encrypt.c; then echo $(srcdir)/a_md5encrypt.c; else echo a_md5encrypt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > a_md5encrypt_.c || rm -f a_md5encrypt_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/a_md5encrypt.c; then echo $(srcdir)/a_md5encrypt.c; else echo a_md5encrypt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
adjtime_.c: adjtime.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/adjtime.c; then echo $(srcdir)/adjtime.c; else echo adjtime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > adjtime_.c || rm -f adjtime_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/adjtime.c; then echo $(srcdir)/adjtime.c; else echo adjtime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
adjtimex_.c: adjtimex.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/adjtimex.c; then echo $(srcdir)/adjtimex.c; else echo adjtimex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > adjtimex_.c || rm -f adjtimex_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/adjtimex.c; then echo $(srcdir)/adjtimex.c; else echo adjtimex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+assertions_.c: $(srcdir)/../libisc/assertions.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/$(srcdir)/../libisc/assertions.c; then echo $(srcdir)/$(srcdir)/../libisc/assertions.c; else echo $(srcdir)/../libisc/assertions.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
atoint_.c: atoint.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/atoint.c; then echo $(srcdir)/atoint.c; else echo atoint.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > atoint_.c || rm -f atoint_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/atoint.c; then echo $(srcdir)/atoint.c; else echo atoint.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
atolfp_.c: atolfp.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/atolfp.c; then echo $(srcdir)/atolfp.c; else echo atolfp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > atolfp_.c || rm -f atolfp_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/atolfp.c; then echo $(srcdir)/atolfp.c; else echo atolfp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
atouint_.c: atouint.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/atouint.c; then echo $(srcdir)/atouint.c; else echo atouint.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > atouint_.c || rm -f atouint_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/atouint.c; then echo $(srcdir)/atouint.c; else echo atouint.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
audio_.c: audio.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/audio.c; then echo $(srcdir)/audio.c; else echo audio.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > audio_.c || rm -f audio_.c
-authencrypt_.c: authencrypt.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/authencrypt.c; then echo $(srcdir)/authencrypt.c; else echo authencrypt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > authencrypt_.c || rm -f authencrypt_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/audio.c; then echo $(srcdir)/audio.c; else echo audio.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
authkeys_.c: authkeys.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/authkeys.c; then echo $(srcdir)/authkeys.c; else echo authkeys.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > authkeys_.c || rm -f authkeys_.c
-authparity_.c: authparity.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/authparity.c; then echo $(srcdir)/authparity.c; else echo authparity.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > authparity_.c || rm -f authparity_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/authkeys.c; then echo $(srcdir)/authkeys.c; else echo authkeys.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
authreadkeys_.c: authreadkeys.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/authreadkeys.c; then echo $(srcdir)/authreadkeys.c; else echo authreadkeys.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > authreadkeys_.c || rm -f authreadkeys_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/authreadkeys.c; then echo $(srcdir)/authreadkeys.c; else echo authreadkeys.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
authusekey_.c: authusekey.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/authusekey.c; then echo $(srcdir)/authusekey.c; else echo authusekey.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > authusekey_.c || rm -f authusekey_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/authusekey.c; then echo $(srcdir)/authusekey.c; else echo authusekey.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
binio_.c: binio.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/binio.c; then echo $(srcdir)/binio.c; else echo binio.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > binio_.c || rm -f binio_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/binio.c; then echo $(srcdir)/binio.c; else echo binio.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
buftvtots_.c: buftvtots.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/buftvtots.c; then echo $(srcdir)/buftvtots.c; else echo buftvtots.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > buftvtots_.c || rm -f buftvtots_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/buftvtots.c; then echo $(srcdir)/buftvtots.c; else echo buftvtots.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
caljulian_.c: caljulian.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/caljulian.c; then echo $(srcdir)/caljulian.c; else echo caljulian.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > caljulian_.c || rm -f caljulian_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/caljulian.c; then echo $(srcdir)/caljulian.c; else echo caljulian.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
calleapwhen_.c: calleapwhen.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/calleapwhen.c; then echo $(srcdir)/calleapwhen.c; else echo calleapwhen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > calleapwhen_.c || rm -f calleapwhen_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/calleapwhen.c; then echo $(srcdir)/calleapwhen.c; else echo calleapwhen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
caltontp_.c: caltontp.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/caltontp.c; then echo $(srcdir)/caltontp.c; else echo caltontp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > caltontp_.c || rm -f caltontp_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/caltontp.c; then echo $(srcdir)/caltontp.c; else echo caltontp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
calyearstart_.c: calyearstart.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/calyearstart.c; then echo $(srcdir)/calyearstart.c; else echo calyearstart.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > calyearstart_.c || rm -f calyearstart_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/calyearstart.c; then echo $(srcdir)/calyearstart.c; else echo calyearstart.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clocktime_.c: clocktime.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clocktime.c; then echo $(srcdir)/clocktime.c; else echo clocktime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clocktime_.c || rm -f clocktime_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clocktime.c; then echo $(srcdir)/clocktime.c; else echo clocktime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clocktypes_.c: clocktypes.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clocktypes.c; then echo $(srcdir)/clocktypes.c; else echo clocktypes.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clocktypes_.c || rm -f clocktypes_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clocktypes.c; then echo $(srcdir)/clocktypes.c; else echo clocktypes.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
decodenetnum_.c: decodenetnum.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/decodenetnum.c; then echo $(srcdir)/decodenetnum.c; else echo decodenetnum.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > decodenetnum_.c || rm -f decodenetnum_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/decodenetnum.c; then echo $(srcdir)/decodenetnum.c; else echo decodenetnum.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
dofptoa_.c: dofptoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dofptoa.c; then echo $(srcdir)/dofptoa.c; else echo dofptoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dofptoa_.c || rm -f dofptoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dofptoa.c; then echo $(srcdir)/dofptoa.c; else echo dofptoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
dolfptoa_.c: dolfptoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dolfptoa.c; then echo $(srcdir)/dolfptoa.c; else echo dolfptoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dolfptoa_.c || rm -f dolfptoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dolfptoa.c; then echo $(srcdir)/dolfptoa.c; else echo dolfptoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
emalloc_.c: emalloc.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/emalloc.c; then echo $(srcdir)/emalloc.c; else echo emalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > emalloc_.c || rm -f emalloc_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/emalloc.c; then echo $(srcdir)/emalloc.c; else echo emalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+error_.c: $(srcdir)/../libisc/error.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/$(srcdir)/../libisc/error.c; then echo $(srcdir)/$(srcdir)/../libisc/error.c; else echo $(srcdir)/../libisc/error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
findconfig_.c: findconfig.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/findconfig.c; then echo $(srcdir)/findconfig.c; else echo findconfig.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > findconfig_.c || rm -f findconfig_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/findconfig.c; then echo $(srcdir)/findconfig.c; else echo findconfig.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
fptoa_.c: fptoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/fptoa.c; then echo $(srcdir)/fptoa.c; else echo fptoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > fptoa_.c || rm -f fptoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/fptoa.c; then echo $(srcdir)/fptoa.c; else echo fptoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
fptoms_.c: fptoms.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/fptoms.c; then echo $(srcdir)/fptoms.c; else echo fptoms.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > fptoms_.c || rm -f fptoms_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/fptoms.c; then echo $(srcdir)/fptoms.c; else echo fptoms.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
getopt_.c: getopt.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt_.c || rm -f getopt_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
gpstolfp_.c: gpstolfp.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gpstolfp.c; then echo $(srcdir)/gpstolfp.c; else echo gpstolfp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gpstolfp_.c || rm -f gpstolfp_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gpstolfp.c; then echo $(srcdir)/gpstolfp.c; else echo gpstolfp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
hextoint_.c: hextoint.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hextoint.c; then echo $(srcdir)/hextoint.c; else echo hextoint.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > hextoint_.c || rm -f hextoint_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hextoint.c; then echo $(srcdir)/hextoint.c; else echo hextoint.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
hextolfp_.c: hextolfp.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hextolfp.c; then echo $(srcdir)/hextolfp.c; else echo hextolfp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > hextolfp_.c || rm -f hextolfp_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hextolfp.c; then echo $(srcdir)/hextolfp.c; else echo hextolfp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
humandate_.c: humandate.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/humandate.c; then echo $(srcdir)/humandate.c; else echo humandate.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > humandate_.c || rm -f humandate_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/humandate.c; then echo $(srcdir)/humandate.c; else echo humandate.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
icom_.c: icom.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/icom.c; then echo $(srcdir)/icom.c; else echo icom.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > icom_.c || rm -f icom_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/icom.c; then echo $(srcdir)/icom.c; else echo icom.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ieee754io_.c: ieee754io.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ieee754io.c; then echo $(srcdir)/ieee754io.c; else echo ieee754io.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ieee754io_.c || rm -f ieee754io_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ieee754io.c; then echo $(srcdir)/ieee754io.c; else echo ieee754io.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+inet_ntop_.c: $(srcdir)/../libisc/inet_ntop.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/$(srcdir)/../libisc/inet_ntop.c; then echo $(srcdir)/$(srcdir)/../libisc/inet_ntop.c; else echo $(srcdir)/../libisc/inet_ntop.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+interfaceiter_.c: $(srcdir)/../libisc/interfaceiter.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/$(srcdir)/../libisc/interfaceiter.c; then echo $(srcdir)/$(srcdir)/../libisc/interfaceiter.c; else echo $(srcdir)/../libisc/interfaceiter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
inttoa_.c: inttoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/inttoa.c; then echo $(srcdir)/inttoa.c; else echo inttoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > inttoa_.c || rm -f inttoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/inttoa.c; then echo $(srcdir)/inttoa.c; else echo inttoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
iosignal_.c: iosignal.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/iosignal.c; then echo $(srcdir)/iosignal.c; else echo iosignal.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > iosignal_.c || rm -f iosignal_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/iosignal.c; then echo $(srcdir)/iosignal.c; else echo iosignal.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+isc_strerror_.c: $(srcdir)/../libisc/isc_strerror.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/$(srcdir)/../libisc/isc_strerror.c; then echo $(srcdir)/$(srcdir)/../libisc/isc_strerror.c; else echo $(srcdir)/../libisc/isc_strerror.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+lib_.c: $(srcdir)/../libisc/lib.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/$(srcdir)/../libisc/lib.c; then echo $(srcdir)/$(srcdir)/../libisc/lib.c; else echo $(srcdir)/../libisc/lib.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
lib_strbuf_.c: lib_strbuf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib_strbuf.c; then echo $(srcdir)/lib_strbuf.c; else echo lib_strbuf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lib_strbuf_.c || rm -f lib_strbuf_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib_strbuf.c; then echo $(srcdir)/lib_strbuf.c; else echo lib_strbuf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
log_.c: log.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/log.c; then echo $(srcdir)/log.c; else echo log.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > log_.c || rm -f log_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/log.c; then echo $(srcdir)/log.c; else echo log.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
machines_.c: machines.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/machines.c; then echo $(srcdir)/machines.c; else echo machines.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > machines_.c || rm -f machines_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/machines.c; then echo $(srcdir)/machines.c; else echo machines.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
md5c_.c: md5c.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/md5c.c; then echo $(srcdir)/md5c.c; else echo md5c.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > md5c_.c || rm -f md5c_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/md5c.c; then echo $(srcdir)/md5c.c; else echo md5c.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+mem_.c: $(srcdir)/../libisc/mem.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/$(srcdir)/../libisc/mem.c; then echo $(srcdir)/$(srcdir)/../libisc/mem.c; else echo $(srcdir)/../libisc/mem.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
memmove_.c: memmove.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memmove.c; then echo $(srcdir)/memmove.c; else echo memmove.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memmove_.c || rm -f memmove_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memmove.c; then echo $(srcdir)/memmove.c; else echo memmove.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
mfp_mul_.c: mfp_mul.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mfp_mul.c; then echo $(srcdir)/mfp_mul.c; else echo mfp_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > mfp_mul_.c || rm -f mfp_mul_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mfp_mul.c; then echo $(srcdir)/mfp_mul.c; else echo mfp_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
mfptoa_.c: mfptoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mfptoa.c; then echo $(srcdir)/mfptoa.c; else echo mfptoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > mfptoa_.c || rm -f mfptoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mfptoa.c; then echo $(srcdir)/mfptoa.c; else echo mfptoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
mfptoms_.c: mfptoms.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mfptoms.c; then echo $(srcdir)/mfptoms.c; else echo mfptoms.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > mfptoms_.c || rm -f mfptoms_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mfptoms.c; then echo $(srcdir)/mfptoms.c; else echo mfptoms.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
mktime_.c: mktime.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mktime.c; then echo $(srcdir)/mktime.c; else echo mktime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > mktime_.c || rm -f mktime_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mktime.c; then echo $(srcdir)/mktime.c; else echo mktime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
modetoa_.c: modetoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/modetoa.c; then echo $(srcdir)/modetoa.c; else echo modetoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > modetoa_.c || rm -f modetoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/modetoa.c; then echo $(srcdir)/modetoa.c; else echo modetoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+msgcat_.c: $(srcdir)/../libisc/msgcat.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/$(srcdir)/../libisc/msgcat.c; then echo $(srcdir)/$(srcdir)/../libisc/msgcat.c; else echo $(srcdir)/../libisc/msgcat.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
mstolfp_.c: mstolfp.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mstolfp.c; then echo $(srcdir)/mstolfp.c; else echo mstolfp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > mstolfp_.c || rm -f mstolfp_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mstolfp.c; then echo $(srcdir)/mstolfp.c; else echo mstolfp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
msutotsf_.c: msutotsf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/msutotsf.c; then echo $(srcdir)/msutotsf.c; else echo msutotsf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > msutotsf_.c || rm -f msutotsf_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/msutotsf.c; then echo $(srcdir)/msutotsf.c; else echo msutotsf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
msyslog_.c: msyslog.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/msyslog.c; then echo $(srcdir)/msyslog.c; else echo msyslog.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > msyslog_.c || rm -f msyslog_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/msyslog.c; then echo $(srcdir)/msyslog.c; else echo msyslog.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+net_.c: $(srcdir)/../libisc/net.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/$(srcdir)/../libisc/net.c; then echo $(srcdir)/$(srcdir)/../libisc/net.c; else echo $(srcdir)/../libisc/net.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
netof_.c: netof.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/netof.c; then echo $(srcdir)/netof.c; else echo netof.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > netof_.c || rm -f netof_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/netof.c; then echo $(srcdir)/netof.c; else echo netof.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+ntp_rfc2553_.c: ntp_rfc2553.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_rfc2553.c; then echo $(srcdir)/ntp_rfc2553.c; else echo ntp_rfc2553.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
numtoa_.c: numtoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/numtoa.c; then echo $(srcdir)/numtoa.c; else echo numtoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > numtoa_.c || rm -f numtoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/numtoa.c; then echo $(srcdir)/numtoa.c; else echo numtoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
numtohost_.c: numtohost.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/numtohost.c; then echo $(srcdir)/numtohost.c; else echo numtohost.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > numtohost_.c || rm -f numtohost_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/numtohost.c; then echo $(srcdir)/numtohost.c; else echo numtohost.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
octtoint_.c: octtoint.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/octtoint.c; then echo $(srcdir)/octtoint.c; else echo octtoint.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > octtoint_.c || rm -f octtoint_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/octtoint.c; then echo $(srcdir)/octtoint.c; else echo octtoint.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
prettydate_.c: prettydate.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/prettydate.c; then echo $(srcdir)/prettydate.c; else echo prettydate.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > prettydate_.c || rm -f prettydate_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/prettydate.c; then echo $(srcdir)/prettydate.c; else echo prettydate.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
random_.c: random.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/random.c; then echo $(srcdir)/random.c; else echo random.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > random_.c || rm -f random_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/random.c; then echo $(srcdir)/random.c; else echo random.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ranny_.c: ranny.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ranny.c; then echo $(srcdir)/ranny.c; else echo ranny.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ranny_.c || rm -f ranny_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ranny.c; then echo $(srcdir)/ranny.c; else echo ranny.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
recvbuff_.c: recvbuff.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/recvbuff.c; then echo $(srcdir)/recvbuff.c; else echo recvbuff.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > recvbuff_.c || rm -f recvbuff_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/recvbuff.c; then echo $(srcdir)/recvbuff.c; else echo recvbuff.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refnumtoa_.c: refnumtoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refnumtoa.c; then echo $(srcdir)/refnumtoa.c; else echo refnumtoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refnumtoa_.c || rm -f refnumtoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refnumtoa.c; then echo $(srcdir)/refnumtoa.c; else echo refnumtoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
snprintf_.c: snprintf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/snprintf.c; then echo $(srcdir)/snprintf.c; else echo snprintf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > snprintf_.c || rm -f snprintf_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/snprintf.c; then echo $(srcdir)/snprintf.c; else echo snprintf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+socktoa_.c: socktoa.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/socktoa.c; then echo $(srcdir)/socktoa.c; else echo socktoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+socktohost_.c: socktohost.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/socktohost.c; then echo $(srcdir)/socktohost.c; else echo socktohost.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
statestr_.c: statestr.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/statestr.c; then echo $(srcdir)/statestr.c; else echo statestr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > statestr_.c || rm -f statestr_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/statestr.c; then echo $(srcdir)/statestr.c; else echo statestr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
strdup_.c: strdup.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strdup.c; then echo $(srcdir)/strdup.c; else echo strdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strdup_.c || rm -f strdup_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strdup.c; then echo $(srcdir)/strdup.c; else echo strdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
strerror_.c: strerror.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strerror.c; then echo $(srcdir)/strerror.c; else echo strerror.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strerror_.c || rm -f strerror_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strerror.c; then echo $(srcdir)/strerror.c; else echo strerror.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+strstr_.c: strstr.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strstr.c; then echo $(srcdir)/strstr.c; else echo strstr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
syssignal_.c: syssignal.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/syssignal.c; then echo $(srcdir)/syssignal.c; else echo syssignal.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > syssignal_.c || rm -f syssignal_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/syssignal.c; then echo $(srcdir)/syssignal.c; else echo syssignal.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
systime_.c: systime.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/systime.c; then echo $(srcdir)/systime.c; else echo systime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > systime_.c || rm -f systime_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/systime.c; then echo $(srcdir)/systime.c; else echo systime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+systime_s_.c: systime_s.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/systime_s.c; then echo $(srcdir)/systime_s.c; else echo systime_s.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
tsftomsu_.c: tsftomsu.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tsftomsu.c; then echo $(srcdir)/tsftomsu.c; else echo tsftomsu.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > tsftomsu_.c || rm -f tsftomsu_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tsftomsu.c; then echo $(srcdir)/tsftomsu.c; else echo tsftomsu.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
tstotv_.c: tstotv.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tstotv.c; then echo $(srcdir)/tstotv.c; else echo tstotv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > tstotv_.c || rm -f tstotv_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tstotv.c; then echo $(srcdir)/tstotv.c; else echo tstotv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
tvtoa_.c: tvtoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tvtoa.c; then echo $(srcdir)/tvtoa.c; else echo tvtoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > tvtoa_.c || rm -f tvtoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tvtoa.c; then echo $(srcdir)/tvtoa.c; else echo tvtoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
tvtots_.c: tvtots.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tvtots.c; then echo $(srcdir)/tvtots.c; else echo tvtots.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > tvtots_.c || rm -f tvtots_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tvtots.c; then echo $(srcdir)/tvtots.c; else echo tvtots.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
uglydate_.c: uglydate.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/uglydate.c; then echo $(srcdir)/uglydate.c; else echo uglydate.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > uglydate_.c || rm -f uglydate_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/uglydate.c; then echo $(srcdir)/uglydate.c; else echo uglydate.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
uinttoa_.c: uinttoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/uinttoa.c; then echo $(srcdir)/uinttoa.c; else echo uinttoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > uinttoa_.c || rm -f uinttoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/uinttoa.c; then echo $(srcdir)/uinttoa.c; else echo uinttoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
utvtoa_.c: utvtoa.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/utvtoa.c; then echo $(srcdir)/utvtoa.c; else echo utvtoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > utvtoa_.c || rm -f utvtoa_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/utvtoa.c; then echo $(srcdir)/utvtoa.c; else echo utvtoa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ymd2yd_.c: ymd2yd.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ymd2yd.c; then echo $(srcdir)/ymd2yd.c; else echo ymd2yd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ymd2yd_.c || rm -f ymd2yd_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ymd2yd.c; then echo $(srcdir)/ymd2yd.c; else echo ymd2yd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
a_md5encrypt_.$(OBJEXT) adjtime_.$(OBJEXT) adjtimex_.$(OBJEXT) \
-atoint_.$(OBJEXT) atolfp_.$(OBJEXT) atouint_.$(OBJEXT) audio_.$(OBJEXT) \
-authencrypt_.$(OBJEXT) authkeys_.$(OBJEXT) authparity_.$(OBJEXT) \
+assertions_.$(OBJEXT) atoint_.$(OBJEXT) atolfp_.$(OBJEXT) \
+atouint_.$(OBJEXT) audio_.$(OBJEXT) authkeys_.$(OBJEXT) \
authreadkeys_.$(OBJEXT) authusekey_.$(OBJEXT) binio_.$(OBJEXT) \
buftvtots_.$(OBJEXT) caljulian_.$(OBJEXT) calleapwhen_.$(OBJEXT) \
caltontp_.$(OBJEXT) calyearstart_.$(OBJEXT) clocktime_.$(OBJEXT) \
clocktypes_.$(OBJEXT) decodenetnum_.$(OBJEXT) dofptoa_.$(OBJEXT) \
-dolfptoa_.$(OBJEXT) emalloc_.$(OBJEXT) findconfig_.$(OBJEXT) \
-fptoa_.$(OBJEXT) fptoms_.$(OBJEXT) getopt_.$(OBJEXT) \
-gpstolfp_.$(OBJEXT) hextoint_.$(OBJEXT) hextolfp_.$(OBJEXT) \
-humandate_.$(OBJEXT) icom_.$(OBJEXT) ieee754io_.$(OBJEXT) \
-inttoa_.$(OBJEXT) iosignal_.$(OBJEXT) lib_strbuf_.$(OBJEXT) \
-log_.$(OBJEXT) machines_.$(OBJEXT) md5c_.$(OBJEXT) memmove_.$(OBJEXT) \
-mfp_mul_.$(OBJEXT) mfptoa_.$(OBJEXT) mfptoms_.$(OBJEXT) \
-mktime_.$(OBJEXT) modetoa_.$(OBJEXT) mstolfp_.$(OBJEXT) \
-msutotsf_.$(OBJEXT) msyslog_.$(OBJEXT) netof_.$(OBJEXT) \
-numtoa_.$(OBJEXT) numtohost_.$(OBJEXT) octtoint_.$(OBJEXT) \
-prettydate_.$(OBJEXT) random_.$(OBJEXT) ranny_.$(OBJEXT) \
-recvbuff_.$(OBJEXT) refnumtoa_.$(OBJEXT) snprintf_.$(OBJEXT) \
+dolfptoa_.$(OBJEXT) emalloc_.$(OBJEXT) error_.$(OBJEXT) \
+findconfig_.$(OBJEXT) fptoa_.$(OBJEXT) fptoms_.$(OBJEXT) \
+getopt_.$(OBJEXT) gpstolfp_.$(OBJEXT) hextoint_.$(OBJEXT) \
+hextolfp_.$(OBJEXT) humandate_.$(OBJEXT) icom_.$(OBJEXT) \
+ieee754io_.$(OBJEXT) inet_ntop_.$(OBJEXT) interfaceiter_.$(OBJEXT) \
+inttoa_.$(OBJEXT) iosignal_.$(OBJEXT) isc_strerror_.$(OBJEXT) \
+lib_.$(OBJEXT) lib_strbuf_.$(OBJEXT) log_.$(OBJEXT) machines_.$(OBJEXT) \
+md5c_.$(OBJEXT) mem_.$(OBJEXT) memmove_.$(OBJEXT) mfp_mul_.$(OBJEXT) \
+mfptoa_.$(OBJEXT) mfptoms_.$(OBJEXT) mktime_.$(OBJEXT) \
+modetoa_.$(OBJEXT) msgcat_.$(OBJEXT) mstolfp_.$(OBJEXT) \
+msutotsf_.$(OBJEXT) msyslog_.$(OBJEXT) net_.$(OBJEXT) netof_.$(OBJEXT) \
+ntp_rfc2553_.$(OBJEXT) numtoa_.$(OBJEXT) numtohost_.$(OBJEXT) \
+octtoint_.$(OBJEXT) prettydate_.$(OBJEXT) random_.$(OBJEXT) \
+ranny_.$(OBJEXT) recvbuff_.$(OBJEXT) refnumtoa_.$(OBJEXT) \
+snprintf_.$(OBJEXT) socktoa_.$(OBJEXT) socktohost_.$(OBJEXT) \
statestr_.$(OBJEXT) strdup_.$(OBJEXT) strerror_.$(OBJEXT) \
-syssignal_.$(OBJEXT) systime_.$(OBJEXT) tsftomsu_.$(OBJEXT) \
-tstotv_.$(OBJEXT) tvtoa_.$(OBJEXT) tvtots_.$(OBJEXT) \
-uglydate_.$(OBJEXT) uinttoa_.$(OBJEXT) utvtoa_.$(OBJEXT) \
-ymd2yd_.$(OBJEXT) : $(ANSI2KNR)
+strstr_.$(OBJEXT) syssignal_.$(OBJEXT) systime_.$(OBJEXT) \
+systime_s_.$(OBJEXT) tsftomsu_.$(OBJEXT) tstotv_.$(OBJEXT) \
+tvtoa_.$(OBJEXT) tvtots_.$(OBJEXT) uglydate_.$(OBJEXT) \
+uinttoa_.$(OBJEXT) utvtoa_.$(OBJEXT) ymd2yd_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -572,7 +1120,6 @@ check: check-am
all-am: Makefile $(LIBRARIES) $(HEADERS)
installdirs:
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -584,6 +1131,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -591,7 +1139,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -601,9 +1149,11 @@ clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -624,6 +1174,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -631,28 +1183,30 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-generic \
- clean-noinstLIBRARIES distclean distclean-compile \
- distclean-depend distclean-generic distclean-tags distdir dvi \
- dvi-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-noinstLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am info \
+ info-am install install-am install-data install-data-am \
+ install-exec install-exec-am install-info install-info-am \
+ install-man install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-kr pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-info-am
../include/des.h:
touch ../include/des.h
-
-#mktime_.c: mktime.c $(ANSI2KNR)
-# $(ANSI2KNR) $< mktime_.c
-
-#strerror_.c: strerror.c $(ANSI2KNR)
-# $(ANSI2KNR) $< strerror_.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/ntp/libntp/a_md5encrypt.c b/contrib/ntp/libntp/a_md5encrypt.c
index b7f232203987..42513ef53480 100644
--- a/contrib/ntp/libntp/a_md5encrypt.c
+++ b/contrib/ntp/libntp/a_md5encrypt.c
@@ -8,22 +8,22 @@
* www.rsa.com.
*/
-#include "ntp_machine.h"
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <stdio.h>
-
-#include "ntp_types.h"
+#include "ntp_fp.h"
#include "ntp_string.h"
-#include "global.h"
-#include "md5.h"
#include "ntp_stdlib.h"
-#define BLOCK_OCTETS 16 /* message digest size */
+/* Disable the openssl md5 includes, because they'd clash with ours. */
+/* #define NO_MD5 */
+/* #define OPENSSL_NO_MD5 */
+#undef OPENSSL
+#include "ntp.h"
+#include "global.h"
+#include "ntp_md5.h"
/*
* MD5authencrypt - generate MD5 message authenticator
@@ -37,20 +37,18 @@ MD5authencrypt(
int length /* packet length */
)
{
- MD5_CTX ctx;
- u_char digest[BLOCK_OCTETS];
- int i;
+ MD5_CTX md5;
+ u_char digest[16];
/*
* MD5 with key identifier concatenated with packet.
*/
- MD5Init(&ctx);
- MD5Update(&ctx, key, (u_int)cache_keylen);
- MD5Update(&ctx, (u_char *)pkt, (u_int)length);
- MD5Final(digest, &ctx);
- i = length / 4;
- memmove((char *)&pkt[i + 1], (char *)digest, BLOCK_OCTETS);
- return (BLOCK_OCTETS + 4);
+ MD5Init(&md5);
+ MD5Update(&md5, key, (u_int)cache_keylen);
+ MD5Update(&md5, (u_char *)pkt, (u_int)length);
+ MD5Final(digest, &md5);
+ memmove((u_char *)pkt + length + 4, digest, 16);
+ return (16 + 4);
}
@@ -63,22 +61,44 @@ int
MD5authdecrypt(
u_char *key, /* key pointer */
u_int32 *pkt, /* packet pointer */
- int length, /* packet length */
+ int length, /* packet length */
int size /* MAC size */
)
{
- MD5_CTX ctx;
- u_char digest[BLOCK_OCTETS];
+ MD5_CTX md5;
+ u_char digest[16];
/*
* MD5 with key identifier concatenated with packet.
*/
- if (size != BLOCK_OCTETS + 4)
+ MD5Init(&md5);
+ MD5Update(&md5, key, (u_int)cache_keylen);
+ MD5Update(&md5, (u_char *)pkt, (u_int)length);
+ MD5Final(digest, &md5);
+ if (size != 16 + 4)
return (0);
- MD5Init(&ctx);
- MD5Update(&ctx, key, (u_int)cache_keylen);
- MD5Update(&ctx, (u_char *)pkt, (u_int)length);
- MD5Final(digest, &ctx);
- return (!memcmp((char *)digest, (char *)pkt + length + 4,
- BLOCK_OCTETS));
+ return (!memcmp(digest, (char *)pkt + length + 4, 16));
+}
+
+/*
+ * Calculate the reference id from the address. If it is an IPv4
+ * address, use it as is. If it is an IPv6 address, do a md5 on
+ * it and use the bottom 4 bytes.
+ */
+u_int32
+addr2refid(struct sockaddr_storage *addr)
+{
+ MD5_CTX md5;
+ u_char digest[16];
+ u_int32 addr_refid;
+
+ if (addr->ss_family == AF_INET)
+ return (GET_INADDR(*addr));
+
+ MD5Init(&md5);
+ MD5Update(&md5, (u_char *)&GET_INADDR6(*addr),
+ sizeof(struct in6_addr));
+ MD5Final(digest, &md5);
+ memcpy(&addr_refid, digest, 4);
+ return (htonl(addr_refid));
}
diff --git a/contrib/ntp/libntp/adjtime.c b/contrib/ntp/libntp/adjtime.c
index a9989f0ad3a0..f04145010ccb 100644
--- a/contrib/ntp/libntp/adjtime.c
+++ b/contrib/ntp/libntp/adjtime.c
@@ -1,5 +1,5 @@
#ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
#ifdef MPE
@@ -80,7 +80,7 @@ if (delta != NULL) {
/* Force new PDC time by starting an extra correction. */
set_time_correction(pdc_usecs_wanted - pdc_usecs_current,0,1);
}
-#endif
+#endif /* 0 */
/* Immediately jump the PDC time to the new value, and then initiate a
gradual MPE time correction slew. */
@@ -244,6 +244,80 @@ _adjtime(
return (0);
}
-#else /* not NEED_HPUX_ADJTIME */
+#else
+# if NEED_QNX_ADJTIME
+/*
+ * Emulate adjtime() using QNX ClockAdjust().
+ * Chris Burghart <burghart@atd.ucar.edu>, 11/2001
+ *
+ * This is a *very* simple implementation of adjtime() for QNX.
+ * ClockAdjust() is used to tweak the system clock by about +- 1/10
+ * of its current clock period per tick until the desired delta is
+ * achieved.
+ */
+# include <math.h>
+# include <stdio.h>
+# include <sys/neutrino.h>
+# include <sys/time.h>
+
+# include <ntp_stdlib.h>
+
+int
+adjtime (struct timeval *delta, struct timeval *olddelta)
+{
+ double delta_nsec;
+ double delta_nsec_old;
+ struct _clockadjust adj;
+ struct _clockadjust oldadj;
+ /*
+ * How many nanoseconds are we adjusting?
+ */
+ delta_nsec = delta->tv_sec * 1e9 + delta->tv_usec * 1000;
+ /*
+ * Build the adjust structure and call ClockAdjust()
+ */
+ if (delta_nsec != 0)
+ {
+ struct _clockperiod period;
+ long count;
+ long increment;
+
+ /*
+ * Get the current clock period (nanoseconds)
+ */
+ if (ClockPeriod (CLOCK_REALTIME, 0, &period, 0) < 0)
+ return -1;
+
+ /*
+ * Set the adjust increment to approximately 1/10 timer period per
+ * clock tick.
+ */
+ count = 1 + (long)(fabs(10 * delta_nsec / period.nsec));
+ increment = (long)(delta_nsec / count);
+
+ adj.tick_nsec_inc = increment;
+ adj.tick_count = count;
+ }
+ else
+ {
+ adj.tick_nsec_inc = 0;
+ adj.tick_count = 0;
+ }
+
+ if (ClockAdjust (CLOCK_REALTIME, &adj, &oldadj) < 0)
+ return -1;
+
+ /*
+ * Build olddelta
+ */
+ delta_nsec_old = oldadj.tick_count * oldadj.tick_nsec_inc;
+ olddelta->tv_sec = (int)(delta_nsec_old / 1e9);
+ olddelta->tv_usec = (int)((delta_nsec_old - 1.0e9 * olddelta->tv_sec) /
+ 1000);
+
+ return 0;
+}
+# else /* no special adjtime() needed */
int adjtime_bs;
-#endif /* not NEED_HPUX_ADJTIME */
+# endif
+#endif
diff --git a/contrib/ntp/libntp/audio.c b/contrib/ntp/libntp/audio.c
index 1fedb3ef103d..65a60634b5be 100644
--- a/contrib/ntp/libntp/audio.c
+++ b/contrib/ntp/libntp/audio.c
@@ -2,10 +2,11 @@
* audio.c - audio interface for reference clock audio drivers
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
-#if defined(HAVE_SYS_AUDIOIO_H) || defined(HAVE_SUN_AUDIOIO_H)
+#if defined(HAVE_SYS_AUDIOIO_H) || defined(HAVE_SUN_AUDIOIO_H) || \
+ defined(HAVE_SYS_SOUNDCARD_H) || defined(HAVE_MACHINE_SOUNDCARD_H)
#include "audio.h"
#include "ntp_stdlib.h"
@@ -17,34 +18,186 @@
#include "ntp_string.h"
#ifdef HAVE_SYS_AUDIOIO_H
-#include <sys/audioio.h>
+# include <sys/audioio.h>
#endif /* HAVE_SYS_AUDIOIO_H */
#ifdef HAVE_SUN_AUDIOIO_H
-#include <sys/ioccom.h>
-#include <sun/audioio.h>
+# include <sys/ioccom.h>
+# include <sun/audioio.h>
#endif /* HAVE_SUN_AUDIOIO_H */
#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
+# include <sys/ioctl.h>
#endif /* HAVE_SYS_IOCTL_H */
#include <fcntl.h>
+#ifdef HAVE_MACHINE_SOUNDCARD_H
+# include <machine/soundcard.h>
+# define PCM_STYLE_SOUND
+#else
+# ifdef HAVE_SYS_SOUNDCARD_H
+# include <sys/soundcard.h>
+# define PCM_STYLE_SOUND
+# endif
+#endif
+
+#ifdef PCM_STYLE_SOUND
+# include <ctype.h>
+#endif
+
/*
* Global variables
*/
#ifdef HAVE_SYS_AUDIOIO_H
static struct audio_device device; /* audio device ident */
#endif /* HAVE_SYS_AUDIOIO_H */
+#ifdef PCM_STYLE_SOUND
+# define INIT_FILE "/etc/ntp.audio"
+int agc = SOUND_MIXER_WRITE_RECLEV; /* or IGAIN or LINE */
+int monitor = SOUND_MIXER_WRITE_VOLUME; /* or OGAIN */
+int devmask = 0;
+int recmask = 0;
+char cf_c_dev[100], cf_i_dev[100], cf_agc[100], cf_monitor[100];
+
+const char *m_names[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES;
+#else /* not PCM_STYLE_SOUND */
static struct audio_info info; /* audio device info */
+#endif /* not PCM_STYLE_SOUND */
static int ctl_fd; /* audio control file descriptor */
+#ifdef PCM_STYLE_SOUND
+static void audio_config_read P((int, char **, char **));
+static int mixer_name P((const char *, int));
+
+
+int
+mixer_name(
+ const char *m_name,
+ int m_mask
+ )
+{
+ int i;
+
+ for (i = 0; i < SOUND_MIXER_NRDEVICES; ++i)
+ if (((1 << i) & m_mask)
+ && !strcmp(m_names[i], m_name))
+ break;
+
+ return (SOUND_MIXER_NRDEVICES == i)
+ ? -1
+ : i
+ ;
+}
+
+
+/*
+ * Check:
+ *
+ * /etc/ntp.audio# where # is the unit number
+ * /etc/ntp.audio.# where # is the unit number
+ * /etc/ntp.audio
+ *
+ * for contents of the form:
+ *
+ * idev /dev/input_device
+ * cdev /dev/control_device
+ * agc pcm_input_device {igain,line,line1,...}
+ * monitor pcm_monitor_device {ogain,...}
+ *
+ * The device names for the "agc" and "monitor" keywords
+ * can be found by running either the "mixer" program or the
+ * util/audio-pcm program.
+ *
+ * Great hunks of this subroutine were swiped from refclock_oncore.c
+ */
+static void
+audio_config_read(
+ int unit,
+ char **c_dev, /* Control device */
+ char **i_dev /* input device */
+ )
+{
+ FILE *fd;
+ char device[20], line[100], ab[100];
+
+ sprintf(device, "%s%d", INIT_FILE, unit);
+ if ((fd = fopen(device, "r")) == NULL) {
+ printf("audio_config_read: <%s> NO\n", device);
+ sprintf(device, "%s.%d", INIT_FILE, unit);
+ if ((fd = fopen(device, "r")) == NULL) {
+ printf("audio_config_read: <%s> NO\n", device);
+ sprintf(device, "%s.%d", INIT_FILE, unit);
+ if ((fd = fopen(device, "r")) == NULL) {
+ printf("audio_config_read: <%s> NO\n", device);
+ return;
+ }
+ }
+ }
+ printf("audio_config_read: reading <%s>\n", device);
+ while (fgets(line, sizeof line, fd)) {
+ char *cp, *cc, *ca;
+ int i;
+
+ /* Remove comments */
+ if ((cp = strchr(line, '#')))
+ *cp = '\0';
+
+ /* Remove any trailing spaces */
+ for (i = strlen(line);
+ i > 0 && isascii((int)line[i - 1]) && isspace((int)line[i - 1]);
+ )
+ line[--i] = '\0';
+
+ /* Remove leading space */
+ for (cc = line; *cc && isascii((int)*cc) && isspace((int)*cc); cc++)
+ continue;
+
+ /* Stop if nothing left */
+ if (!*cc)
+ continue;
+
+ /* Uppercase the command and find the arg */
+ for (ca = cc; *ca; ca++) {
+ if (isascii((int)*ca)) {
+ if (islower((int)*ca)) {
+ *ca = toupper(*ca);
+ } else if (isspace((int)*ca) || (*ca == '='))
+ break;
+ }
+ }
+
+ /* Remove space (and possible =) leading the arg */
+ for (; *ca && isascii((int)*ca) && (isspace((int)*ca) || (*ca == '=')); ca++)
+ continue;
+
+ if (!strncmp(cc, "IDEV", (size_t) 4)) {
+ sscanf(ca, "%s", ab);
+ strcpy(cf_i_dev, ab);
+ printf("idev <%s>\n", ab);
+ } else if (!strncmp(cc, "CDEV", (size_t) 4)) {
+ sscanf(ca, "%s", ab);
+ strcpy(cf_c_dev, ab);
+ printf("cdev <%s>\n", ab);
+ } else if (!strncmp(cc, "AGC", (size_t) 3)) {
+ sscanf(ca, "%s", ab);
+ strcpy(cf_agc, ab);
+ printf("agc <%s> %d\n", ab, i);
+ } else if (!strncmp(cc, "MONITOR", (size_t) 7)) {
+ sscanf(ca, "%s", ab);
+ strcpy(cf_monitor, ab);
+ printf("monitor <%s> %d\n", ab, mixer_name(ab, -1));
+ }
+ }
+ fclose(fd);
+ return;
+}
+#endif /* PCM_STYLE_SOUND */
/*
* audio_init - open and initialize audio device
*
- * This code works with SunOS 4.x and Solaris 2.x; however, it is
+ * This code works with SunOS 4.x, Solaris 2.x, and PCM; however, it is
* believed generic and applicable to other systems with a minor twid
* or two. All it does is open the device, set the buffer size (Solaris
* only), preset the gain and set the input port. It assumes that the
@@ -54,11 +207,41 @@ static int ctl_fd; /* audio control file descriptor */
*/
int
audio_init(
- char *dname /* device name */
+ char *dname, /* device name */
+ int bufsiz, /* buffer size */
+ int unit /* device unit (0-3) */
)
{
+#ifdef PCM_STYLE_SOUND
+# define ACTL_DEV "/dev/mixer%d"
+ char actl_dev[30];
+# ifdef HAVE_STRUCT_SND_SIZE
+ struct snd_size s_size;
+# endif
+# ifdef AIOGFMT
+ snd_chan_param s_c_p;
+# endif
+#endif
int fd;
int rval;
+ char *actl =
+#ifdef PCM_STYLE_SOUND
+ actl_dev
+#else
+ "/dev/audioctl"
+#endif
+ ;
+
+#ifdef PCM_STYLE_SOUND
+ (void)sprintf(actl_dev, ACTL_DEV, unit);
+
+ audio_config_read(unit, &actl, &dname);
+ /* If we have values for cf_c_dev or cf_i_dev, use them. */
+ if (*cf_c_dev)
+ dname = cf_c_dev;
+ if (*cf_i_dev)
+ actl = cf_i_dev;
+#endif
/*
* Open audio device. Do not complain if not there.
@@ -70,9 +253,9 @@ audio_init(
/*
* Open audio control device.
*/
- ctl_fd = open("/dev/audioctl", O_RDWR);
+ ctl_fd = open(actl, O_RDWR);
if (ctl_fd < 0) {
- msyslog(LOG_ERR, "audio: invalid control device\n");
+ msyslog(LOG_ERR, "audio_init: invalid control device <%s>\n", actl);
close(fd);
return(ctl_fd);
}
@@ -80,42 +263,181 @@ audio_init(
/*
* Set audio device parameters.
*/
- rval = audio_gain((AUDIO_MAX_GAIN - AUDIO_MIN_GAIN) / 2,
- AUDIO_MICROPHONE);
+#ifdef PCM_STYLE_SOUND
+ printf("audio_init: <%s> bufsiz %d\n", dname, bufsiz);
+ rval = fd;
+
+# ifdef HAVE_STRUCT_SND_SIZE
+ if (ioctl(fd, AIOGSIZE, &s_size) == -1)
+ printf("audio_init: AIOGSIZE: %s\n", strerror(errno));
+ else
+ printf("audio_init: orig: play_size %d, rec_size %d\n",
+ s_size.play_size, s_size.rec_size);
+
+ s_size.play_size = s_size.rec_size = bufsiz;
+ printf("audio_init: want: play_size %d, rec_size %d\n",
+ s_size.play_size, s_size.rec_size);
+
+ if (ioctl(fd, AIOSSIZE, &s_size) == -1)
+ printf("audio_init: AIOSSIZE: %s\n", strerror(errno));
+ else
+ printf("audio_init: set: play_size %d, rec_size %d\n",
+ s_size.play_size, s_size.rec_size);
+# endif /* HAVE_STRUCT_SND_SIZE */
+
+# ifdef AIOGFMT
+ if (ioctl(fd, AIOGFMT, &s_c_p) == -1)
+ printf("audio_init: AIOGFMT: %s\n", strerror(errno));
+ else
+ printf("audio_init: play_rate %lu, rec_rate %lu, play_format %#lx, rec_format %#lx\n",
+ s_c_p.play_rate, s_c_p.rec_rate, s_c_p.play_format, s_c_p.rec_format);
+# endif
+
+ /* Grab the device and record masks */
+
+ if (ioctl(ctl_fd, SOUND_MIXER_READ_DEVMASK, &devmask) == -1)
+ printf("SOUND_MIXER_READ_DEVMASK: %s\n", strerror(errno));
+ if (ioctl(ctl_fd, SOUND_MIXER_READ_RECMASK, &recmask) == -1)
+ printf("SOUND_MIXER_READ_RECMASK: %s\n", strerror(errno));
+
+ /* validate and set any specified config file stuff */
+ if (*cf_agc) {
+ int i;
+
+ i = mixer_name(cf_agc, recmask);
+ if (i >= 0)
+ agc = MIXER_WRITE(i);
+ else
+ printf("input %s not in recmask %#x\n",
+ cf_agc, recmask);
+ }
+
+ if (*cf_monitor) {
+ int i;
+
+ /* devmask */
+ i = mixer_name(cf_monitor, devmask);
+ if (i >= 0)
+ monitor = MIXER_WRITE(i);
+ else
+ printf("monitor %s not in devmask %#x\n",
+ cf_monitor, devmask);
+ }
+
+#else /* not PCM_STYLE_SOUND */
+ AUDIO_INITINFO(&info);
+ info.play.gain = AUDIO_MAX_GAIN;
+ info.play.port = AUDIO_SPEAKER;
+# ifdef HAVE_SYS_AUDIOIO_H
+ info.record.buffer_size = bufsiz;
+# endif /* HAVE_SYS_AUDIOIO_H */
+ rval = ioctl(ctl_fd, (int)AUDIO_SETINFO, (char *)&info);
if (rval < 0) {
msyslog(LOG_ERR, "audio: invalid control device parameters\n");
close(ctl_fd);
close(fd);
return(rval);
}
- return (fd);
+ rval = fd;
+#endif /* not PCM_STYLE_SOUND */
+ return (rval);
}
/*
- * audio_gain - adjust codec gain and port
+ * audio_gain - adjust codec gains and port
*/
int
audio_gain(
- int gain, /* gain 0-255 */
- int port /* port */
+ int gain, /* volume level (gain) 0-255 */
+ int mongain, /* input to output mix (monitor gain) 0-255 */
+ int port /* selected I/O port: 1 mic/2 line in */
)
{
int rval;
+ static int o_mongain = -1;
+ static int o_port = -1;
- AUDIO_INITINFO(&info);
-#ifdef HAVE_SYS_AUDIOIO_H
- info.record.buffer_size = AUDIO_BUFSIZ;
-#endif /* HAVE_SYS_AUDIOIO_H */
- info.record.gain = gain;
- info.record.port = port;
+#ifdef PCM_STYLE_SOUND
+ int l, r;
+
+ rval = 0;
+
+ r = l = 100 * gain / 255; /* Normalize to 0-100 */
+# ifdef DEBUG
+ if (debug > 1)
+ printf("audio_gain: gain %d/%d\n", gain, l);
+# endif
+ /* figure out what channel(s) to use. just nuke right for now. */
+ r = 0 ; /* setting to zero nicely mutes the channel */
+
+ l |= r << 8;
+ if (port == 2) {
+ rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_LINE, &l);
+ } else {
+ rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_MIC, &l);
+ }
+ if (rval == -1) {
+ printf("audio_gain: agc write: %s\n", strerror(errno));
+ return (rval);
+ }
+
+ if (o_mongain != mongain) {
+ r = l = 100 * mongain / 255; /* Normalize to 0-100 */
+# ifdef DEBUG
+ if (debug > 1)
+ printf("audio_gain: mongain %d/%d\n", mongain, l);
+# endif
+ l |= r << 8;
+ rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_VOLUME, &l);
+ if (rval == -1) {
+ printf("audio_gain: mongain write: %s\n",
+ strerror(errno));
+ return (rval);
+ }
+ o_mongain = mongain;
+ }
+
+ if (o_port != port) {
+# ifdef DEBUG
+ if (debug > 1)
+ printf("audio_gain: port %d\n", port);
+# endif
+ l = (1 << ((port == 2) ? SOUND_MIXER_LINE : SOUND_MIXER_MIC));
+ rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_RECSRC, &l);
+ if (rval == -1) {
+ printf("SOUND_MIXER_WRITE_RECSRC: %s\n",
+ strerror(errno));
+ return (rval);
+ }
+# ifdef DEBUG
+ if (debug > 1) {
+ if (ioctl(ctl_fd, SOUND_MIXER_READ_RECSRC, &l) == -1)
+ printf("SOUND_MIXER_WRITE_RECSRC: %s\n",
+ strerror(errno));
+ else
+ printf("audio_gain: recsrc is %d\n", l);
+ }
+# endif
+ o_port = port;
+ }
+#else /* not PCM_STYLE_SOUND */
+ ioctl(ctl_fd, (int)AUDIO_GETINFO, (char *)&info);
+ info.record.encoding = AUDIO_ENCODING_ULAW;
info.record.error = 0;
- rval = ioctl(ctl_fd, (int)AUDIO_SETINFO, &info);
+ info.record.gain = gain;
+ if (o_mongain != mongain)
+ o_mongain = info.monitor_gain = mongain;
+ if (o_port != port)
+ o_port = info.record.port = port;
+ rval = ioctl(ctl_fd, (int)AUDIO_SETINFO, (char *)&info);
if (rval < 0) {
msyslog(LOG_ERR, "audio_gain: %m");
return (rval);
}
- return (info.record.error);
+ rval = info.record.error;
+#endif /* not PCM_STYLE_SOUND */
+ return (rval);
}
@@ -128,23 +450,32 @@ audio_gain(
void
audio_show(void)
{
-#ifdef HAVE_SYS_AUDIOIO_H
+#ifdef PCM_STYLE_SOUND
+ int recsrc = 0;
+
+ printf("audio_show: ctl_fd %d\n", ctl_fd);
+ if (ioctl(ctl_fd, SOUND_MIXER_READ_RECSRC, &recsrc) == -1)
+ printf("SOUND_MIXER_READ_RECSRC: %s\n", strerror(errno));
+
+#else /* not PCM_STYLE_SOUND */
+# ifdef HAVE_SYS_AUDIOIO_H
ioctl(ctl_fd, (int)AUDIO_GETDEV, &device);
printf("audio: name %s, version %s, config %s\n",
device.name, device.version, device.config);
-#endif /* HAVE_SYS_AUDIOIO_H */
- ioctl(ctl_fd, (int)AUDIO_GETINFO, &info);
+# endif /* HAVE_SYS_AUDIOIO_H */
+ ioctl(ctl_fd, (int)AUDIO_GETINFO, (char *)&info);
printf(
- "audio: samples %d, channels %d, precision %d, encoding %d, gain %d, port %d\n",
+ "audio: rate %d, chan %d, prec %d, code %d, gain %d, mon %d, port %d\n",
info.record.sample_rate, info.record.channels,
info.record.precision, info.record.encoding,
- info.record.gain, info.record.port);
+ info.record.gain, info.monitor_gain, info.record.port);
printf(
"audio: samples %d, eof %d, pause %d, error %d, waiting %d, balance %d\n",
info.record.samples, info.record.eof,
info.record.pause, info.record.error,
info.record.waiting, info.record.balance);
+#endif /* not PCM_STYLE_SOUND */
}
#else
int audio_bs;
-#endif /* HAVE_SYS_AUDIOIO_H HAVE_SUN_AUDIOIO_H */
+#endif /* HAVE_{SYS_AUDIOIO,SUN_AUDIOIO,MACHINE_SOUNDCARD,SYS_SOUNDCARD}_H */
diff --git a/contrib/ntp/libntp/authkeys.c b/contrib/ntp/libntp/authkeys.c
index f35d91c6214a..1c954446802e 100644
--- a/contrib/ntp/libntp/authkeys.c
+++ b/contrib/ntp/libntp/authkeys.c
@@ -23,9 +23,6 @@ struct savekey {
struct savekey *next;
union {
long bogon; /* Make sure nonempty */
-#ifdef DES
- u_int32 DES_key[2]; /* DES key */
-#endif
u_char MD5_key[32]; /* MD5 key */
} k;
keyid_t keyid; /* key identifier */
@@ -35,7 +32,6 @@ struct savekey {
};
#define KEY_TRUSTED 0x001 /* this key is trusted */
-#define KEY_DES 0x100 /* this is a DES type key */
#define KEY_MD5 0x200 /* this is a MD5 type key */
/*
@@ -168,12 +164,6 @@ authhavekey(
cache_keylen = sk->keylen;
return (1);
}
-#ifdef DES
- if (sk->flags & KEY_DES) {
- cache_key = (u_char *)sk->k.DES_key;
- return (1);
- }
-#endif
return (0);
}
@@ -308,60 +298,6 @@ authistrusted(
}
-
-#ifdef DES
-/*
- * DESauth_setkey - set a key into the key array
- */
-void
-DESauth_setkey(
- keyid_t keyno,
- const u_int32 *key
- )
-{
- struct savekey *sk;
-
- /*
- * See if we already have the key. If so just stick in the
- * new value.
- */
- sk = key_hash[KEYHASH(keyno)];
- while (sk != 0) {
- if (keyno == sk->keyid) {
- sk->k.DES_key[0] = key[0];
- sk->k.DES_key[1] = key[1];
- sk->flags |= KEY_DES;
- if (cache_keyid == keyno)
- cache_flags = 0;
- cache_keyid = 0;
- return;
- }
- sk = sk->next;
- }
-
- /*
- * Need to allocate new structure. Do it.
- */
- if (authnumfreekeys == 0) {
- if (auth_moremem() == 0)
- return;
- }
- sk = authfreekeys;
- authfreekeys = sk->next;
- authnumfreekeys--;
-
- sk->k.DES_key[0] = key[0];
- sk->k.DES_key[1] = key[1];
- sk->keyid = keyno;
- sk->flags = KEY_DES;
- sk->lifetime = 0;
- sk->next = key_hash[KEYHASH(keyno)];
- key_hash[KEYHASH(keyno)] = sk;
- authnumkeys++;
- return;
-}
-#endif
-
void
MD5auth_setkey(
keyid_t keyno,
@@ -438,9 +374,10 @@ auth_delkeys(void)
*/
while (sk != 0 && sk->keyid <= NTP_MAXKEY) {
/*
- * Don't loose info which keys are trusted.
+ * Don't lose info as to which keys are trusted.
*/
if (sk->flags & KEY_TRUSTED) {
+ skp = &(sk->next);
memset(&sk->k, 0, sizeof(sk->k));
sk->lifetime = 0;
sk->keylen = 0;
@@ -512,11 +449,6 @@ authencrypt(
if (!authhavekey(keyno))
return (0);
-#ifdef DES
- if (cache_flags & KEY_DES)
- return (DESauthencrypt(cache_key, pkt, length));
-#endif
-
if (cache_flags & KEY_MD5)
return (MD5authencrypt(cache_key, pkt, length));
@@ -549,11 +481,6 @@ authdecrypt(
if (!authhavekey(keyno) || size < 4)
return (0);
-#ifdef DES
- if (cache_flags & KEY_DES)
- return (DESauthdecrypt(cache_key, pkt, length, size));
-#endif
-
if (cache_flags & KEY_MD5)
return (MD5authdecrypt(cache_key, pkt, length, size));
diff --git a/contrib/ntp/libntp/authreadkeys.c b/contrib/ntp/libntp/authreadkeys.c
index ce5cefbb90ae..22020f3f853a 100644
--- a/contrib/ntp/libntp/authreadkeys.c
+++ b/contrib/ntp/libntp/authreadkeys.c
@@ -9,19 +9,6 @@
#include "ntp_syslog.h"
#include "ntp_stdlib.h"
-#ifdef DES
-/*
- * Types of ascii representations for keys. "Standard" means a 64 bit
- * hex number in NBS format, i.e. with the low order bit of each byte
- * a parity bit. "NTP" means a 64 bit key in NTP format, with the
- * high order bit of each byte a parity bit. "Ascii" means a 1-to-8
- * character string whose ascii representation is used as the key.
- */
-#define KEY_TYPE_STD 1
-#define KEY_TYPE_NTP 2
-#define KEY_TYPE_ASCII 3
-#endif
-
/*
* Arbitrary long string of ASCII characters.
*/
@@ -140,19 +127,6 @@ authreadkeys(
continue;
}
switch (*token) {
-#ifdef DES
- case 'S':
- case 's':
- keytype = KEY_TYPE_STD; break;
-
- case 'N':
- case 'n':
- keytype = KEY_TYPE_NTP; break;
-
- case 'A':
- case 'a':
- keytype = KEY_TYPE_ASCII; break;
-#endif
case 'M':
case 'm':
keytype = KEY_TYPE_MD5; break;
@@ -173,17 +147,6 @@ authreadkeys(
keyno);
} else {
switch(keytype) {
-#ifdef DES
- case KEY_TYPE_STD:
- case KEY_TYPE_NTP:
- case KEY_TYPE_ASCII:
- if (!authusekey(keyno, keytype,
- (u_char *)token))
- msyslog(LOG_ERR,
- "format/parity error for DES key %ld, not used",
- keyno);
- break;
-#endif
case KEY_TYPE_MD5:
if (!authusekey(keyno, keytype,
(u_char *)token))
diff --git a/contrib/ntp/libntp/authusekey.c b/contrib/ntp/libntp/authusekey.c
index 18b8ba00ecab..40dd3737ddf2 100644
--- a/contrib/ntp/libntp/authusekey.c
+++ b/contrib/ntp/libntp/authusekey.c
@@ -15,14 +15,6 @@
* high order bit of each byte a parity bit. "Ascii" means a 1-to-8
* character string whose ascii representation is used as the key.
*/
-#ifdef DES
-#define KEY_TYPE_STD 1
-#define KEY_TYPE_NTP 2
-#define KEY_TYPE_ASCII 3
-
-#define STD_PARITY_BITS ((unsigned)0x01010101)
-
-#endif
#define KEY_TYPE_MD5 4
@@ -33,13 +25,6 @@ authusekey(
const u_char *str
)
{
-#ifdef DES
- u_int32 key[2];
- u_char keybytes[8];
- char *xdigit;
- int i;
- static const char *hex = "0123456789abcdef";
-#endif
const u_char *cp;
int len;
@@ -49,74 +34,6 @@ authusekey(
return 0;
switch(keytype) {
-#ifdef DES
- case KEY_TYPE_STD:
- case KEY_TYPE_NTP:
- if (len != 16) /* Lazy. Should define constant */
- return 0;
- /*
- * Decode hex key.
- */
- key[0] = 0;
- key[1] = 0;
- for (i = 0; i < 16; i++) {
- if (!isascii(*cp))
- return 0;
- xdigit = strchr(hex, isupper(*cp) ? tolower(*cp) : *cp);
- cp++;
- if (xdigit == 0)
- return 0;
- key[i>>3] <<= 4;
- key[i>>3] |= (u_int32)(xdigit - hex) & 0xf;
- }
-
- /*
- * If this is an NTP format key, put it into NBS format
- */
- if (keytype == KEY_TYPE_NTP) {
- for (i = 0; i < 2; i++)
- key[i] = ((key[i] << 1) & ~STD_PARITY_BITS)
- | ((key[i] >> 7) & STD_PARITY_BITS);
- }
-
- /*
- * Check the parity, reject the key if the check fails
- */
- if (!DESauth_parity(key)) {
- return 0;
- }
-
- /*
- * We can't find a good reason not to use this key.
- * So use it.
- */
- DESauth_setkey(keyno, key);
- break;
-
- case KEY_TYPE_ASCII:
- /*
- * Make up key from ascii representation
- */
- memset((char *) keybytes, 0, sizeof(keybytes));
- for (i = 0; i < 8 && i < len; i++)
- keybytes[i] = *cp++ << 1;
- key[0] = (u_int32)keybytes[0] << 24 | (u_int32)keybytes[1] << 16
- | (u_int32)keybytes[2] << 8 | (u_int32)keybytes[3];
- key[1] = (u_int32)keybytes[4] << 24 | (u_int32)keybytes[5] << 16
- | (u_int32)keybytes[6] << 8 | (u_int32)keybytes[7];
-
- /*
- * Set parity on key
- */
- (void)DESauth_parity(key);
-
- /*
- * Now set key in.
- */
- DESauth_setkey(keyno, key);
- break;
-#endif
-
case KEY_TYPE_MD5:
MD5auth_setkey(keyno, str, (int)strlen((const char *)str));
break;
diff --git a/contrib/ntp/libntp/binio.c b/contrib/ntp/libntp/binio.c
index cc3b408df9e8..bbaf06f4e002 100644
--- a/contrib/ntp/libntp/binio.c
+++ b/contrib/ntp/libntp/binio.c
@@ -27,8 +27,8 @@ put_lsb_short(
long val
)
{
- *((*bufpp)++) = val & 0xFF;
- *((*bufpp)++) = (val >> 8) & 0xFF;
+ *((*bufpp)++) = (unsigned char) (val & 0xFF);
+ *((*bufpp)++) = (unsigned char) ((val >> 8) & 0xFF);
}
long
@@ -52,10 +52,10 @@ put_lsb_long(
long val
)
{
- *((*bufpp)++) = val & 0xFF;
- *((*bufpp)++) = (val >> 8) & 0xFF;
- *((*bufpp)++) = (val >> 16) & 0xFF;
- *((*bufpp)++) = (val >> 24) & 0xFF;
+ *((*bufpp)++) = (unsigned char)(val & 0xFF);
+ *((*bufpp)++) = (unsigned char)((val >> 8) & 0xFF);
+ *((*bufpp)++) = (unsigned char)((val >> 16) & 0xFF);
+ *((*bufpp)++) = (unsigned char)((val >> 24) & 0xFF);
}
long
@@ -77,8 +77,8 @@ put_msb_short(
long val
)
{
- *((*bufpp)++) = (val >> 8) & 0xFF;
- *((*bufpp)++) = val & 0xFF;
+ *((*bufpp)++) = (unsigned char)((val >> 8) & 0xFF);
+ *((*bufpp)++) = (unsigned char)( val & 0xFF);
}
long
@@ -102,10 +102,10 @@ put_msb_long(
long val
)
{
- *((*bufpp)++) = (val >> 24) & 0xFF;
- *((*bufpp)++) = (val >> 16) & 0xFF;
- *((*bufpp)++) = (val >> 8 ) & 0xFF;
- *((*bufpp)++) = val & 0xFF;
+ *((*bufpp)++) = (unsigned char)((val >> 24) & 0xFF);
+ *((*bufpp)++) = (unsigned char)((val >> 16) & 0xFF);
+ *((*bufpp)++) = (unsigned char)((val >> 8 ) & 0xFF);
+ *((*bufpp)++) = (unsigned char)( val & 0xFF);
}
/*
diff --git a/contrib/ntp/libntp/caljulian.c b/contrib/ntp/libntp/caljulian.c
index 948bb1c57dd8..c3b5e671fc54 100644
--- a/contrib/ntp/libntp/caljulian.c
+++ b/contrib/ntp/libntp/caljulian.c
@@ -110,6 +110,6 @@ caljulian(
break;
}
jt->month++;
- jt->monthday = monthday;
+ jt->monthday = (u_char) monthday;
}
}
diff --git a/contrib/ntp/libntp/clocktypes.c b/contrib/ntp/libntp/clocktypes.c
index ec99ba881467..928851f24d2c 100644
--- a/contrib/ntp/libntp/clocktypes.c
+++ b/contrib/ntp/libntp/clocktypes.c
@@ -84,17 +84,17 @@ struct clktype clktypes[] = {
"PCF"},
{ REFCLK_WWV_AUDIO, "WWV/H Audio Demodulator/Decoder (36)",
"WWV_AUDIO"},
- { REFCLK_FG, "Forum Graphic GPS Dating Station (37)",
+ { REFCLK_FG, "Forum Graphic GPS Dating Station (37)",
"GPS_FG"},
{ REFCLK_HOPF_SERIAL, "hopf Elektronic serial line receiver (38)",
"HOPF_S"},
{ REFCLK_HOPF_PCI, "hopf Elektronic PCI receiver (39)",
"HOPF_P"},
- { REFCLK_JJY, "JJY receiver (40)",
- "JJY" },
+ { REFCLK_JJY, "JJY receiver (40)",
+ "JJY"},
{ REFCLK_TT560, "TrueTime 560 IRIG-B decoder (41)",
"TT_IRIG"},
- { REFCLK_ZYFER, "Zyfer GPStarplus receiver (42)",
+ { REFCLK_ZYFER, "Zyfer GPStarplus receiver (42)",
"GPS_ZYFER" },
{ REFCLK_RIPENCC, "RIPE NCC Trimble driver (43)",
"GPS_RIPENCC" },
diff --git a/contrib/ntp/libntp/decodenetnum.c b/contrib/ntp/libntp/decodenetnum.c
index a24e4933af91..4accf4a451c1 100644
--- a/contrib/ntp/libntp/decodenetnum.c
+++ b/contrib/ntp/libntp/decodenetnum.c
@@ -5,55 +5,36 @@
#include <ctype.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <netdb.h>
#include "ntp_stdlib.h"
int
decodenetnum(
const char *num,
- u_int32 *netnum
+ struct sockaddr_storage *netnum
)
{
+ struct addrinfo hints, *ai = NULL;
+ register int err, i;
register const char *cp;
- register char *bp;
- register int i;
- register int temp;
- register int eos;
- char buf[80]; /* will core dump on really stupid stuff */
+ char name[80];
cp = num;
- *netnum = 0;
if (*cp == '[') {
- eos = ']';
cp++;
- } else {
- eos = '\0';
+ for (i = 0; *cp != ']'; cp++, i++)
+ name[i] = *cp;
+ name[i] = '\0';
+ num = name;
}
-
- for (i = 0; i < 4; i++) {
- bp = buf;
- while (isdigit((int)*cp))
- *bp++ = *cp++;
- if (bp == buf)
- break;
-
- if (i < 3) {
- if (*cp++ != '.')
- break;
- } else if (*cp != eos)
- break;
-
- *bp = '\0';
- temp = atoi(buf);
- if (temp > 255)
- break;
- *netnum <<= 8;
- *netnum += temp;
- }
-
- if (i < 4)
- return 0;
- *netnum = htonl(*netnum);
+ memset(&hints, 0, sizeof(struct addrinfo));
+ hints.ai_flags = AI_NUMERICHOST;
+ err = getaddrinfo(num, NULL, &hints, &ai);
+ if (err != 0)
+ return 0;
+ memcpy(netnum, (struct sockaddr_storage *)ai->ai_addr, ai->ai_addrlen);
+ freeaddrinfo(ai);
return 1;
}
diff --git a/contrib/ntp/libntp/dofptoa.c b/contrib/ntp/libntp/dofptoa.c
index caa099746145..0f96909f1175 100644
--- a/contrib/ntp/libntp/dofptoa.c
+++ b/contrib/ntp/libntp/dofptoa.c
@@ -12,7 +12,7 @@ char *
dofptoa(
u_fp fpv,
int neg,
- int ndec,
+ short ndec,
int msec
)
{
@@ -53,8 +53,8 @@ dofptoa(
do {
tmp = sv;
- sv /= ten;
- *(--cp) = tmp - ((sv<<3) + (sv<<1));
+ sv = (u_short) (sv/ten);
+ *(--cp) = (u_char)(tmp - ((sv<<3) + (sv<<1)));
} while (sv != 0);
}
@@ -62,7 +62,7 @@ dofptoa(
* Figure out how much of the fraction to do
*/
if (msec) {
- dec = ndec + 3;
+ dec = (short)(ndec + 3);
if (dec < 3)
dec = 3;
cpdec = &cbuf[8];
diff --git a/contrib/ntp/libntp/dolfptoa.c b/contrib/ntp/libntp/dolfptoa.c
index 5602331ad945..7c92a305aca3 100644
--- a/contrib/ntp/libntp/dolfptoa.c
+++ b/contrib/ntp/libntp/dolfptoa.c
@@ -13,7 +13,7 @@ dolfptoa(
u_long fpi,
u_long fpv,
int neg,
- int ndec,
+ short ndec,
int msec
)
{
@@ -59,8 +59,8 @@ dolfptoa(
do {
stmp = swork;
- swork /= sten;
- stmp -= (swork<<3) + (swork<<1);
+ swork = (u_short) (swork/sten);
+ stmp = (u_short)(stmp - ((swork<<3) + (swork<<1)));
*--cp = (u_char)stmp;
} while (swork != 0);
}
diff --git a/contrib/ntp/libntp/fptoa.c b/contrib/ntp/libntp/fptoa.c
index f0247ddcdf86..025ad21e55b4 100644
--- a/contrib/ntp/libntp/fptoa.c
+++ b/contrib/ntp/libntp/fptoa.c
@@ -7,7 +7,7 @@
char *
fptoa(
s_fp fpv,
- int ndec
+ short ndec
)
{
u_fp plusfp;
diff --git a/contrib/ntp/libntp/fptoms.c b/contrib/ntp/libntp/fptoms.c
index 4d371aadef45..0bfca5556160 100644
--- a/contrib/ntp/libntp/fptoms.c
+++ b/contrib/ntp/libntp/fptoms.c
@@ -6,7 +6,7 @@
char *
fptoms(
s_fp fpv,
- int ndec
+ short ndec
)
{
u_fp plusfp;
diff --git a/contrib/ntp/libntp/humandate.c b/contrib/ntp/libntp/humandate.c
index 7995633be4d3..52f5af1661a9 100644
--- a/contrib/ntp/libntp/humandate.c
+++ b/contrib/ntp/libntp/humandate.c
@@ -24,11 +24,14 @@ humandate(
struct tm *tm;
time_t sec;
- LIB_GETBUF(bp);
-
sec = ntptime - JAN_1970;
tm = localtime(&sec);
+ if (!tm)
+ return "--- --- -- ---- --:--:--";
+
+ LIB_GETBUF(bp);
+
(void) sprintf(bp, "%s, %s %2d %4d %2d:%02d:%02d",
days[tm->tm_wday], months[tm->tm_mon], tm->tm_mday,
1900+tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec);
@@ -47,6 +50,9 @@ humanlogtime(void)
time_t cursec = time((time_t *) 0);
struct tm *tm = localtime(&cursec);
+ if (!tm)
+ return "-- --- --:--:--";
+
LIB_GETBUF(bp);
(void) sprintf(bp, "%2d %s %02d:%02d:%02d",
diff --git a/contrib/ntp/libntp/icom.c b/contrib/ntp/libntp/icom.c
index 3b9a9a5d00df..5c1a9a34b027 100644
--- a/contrib/ntp/libntp/icom.c
+++ b/contrib/ntp/libntp/icom.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include "ntp_tty.h"
+#include "l_stdlib.h"
/*
* Scraps
diff --git a/contrib/ntp/libntp/ieee754io.c b/contrib/ntp/libntp/ieee754io.c
index 4aa9920a3278..979fed9b4384 100644
--- a/contrib/ntp/libntp/ieee754io.c
+++ b/contrib/ntp/libntp/ieee754io.c
@@ -139,7 +139,7 @@ fetch_ieee754(
unsigned int sign;
unsigned int bias;
unsigned int maxexp;
- unsigned int mbits;
+ int mbits;
u_long mantissa_low;
u_long mantissa_high;
u_long characteristic;
diff --git a/contrib/ntp/libntp/iosignal.c b/contrib/ntp/libntp/iosignal.c
index cda5e96056bb..bcad890e5267 100644
--- a/contrib/ntp/libntp/iosignal.c
+++ b/contrib/ntp/libntp/iosignal.c
@@ -1,5 +1,5 @@
/*
- * ntp_io.c - input/output routines for ntpd. The socket-opening code
+ * iosignal.c - input/output routines for ntpd. The socket-opening code
* was shamelessly stolen from ntpd.
*/
@@ -50,8 +50,8 @@ extern void input_handler P((l_fp *));
* Some systems (MOST) define SIGPOLL == SIGIO, others SIGIO == SIGPOLL, and
* a few have separate SIGIO and SIGPOLL signals. This code checks for the
* SIGIO == SIGPOLL case at compile time.
- * Do not defined USE_SIGPOLL or USE_SIGIO.
- * these are interal only to ntp_io.c!
+ * Do not define USE_SIGPOLL or USE_SIGIO.
+ * these are interal only to iosignal.c!
*/
# if defined(USE_SIGPOLL)
# undef USE_SIGPOLL
@@ -68,6 +68,12 @@ extern void input_handler P((l_fp *));
# define USE_SIGIO
# endif
+# ifdef __QNXNTO__
+# include <fcntl.h>
+# include <unix.h>
+# define FNDELAY O_NDELAY
+# endif
+
# if defined(USE_SIGIO) && defined(USE_SIGPOLL)
# if SIGIO == SIGPOLL
# define USE_SIGIO
diff --git a/contrib/ntp/libntp/log.c b/contrib/ntp/libntp/log.c
index e694361d5fe7..991b498e9b4a 100644
--- a/contrib/ntp/libntp/log.c
+++ b/contrib/ntp/libntp/log.c
@@ -1,9 +1,14 @@
/* Microsoft Developer Support Copyright (c) 1993 Microsoft Corporation. */
+/* Skip asynch rpc inclusion */
+#ifndef __RPCASYNC_H__
+#define __RPCASYNC_H__
+#endif
+
+#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <windows.h>
#include "messages.h"
#include "log.h"
@@ -13,7 +18,7 @@
/*********************************************************************
-* FUNCTION: addSourceToRegistry(void) *
+* FUNCTION: addSourceToRegistry(LPSTR pszAppname, LPSTR pszMsgDLL) *
* *
* PURPOSE: Add a source name key, message DLL name value, and *
* message type supported value to the registry *
@@ -28,6 +33,8 @@ void addSourceToRegistry(LPSTR pszAppname, LPSTR pszMsgDLL)
HKEY hk; /* registry key handle */
DWORD dwData;
BOOL bSuccess;
+ char regarray[200];
+ char *lpregarray = regarray;
/* When an application uses the RegisterEventSource or OpenEventLog
function to get a handle of an event log, the event loggging service
@@ -36,9 +43,11 @@ void addSourceToRegistry(LPSTR pszAppname, LPSTR pszMsgDLL)
under the Application key and adding registry values to the new
subkey. */
+ strcpy(lpregarray, "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\");
+ strcat(lpregarray, pszAppname);
+
/* Create a new key for our application */
- bSuccess = RegCreateKey(HKEY_LOCAL_MACHINE,
- "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\NTP", &hk);
+ bSuccess = RegCreateKey(HKEY_LOCAL_MACHINE,lpregarray, &hk);
PERR(bSuccess == ERROR_SUCCESS, "RegCreateKey");
/* Add the Event-ID message-file name to the subkey. */
diff --git a/contrib/ntp/libntp/machines.c b/contrib/ntp/libntp/machines.c
index d0db63c7c9cb..9e318bf29088 100644
--- a/contrib/ntp/libntp/machines.c
+++ b/contrib/ntp/libntp/machines.c
@@ -18,7 +18,7 @@
#endif
#ifdef SYS_WINNT
-# include <conio.h>
+int _getch(void); /* Declare the one function rather than include conio.h */
#else
#ifdef SYS_VXWORKS
@@ -445,7 +445,15 @@ ntp_set_tod(
#endif /* HAVE_CLOCK_SETTIME */
#ifdef HAVE_SETTIMEOFDAY
if (rc) {
+ struct timeval adjtv;
+
set_tod_using = "settimeofday";
+ /*
+ * Some broken systems don't reset adjtime() when the
+ * clock is stepped.
+ */
+ adjtv.tv_sec = adjtv.tv_usec = 0;
+ adjtime(&adjtv, NULL);
rc = SETTIMEOFDAY(tvp, tzp);
#ifdef DEBUG
if (debug) {
diff --git a/contrib/ntp/libntp/md5c.c b/contrib/ntp/libntp/md5c.c
index 00b3c6bb0b84..07eec6c2f748 100644
--- a/contrib/ntp/libntp/md5c.c
+++ b/contrib/ntp/libntp/md5c.c
@@ -24,7 +24,8 @@
*/
#include "global.h"
-#include "md5.h"
+#ifndef HAVE_MD5INIT
+#include "ntp_md5.h"
/* Constants for MD5Transform routine.
*/
@@ -122,10 +123,10 @@ MD5Update (
unsigned int inputLen /* length of input block */
)
{
- unsigned int i, index, partLen;
+ unsigned int i, idx, partLen;
/* Compute number of bytes mod 64 */
- index = (unsigned int)((context->count[0] >> 3) & 0x3F);
+ idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
if ((context->count[0] += ((UINT4)inputLen << 3))
@@ -133,26 +134,26 @@ MD5Update (
context->count[1]++;
context->count[1] += ((UINT4)inputLen >> 29);
- partLen = 64 - index;
+ partLen = 64 - idx;
/* Transform as many times as possible.
*/
if (inputLen >= partLen) {
MD5_memcpy
- ((POINTER)&context->buffer[index], (POINTER)input, partLen);
+ ((POINTER)&context->buffer[idx], (POINTER)input, partLen);
MD5Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD5Transform (context->state, &input[i]);
- index = 0;
+ idx = 0;
}
else
i = 0;
/* Buffer remaining input */
MD5_memcpy
- ((POINTER)&context->buffer[index], (POINTER)&input[i],
+ ((POINTER)&context->buffer[idx], (POINTER)&input[i],
inputLen-i);
}
@@ -166,15 +167,15 @@ MD5Final (
)
{
unsigned char bits[8];
- unsigned int index, padLen;
+ unsigned int idx, padLen;
/* Save number of bits */
Encode (bits, context->count, 8);
/* Pad out to 56 mod 64.
*/
- index = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (index < 56) ? (56 - index) : (120 - index);
+ idx = (unsigned int)((context->count[0] >> 3) & 0x3f);
+ padLen = (idx < 56) ? (56 - idx) : (120 - idx);
MD5Update (context, PADDING, padLen);
/* Append length (before padding) */
@@ -348,3 +349,6 @@ MD5_memset (
for (i = 0; i < len; i++)
((char *)output)[i] = (char)value;
}
+#else
+int md5_bs;
+#endif
diff --git a/contrib/ntp/libntp/memmove.c b/contrib/ntp/libntp/memmove.c
index b5d08687c17d..8ccc4b1bb3c4 100644
--- a/contrib/ntp/libntp/memmove.c
+++ b/contrib/ntp/libntp/memmove.c
@@ -48,6 +48,8 @@ static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93";
#endif
#include <string.h>
+#include "l_stdlib.h"
+
/*
* sizeof(word) MUST BE A POWER OF TWO
* SO THAT wmask BELOW IS ALL ONES
@@ -103,7 +105,8 @@ memmove(
* Copy whole words, then mop up any trailing bytes.
*/
t = length / wsize;
- TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize);
+ TLOOP(*(word *)dst = *(const word *)src; src += wsize;
+ dst += wsize);
t = length & wmask;
TLOOP(*dst++ = *src++);
} else {
@@ -124,7 +127,8 @@ memmove(
TLOOP1(*--dst = *--src);
}
t = length / wsize;
- TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src);
+ TLOOP(src -= wsize; dst -= wsize;
+ *(word *)dst = *(const word *)src);
t = length & wmask;
TLOOP(*--dst = *--src);
}
diff --git a/contrib/ntp/libntp/mfptoa.c b/contrib/ntp/libntp/mfptoa.c
index 8257b6c2a6bc..6450b2c136be 100644
--- a/contrib/ntp/libntp/mfptoa.c
+++ b/contrib/ntp/libntp/mfptoa.c
@@ -8,7 +8,7 @@ char *
mfptoa(
u_long fpi,
u_long fpf,
- int ndec
+ short ndec
)
{
int isneg;
diff --git a/contrib/ntp/libntp/mfptoms.c b/contrib/ntp/libntp/mfptoms.c
index 10afb51bc5af..d2bfd71eecee 100644
--- a/contrib/ntp/libntp/mfptoms.c
+++ b/contrib/ntp/libntp/mfptoms.c
@@ -8,7 +8,7 @@ char *
mfptoms(
u_long fpi,
u_long fpf,
- int ndec
+ short ndec
)
{
int isneg;
diff --git a/contrib/ntp/libntp/mktime.c b/contrib/ntp/libntp/mktime.c
index 6d944f957793..7f8290f3c3ed 100644
--- a/contrib/ntp/libntp/mktime.c
+++ b/contrib/ntp/libntp/mktime.c
@@ -62,7 +62,7 @@
#include "ntp_machine.h"
-#if !HAVE_MKTIME
+#if !HAVE_MKTIME || !HAVE_TIMEGM
#ifndef DSTMINUTES
#define DSTMINUTES 60
@@ -84,7 +84,7 @@
#define TM_YEAR_BASE 1900
#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
-extern time_t time();
+extern time_t time P((time_t *));
static int mon_lengths[2][MONSPERYEAR] = {
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
@@ -179,7 +179,8 @@ tmcomp(
static time_t
time2(
struct tm * tmp,
- int * okayp
+ int * okayp,
+ int usezn
)
{
register int dir;
@@ -227,7 +228,10 @@ time2(
*/
t = (t < 0) ? 0 : ((time_t) 1 << bits);
for ( ; ; ) {
- mytm = *localtime(&t);
+ if (usezn)
+ mytm = *localtime(&t);
+ else
+ mytm = *gmtime(&t);
dir = tmcomp(&mytm, &yourtm);
if (dir != 0) {
if (bits-- < 0)
@@ -245,11 +249,18 @@ time2(
return WRONG;
}
t += saved_seconds;
- *tmp = *localtime(&t);
+ if (usezn)
+ *tmp = *localtime(&t);
+ else
+ *tmp = *gmtime(&t);
*okayp = TRUE;
return t;
}
+#else
+int mktime_bs;
+#endif /* !HAVE_MKTIME || !HAVE_TIMEGM */
+#if !HAVE_MKTIME
static time_t
time1(
struct tm * tmp
@@ -260,7 +271,7 @@ time1(
if (tmp->tm_isdst > 1)
tmp->tm_isdst = 1;
- t = time2(tmp, &okay);
+ t = time2(tmp, &okay, 1);
if (okay || tmp->tm_isdst < 0)
return t;
@@ -274,6 +285,22 @@ mktime(
{
return time1(tmp);
}
-#else
-int mktime_bs;
-#endif
+#endif /* !HAVE_MKTIME */
+
+#if !HAVE_TIMEGM
+time_t
+timegm(
+ struct tm * tmp
+ )
+{
+ register time_t t;
+ int okay;
+
+ tmp->tm_isdst = 0;
+ t = time2(tmp, &okay, 0);
+ if (okay || tmp->tm_isdst < 0)
+ return t;
+
+ return WRONG;
+}
+#endif /* !HAVE_TIMEGM */
diff --git a/contrib/ntp/libntp/msyslog.c b/contrib/ntp/libntp/msyslog.c
index 52da608f4db3..f0e8872bc8d0 100644
--- a/contrib/ntp/libntp/msyslog.c
+++ b/contrib/ntp/libntp/msyslog.c
@@ -24,6 +24,7 @@
#include "ntp_stdlib.h"
#ifdef SYS_WINNT
+# include <stdarg.h>
# include "..\ports\winnt\libntp\log.h"
# include "..\ports\winnt\libntp\messages.h"
#endif
@@ -35,53 +36,61 @@ FILE *syslog_file = NULL;
u_long ntp_syslogmask = ~ (u_long) 0;
#ifdef SYS_WINNT
-HANDLE hEventSource;
-LPTSTR lpszStrings[1];
-static WORD event_type[] = {
- EVENTLOG_ERROR_TYPE, EVENTLOG_ERROR_TYPE, EVENTLOG_ERROR_TYPE, EVENTLOG_ERROR_TYPE,
- EVENTLOG_WARNING_TYPE,
- EVENTLOG_INFORMATION_TYPE, EVENTLOG_INFORMATION_TYPE, EVENTLOG_INFORMATION_TYPE,
-};
+static char separator = '\\';
+#else
+static char separator = '/';
#endif /* SYS_WINNT */
extern char *progname;
-#if defined(__STDC__) || defined(HAVE_STDARG_H)
-void msyslog(int level, const char *fmt, ...)
-#else /* defined(__STDC__) || defined(HAVE_STDARG_H) */
- /*VARARGS*/
- void msyslog(va_alist)
- va_dcl
-#endif /* defined(__STDC__) || defined(HAVE_STDARG_H) */
+/* Declare the local functions */
+void addto_syslog P((int, char *));
+void format_errmsg P((char *, int, const char *, int));
+
+
+/*
+ * This routine adds the contents of a buffer to the log
+ */
+void
+addto_syslog(int level, char * buf)
{
-#if defined(__STDC__) || defined(HAVE_STDARG_H)
-#else
- int level;
- const char *fmt;
-#endif
- va_list ap;
- char buf[1025], nfmt[256];
-#if defined(SYS_WINNT)
- char xerr[50];
+ char *prog;
+ FILE *out_file = syslog_file;
+
+#if !defined(VMS) && !defined (SYS_VXWORKS)
+ if (syslogit)
+ syslog(level, "%s", buf);
+ else
+#endif /* VMS && SYS_VXWORKS*/
+ {
+ out_file = syslog_file ? syslog_file: level <= LOG_ERR ? stderr : stdout;
+ /* syslog() provides the timestamp, so if we're not using
+ syslog, we must provide it. */
+ prog = strrchr(progname, separator);
+ if (prog == NULL)
+ prog = progname;
+ else
+ prog++;
+ (void) fprintf(out_file, "%s ", humanlogtime ());
+ (void) fprintf(out_file, "%s[%d]: %s", prog, (int)getpid(), buf);
+ fflush (out_file);
+ }
+#if DEBUG
+ if (debug && out_file != stdout && out_file != stderr)
+ printf("addto_syslog: %s\n", buf);
#endif
- register int c;
- register char *n, *prog;
+}
+void
+format_errmsg(char *nfmt, int lennfmt, const char *fmt, int errval)
+{
+ register char c;
+ register char *n;
register const char *f;
- int olderrno;
- char *err;
-
-#if defined(__STDC__) || defined(HAVE_STDARG_H)
- va_start(ap, fmt);
-#else
- va_start(ap);
- level = va_arg(ap, int);
- fmt = va_arg(ap, char *);
-#endif
+ char *err;
- olderrno = errno;
n = nfmt;
f = fmt;
- while ((c = *f++) != '\0' && c != '\n' && n < &nfmt[252]) {
+ while ((c = *f++) != '\0' && n < (nfmt+lennfmt - 2)) {
if (c != '%') {
*n++ = c;
continue;
@@ -92,21 +101,9 @@ void msyslog(int level, const char *fmt, ...)
continue;
}
err = 0;
-#if !defined(SYS_WINNT)
- err = strerror(olderrno);
-#else /* SYS_WINNT */
- err = xerr;
- FormatMessage(
- FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */
- (LPTSTR) err,
- sizeof(xerr),
- NULL);
-
-#endif /* SYS_WINNT */
- if ((n + strlen(err)) < &nfmt[254]) {
+ err = strerror(errval);
+ /* Make sure we have enough space for the error message */
+ if ((n + strlen(err)) < (nfmt + lennfmt -2)) {
strcpy(n, err);
n += strlen(err);
}
@@ -116,46 +113,95 @@ void msyslog(int level, const char *fmt, ...)
#endif /* VMS */
*n++ = '\n';
*n = '\0';
+}
+
+/*
+ * The externally called functions are defined here
+ * but share the internal function above to fetch
+ * any error message strings, This is done so that we can
+ * have two different functions to perform the logging
+ * since Windows gets it's error information from different
+ * places depending on whether or not it's network I/O.
+ * msyslog() is for general use while netsyslog() is for
+ * network I/O functions. They are virtually identical
+ * in implementation.
+ */
+
+#if defined(__STDC__) || defined(HAVE_STDARG_H)
+void msyslog(int level, const char *fmt, ...)
+#else /* defined(__STDC__) || defined(HAVE_STDARG_H) */
+ /*VARARGS*/
+ void msyslog(va_alist)
+ va_dcl
+#endif /* defined(__STDC__) || defined(HAVE_STDARG_H) */
+{
+#if defined(__STDC__) || defined(HAVE_STDARG_H)
+#else
+ int level;
+ const char *fmt;
+#endif
+ va_list ap;
+ char buf[1025], nfmt[256];
+
+ /*
+ * Save the error value as soon as possible
+ */
+#ifdef SYS_WINNT
+ int errval = GetLastError();
+#else
+ int errval = errno;
+#endif
+
+#if defined(__STDC__) || defined(HAVE_STDARG_H)
+ va_start(ap, fmt);
+#else
+ va_start(ap);
+
+ level = va_arg(ap, int);
+ fmt = va_arg(ap, char *);
+#endif
+ format_errmsg(nfmt, sizeof(nfmt), fmt, errval);
vsnprintf(buf, sizeof(buf), nfmt, ap);
-#if !defined(VMS) && !defined (SYS_VXWORKS)
- if (syslogit)
-#ifndef SYS_WINNT
- syslog(level, "%s", buf);
+ addto_syslog(level, buf);
+ va_end(ap);
+}
+#if defined(__STDC__) || defined(HAVE_STDARG_H)
+void netsyslog(int level, const char *fmt, ...)
+#else /* defined(__STDC__) || defined(HAVE_STDARG_H) */
+ /*VARARGS*/
+ void netsyslog(va_alist)
+ va_dcl
+#endif /* defined(__STDC__) || defined(HAVE_STDARG_H) */
+{
+#if defined(__STDC__) || defined(HAVE_STDARG_H)
#else
- {
- lpszStrings[0] = buf;
-
- switch (event_type[level])
- {
- case EVENTLOG_ERROR_TYPE:
- reportAnEEvent(NTP_ERROR,1,lpszStrings);
- break;
- case EVENTLOG_INFORMATION_TYPE:
- reportAnIEvent(NTP_INFO,1,lpszStrings);
- break;
- case EVENTLOG_WARNING_TYPE:
- reportAnWEvent(NTP_WARNING,1,lpszStrings);
- break;
- } /* switch end */
-
- }
-#endif /* SYS_WINNT */
- else
-#endif /* VMS && SYS_VXWORKS*/
- {
- FILE *out_file = syslog_file ? syslog_file
- : level <= LOG_ERR ? stderr : stdout;
- /* syslog() provides the timestamp, so if we're not using
- syslog, we must provide it. */
- prog = strrchr(progname, '/');
- if (prog == NULL)
- prog = progname;
- else
- prog++;
- (void) fprintf(out_file, "%s ", humanlogtime ());
- (void) fprintf(out_file, "%s[%d]: %s", prog, (int)getpid(), buf);
- fflush (out_file);
- }
+ int level;
+ const char *fmt;
+#endif
+ va_list ap;
+ char buf[1025], nfmt[256];
+
+ /*
+ * Save the error value as soon as possible
+ */
+#ifdef SYS_WINNT
+ int errval = WSAGetLastError();
+#else
+ int errval = errno;
+#endif
+
+#if defined(__STDC__) || defined(HAVE_STDARG_H)
+ va_start(ap, fmt);
+#else
+ va_start(ap);
+
+ level = va_arg(ap, int);
+ fmt = va_arg(ap, char *);
+#endif
+ format_errmsg(nfmt, sizeof(nfmt), fmt, errval);
+
+ vsnprintf(buf, sizeof(buf), nfmt, ap);
+ addto_syslog(level, buf);
va_end(ap);
}
diff --git a/contrib/ntp/libntp/netof.c b/contrib/ntp/libntp/netof.c
index df7657e4fd9e..fd57568d3130 100644
--- a/contrib/ntp/libntp/netof.c
+++ b/contrib/ntp/libntp/netof.c
@@ -1,25 +1,48 @@
/*
- * netof - return the net address part of an ip address
+ * netof - return the net address part of an ip address in a sockaddr_storage structure
* (zero out host part)
*/
#include <stdio.h>
#include "ntp_fp.h"
#include "ntp_stdlib.h"
+#include "ntp.h"
-u_int32
+#define NUM_NETOF_BUFS 10
+static struct sockaddr_storage ssbuf[NUM_NETOF_BUFS];
+static int next_ssbuf = 0;
+
+struct sockaddr_storage*
netof(
- u_int32 num
+ struct sockaddr_storage* hostaddr
)
{
register u_int32 netnum;
+ struct sockaddr_storage *netaddr;
+
+ netaddr = &ssbuf[next_ssbuf++];
+ if (next_ssbuf == NUM_NETOF_BUFS)
+ next_ssbuf = 0;
+ memcpy(netaddr, hostaddr, sizeof(struct sockaddr_storage));
+
+ if(netaddr->ss_family == AF_INET) {
+ netnum = ((struct sockaddr_in*)netaddr)->sin_addr.s_addr;
+
+ /*
+ * We live in a modern CIDR world where the basement nets, which
+ * used to be class A, are now probably associated with each
+ * host address. So, for class-A nets, all bits are significant.
+ */
+ if(IN_CLASSC(netnum))
+ netnum &= IN_CLASSC_NET;
+ else if (IN_CLASSB(netnum))
+ netnum &= IN_CLASSB_NET;
+ ((struct sockaddr_in*)netaddr)->sin_addr.s_addr = netnum;
+ }
+ else if(netaddr->ss_family == AF_INET6) {
+ /* Here we put 0 at the local link address so we get net address */
+ memset(&((struct sockaddr_in6*)netaddr)->sin6_addr.s6_addr[8], 0, 8*sizeof(u_char));
+ }
- netnum = num;
- if(IN_CLASSC(netnum))
- netnum &= IN_CLASSC_NET;
- else if (IN_CLASSB(netnum))
- netnum &= IN_CLASSB_NET;
- else /* treat all other like class A */
- netnum &= IN_CLASSA_NET;
- return netnum;
+ return netaddr;
}
diff --git a/contrib/ntp/libntp/ntp_rfc2553.c b/contrib/ntp/libntp/ntp_rfc2553.c
new file mode 100644
index 000000000000..278863085eb4
--- /dev/null
+++ b/contrib/ntp/libntp/ntp_rfc2553.c
@@ -0,0 +1,331 @@
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/*
+ * Compatability shims with the rfc2553 API to simplify ntp.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <ctype.h>
+#include <sys/socket.h>
+#include "ntp_rfc2553.h"
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#include <netdb.h>
+
+#include "ntpd.h"
+#include "ntp_malloc.h"
+#include "ntp_stdlib.h"
+#include "ntp_string.h"
+
+#ifndef HAVE_IPV6
+
+#if defined(SYS_WINNT)
+/* XXX This is the preferred way, but for some reason the SunOS compiler
+ * does not like it.
+ */
+const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+#else
+const struct in6_addr in6addr_any;
+#endif
+
+static char *ai_errlist[] = {
+ "Success",
+ "Address family for hostname not supported", /* EAI_ADDRFAMILY */
+ "Temporary failure in name resolution", /* EAI_AGAIN */
+ "Invalid value for ai_flags", /* EAI_BADFLAGS */
+ "Non-recoverable failure in name resolution", /* EAI_FAIL */
+ "ai_family not supported", /* EAI_FAMILY */
+ "Memory allocation failure", /* EAI_MEMORY */
+ "No address associated with hostname", /* EAI_NODATA */
+ "hostname nor servname provided, or not known", /* EAI_NONAME */
+ "servname not supported for ai_socktype", /* EAI_SERVICE */
+ "ai_socktype not supported", /* EAI_SOCKTYPE */
+ "System error returned in errno", /* EAI_SYSTEM */
+ "Invalid value for hints", /* EAI_BADHINTS */
+ "Resolved protocol is unknown", /* EAI_PROTOCOL */
+ "Unknown error", /* EAI_MAX */
+};
+
+static int ipv4_aton P((const char *, struct sockaddr_storage *));
+static int do_nodename P((const char *nodename, struct addrinfo *ai,
+ const struct addrinfo *hints));
+
+int
+getaddrinfo (const char *nodename, const char *servname,
+ const struct addrinfo *hints, struct addrinfo **res)
+{
+ int rval;
+ struct addrinfo *ai;
+ struct sockaddr_in *sockin;
+
+ ai = calloc(sizeof(struct addrinfo), 1);
+ if (ai == NULL)
+ return (EAI_MEMORY);
+
+ if (nodename != NULL) {
+ rval = do_nodename(nodename, ai, hints);
+ if (rval != 0) {
+ freeaddrinfo(ai);
+ return (rval);
+ }
+ }
+ if (nodename == NULL && hints != NULL) {
+ ai->ai_addr = calloc(sizeof(struct sockaddr_storage), 1);
+ if (ai->ai_addr == NULL) {
+ freeaddrinfo(ai);
+ return (EAI_MEMORY);
+ }
+ ai->ai_family = AF_INET;
+ ai->ai_addrlen = sizeof(struct sockaddr_storage);
+ sockin = (struct sockaddr_in *)ai->ai_addr;
+ sockin->sin_family = AF_INET;
+ sockin->sin_addr.s_addr = htonl(INADDR_ANY);
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ ai->ai_addr->sa_len = SOCKLEN(ai->ai_addr);
+#endif
+ }
+ if (servname != NULL) {
+ ai->ai_family = AF_INET;
+ ai->ai_socktype = SOCK_DGRAM;
+ if (strcmp(servname, "ntp") != 0) {
+ freeaddrinfo(ai);
+ return (EAI_SERVICE);
+ }
+ sockin = (struct sockaddr_in *)ai->ai_addr;
+ sockin->sin_port = htons(NTP_PORT);
+ }
+ *res = ai;
+ return (0);
+}
+
+void
+freeaddrinfo(struct addrinfo *ai)
+{
+ if (ai->ai_canonname != NULL)
+ free(ai->ai_canonname);
+ if (ai->ai_addr != NULL)
+ free(ai->ai_addr);
+ free(ai);
+}
+
+int
+getnameinfo (const struct sockaddr *sa, u_int salen, char *host,
+ size_t hostlen, char *serv, size_t servlen, int flags)
+{
+ struct hostent *hp;
+
+ if (sa->sa_family != AF_INET)
+ return (EAI_FAMILY);
+ hp = gethostbyaddr(
+ (const char *)&((const struct sockaddr_in *)sa)->sin_addr,
+ 4, AF_INET);
+ if (hp == NULL) {
+ if (h_errno == TRY_AGAIN)
+ return (EAI_AGAIN);
+ else
+ return (EAI_FAIL);
+ }
+ if (host != NULL) {
+ strncpy(host, hp->h_name, hostlen);
+ host[hostlen] = '\0';
+ }
+ return (0);
+}
+
+char *
+gai_strerror(int ecode)
+{
+ if (ecode < 0 || ecode > EAI_MAX)
+ ecode = EAI_MAX;
+ return ai_errlist[ecode];
+}
+
+static int
+do_nodename(
+ const char *nodename,
+ struct addrinfo *ai,
+ const struct addrinfo *hints)
+{
+ struct hostent *hp;
+ struct sockaddr_in *sockin;
+
+ ai->ai_addr = calloc(sizeof(struct sockaddr_storage), 1);
+ if (ai->ai_addr == NULL)
+ return (EAI_MEMORY);
+
+ if (hints != NULL && hints->ai_flags & AI_NUMERICHOST) {
+ if (ipv4_aton(nodename,
+ (struct sockaddr_storage *)ai->ai_addr) == 1) {
+ ai->ai_family = AF_INET;
+ ai->ai_addrlen = sizeof(struct sockaddr_in);
+ return (0);
+ }
+ return (EAI_NONAME);
+ }
+ hp = gethostbyname(nodename);
+ if (hp == NULL) {
+ if (h_errno == TRY_AGAIN)
+ return (EAI_AGAIN);
+ else {
+ if (ipv4_aton(nodename,
+ (struct sockaddr_storage *)ai->ai_addr) == 1) {
+ ai->ai_family = AF_INET;
+ ai->ai_addrlen = sizeof(struct sockaddr_in);
+ return (0);
+ }
+ return (EAI_FAIL);
+ }
+ }
+ ai->ai_family = hp->h_addrtype;
+ ai->ai_addrlen = sizeof(struct sockaddr);
+ sockin = (struct sockaddr_in *)ai->ai_addr;
+ memcpy(&sockin->sin_addr, hp->h_addr, hp->h_length);
+ ai->ai_addr->sa_family = hp->h_addrtype;
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ ai->ai_addr->sa_len = sizeof(struct sockaddr);
+#endif
+ if (hints != NULL && hints->ai_flags & AI_CANONNAME) {
+ ai->ai_canonname = malloc(strlen(hp->h_name) + 1);
+ if (ai->ai_canonname == NULL)
+ return (EAI_MEMORY);
+ strcpy(ai->ai_canonname, hp->h_name);
+ }
+ return (0);
+}
+
+/*
+ * ipv4_aton - return a net number (this is crude, but careful)
+ */
+static int
+ipv4_aton(
+ const char *num,
+ struct sockaddr_storage *saddr
+ )
+{
+ const char *cp;
+ char *bp;
+ int i;
+ int temp;
+ char buf[80]; /* will core dump on really stupid stuff */
+ u_int32 netnum;
+ struct sockaddr_in *addr;
+
+ cp = num;
+ netnum = 0;
+ for (i = 0; i < 4; i++) {
+ bp = buf;
+ while (isdigit((int)*cp))
+ *bp++ = *cp++;
+ if (bp == buf)
+ break;
+
+ if (i < 3) {
+ if (*cp++ != '.')
+ break;
+ } else if (*cp != '\0')
+ break;
+
+ *bp = '\0';
+ temp = atoi(buf);
+ if (temp > 255)
+ break;
+ netnum <<= 8;
+ netnum += temp;
+#ifdef DEBUG
+ if (debug > 3)
+ printf("ipv4_aton %s step %d buf %s temp %d netnum %lu\n",
+ num, i, buf, temp, (u_long)netnum);
+#endif
+ }
+
+ if (i < 4) {
+#ifdef DEBUG
+ if (debug > 3)
+ printf(
+ "ipv4_aton: \"%s\" invalid host number, line ignored\n",
+ num);
+#endif
+ return (0);
+ }
+
+ /*
+ * make up socket address. Clear it out for neatness.
+ */
+ memset((void *)saddr, 0, sizeof(struct sockaddr_storage));
+ addr = (struct sockaddr_in *)saddr;
+ addr->sin_family = AF_INET;
+ addr->sin_port = htons(NTP_PORT);
+ addr->sin_addr.s_addr = htonl(netnum);
+#ifdef DEBUG
+ if (debug > 1)
+ printf("ipv4_aton given %s, got %s.\n", num, ntoa(saddr));
+#endif
+ return (1);
+}
+#endif /* !HAVE_IPV6 */
diff --git a/contrib/ntp/libntp/refnumtoa.c b/contrib/ntp/libntp/refnumtoa.c
index a1020150b7a1..7c5d96e1e222 100644
--- a/contrib/ntp/libntp/refnumtoa.c
+++ b/contrib/ntp/libntp/refnumtoa.c
@@ -9,23 +9,28 @@
char *
refnumtoa(
- u_int32 num
+ struct sockaddr_storage* num
)
{
register u_int32 netnum;
register char *buf;
register const char *rclock;
-
- netnum = ntohl(num);
-
+
LIB_GETBUF(buf);
- rclock = clockname((int)((u_long)netnum >> 8) & 0xff);
+ if(num->ss_family == AF_INET) {
+ netnum = ntohl(((struct sockaddr_in*)num)->sin_addr.s_addr);
+ rclock = clockname((int)((u_long)netnum >> 8) & 0xff);
+
+ if (rclock != NULL)
+ (void)sprintf(buf, "%s(%lu)", rclock, (u_long)netnum & 0xff);
+ else
+ (void)sprintf(buf, "REFCLK(%lu,%lu)",
+ ((u_long)netnum >> 8) & 0xff, (u_long)netnum & 0xff);
- if (rclock != NULL)
- (void)sprintf(buf, "%s(%lu)", rclock, (u_long)netnum & 0xff);
- else
- (void)sprintf(buf, "REFCLK(%lu,%lu)",
- ((u_long)netnum >> 8) & 0xff, (u_long)netnum & 0xff);
+ }
+ else {
+ (void)sprintf(buf, "refclock address type not implemented yet, use IPv4 refclock address.");
+ }
return buf;
}
diff --git a/contrib/ntp/libntp/snprintf.c b/contrib/ntp/libntp/snprintf.c
index 101bc1730474..7588b8483a0a 100644
--- a/contrib/ntp/libntp/snprintf.c
+++ b/contrib/ntp/libntp/snprintf.c
@@ -10,6 +10,8 @@
#endif
#include <stdio.h>
+#include "l_stdlib.h"
+
#ifdef __STDC__
int snprintf(char *str, size_t n, const char *fmt, ...)
#else
@@ -42,11 +44,12 @@ int snprintf(str, n, fmt, va_alist)
}
int
-vsnprintf(str, n, fmt, ap)
- char *str;
- size_t n;
- const char *fmt;
- va_list ap;
+vsnprintf(
+ char *str,
+ size_t n,
+ const char *fmt,
+ va_list ap
+ )
{
#ifdef VSPRINTF_CHARSTAR
return (strlen(vsprintf(str, fmt, ap)));
diff --git a/contrib/ntp/libntp/socktoa.c b/contrib/ntp/libntp/socktoa.c
new file mode 100644
index 000000000000..34de7848a4c0
--- /dev/null
+++ b/contrib/ntp/libntp/socktoa.c
@@ -0,0 +1,48 @@
+/*
+ * socktoa - return a numeric host name from a sockaddr_storage structure
+ */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+
+#include <arpa/inet.h>
+
+#ifdef ISC_PLATFORM_NEEDNTOP
+#include <isc/net.h>
+#endif
+
+#include <stdio.h>
+
+#include "ntp_fp.h"
+#include "lib_strbuf.h"
+#include "ntp_stdlib.h"
+#include "ntp.h"
+
+char *
+socktoa(
+ struct sockaddr_storage* sock
+ )
+{
+ register char *buffer;
+
+ LIB_GETBUF(buffer);
+
+ if (sock == NULL) printf("null");
+
+ switch(sock->ss_family) {
+
+ case AF_INET :
+ inet_ntop(AF_INET, &GET_INADDR(*sock), buffer,
+ LIB_BUFLENGTH);
+ break;
+
+ case AF_INET6 :
+ inet_ntop(AF_INET6, &GET_INADDR6(*sock), buffer,
+ LIB_BUFLENGTH);
+ }
+ return buffer;
+}
diff --git a/contrib/ntp/libntp/socktohost.c b/contrib/ntp/libntp/socktohost.c
new file mode 100644
index 000000000000..7a3b30f63d6c
--- /dev/null
+++ b/contrib/ntp/libntp/socktohost.c
@@ -0,0 +1,32 @@
+/*
+ * socktoa - return a numeric host name from a sockaddr_storage structure
+ */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+
+#include <arpa/inet.h>
+
+#include <stdio.h>
+
+#include "ntp_fp.h"
+#include "lib_strbuf.h"
+#include "ntp_stdlib.h"
+#include "ntp.h"
+
+
+char *
+socktohost(
+ struct sockaddr_storage* sock
+ )
+{
+ register char *buffer;
+
+ LIB_GETBUF(buffer);
+ if (getnameinfo((struct sockaddr *)sock, SOCKLEN(sock), buffer,
+ LIB_BUFLENGTH /* NI_MAXHOST*/, NULL, 0, 0))
+ return stoa(sock);
+
+ return buffer;
+}
diff --git a/contrib/ntp/libntp/statestr.c b/contrib/ntp/libntp/statestr.c
index 7dd600979904..3acc5c991421 100644
--- a/contrib/ntp/libntp/statestr.c
+++ b/contrib/ntp/libntp/statestr.c
@@ -102,7 +102,7 @@ struct codestring sys_codes[] = {
};
/*
- * Peer Events
+ * Peer events
*/
static
struct codestring peer_codes[] = {
@@ -118,6 +118,31 @@ struct codestring peer_codes[] = {
{ -1, "event" }
};
+#ifdef OPENSSL
+/*
+ * Crypto events
+ */
+static
+struct codestring crypto_codes[] = {
+ { XEVNT_OK & ~CRPT_EVENT, "success" },
+ { XEVNT_LEN & ~CRPT_EVENT, "bad_field_format_or_length" },
+ { XEVNT_TSP & ~CRPT_EVENT, "bad_timestamp" },
+ { XEVNT_FSP & ~CRPT_EVENT, "bad_filestamp" },
+ { XEVNT_PUB & ~CRPT_EVENT, "bad_procedure_or_data" },
+ { XEVNT_MD & ~CRPT_EVENT, "unsupported_digest_type" },
+ { XEVNT_KEY & ~CRPT_EVENT, "unsupported_identity_type" },
+ { XEVNT_SGL & ~CRPT_EVENT, "bad_signature_length" },
+ { XEVNT_SIG & ~CRPT_EVENT, "signature_not_verified" },
+ { XEVNT_VFY & ~CRPT_EVENT, "certificate not verified" },
+ { XEVNT_PER & ~CRPT_EVENT, "certificate_expired" },
+ { XEVNT_CKY & ~CRPT_EVENT, "bad_or_missing_cookie" },
+ { XEVNT_DAT & ~CRPT_EVENT, "bad_or_missing_leapsecond_table" },
+ { XEVNT_CRT & ~CRPT_EVENT, "bad_or_missing_certificate" },
+ { XEVNT_ID & ~CRPT_EVENT, "bad or missing identification" },
+ { -1, "crypto" }
+};
+#endif /* OPENSSL */
+
/* Forwards */
static const char *getcode P((int, struct codestring *));
static const char *getevents P((int));
@@ -235,7 +260,14 @@ eventstr(
int num
)
{
- return getcode(num & ~PEER_EVENT, (num & PEER_EVENT) ? peer_codes : sys_codes);
+ if (num & PEER_EVENT)
+ return (getcode(num & ~PEER_EVENT, peer_codes));
+#ifdef OPENSSL
+ else if (num & CRPT_EVENT)
+ return (getcode(num & ~CRPT_EVENT, crypto_codes));
+#endif /* OPENSSL */
+ else
+ return (getcode(num, sys_codes));
}
const char *
diff --git a/contrib/ntp/libntp/strerror.c b/contrib/ntp/libntp/strerror.c
index 5a9595a9a6e8..9d8ae8e4f483 100644
--- a/contrib/ntp/libntp/strerror.c
+++ b/contrib/ntp/libntp/strerror.c
@@ -27,6 +27,8 @@ static const char sccsid[] = "@(#)strerror.c 5.1 (Berkeley) 4/9/89";
#include <stdio.h>
#include <string.h>
+#include "l_stdlib.h"
+
char *
strerror(
int errnum
diff --git a/contrib/ntp/libntp/strstr.c b/contrib/ntp/libntp/strstr.c
new file mode 100644
index 000000000000..a4deb8701d6c
--- /dev/null
+++ b/contrib/ntp/libntp/strstr.c
@@ -0,0 +1,52 @@
+#include <config.h>
+
+#if !HAVE_STRSTR
+
+/*
+ * Amanda, The Advanced Maryland Automatic Network Disk Archiver
+ * Copyright (c) 1991-1998 University of Maryland at College Park
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of U.M. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. U.M. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: James da Silva, Systems Design and Analysis Group
+ * Computer Science Department
+ * University of Maryland at College Park
+ */
+/*
+ * $Id$
+ *
+ * replacement for missing ANSI-C strstr function
+ */
+
+char *strstr(a, b)
+char *a, *b;
+{
+ int alen, blen, i;
+
+ alen = strlen(a);
+ blen = strlen(b);
+
+ for(i=0; i <= alen-blen; i++, a++)
+ if(strncmp(a, b, blen) == 0) return a;
+
+ return NULL;
+}
+#else
+int strstr_bs;
+#endif
diff --git a/contrib/ntp/libntp/systime.c b/contrib/ntp/libntp/systime.c
index e14a4d8d1562..ac6aa983f7b5 100644
--- a/contrib/ntp/libntp/systime.c
+++ b/contrib/ntp/libntp/systime.c
@@ -1,14 +1,19 @@
/*
* systime -- routines to fiddle a UNIX clock.
+ *
+ * ATTENTION: Get approval from Dave Mills on all changes to this file!
+ *
*/
-
-#include "ntp_proto.h" /* for MAX_FREQ */
#include "ntp_machine.h"
#include "ntp_fp.h"
#include "ntp_syslog.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
+#ifdef SIM
+#include "ntpsim.h"
+#endif /*SIM */
+
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
@@ -19,149 +24,123 @@
# include <utmpx.h>
#endif /* HAVE_UTMPX_H */
-int systime_10ms_ticks = 0; /* adj sysclock in 10ms increments */
-
/*
- * These routines (init_systime, get_systime, step_systime, adj_systime)
- * implement an interface between the (more or less) system independent
- * bits of NTP and the peculiarities of dealing with the Unix system
- * clock.
+ * These routines (get_systime, step_systime, adj_systime) implement an
+ * interface between the system independent NTP clock and the Unix
+ * system clock in various architectures and operating systems.
+ *
+ * Time is a precious quantity in these routines and every effort is
+ * made to minimize errors by always rounding toward zero and amortizing
+ * adjustment residues. By default the adjustment quantum is 1 us for
+ * the usual Unix tickadj() system call, but this can be increased if
+ * necessary by a configuration command. For instance, when the
+ * adjtime() quantum is a clock tick for a 100-Hz clock, the quantum
+ * should be 10 ms.
*/
-double sys_residual = 0; /* residual from previous adjustment */
+double sys_tick = 1e-6; /* tickadj() quantum (s) */
+double sys_residual = 0; /* adjustment residue (s) */
+#ifndef SIM
/*
- * get_systime - return the system time in timestamp format biased by
- * the current time offset.
+ * get_systime - return system time in NTP timestamp format.
*/
void
get_systime(
- l_fp *now
+ l_fp *now /* system time */
)
{
-#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_GETCLOCK)
- struct timespec ts;
-#else
- struct timeval tv;
-#endif
double dtemp;
+#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_GETCLOCK)
+ struct timespec ts; /* seconds and nanoseconds */
+
/*
- * We use nanosecond time if we can get it. Watch out for
- * rounding wiggles, which may overflow the fraction.
+ * Convert Unix clock from seconds and nanoseconds to seconds.
*/
-#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_GETCLOCK)
# ifdef HAVE_CLOCK_GETTIME
- (void) clock_gettime(CLOCK_REALTIME, &ts);
+ clock_gettime(CLOCK_REALTIME, &ts);
# else
- (void) getclock(TIMEOFDAY, &ts);
+ getclock(TIMEOFDAY, &ts);
# endif
now->l_i = ts.tv_sec + JAN_1970;
- dtemp = ts.tv_nsec * FRAC / 1e9;
- if (dtemp >= FRAC)
- now->l_i++;
- now->l_uf = (u_int32)dtemp;
-#else /* HAVE_CLOCK_GETTIME */
- (void) GETTIMEOFDAY(&tv, (struct timezone *)0);
- now->l_i = tv.tv_sec + JAN_1970;
+ dtemp = ts.tv_nsec / 1e9;
-#if defined RELIANTUNIX_CLOCK || defined SCO5_CLOCK
- if (systime_10ms_ticks) {
- /* fake better than 10ms resolution by interpolating
- accumulated residual (in adj_systime(), see below) */
- dtemp = tv.tv_usec / 1e6;
- if (sys_residual < 5000e-6 && sys_residual > -5000e-6) {
- dtemp += sys_residual;
- if (dtemp < 0) {
- now->l_i--;
- dtemp++;
- }
- }
- dtemp *= FRAC;
- } else
-#endif
+#else /* HAVE_CLOCK_GETTIME || HAVE_GETCLOCK */
+ struct timeval tv; /* seconds and microseconds */
- dtemp = tv.tv_usec * FRAC / 1e6;
+ /*
+ * Convert Unix clock from seconds and microseconds to seconds.
+ */
+ GETTIMEOFDAY(&tv, NULL);
+ now->l_i = tv.tv_sec + JAN_1970;
+ dtemp = tv.tv_usec / 1e6;
+
+#endif /* HAVE_CLOCK_GETTIME || HAVE_GETCLOCK */
- if (dtemp >= FRAC)
+ /*
+ * Renormalize to seconds past 1900 and fraction.
+ */
+ dtemp += sys_residual;
+ if (dtemp >= 1) {
+ dtemp -= 1;
now->l_i++;
+ } else if (dtemp < -1) {
+ dtemp += 1;
+ now->l_i--;
+ }
+ dtemp *= FRAC;
now->l_uf = (u_int32)dtemp;
-#endif /* HAVE_CLOCK_GETTIME */
-
}
/*
- * adj_systime - called once every second to make system time adjustments.
- * Returns 1 if okay, 0 if trouble.
+ * adj_systime - adjust system time by the argument.
*/
#if !defined SYS_WINNT
-int
+int /* 0 okay, 1 error */
adj_systime(
- double now
+ double now /* adjustment (s) */
)
{
- double dtemp;
- struct timeval adjtv;
- u_char isneg = 0;
- struct timeval oadjtv;
+ struct timeval adjtv; /* new adjustment */
+ struct timeval oadjtv; /* residual adjustment */
+ double dtemp;
+ long ticks;
+ int isneg = 0;
/*
- * Add the residual from the previous adjustment to the new
- * adjustment, bound and round.
+ * Most Unix adjtime() implementations adjust the system clock
+ * in microsecond quanta, but some adjust in 10-ms quanta. We
+ * carefully round the adjustment to the nearest quantum, then
+ * adjust in quanta and keep the residue for later.
*/
- dtemp = sys_residual + now;
- sys_residual = 0;
+ dtemp = now + sys_residual;
if (dtemp < 0) {
isneg = 1;
dtemp = -dtemp;
}
-
-#if defined RELIANTUNIX_CLOCK || defined SCO5_CLOCK
- if (systime_10ms_ticks) {
- /* accumulate changes until we have enough to adjust a tick */
- if (dtemp < 5000e-6) {
- if (isneg) sys_residual = -dtemp;
- else sys_residual = dtemp;
- dtemp = 0;
- } else {
- if (isneg) sys_residual = 10000e-6 - dtemp;
- else sys_residual = dtemp - 10000e-6;
- dtemp = 10000e-6;
- }
- } else
-#endif
- if (dtemp > NTP_MAXFREQ)
- dtemp = NTP_MAXFREQ;
-
- dtemp = dtemp * 1e6 + .5;
-
- if (isneg)
- dtemp = -dtemp;
- adjtv.tv_sec = 0;
- adjtv.tv_usec = (int32)dtemp;
+ adjtv.tv_sec = (long)dtemp;
+ dtemp -= adjtv.tv_sec;
+ ticks = (long)(dtemp / sys_tick + .5);
+ adjtv.tv_usec = (long)(ticks * sys_tick * 1e6);
+ dtemp -= adjtv.tv_usec / 1e6;
+ sys_residual = dtemp;
/*
- * Here we do the actual adjustment. If for some reason the adjtime()
- * call fails, like it is not implemented or something like that,
- * we honk to the log. If the previous adjustment did not complete,
- * we correct the residual offset.
+ * Convert to signed seconds and microseconds for the Unix
+ * adjtime() system call. Note we purposely lose the adjtime()
+ * leftover.
*/
- /* casey - we need a posix type thang here */
- if (adjtime(&adjtv, &oadjtv) < 0)
- {
- msyslog(LOG_ERR, "Can't adjust time (%ld sec, %ld usec): %m",
- (long)adjtv.tv_sec, (long)adjtv.tv_usec);
- return 0;
- }
- else {
- sys_residual += oadjtv.tv_usec / 1e6;
+ if (isneg) {
+ adjtv.tv_sec = -adjtv.tv_sec;
+ adjtv.tv_usec = -adjtv.tv_usec;
}
-#ifdef DEBUG
- if (debug > 6)
- printf("adj_systime: adj %.9f -> remaining residual %.9f\n", now, sys_residual);
-#endif
- return 1;
+ if (adjtime(&adjtv, &oadjtv) < 0) {
+ msyslog(LOG_ERR, "adj_systime: %m");
+ return (0);
+ }
+ return (1);
}
#endif
@@ -186,12 +165,12 @@ step_systime(
isneg = 1;
dtemp = - dtemp;
adjtv.tv_sec = (int32)dtemp;
- adjtv.tv_usec = (u_int32)((dtemp - (double)adjtv.tv_sec) *
- 1e6 + .5);
+ adjtv.tv_usec = (u_int32)((dtemp -
+ (double)adjtv.tv_sec) * 1e6 + .5);
} else {
adjtv.tv_sec = (int32)dtemp;
- adjtv.tv_usec = (u_int32)((dtemp - (double)adjtv.tv_sec) *
- 1e6 + .5);
+ adjtv.tv_usec = (u_int32)((dtemp -
+ (double)adjtv.tv_sec) * 1e6 + .5);
}
#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_GETCLOCK)
#ifdef HAVE_CLOCK_GETTIME
@@ -226,8 +205,8 @@ step_systime(
timetv.tv_usec -= 1000000;
}
}
- if (ntp_set_tod(&timetv, (struct timezone *)0) != 0) {
- msyslog(LOG_ERR, "Can't set time of day: %m");
+ if (ntp_set_tod(&timetv, NULL) != 0) {
+ msyslog(LOG_ERR, "step-systime: %m");
return (0);
}
sys_residual = 0;
@@ -255,8 +234,8 @@ step_systime(
*/
/*
- * Write old and new time entries in utmp and wtmp if step adjustment
- * is greater than one second.
+ * Write old and new time entries in utmp and wtmp if step
+ * adjustment is greater than one second.
*
* This might become even Uglier...
*/
@@ -358,3 +337,185 @@ step_systime(
}
return (1);
}
+
+#else /* SIM */
+/*
+ * Clock routines for the simulator - Harish Nair, with help
+ */
+/*
+ * get_systime - return the system time in NTP timestamp format
+ */
+void
+get_systime(
+ l_fp *now /* current system time in l_fp */ )
+{
+ /*
+ * To fool the code that determines the local clock precision,
+ * we advance the clock a minimum of 200 nanoseconds on every
+ * clock read. This is appropriate for a typical modern machine
+ * with nanosecond clocks. Note we make no attempt here to
+ * simulate reading error, since the error is so small. This may
+ * change when the need comes to implement picosecond clocks.
+ */
+ if (ntp_node.ntp_time == ntp_node.last_time)
+ ntp_node.ntp_time += 200e-9;
+ ntp_node.last_time = ntp_node.ntp_time;
+ DTOLFP(ntp_node.ntp_time, now);
+}
+
+
+/*
+ * adj_systime - advance or retard the system clock exactly like the
+ * real thng.
+ */
+int /* always succeeds */
+adj_systime(
+ double now /* time adjustment (s) */
+ )
+{
+ struct timeval adjtv; /* new adjustment */
+ double dtemp;
+ long ticks;
+ int isneg = 0;
+
+ /*
+ * Most Unix adjtime() implementations adjust the system clock
+ * in microsecond quanta, but some adjust in 10-ms quanta. We
+ * carefully round the adjustment to the nearest quantum, then
+ * adjust in quanta and keep the residue for later.
+ */
+ dtemp = now + sys_residual;
+ if (dtemp < 0) {
+ isneg = 1;
+ dtemp = -dtemp;
+ }
+ adjtv.tv_sec = (long)dtemp;
+ dtemp -= adjtv.tv_sec;
+ ticks = (long)(dtemp / sys_tick + .5);
+ adjtv.tv_usec = (long)(ticks * sys_tick * 1e6);
+ dtemp -= adjtv.tv_usec / 1e6;
+ sys_residual = dtemp;
+
+ /*
+ * Convert to signed seconds and microseconds for the Unix
+ * adjtime() system call. Note we purposely lose the adjtime()
+ * leftover.
+ */
+ if (isneg) {
+ adjtv.tv_sec = -adjtv.tv_sec;
+ adjtv.tv_usec = -adjtv.tv_usec;
+ sys_residual = -sys_residual;
+ }
+
+ /*
+ * We went to all the trouble just to be sure the emulation is
+ * precise. We now return to our regularly scheduled concert.
+ */
+ ntp_node.clk_time -= adjtv.tv_sec + adjtv.tv_usec / 1e6;
+ return (1);
+}
+
+
+/*
+ * step_systime - step the system clock. We are religious here.
+ */
+int /* always succeeds */
+step_systime(
+ double now /* step adjustment (s) */
+ )
+{
+ ntp_node.adj = now;
+ return (1);
+}
+
+/*
+ * node_clock - update the clocks
+ */
+int /* always succeeds */
+node_clock(
+ Node *n, /* global node pointer */
+ double t /* node time */
+ )
+{
+ double dtemp;
+
+ /*
+ * Advance client clock (ntp_time). Advance server clock
+ * (clk_time) adjusted for systematic and random frequency
+ * errors. The random error is a random walk computed as the
+ * integral of samples from a Gaussian distribution.
+ */
+ dtemp = t - n->ntp_time;
+ n->time = t;
+ n->ntp_time += dtemp;
+ n->ferr += gauss(0, dtemp * n->fnse);
+ n->clk_time += dtemp * (1 + n->ferr);
+
+ /*
+ * Perform the adjtime() function. If the adjustment completed
+ * in the previous interval, amortize the entire amount; if not,
+ * carry the leftover to the next interval.
+ */
+ dtemp *= n->slew;
+ if (dtemp < fabs(n->adj)) {
+ if (n->adj < 0) {
+ n->adj += dtemp;
+ n->ntp_time -= dtemp;
+ } else {
+ n->adj -= dtemp;
+ n->ntp_time += dtemp;
+ }
+ } else {
+ n->ntp_time += n->adj;
+ n->adj = 0;
+ }
+ return (0);
+}
+
+
+/*
+ * gauss() - returns samples from a gaussion distribution
+ */
+double /* Gaussian sample */
+gauss(
+ double m, /* sample mean */
+ double s /* sample standard deviation (sigma) */
+ )
+{
+ double q1, q2;
+
+ /*
+ * Roll a sample from a Gaussian distribution with mean m and
+ * standard deviation s. For m = 0, s = 1, mean(y) = 0,
+ * std(y) = 1.
+ */
+ if (s == 0)
+ return (m);
+ while ((q1 = drand48()) == 0);
+ q2 = drand48();
+ return (m + s * sqrt(-2. * log(q1)) * cos(2. * PI * q2));
+}
+
+
+/*
+ * poisson() - returns samples from a network delay distribution
+ */
+double /* delay sample (s) */
+poisson(
+ double m, /* fixed propagation delay (s) */
+ double s /* exponential parameter (mu) */
+ )
+{
+ double q1;
+
+ /*
+ * Roll a sample from a composite distribution with propagation
+ * delay m and exponential distribution time with parameter s.
+ * For m = 0, s = 1, mean(y) = std(y) = 1.
+ */
+ if (s == 0)
+ return (m);
+ while ((q1 = drand48()) == 0);
+ return (m - s * log(q1 * s));
+}
+#endif /* SIM */
diff --git a/contrib/ntp/libntp/systime_s.c b/contrib/ntp/libntp/systime_s.c
new file mode 100644
index 000000000000..87621220b035
--- /dev/null
+++ b/contrib/ntp/libntp/systime_s.c
@@ -0,0 +1,2 @@
+#define SIM
+#include "systime.c"
diff --git a/contrib/ntp/libparse/Makefile.in b/contrib/ntp/libparse/Makefile.in
index 51546c19cd4f..e1e2a60bf099 100644
--- a/contrib/ntp/libparse/Makefile.in
+++ b/contrib/ntp/libparse/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,21 +94,65 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
EXTRA_LIBRARIES = libparse.a libparse_kernel.a
@@ -159,6 +201,7 @@ ETAGS_ARGS = Makefile.am
EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c
subdir = libparse
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -198,35 +241,33 @@ parsestreams_LDADD = $(LDADD)
parsestreams_DEPENDENCIES =
parsestreams_LDFLAGS =
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/clk_computime$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clk_dcf7000$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clk_hopf6021$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clk_meinberg$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clk_rawdcf$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clk_rcc8000$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clk_schmid$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clk_trimtaip$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clk_trimtsip$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clk_varitext$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/clk_wharton$U.Po $(DEPDIR)/data_mbg$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/info_trimble$U.Po $(DEPDIR)/parse$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/parse_conf$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/parsesolaris$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/parsestreams$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/trim_info$U.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/clk_computime$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clk_dcf7000$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clk_hopf6021$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clk_meinberg$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clk_rawdcf$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clk_rcc8000$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clk_schmid$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clk_trimtaip$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clk_trimtsip$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clk_varitext$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/clk_wharton$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/data_mbg$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/info_trimble$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/parse$U.Po ./$(DEPDIR)/parse_conf$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/parsesolaris$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/parsestreams$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/trim_info$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) \
parsesolaris.c parsestreams.c
-DIST_COMMON = README Makefile.am Makefile.in
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) parsesolaris.c parsestreams.c
all: all-am
@@ -237,9 +278,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu libparse/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
AR = ar
@@ -274,78 +313,84 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_computime$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_dcf7000$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_hopf6021$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_meinberg$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_rawdcf$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_rcc8000$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_schmid$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_trimtaip$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_trimtsip$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_varitext$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clk_wharton$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/data_mbg$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/info_trimble$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/parse$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/parse_conf$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/parsesolaris$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/parsestreams$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/trim_info$U.Po@am__quote@
-
-distclean-depend:
- -rm -rf $(DEPDIR)
+ -test "$U" = "" || rm -f *_.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_computime$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_dcf7000$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_hopf6021$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_meinberg$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_rawdcf$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_rcc8000$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_schmid$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_trimtaip$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_trimtsip$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_varitext$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_wharton$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_mbg$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_trimble$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_conf$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsesolaris$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsestreams$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trim_info$U.Po@am__quote@
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
clk_computime_.c: clk_computime.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_computime.c; then echo $(srcdir)/clk_computime.c; else echo clk_computime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_computime_.c || rm -f clk_computime_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_computime.c; then echo $(srcdir)/clk_computime.c; else echo clk_computime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_dcf7000_.c: clk_dcf7000.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_dcf7000.c; then echo $(srcdir)/clk_dcf7000.c; else echo clk_dcf7000.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_dcf7000_.c || rm -f clk_dcf7000_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_dcf7000.c; then echo $(srcdir)/clk_dcf7000.c; else echo clk_dcf7000.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_hopf6021_.c: clk_hopf6021.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_hopf6021.c; then echo $(srcdir)/clk_hopf6021.c; else echo clk_hopf6021.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_hopf6021_.c || rm -f clk_hopf6021_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_hopf6021.c; then echo $(srcdir)/clk_hopf6021.c; else echo clk_hopf6021.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_meinberg_.c: clk_meinberg.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_meinberg.c; then echo $(srcdir)/clk_meinberg.c; else echo clk_meinberg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_meinberg_.c || rm -f clk_meinberg_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_meinberg.c; then echo $(srcdir)/clk_meinberg.c; else echo clk_meinberg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_rawdcf_.c: clk_rawdcf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_rawdcf.c; then echo $(srcdir)/clk_rawdcf.c; else echo clk_rawdcf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_rawdcf_.c || rm -f clk_rawdcf_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_rawdcf.c; then echo $(srcdir)/clk_rawdcf.c; else echo clk_rawdcf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_rcc8000_.c: clk_rcc8000.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_rcc8000.c; then echo $(srcdir)/clk_rcc8000.c; else echo clk_rcc8000.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_rcc8000_.c || rm -f clk_rcc8000_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_rcc8000.c; then echo $(srcdir)/clk_rcc8000.c; else echo clk_rcc8000.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_schmid_.c: clk_schmid.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_schmid.c; then echo $(srcdir)/clk_schmid.c; else echo clk_schmid.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_schmid_.c || rm -f clk_schmid_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_schmid.c; then echo $(srcdir)/clk_schmid.c; else echo clk_schmid.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_trimtaip_.c: clk_trimtaip.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_trimtaip.c; then echo $(srcdir)/clk_trimtaip.c; else echo clk_trimtaip.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_trimtaip_.c || rm -f clk_trimtaip_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_trimtaip.c; then echo $(srcdir)/clk_trimtaip.c; else echo clk_trimtaip.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_trimtsip_.c: clk_trimtsip.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_trimtsip.c; then echo $(srcdir)/clk_trimtsip.c; else echo clk_trimtsip.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_trimtsip_.c || rm -f clk_trimtsip_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_trimtsip.c; then echo $(srcdir)/clk_trimtsip.c; else echo clk_trimtsip.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_varitext_.c: clk_varitext.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_varitext.c; then echo $(srcdir)/clk_varitext.c; else echo clk_varitext.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_varitext_.c || rm -f clk_varitext_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_varitext.c; then echo $(srcdir)/clk_varitext.c; else echo clk_varitext.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_wharton_.c: clk_wharton.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_wharton.c; then echo $(srcdir)/clk_wharton.c; else echo clk_wharton.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clk_wharton_.c || rm -f clk_wharton_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clk_wharton.c; then echo $(srcdir)/clk_wharton.c; else echo clk_wharton.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
data_mbg_.c: data_mbg.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/data_mbg.c; then echo $(srcdir)/data_mbg.c; else echo data_mbg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > data_mbg_.c || rm -f data_mbg_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/data_mbg.c; then echo $(srcdir)/data_mbg.c; else echo data_mbg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
info_trimble_.c: info_trimble.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/info_trimble.c; then echo $(srcdir)/info_trimble.c; else echo info_trimble.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > info_trimble_.c || rm -f info_trimble_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/info_trimble.c; then echo $(srcdir)/info_trimble.c; else echo info_trimble.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
parse_.c: parse.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/parse.c; then echo $(srcdir)/parse.c; else echo parse.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > parse_.c || rm -f parse_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/parse.c; then echo $(srcdir)/parse.c; else echo parse.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
parse_conf_.c: parse_conf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/parse_conf.c; then echo $(srcdir)/parse_conf.c; else echo parse_conf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > parse_conf_.c || rm -f parse_conf_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/parse_conf.c; then echo $(srcdir)/parse_conf.c; else echo parse_conf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
parsesolaris_.c: parsesolaris.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/parsesolaris.c; then echo $(srcdir)/parsesolaris.c; else echo parsesolaris.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > parsesolaris_.c || rm -f parsesolaris_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/parsesolaris.c; then echo $(srcdir)/parsesolaris.c; else echo parsesolaris.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
parsestreams_.c: parsestreams.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/parsestreams.c; then echo $(srcdir)/parsestreams.c; else echo parsestreams.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > parsestreams_.c || rm -f parsestreams_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/parsestreams.c; then echo $(srcdir)/parsestreams.c; else echo parsestreams.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
trim_info_.c: trim_info.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/trim_info.c; then echo $(srcdir)/trim_info.c; else echo trim_info.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > trim_info_.c || rm -f trim_info_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/trim_info.c; then echo $(srcdir)/trim_info.c; else echo trim_info.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clk_computime_.$(OBJEXT) clk_dcf7000_.$(OBJEXT) clk_hopf6021_.$(OBJEXT) \
clk_meinberg_.$(OBJEXT) clk_rawdcf_.$(OBJEXT) clk_rcc8000_.$(OBJEXT) \
clk_schmid_.$(OBJEXT) clk_trimtaip_.$(OBJEXT) clk_trimtsip_.$(OBJEXT) \
@@ -355,53 +400,85 @@ parsesolaris_.$(OBJEXT) parsestreams_.$(OBJEXT) trim_info_.$(OBJEXT) : \
$(ANSI2KNR)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -413,7 +490,6 @@ check: check-am
all-am: Makefile $(LIBRARIES) $(PROGRAMS)
installdirs:
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -425,6 +501,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -433,7 +510,7 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -444,9 +521,11 @@ clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -467,6 +546,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -474,17 +555,25 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-generic \
- clean-noinstLIBRARIES clean-noinstPROGRAMS distclean \
- distclean-compile distclean-depend distclean-generic \
- distclean-tags distdir dvi dvi-am info info-am install \
- install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-kr tags \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-tags distdir dvi \
+ dvi-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-kr pdf pdf-am ps ps-am tags \
uninstall uninstall-am uninstall-info-am
diff --git a/contrib/ntp/missing b/contrib/ntp/missing
index 0a7fb5a2acec..6a37006e8f0a 100755
--- a/contrib/ntp/missing
+++ b/contrib/ntp/missing
@@ -1,6 +1,6 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -78,7 +78,7 @@ Supported PROGRAM values:
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing 0.3 - GNU automake"
+ echo "missing 0.4 - GNU automake"
;;
-*)
@@ -87,7 +87,12 @@ Supported PROGRAM values:
exit 1
;;
- aclocal)
+ aclocal*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
@@ -97,6 +102,11 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
@@ -106,6 +116,11 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
@@ -124,7 +139,12 @@ WARNING: \`$1' is missing on your system. You should only need it if
touch $touch_files
;;
- automake)
+ automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
@@ -135,6 +155,34 @@ WARNING: \`$1' is missing on your system. You should only need it if
while read f; do touch "$f"; done
;;
+ autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
@@ -189,6 +237,11 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
@@ -240,23 +293,23 @@ WARNING: \`$1' is missing on your system. You should only need it if
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
- gnutar ${1+"$@"} && exit 0
+ gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
- gtar ${1+"$@"} && exit 0
+ gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" ${1+"$@"} && exit 0
+ tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" ${1+"$@"} && exit 0
+ tar "$firstarg" "$@" && exit 0
;;
esac
fi
diff --git a/contrib/ntp/mkinstalldirs b/contrib/ntp/mkinstalldirs
index 4f58503ea4e0..d2d5f21b6112 100755
--- a/contrib/ntp/mkinstalldirs
+++ b/contrib/ntp/mkinstalldirs
@@ -4,37 +4,108 @@
# Created: 1993-05-16
# Public domain
-# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
-
errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case $1 in
+ -h | --help | --h*) # -h for help
+ echo "$usage" 1>&2
+ exit 0
+ ;;
+ -m) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --) # stop option processing
+ shift
+ break
+ ;;
+ -*) # unknown option
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *) # first non-opt arg
+ break
+ ;;
+ esac
+done
for file
do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+ 0) exit 0 ;;
+esac
+
+case $dirmode in
+ '')
+ if mkdir -p -- . 2>/dev/null; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ fi
+ ;;
+ *)
+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ fi
+ ;;
+esac
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case $pathcomp in
+ -*) pathcomp=./$pathcomp ;;
+ esac
- pathcomp=
- for d
- do
- pathcomp="$pathcomp$d"
- case "$pathcomp" in
- -* ) pathcomp=./$pathcomp ;;
- esac
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp"
+ mkdir "$pathcomp" || lasterr=$?
- mkdir "$pathcomp" || lasterr=$?
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- fi
- fi
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
- pathcomp="$pathcomp/"
- done
+ pathcomp="$pathcomp/"
+ done
done
exit $errstatus
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
# mkinstalldirs ends here
diff --git a/contrib/ntp/ntpd/Makefile.am b/contrib/ntp/ntpd/Makefile.am
index 94dfd092a6f2..0fa4e219461a 100644
--- a/contrib/ntp/ntpd/Makefile.am
+++ b/contrib/ntp/ntpd/Makefile.am
@@ -1,31 +1,39 @@
#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
-bin_PROGRAMS = ntpd
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/librsaref
-# LDADD might need RESLIB and ADJLIB
-LDADD = version.o @LIBPARSE@ ../libntp/libntp.a @LIBRSAREF@
+bin_PROGRAMS = ntpd @MAKE_NTPDSIM@
+noinst_LIBRARIES = libntpd.a
+INCLUDES = -I$(top_srcdir)/include -I../include
+# LDADD might need RESLIB and ADJLIB.
+# If LIBPARSE, we need libntpd.a 2wagain afterwards...
+LDADD = version.o libntpd.a @LIBPARSE@ libntpd.a
# ntpd may need:
# log10 refclock_wwv.o
# sqrt ntp_control.o
# floor refclock_wwv.o
# which are (usually) provided by -lm.
-ntpd_LDADD = $(LDADD) -lm
+ntpd_LDADD = $(LDADD) ../libntp/libntp.a -lm @LCRYPTO@
+ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a -lm @LCRYPTO@
+ntpdsim_CFLAGS = $(CFLAGS) -DSIM
+check_y2k_LDADD = $(LDADD) ../libntp/libntp.a
DISTCLEANFILES = .version version.c
#EXTRA_DIST = ntpd.mak
ETAGS_ARGS = Makefile.am
### Y2Kfixes
check_PROGRAMS = @MAKE_CHECK_Y2K@
-EXTRA_PROGRAMS = check_y2k
+EXTRA_PROGRAMS = check_y2k ntpdsim
check-local: @MAKE_CHECK_Y2K@
test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
+# SIM: cmd_args.c ntp_config.c ntp_io.c ntpd.c + ntpsim.c (include/ntpsim.h)
# ntp_resolver.c is presently unused...
-ntpd_SOURCES = cmd_args.c jupiter.h map_vme.c ntp_config.c ntp_control.c \
+ntpd_SOURCES = cmd_args.c ntp_config.c ntp_io.c ntpd.c
+ntpdsim_SOURCES = $(ntpd_SOURCES) ntpsim.c
+libntpd_a_SOURCES = jupiter.h map_vme.c ntp_control.c \
ntp_crypto.c ntp_filegen.c \
- ntp_intres.c ntp_io.c ntp_loopfilter.c ntp_monitor.c ntp_peer.c \
+ ntp_intres.c ntp_loopfilter.c ntp_monitor.c ntp_peer.c \
ntp_proto.c ntp_refclock.c ntp_request.c \
- ntp_restrict.c ntp_timer.c ntp_util.c ntpd.c \
+ ntp_restrict.c ntp_timer.c ntp_util.c \
refclock_acts.c refclock_arbiter.c refclock_arc.c refclock_as2201.c \
refclock_atom.c refclock_bancomm.c refclock_chronolog.c \
refclock_chu.c refclock_conf.c refclock_datum.c refclock_dumbclock.c \
@@ -47,6 +55,6 @@ $(PROGRAMS): $(LDADD)
../libparse/libparse.a:
cd ../libparse && $(MAKE)
-version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ @LIBRSAREF@ Makefile
+version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/version
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpd
$(COMPILE) -c version.c
diff --git a/contrib/ntp/ntpd/Makefile.in b/contrib/ntp/ntpd/Makefile.in
index 2622b3b2829c..eef07742aaa5 100644
--- a/contrib/ntp/ntpd/Makefile.in
+++ b/contrib/ntp/ntpd/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,45 +94,97 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
-bin_PROGRAMS = ntpd
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/librsaref
-# LDADD might need RESLIB and ADJLIB
-LDADD = version.o @LIBPARSE@ ../libntp/libntp.a @LIBRSAREF@
+bin_PROGRAMS = ntpd @MAKE_NTPDSIM@
+noinst_LIBRARIES = libntpd.a
+INCLUDES = -I$(top_srcdir)/include -I../include
+# LDADD might need RESLIB and ADJLIB.
+# If LIBPARSE, we need libntpd.a 2wagain afterwards...
+LDADD = version.o libntpd.a @LIBPARSE@ libntpd.a
# ntpd may need:
# log10 refclock_wwv.o
# sqrt ntp_control.o
# floor refclock_wwv.o
# which are (usually) provided by -lm.
-ntpd_LDADD = $(LDADD) -lm
+ntpd_LDADD = $(LDADD) ../libntp/libntp.a -lm @LCRYPTO@
+ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a -lm @LCRYPTO@
+ntpdsim_CFLAGS = $(CFLAGS) -DSIM
+check_y2k_LDADD = $(LDADD) ../libntp/libntp.a
DISTCLEANFILES = .version version.c
#EXTRA_DIST = ntpd.mak
ETAGS_ARGS = Makefile.am
### Y2Kfixes
check_PROGRAMS = @MAKE_CHECK_Y2K@
-EXTRA_PROGRAMS = check_y2k
+EXTRA_PROGRAMS = check_y2k ntpdsim
+# SIM: cmd_args.c ntp_config.c ntp_io.c ntpd.c + ntpsim.c (include/ntpsim.h)
# ntp_resolver.c is presently unused...
-ntpd_SOURCES = cmd_args.c jupiter.h map_vme.c ntp_config.c ntp_control.c \
+ntpd_SOURCES = cmd_args.c ntp_config.c ntp_io.c ntpd.c
+ntpdsim_SOURCES = $(ntpd_SOURCES) ntpsim.c
+libntpd_a_SOURCES = jupiter.h map_vme.c ntp_control.c \
ntp_crypto.c ntp_filegen.c \
- ntp_intres.c ntp_io.c ntp_loopfilter.c ntp_monitor.c ntp_peer.c \
+ ntp_intres.c ntp_loopfilter.c ntp_monitor.c ntp_peer.c \
ntp_proto.c ntp_refclock.c ntp_request.c \
- ntp_restrict.c ntp_timer.c ntp_util.c ntpd.c \
+ ntp_restrict.c ntp_timer.c ntp_util.c \
refclock_acts.c refclock_arbiter.c refclock_arc.c refclock_as2201.c \
refclock_atom.c refclock_bancomm.c refclock_chronolog.c \
refclock_chu.c refclock_conf.c refclock_datum.c refclock_dumbclock.c \
@@ -149,122 +199,143 @@ ntpd_SOURCES = cmd_args.c jupiter.h map_vme.c ntp_config.c ntp_control.c \
refclock_zyfer.c refclock_ripencc.c refclock_neoclock4x.c
subdir = ntpd
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
-EXTRA_PROGRAMS = check_y2k$(EXEEXT)
-bin_PROGRAMS = ntpd$(EXEEXT)
+LIBRARIES = $(noinst_LIBRARIES)
+
+libntpd_a_AR = $(AR) cru
+libntpd_a_LIBADD =
+am_libntpd_a_OBJECTS = map_vme$U.$(OBJEXT) ntp_control$U.$(OBJEXT) \
+ ntp_crypto$U.$(OBJEXT) ntp_filegen$U.$(OBJEXT) \
+ ntp_intres$U.$(OBJEXT) ntp_loopfilter$U.$(OBJEXT) \
+ ntp_monitor$U.$(OBJEXT) ntp_peer$U.$(OBJEXT) \
+ ntp_proto$U.$(OBJEXT) ntp_refclock$U.$(OBJEXT) \
+ ntp_request$U.$(OBJEXT) ntp_restrict$U.$(OBJEXT) \
+ ntp_timer$U.$(OBJEXT) ntp_util$U.$(OBJEXT) \
+ refclock_acts$U.$(OBJEXT) refclock_arbiter$U.$(OBJEXT) \
+ refclock_arc$U.$(OBJEXT) refclock_as2201$U.$(OBJEXT) \
+ refclock_atom$U.$(OBJEXT) refclock_bancomm$U.$(OBJEXT) \
+ refclock_chronolog$U.$(OBJEXT) refclock_chu$U.$(OBJEXT) \
+ refclock_conf$U.$(OBJEXT) refclock_datum$U.$(OBJEXT) \
+ refclock_dumbclock$U.$(OBJEXT) refclock_fg$U.$(OBJEXT) \
+ refclock_gpsvme$U.$(OBJEXT) refclock_heath$U.$(OBJEXT) \
+ refclock_hopfser$U.$(OBJEXT) refclock_hopfpci$U.$(OBJEXT) \
+ refclock_hpgps$U.$(OBJEXT) refclock_irig$U.$(OBJEXT) \
+ refclock_jjy$U.$(OBJEXT) refclock_jupiter$U.$(OBJEXT) \
+ refclock_leitch$U.$(OBJEXT) refclock_local$U.$(OBJEXT) \
+ refclock_msfees$U.$(OBJEXT) refclock_mx4200$U.$(OBJEXT) \
+ refclock_nmea$U.$(OBJEXT) refclock_oncore$U.$(OBJEXT) \
+ refclock_palisade$U.$(OBJEXT) refclock_parse$U.$(OBJEXT) \
+ refclock_pcf$U.$(OBJEXT) refclock_pst$U.$(OBJEXT) \
+ refclock_ptbacts$U.$(OBJEXT) refclock_shm$U.$(OBJEXT) \
+ refclock_tpro$U.$(OBJEXT) refclock_trak$U.$(OBJEXT) \
+ refclock_true$U.$(OBJEXT) refclock_tt560$U.$(OBJEXT) \
+ refclock_ulink$U.$(OBJEXT) refclock_usno$U.$(OBJEXT) \
+ refclock_wwv$U.$(OBJEXT) refclock_wwvb$U.$(OBJEXT) \
+ refclock_zyfer$U.$(OBJEXT) refclock_ripencc$U.$(OBJEXT) \
+ refclock_neoclock4x$U.$(OBJEXT)
+libntpd_a_OBJECTS = $(am_libntpd_a_OBJECTS)
+EXTRA_PROGRAMS = check_y2k$(EXEEXT) ntpdsim$(EXEEXT)
+bin_PROGRAMS = ntpd$(EXEEXT) @MAKE_NTPDSIM@
check_PROGRAMS = @MAKE_CHECK_Y2K@
PROGRAMS = $(bin_PROGRAMS)
check_y2k_SOURCES = check_y2k.c
check_y2k_OBJECTS = check_y2k$U.$(OBJEXT)
-check_y2k_LDADD = $(LDADD)
-check_y2k_DEPENDENCIES = version.o ../libntp/libntp.a
+check_y2k_DEPENDENCIES = version.o libntpd.a libntpd.a \
+ ../libntp/libntp.a
check_y2k_LDFLAGS =
-am_ntpd_OBJECTS = cmd_args$U.$(OBJEXT) map_vme$U.$(OBJEXT) \
- ntp_config$U.$(OBJEXT) ntp_control$U.$(OBJEXT) \
- ntp_crypto$U.$(OBJEXT) ntp_filegen$U.$(OBJEXT) \
- ntp_intres$U.$(OBJEXT) ntp_io$U.$(OBJEXT) \
- ntp_loopfilter$U.$(OBJEXT) ntp_monitor$U.$(OBJEXT) \
- ntp_peer$U.$(OBJEXT) ntp_proto$U.$(OBJEXT) \
- ntp_refclock$U.$(OBJEXT) ntp_request$U.$(OBJEXT) \
- ntp_restrict$U.$(OBJEXT) ntp_timer$U.$(OBJEXT) \
- ntp_util$U.$(OBJEXT) ntpd$U.$(OBJEXT) refclock_acts$U.$(OBJEXT) \
- refclock_arbiter$U.$(OBJEXT) refclock_arc$U.$(OBJEXT) \
- refclock_as2201$U.$(OBJEXT) refclock_atom$U.$(OBJEXT) \
- refclock_bancomm$U.$(OBJEXT) refclock_chronolog$U.$(OBJEXT) \
- refclock_chu$U.$(OBJEXT) refclock_conf$U.$(OBJEXT) \
- refclock_datum$U.$(OBJEXT) refclock_dumbclock$U.$(OBJEXT) \
- refclock_fg$U.$(OBJEXT) refclock_gpsvme$U.$(OBJEXT) \
- refclock_heath$U.$(OBJEXT) refclock_hopfser$U.$(OBJEXT) \
- refclock_hopfpci$U.$(OBJEXT) refclock_hpgps$U.$(OBJEXT) \
- refclock_irig$U.$(OBJEXT) refclock_jjy$U.$(OBJEXT) \
- refclock_jupiter$U.$(OBJEXT) refclock_leitch$U.$(OBJEXT) \
- refclock_local$U.$(OBJEXT) refclock_msfees$U.$(OBJEXT) \
- refclock_mx4200$U.$(OBJEXT) refclock_nmea$U.$(OBJEXT) \
- refclock_oncore$U.$(OBJEXT) refclock_palisade$U.$(OBJEXT) \
- refclock_parse$U.$(OBJEXT) refclock_pcf$U.$(OBJEXT) \
- refclock_pst$U.$(OBJEXT) refclock_ptbacts$U.$(OBJEXT) \
- refclock_shm$U.$(OBJEXT) refclock_tpro$U.$(OBJEXT) \
- refclock_trak$U.$(OBJEXT) refclock_true$U.$(OBJEXT) \
- refclock_tt560$U.$(OBJEXT) refclock_ulink$U.$(OBJEXT) \
- refclock_usno$U.$(OBJEXT) refclock_wwv$U.$(OBJEXT) \
- refclock_wwvb$U.$(OBJEXT) refclock_zyfer$U.$(OBJEXT) \
- refclock_ripencc$U.$(OBJEXT) refclock_neoclock4x$U.$(OBJEXT)
+am_ntpd_OBJECTS = cmd_args$U.$(OBJEXT) ntp_config$U.$(OBJEXT) \
+ ntp_io$U.$(OBJEXT) ntpd$U.$(OBJEXT)
ntpd_OBJECTS = $(am_ntpd_OBJECTS)
-ntpd_DEPENDENCIES = version.o ../libntp/libntp.a
+ntpd_DEPENDENCIES = version.o libntpd.a libntpd.a ../libntp/libntp.a
ntpd_LDFLAGS =
+am__objects_1 = ntpdsim-cmd_args$U.$(OBJEXT) \
+ ntpdsim-ntp_config$U.$(OBJEXT) ntpdsim-ntp_io$U.$(OBJEXT) \
+ ntpdsim-ntpd$U.$(OBJEXT)
+am_ntpdsim_OBJECTS = $(am__objects_1) ntpdsim-ntpsim$U.$(OBJEXT)
+ntpdsim_OBJECTS = $(am_ntpdsim_OBJECTS)
+ntpdsim_DEPENDENCIES = version.o libntpd.a libntpd.a \
+ ../libntp/libntpsim.a
+ntpdsim_LDFLAGS =
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/check_y2k$U.Po $(DEPDIR)/cmd_args$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/map_vme$U.Po $(DEPDIR)/ntp_config$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_control$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_crypto$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_filegen$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_intres$U.Po $(DEPDIR)/ntp_io$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_loopfilter$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_monitor$U.Po $(DEPDIR)/ntp_peer$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_proto$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_refclock$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_request$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_restrict$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntp_timer$U.Po $(DEPDIR)/ntp_util$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntpd$U.Po $(DEPDIR)/refclock_acts$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_arbiter$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_arc$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_as2201$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_atom$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_bancomm$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_chronolog$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_chu$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_conf$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_datum$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_dumbclock$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_fg$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_gpsvme$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_heath$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_hopfpci$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_hopfser$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_hpgps$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_irig$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_jjy$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_jupiter$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_leitch$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_local$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_msfees$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_mx4200$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_neoclock4x$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_nmea$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_oncore$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_palisade$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_parse$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_pcf$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_pst$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_ptbacts$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_ripencc$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_shm$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_tpro$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_trak$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_true$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_tt560$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_ulink$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_usno$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_wwv$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_wwvb$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/refclock_zyfer$U.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/check_y2k$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/cmd_args$U.Po ./$(DEPDIR)/map_vme$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_config$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_control$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_crypto$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_filegen$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_intres$U.Po ./$(DEPDIR)/ntp_io$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_loopfilter$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_monitor$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_peer$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_proto$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_refclock$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_request$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_restrict$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_timer$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp_util$U.Po ./$(DEPDIR)/ntpd$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntpdsim-cmd_args$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntpdsim-ntp_config$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntpdsim-ntp_io$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntpdsim-ntpd$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntpdsim-ntpsim$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_acts$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_arbiter$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_arc$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_as2201$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_atom$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_bancomm$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_chronolog$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_chu$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_conf$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_datum$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_dumbclock$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_fg$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_gpsvme$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_heath$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_hopfpci$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_hopfser$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_hpgps$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_irig$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_jjy$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_jupiter$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_leitch$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_local$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_msfees$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_mx4200$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_neoclock4x$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_nmea$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_oncore$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_palisade$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_parse$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_pcf$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_pst$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_ptbacts$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_ripencc$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_shm$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_tpro$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_trak$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_true$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_tt560$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_ulink$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_usno$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_wwv$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_wwvb$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/refclock_zyfer$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = check_y2k.c $(ntpd_SOURCES)
-DIST_COMMON = Makefile.am Makefile.in
-SOURCES = check_y2k.c $(ntpd_SOURCES)
+DIST_SOURCES = $(libntpd_a_SOURCES) check_y2k.c $(ntpd_SOURCES) \
+ $(ntpdsim_SOURCES)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(libntpd_a_SOURCES) check_y2k.c $(ntpd_SOURCES) $(ntpdsim_SOURCES)
all: all-am
@@ -274,9 +345,17 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu ntpd/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+AR = ar
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libntpd.a: $(libntpd_a_OBJECTS) $(libntpd_a_DEPENDENCIES)
+ -rm -f libntpd.a
+ $(libntpd_a_AR) libntpd.a $(libntpd_a_OBJECTS) $(libntpd_a_LIBADD)
+ $(RANLIB) libntpd.a
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@@ -284,16 +363,16 @@ install-binPROGRAMS: $(bin_PROGRAMS)
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
- f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
@@ -309,6 +388,9 @@ check_y2k$(EXEEXT): $(check_y2k_OBJECTS) $(check_y2k_DEPENDENCIES)
ntpd$(EXEEXT): $(ntpd_OBJECTS) $(ntpd_DEPENDENCIES)
@rm -f ntpd$(EXEEXT)
$(LINK) $(ntpd_LDFLAGS) $(ntpd_OBJECTS) $(ntpd_LDADD) $(LIBS)
+ntpdsim$(EXEEXT): $(ntpdsim_OBJECTS) $(ntpdsim_DEPENDENCIES)
+ @rm -f ntpdsim$(EXEEXT)
+ $(LINK) $(ntpdsim_LDFLAGS) $(ntpdsim_OBJECTS) $(ntpdsim_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
@@ -321,287 +403,442 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/check_y2k$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cmd_args$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/map_vme$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_config$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_control$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_crypto$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_filegen$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_intres$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_io$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_loopfilter$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_monitor$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_peer$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_proto$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_refclock$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_request$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_restrict$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_timer$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_util$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntpd$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_acts$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_arbiter$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_arc$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_as2201$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_atom$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_bancomm$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_chronolog$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_chu$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_conf$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_datum$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_dumbclock$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_fg$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_gpsvme$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_heath$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_hopfpci$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_hopfser$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_hpgps$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_irig$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_jjy$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_jupiter$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_leitch$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_local$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_msfees$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_mx4200$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_neoclock4x$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_nmea$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_oncore$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_palisade$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_parse$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_pcf$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_pst$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_ptbacts$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_ripencc$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_shm$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_tpro$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_trak$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_true$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_tt560$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_ulink$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_usno$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_wwv$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_wwvb$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_zyfer$U.Po@am__quote@
-
-distclean-depend:
- -rm -rf $(DEPDIR)
+ -test "$U" = "" || rm -f *_.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_y2k$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmd_args$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map_vme$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_config$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_control$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_crypto$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_filegen$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_intres$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_io$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_loopfilter$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_monitor$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_peer$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_proto$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_refclock$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_request$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_restrict$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_timer$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_util$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpd$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-cmd_args$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_config$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_io$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpd$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpsim$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_acts$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_arbiter$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_arc$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_as2201$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_atom$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_bancomm$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_chronolog$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_chu$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_conf$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_datum$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_dumbclock$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_fg$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_gpsvme$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_heath$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_hopfpci$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_hopfser$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_hpgps$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_irig$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_jjy$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_jupiter$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_leitch$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_local$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_msfees$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_mx4200$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_neoclock4x$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_nmea$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_oncore$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_palisade$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_parse$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_pcf$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_pst$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_ptbacts$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_ripencc$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_shm$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tpro$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_trak$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_true$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tt560$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_ulink$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_usno$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_wwv$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_wwvb$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_zyfer$U.Po@am__quote@
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+
+ntpdsim-cmd_args$U.o: cmd_args$U.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-cmd_args$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo" \
+@am__fastdepCC_TRUE@ -c -o ntpdsim-cmd_args$U.o `test -f 'cmd_args$U.c' || echo '$(srcdir)/'`cmd_args$U.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo" "$(DEPDIR)/ntpdsim-cmd_args$U.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmd_args$U.c' object='ntpdsim-cmd_args$U.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/ntpdsim-cmd_args$U.Po' tmpdepfile='$(DEPDIR)/ntpdsim-cmd_args$U.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-cmd_args$U.o `test -f 'cmd_args$U.c' || echo '$(srcdir)/'`cmd_args$U.c
+
+ntpdsim-cmd_args$U.obj: cmd_args$U.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-cmd_args$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo" \
+@am__fastdepCC_TRUE@ -c -o ntpdsim-cmd_args$U.obj `if test -f 'cmd_args$U.c'; then $(CYGPATH_W) 'cmd_args$U.c'; else $(CYGPATH_W) '$(srcdir)/cmd_args$U.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo" "$(DEPDIR)/ntpdsim-cmd_args$U.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmd_args$U.c' object='ntpdsim-cmd_args$U.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/ntpdsim-cmd_args$U.Po' tmpdepfile='$(DEPDIR)/ntpdsim-cmd_args$U.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-cmd_args$U.obj `if test -f 'cmd_args$U.c'; then $(CYGPATH_W) 'cmd_args$U.c'; else $(CYGPATH_W) '$(srcdir)/cmd_args$U.c'; fi`
+
+ntpdsim-ntp_config$U.o: ntp_config$U.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_config$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo" \
+@am__fastdepCC_TRUE@ -c -o ntpdsim-ntp_config$U.o `test -f 'ntp_config$U.c' || echo '$(srcdir)/'`ntp_config$U.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo" "$(DEPDIR)/ntpdsim-ntp_config$U.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_config$U.c' object='ntpdsim-ntp_config$U.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/ntpdsim-ntp_config$U.Po' tmpdepfile='$(DEPDIR)/ntpdsim-ntp_config$U.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_config$U.o `test -f 'ntp_config$U.c' || echo '$(srcdir)/'`ntp_config$U.c
+
+ntpdsim-ntp_config$U.obj: ntp_config$U.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_config$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo" \
+@am__fastdepCC_TRUE@ -c -o ntpdsim-ntp_config$U.obj `if test -f 'ntp_config$U.c'; then $(CYGPATH_W) 'ntp_config$U.c'; else $(CYGPATH_W) '$(srcdir)/ntp_config$U.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo" "$(DEPDIR)/ntpdsim-ntp_config$U.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_config$U.c' object='ntpdsim-ntp_config$U.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/ntpdsim-ntp_config$U.Po' tmpdepfile='$(DEPDIR)/ntpdsim-ntp_config$U.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_config$U.obj `if test -f 'ntp_config$U.c'; then $(CYGPATH_W) 'ntp_config$U.c'; else $(CYGPATH_W) '$(srcdir)/ntp_config$U.c'; fi`
+
+ntpdsim-ntp_io$U.o: ntp_io$U.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_io$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo" \
+@am__fastdepCC_TRUE@ -c -o ntpdsim-ntp_io$U.o `test -f 'ntp_io$U.c' || echo '$(srcdir)/'`ntp_io$U.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo" "$(DEPDIR)/ntpdsim-ntp_io$U.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_io$U.c' object='ntpdsim-ntp_io$U.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/ntpdsim-ntp_io$U.Po' tmpdepfile='$(DEPDIR)/ntpdsim-ntp_io$U.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_io$U.o `test -f 'ntp_io$U.c' || echo '$(srcdir)/'`ntp_io$U.c
+
+ntpdsim-ntp_io$U.obj: ntp_io$U.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_io$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo" \
+@am__fastdepCC_TRUE@ -c -o ntpdsim-ntp_io$U.obj `if test -f 'ntp_io$U.c'; then $(CYGPATH_W) 'ntp_io$U.c'; else $(CYGPATH_W) '$(srcdir)/ntp_io$U.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo" "$(DEPDIR)/ntpdsim-ntp_io$U.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_io$U.c' object='ntpdsim-ntp_io$U.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/ntpdsim-ntp_io$U.Po' tmpdepfile='$(DEPDIR)/ntpdsim-ntp_io$U.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_io$U.obj `if test -f 'ntp_io$U.c'; then $(CYGPATH_W) 'ntp_io$U.c'; else $(CYGPATH_W) '$(srcdir)/ntp_io$U.c'; fi`
+
+ntpdsim-ntpd$U.o: ntpd$U.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpd$U.Tpo" \
+@am__fastdepCC_TRUE@ -c -o ntpdsim-ntpd$U.o `test -f 'ntpd$U.c' || echo '$(srcdir)/'`ntpd$U.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpd$U.Tpo" "$(DEPDIR)/ntpdsim-ntpd$U.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/ntpdsim-ntpd$U.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpd$U.c' object='ntpdsim-ntpd$U.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/ntpdsim-ntpd$U.Po' tmpdepfile='$(DEPDIR)/ntpdsim-ntpd$U.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd$U.o `test -f 'ntpd$U.c' || echo '$(srcdir)/'`ntpd$U.c
+
+ntpdsim-ntpd$U.obj: ntpd$U.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpd$U.Tpo" \
+@am__fastdepCC_TRUE@ -c -o ntpdsim-ntpd$U.obj `if test -f 'ntpd$U.c'; then $(CYGPATH_W) 'ntpd$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpd$U.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpd$U.Tpo" "$(DEPDIR)/ntpdsim-ntpd$U.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/ntpdsim-ntpd$U.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpd$U.c' object='ntpdsim-ntpd$U.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/ntpdsim-ntpd$U.Po' tmpdepfile='$(DEPDIR)/ntpdsim-ntpd$U.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd$U.obj `if test -f 'ntpd$U.c'; then $(CYGPATH_W) 'ntpd$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpd$U.c'; fi`
+
+ntpdsim-ntpsim$U.o: ntpsim$U.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpsim$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo" \
+@am__fastdepCC_TRUE@ -c -o ntpdsim-ntpsim$U.o `test -f 'ntpsim$U.c' || echo '$(srcdir)/'`ntpsim$U.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo" "$(DEPDIR)/ntpdsim-ntpsim$U.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpsim$U.c' object='ntpdsim-ntpsim$U.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/ntpdsim-ntpsim$U.Po' tmpdepfile='$(DEPDIR)/ntpdsim-ntpsim$U.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpsim$U.o `test -f 'ntpsim$U.c' || echo '$(srcdir)/'`ntpsim$U.c
+
+ntpdsim-ntpsim$U.obj: ntpsim$U.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpsim$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo" \
+@am__fastdepCC_TRUE@ -c -o ntpdsim-ntpsim$U.obj `if test -f 'ntpsim$U.c'; then $(CYGPATH_W) 'ntpsim$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpsim$U.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo" "$(DEPDIR)/ntpdsim-ntpsim$U.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpsim$U.c' object='ntpdsim-ntpsim$U.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/ntpdsim-ntpsim$U.Po' tmpdepfile='$(DEPDIR)/ntpdsim-ntpsim$U.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpsim$U.obj `if test -f 'ntpsim$U.c'; then $(CYGPATH_W) 'ntpsim$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpsim$U.c'; fi`
check_y2k_.c: check_y2k.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/check_y2k.c; then echo $(srcdir)/check_y2k.c; else echo check_y2k.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > check_y2k_.c || rm -f check_y2k_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/check_y2k.c; then echo $(srcdir)/check_y2k.c; else echo check_y2k.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
cmd_args_.c: cmd_args.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmd_args.c; then echo $(srcdir)/cmd_args.c; else echo cmd_args.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > cmd_args_.c || rm -f cmd_args_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmd_args.c; then echo $(srcdir)/cmd_args.c; else echo cmd_args.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
map_vme_.c: map_vme.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/map_vme.c; then echo $(srcdir)/map_vme.c; else echo map_vme.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > map_vme_.c || rm -f map_vme_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/map_vme.c; then echo $(srcdir)/map_vme.c; else echo map_vme.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_config_.c: ntp_config.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_config.c; then echo $(srcdir)/ntp_config.c; else echo ntp_config.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_config_.c || rm -f ntp_config_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_config.c; then echo $(srcdir)/ntp_config.c; else echo ntp_config.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_control_.c: ntp_control.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_control.c; then echo $(srcdir)/ntp_control.c; else echo ntp_control.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_control_.c || rm -f ntp_control_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_control.c; then echo $(srcdir)/ntp_control.c; else echo ntp_control.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_crypto_.c: ntp_crypto.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_crypto.c; then echo $(srcdir)/ntp_crypto.c; else echo ntp_crypto.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_crypto_.c || rm -f ntp_crypto_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_crypto.c; then echo $(srcdir)/ntp_crypto.c; else echo ntp_crypto.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_filegen_.c: ntp_filegen.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_filegen.c; then echo $(srcdir)/ntp_filegen.c; else echo ntp_filegen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_filegen_.c || rm -f ntp_filegen_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_filegen.c; then echo $(srcdir)/ntp_filegen.c; else echo ntp_filegen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_intres_.c: ntp_intres.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_intres.c; then echo $(srcdir)/ntp_intres.c; else echo ntp_intres.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_intres_.c || rm -f ntp_intres_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_intres.c; then echo $(srcdir)/ntp_intres.c; else echo ntp_intres.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_io_.c: ntp_io.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_io.c; then echo $(srcdir)/ntp_io.c; else echo ntp_io.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_io_.c || rm -f ntp_io_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_io.c; then echo $(srcdir)/ntp_io.c; else echo ntp_io.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_loopfilter_.c: ntp_loopfilter.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_loopfilter.c; then echo $(srcdir)/ntp_loopfilter.c; else echo ntp_loopfilter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_loopfilter_.c || rm -f ntp_loopfilter_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_loopfilter.c; then echo $(srcdir)/ntp_loopfilter.c; else echo ntp_loopfilter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_monitor_.c: ntp_monitor.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_monitor.c; then echo $(srcdir)/ntp_monitor.c; else echo ntp_monitor.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_monitor_.c || rm -f ntp_monitor_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_monitor.c; then echo $(srcdir)/ntp_monitor.c; else echo ntp_monitor.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_peer_.c: ntp_peer.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_peer.c; then echo $(srcdir)/ntp_peer.c; else echo ntp_peer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_peer_.c || rm -f ntp_peer_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_peer.c; then echo $(srcdir)/ntp_peer.c; else echo ntp_peer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_proto_.c: ntp_proto.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_proto.c; then echo $(srcdir)/ntp_proto.c; else echo ntp_proto.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_proto_.c || rm -f ntp_proto_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_proto.c; then echo $(srcdir)/ntp_proto.c; else echo ntp_proto.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_refclock_.c: ntp_refclock.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_refclock.c; then echo $(srcdir)/ntp_refclock.c; else echo ntp_refclock.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_refclock_.c || rm -f ntp_refclock_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_refclock.c; then echo $(srcdir)/ntp_refclock.c; else echo ntp_refclock.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_request_.c: ntp_request.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_request.c; then echo $(srcdir)/ntp_request.c; else echo ntp_request.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_request_.c || rm -f ntp_request_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_request.c; then echo $(srcdir)/ntp_request.c; else echo ntp_request.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_restrict_.c: ntp_restrict.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_restrict.c; then echo $(srcdir)/ntp_restrict.c; else echo ntp_restrict.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_restrict_.c || rm -f ntp_restrict_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_restrict.c; then echo $(srcdir)/ntp_restrict.c; else echo ntp_restrict.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_timer_.c: ntp_timer.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_timer.c; then echo $(srcdir)/ntp_timer.c; else echo ntp_timer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_timer_.c || rm -f ntp_timer_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_timer.c; then echo $(srcdir)/ntp_timer.c; else echo ntp_timer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntp_util_.c: ntp_util.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_util.c; then echo $(srcdir)/ntp_util.c; else echo ntp_util.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_util_.c || rm -f ntp_util_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_util.c; then echo $(srcdir)/ntp_util.c; else echo ntp_util.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntpd_.c: ntpd.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpd.c; then echo $(srcdir)/ntpd.c; else echo ntpd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntpd_.c || rm -f ntpd_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpd.c; then echo $(srcdir)/ntpd.c; else echo ntpd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+ntpsim_.c: ntpsim.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpsim.c; then echo $(srcdir)/ntpsim.c; else echo ntpsim.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_acts_.c: refclock_acts.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_acts.c; then echo $(srcdir)/refclock_acts.c; else echo refclock_acts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_acts_.c || rm -f refclock_acts_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_acts.c; then echo $(srcdir)/refclock_acts.c; else echo refclock_acts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_arbiter_.c: refclock_arbiter.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_arbiter.c; then echo $(srcdir)/refclock_arbiter.c; else echo refclock_arbiter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_arbiter_.c || rm -f refclock_arbiter_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_arbiter.c; then echo $(srcdir)/refclock_arbiter.c; else echo refclock_arbiter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_arc_.c: refclock_arc.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_arc.c; then echo $(srcdir)/refclock_arc.c; else echo refclock_arc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_arc_.c || rm -f refclock_arc_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_arc.c; then echo $(srcdir)/refclock_arc.c; else echo refclock_arc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_as2201_.c: refclock_as2201.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_as2201.c; then echo $(srcdir)/refclock_as2201.c; else echo refclock_as2201.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_as2201_.c || rm -f refclock_as2201_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_as2201.c; then echo $(srcdir)/refclock_as2201.c; else echo refclock_as2201.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_atom_.c: refclock_atom.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_atom.c; then echo $(srcdir)/refclock_atom.c; else echo refclock_atom.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_atom_.c || rm -f refclock_atom_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_atom.c; then echo $(srcdir)/refclock_atom.c; else echo refclock_atom.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_bancomm_.c: refclock_bancomm.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_bancomm.c; then echo $(srcdir)/refclock_bancomm.c; else echo refclock_bancomm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_bancomm_.c || rm -f refclock_bancomm_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_bancomm.c; then echo $(srcdir)/refclock_bancomm.c; else echo refclock_bancomm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_chronolog_.c: refclock_chronolog.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_chronolog.c; then echo $(srcdir)/refclock_chronolog.c; else echo refclock_chronolog.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_chronolog_.c || rm -f refclock_chronolog_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_chronolog.c; then echo $(srcdir)/refclock_chronolog.c; else echo refclock_chronolog.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_chu_.c: refclock_chu.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_chu.c; then echo $(srcdir)/refclock_chu.c; else echo refclock_chu.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_chu_.c || rm -f refclock_chu_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_chu.c; then echo $(srcdir)/refclock_chu.c; else echo refclock_chu.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_conf_.c: refclock_conf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_conf.c; then echo $(srcdir)/refclock_conf.c; else echo refclock_conf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_conf_.c || rm -f refclock_conf_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_conf.c; then echo $(srcdir)/refclock_conf.c; else echo refclock_conf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_datum_.c: refclock_datum.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_datum.c; then echo $(srcdir)/refclock_datum.c; else echo refclock_datum.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_datum_.c || rm -f refclock_datum_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_datum.c; then echo $(srcdir)/refclock_datum.c; else echo refclock_datum.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_dumbclock_.c: refclock_dumbclock.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_dumbclock.c; then echo $(srcdir)/refclock_dumbclock.c; else echo refclock_dumbclock.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_dumbclock_.c || rm -f refclock_dumbclock_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_dumbclock.c; then echo $(srcdir)/refclock_dumbclock.c; else echo refclock_dumbclock.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_fg_.c: refclock_fg.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_fg.c; then echo $(srcdir)/refclock_fg.c; else echo refclock_fg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_fg_.c || rm -f refclock_fg_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_fg.c; then echo $(srcdir)/refclock_fg.c; else echo refclock_fg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_gpsvme_.c: refclock_gpsvme.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_gpsvme.c; then echo $(srcdir)/refclock_gpsvme.c; else echo refclock_gpsvme.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_gpsvme_.c || rm -f refclock_gpsvme_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_gpsvme.c; then echo $(srcdir)/refclock_gpsvme.c; else echo refclock_gpsvme.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_heath_.c: refclock_heath.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_heath.c; then echo $(srcdir)/refclock_heath.c; else echo refclock_heath.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_heath_.c || rm -f refclock_heath_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_heath.c; then echo $(srcdir)/refclock_heath.c; else echo refclock_heath.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_hopfpci_.c: refclock_hopfpci.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hopfpci.c; then echo $(srcdir)/refclock_hopfpci.c; else echo refclock_hopfpci.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_hopfpci_.c || rm -f refclock_hopfpci_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hopfpci.c; then echo $(srcdir)/refclock_hopfpci.c; else echo refclock_hopfpci.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_hopfser_.c: refclock_hopfser.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hopfser.c; then echo $(srcdir)/refclock_hopfser.c; else echo refclock_hopfser.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_hopfser_.c || rm -f refclock_hopfser_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hopfser.c; then echo $(srcdir)/refclock_hopfser.c; else echo refclock_hopfser.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_hpgps_.c: refclock_hpgps.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hpgps.c; then echo $(srcdir)/refclock_hpgps.c; else echo refclock_hpgps.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_hpgps_.c || rm -f refclock_hpgps_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hpgps.c; then echo $(srcdir)/refclock_hpgps.c; else echo refclock_hpgps.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_irig_.c: refclock_irig.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_irig.c; then echo $(srcdir)/refclock_irig.c; else echo refclock_irig.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_irig_.c || rm -f refclock_irig_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_irig.c; then echo $(srcdir)/refclock_irig.c; else echo refclock_irig.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_jjy_.c: refclock_jjy.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_jjy.c; then echo $(srcdir)/refclock_jjy.c; else echo refclock_jjy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_jjy_.c || rm -f refclock_jjy_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_jjy.c; then echo $(srcdir)/refclock_jjy.c; else echo refclock_jjy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_jupiter_.c: refclock_jupiter.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_jupiter.c; then echo $(srcdir)/refclock_jupiter.c; else echo refclock_jupiter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_jupiter_.c || rm -f refclock_jupiter_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_jupiter.c; then echo $(srcdir)/refclock_jupiter.c; else echo refclock_jupiter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_leitch_.c: refclock_leitch.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_leitch.c; then echo $(srcdir)/refclock_leitch.c; else echo refclock_leitch.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_leitch_.c || rm -f refclock_leitch_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_leitch.c; then echo $(srcdir)/refclock_leitch.c; else echo refclock_leitch.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_local_.c: refclock_local.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_local.c; then echo $(srcdir)/refclock_local.c; else echo refclock_local.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_local_.c || rm -f refclock_local_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_local.c; then echo $(srcdir)/refclock_local.c; else echo refclock_local.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_msfees_.c: refclock_msfees.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_msfees.c; then echo $(srcdir)/refclock_msfees.c; else echo refclock_msfees.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_msfees_.c || rm -f refclock_msfees_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_msfees.c; then echo $(srcdir)/refclock_msfees.c; else echo refclock_msfees.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_mx4200_.c: refclock_mx4200.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_mx4200.c; then echo $(srcdir)/refclock_mx4200.c; else echo refclock_mx4200.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_mx4200_.c || rm -f refclock_mx4200_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_mx4200.c; then echo $(srcdir)/refclock_mx4200.c; else echo refclock_mx4200.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_neoclock4x_.c: refclock_neoclock4x.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_neoclock4x.c; then echo $(srcdir)/refclock_neoclock4x.c; else echo refclock_neoclock4x.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_neoclock4x_.c || rm -f refclock_neoclock4x_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_neoclock4x.c; then echo $(srcdir)/refclock_neoclock4x.c; else echo refclock_neoclock4x.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_nmea_.c: refclock_nmea.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_nmea.c; then echo $(srcdir)/refclock_nmea.c; else echo refclock_nmea.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_nmea_.c || rm -f refclock_nmea_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_nmea.c; then echo $(srcdir)/refclock_nmea.c; else echo refclock_nmea.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_oncore_.c: refclock_oncore.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_oncore.c; then echo $(srcdir)/refclock_oncore.c; else echo refclock_oncore.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_oncore_.c || rm -f refclock_oncore_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_oncore.c; then echo $(srcdir)/refclock_oncore.c; else echo refclock_oncore.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_palisade_.c: refclock_palisade.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_palisade.c; then echo $(srcdir)/refclock_palisade.c; else echo refclock_palisade.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_palisade_.c || rm -f refclock_palisade_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_palisade.c; then echo $(srcdir)/refclock_palisade.c; else echo refclock_palisade.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_parse_.c: refclock_parse.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_parse.c; then echo $(srcdir)/refclock_parse.c; else echo refclock_parse.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_parse_.c || rm -f refclock_parse_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_parse.c; then echo $(srcdir)/refclock_parse.c; else echo refclock_parse.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_pcf_.c: refclock_pcf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_pcf.c; then echo $(srcdir)/refclock_pcf.c; else echo refclock_pcf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_pcf_.c || rm -f refclock_pcf_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_pcf.c; then echo $(srcdir)/refclock_pcf.c; else echo refclock_pcf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_pst_.c: refclock_pst.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_pst.c; then echo $(srcdir)/refclock_pst.c; else echo refclock_pst.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_pst_.c || rm -f refclock_pst_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_pst.c; then echo $(srcdir)/refclock_pst.c; else echo refclock_pst.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_ptbacts_.c: refclock_ptbacts.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_ptbacts.c; then echo $(srcdir)/refclock_ptbacts.c; else echo refclock_ptbacts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_ptbacts_.c || rm -f refclock_ptbacts_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_ptbacts.c; then echo $(srcdir)/refclock_ptbacts.c; else echo refclock_ptbacts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_ripencc_.c: refclock_ripencc.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_ripencc.c; then echo $(srcdir)/refclock_ripencc.c; else echo refclock_ripencc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_ripencc_.c || rm -f refclock_ripencc_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_ripencc.c; then echo $(srcdir)/refclock_ripencc.c; else echo refclock_ripencc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_shm_.c: refclock_shm.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_shm.c; then echo $(srcdir)/refclock_shm.c; else echo refclock_shm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_shm_.c || rm -f refclock_shm_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_shm.c; then echo $(srcdir)/refclock_shm.c; else echo refclock_shm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_tpro_.c: refclock_tpro.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_tpro.c; then echo $(srcdir)/refclock_tpro.c; else echo refclock_tpro.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_tpro_.c || rm -f refclock_tpro_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_tpro.c; then echo $(srcdir)/refclock_tpro.c; else echo refclock_tpro.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_trak_.c: refclock_trak.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_trak.c; then echo $(srcdir)/refclock_trak.c; else echo refclock_trak.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_trak_.c || rm -f refclock_trak_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_trak.c; then echo $(srcdir)/refclock_trak.c; else echo refclock_trak.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_true_.c: refclock_true.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_true.c; then echo $(srcdir)/refclock_true.c; else echo refclock_true.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_true_.c || rm -f refclock_true_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_true.c; then echo $(srcdir)/refclock_true.c; else echo refclock_true.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_tt560_.c: refclock_tt560.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_tt560.c; then echo $(srcdir)/refclock_tt560.c; else echo refclock_tt560.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_tt560_.c || rm -f refclock_tt560_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_tt560.c; then echo $(srcdir)/refclock_tt560.c; else echo refclock_tt560.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_ulink_.c: refclock_ulink.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_ulink.c; then echo $(srcdir)/refclock_ulink.c; else echo refclock_ulink.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_ulink_.c || rm -f refclock_ulink_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_ulink.c; then echo $(srcdir)/refclock_ulink.c; else echo refclock_ulink.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_usno_.c: refclock_usno.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_usno.c; then echo $(srcdir)/refclock_usno.c; else echo refclock_usno.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_usno_.c || rm -f refclock_usno_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_usno.c; then echo $(srcdir)/refclock_usno.c; else echo refclock_usno.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_wwv_.c: refclock_wwv.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_wwv.c; then echo $(srcdir)/refclock_wwv.c; else echo refclock_wwv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_wwv_.c || rm -f refclock_wwv_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_wwv.c; then echo $(srcdir)/refclock_wwv.c; else echo refclock_wwv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_wwvb_.c: refclock_wwvb.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_wwvb.c; then echo $(srcdir)/refclock_wwvb.c; else echo refclock_wwvb.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_wwvb_.c || rm -f refclock_wwvb_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_wwvb.c; then echo $(srcdir)/refclock_wwvb.c; else echo refclock_wwvb.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
refclock_zyfer_.c: refclock_zyfer.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_zyfer.c; then echo $(srcdir)/refclock_zyfer.c; else echo refclock_zyfer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_zyfer_.c || rm -f refclock_zyfer_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_zyfer.c; then echo $(srcdir)/refclock_zyfer.c; else echo refclock_zyfer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
check_y2k_.$(OBJEXT) cmd_args_.$(OBJEXT) map_vme_.$(OBJEXT) \
ntp_config_.$(OBJEXT) ntp_control_.$(OBJEXT) ntp_crypto_.$(OBJEXT) \
ntp_filegen_.$(OBJEXT) ntp_intres_.$(OBJEXT) ntp_io_.$(OBJEXT) \
ntp_loopfilter_.$(OBJEXT) ntp_monitor_.$(OBJEXT) ntp_peer_.$(OBJEXT) \
ntp_proto_.$(OBJEXT) ntp_refclock_.$(OBJEXT) ntp_request_.$(OBJEXT) \
ntp_restrict_.$(OBJEXT) ntp_timer_.$(OBJEXT) ntp_util_.$(OBJEXT) \
-ntpd_.$(OBJEXT) refclock_acts_.$(OBJEXT) refclock_arbiter_.$(OBJEXT) \
-refclock_arc_.$(OBJEXT) refclock_as2201_.$(OBJEXT) \
-refclock_atom_.$(OBJEXT) refclock_bancomm_.$(OBJEXT) \
-refclock_chronolog_.$(OBJEXT) refclock_chu_.$(OBJEXT) \
-refclock_conf_.$(OBJEXT) refclock_datum_.$(OBJEXT) \
-refclock_dumbclock_.$(OBJEXT) refclock_fg_.$(OBJEXT) \
-refclock_gpsvme_.$(OBJEXT) refclock_heath_.$(OBJEXT) \
-refclock_hopfpci_.$(OBJEXT) refclock_hopfser_.$(OBJEXT) \
-refclock_hpgps_.$(OBJEXT) refclock_irig_.$(OBJEXT) \
-refclock_jjy_.$(OBJEXT) refclock_jupiter_.$(OBJEXT) \
-refclock_leitch_.$(OBJEXT) refclock_local_.$(OBJEXT) \
-refclock_msfees_.$(OBJEXT) refclock_mx4200_.$(OBJEXT) \
-refclock_neoclock4x_.$(OBJEXT) refclock_nmea_.$(OBJEXT) \
-refclock_oncore_.$(OBJEXT) refclock_palisade_.$(OBJEXT) \
-refclock_parse_.$(OBJEXT) refclock_pcf_.$(OBJEXT) \
-refclock_pst_.$(OBJEXT) refclock_ptbacts_.$(OBJEXT) \
-refclock_ripencc_.$(OBJEXT) refclock_shm_.$(OBJEXT) \
-refclock_tpro_.$(OBJEXT) refclock_trak_.$(OBJEXT) \
-refclock_true_.$(OBJEXT) refclock_tt560_.$(OBJEXT) \
-refclock_ulink_.$(OBJEXT) refclock_usno_.$(OBJEXT) \
-refclock_wwv_.$(OBJEXT) refclock_wwvb_.$(OBJEXT) \
-refclock_zyfer_.$(OBJEXT) : $(ANSI2KNR)
+ntpd_.$(OBJEXT) ntpsim_.$(OBJEXT) refclock_acts_.$(OBJEXT) \
+refclock_arbiter_.$(OBJEXT) refclock_arc_.$(OBJEXT) \
+refclock_as2201_.$(OBJEXT) refclock_atom_.$(OBJEXT) \
+refclock_bancomm_.$(OBJEXT) refclock_chronolog_.$(OBJEXT) \
+refclock_chu_.$(OBJEXT) refclock_conf_.$(OBJEXT) \
+refclock_datum_.$(OBJEXT) refclock_dumbclock_.$(OBJEXT) \
+refclock_fg_.$(OBJEXT) refclock_gpsvme_.$(OBJEXT) \
+refclock_heath_.$(OBJEXT) refclock_hopfpci_.$(OBJEXT) \
+refclock_hopfser_.$(OBJEXT) refclock_hpgps_.$(OBJEXT) \
+refclock_irig_.$(OBJEXT) refclock_jjy_.$(OBJEXT) \
+refclock_jupiter_.$(OBJEXT) refclock_leitch_.$(OBJEXT) \
+refclock_local_.$(OBJEXT) refclock_msfees_.$(OBJEXT) \
+refclock_mx4200_.$(OBJEXT) refclock_neoclock4x_.$(OBJEXT) \
+refclock_nmea_.$(OBJEXT) refclock_oncore_.$(OBJEXT) \
+refclock_palisade_.$(OBJEXT) refclock_parse_.$(OBJEXT) \
+refclock_pcf_.$(OBJEXT) refclock_pst_.$(OBJEXT) \
+refclock_ptbacts_.$(OBJEXT) refclock_ripencc_.$(OBJEXT) \
+refclock_shm_.$(OBJEXT) refclock_tpro_.$(OBJEXT) \
+refclock_trak_.$(OBJEXT) refclock_true_.$(OBJEXT) \
+refclock_tt560_.$(OBJEXT) refclock_ulink_.$(OBJEXT) \
+refclock_usno_.$(OBJEXT) refclock_wwv_.$(OBJEXT) \
+refclock_wwvb_.$(OBJEXT) refclock_zyfer_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -612,11 +849,10 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
-all-am: Makefile $(PROGRAMS)
+all-am: Makefile $(LIBRARIES) $(PROGRAMS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -628,6 +864,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -635,7 +872,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@@ -644,12 +881,14 @@ maintainer-clean-generic:
clean: clean-am
clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
- mostlyclean-am
+ clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -670,6 +909,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -677,19 +918,27 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-.PHONY: GTAGS all all-am check check-am check-local clean \
- clean-binPROGRAMS clean-checkPROGRAMS clean-generic distclean \
- distclean-compile distclean-depend distclean-generic \
- distclean-tags distdir dvi dvi-am info info-am install \
- install-am install-binPROGRAMS install-data install-data-am \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-kr tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+ clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+ clean-noinstLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am info \
+ info-am install install-am install-binPROGRAMS install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-kr pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
check-local: @MAKE_CHECK_Y2K@
@@ -703,7 +952,7 @@ $(PROGRAMS): $(LDADD)
../libparse/libparse.a:
cd ../libparse && $(MAKE)
-version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ @LIBRSAREF@ Makefile
+version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/version
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpd
$(COMPILE) -c version.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/ntp/ntpd/check_y2k.c b/contrib/ntp/ntpd/check_y2k.c
index f0f4480e7560..6b8311502940 100644
--- a/contrib/ntp/ntpd/check_y2k.c
+++ b/contrib/ntp/ntpd/check_y2k.c
@@ -45,6 +45,9 @@
# if !defined(VMS) /*wjm*/
# include <sys/param.h>
# endif /* VMS */
+# if HAVE_SYS_SIGNAL_H
+# include <sys/signal.h>
+# endif /* HAVE_SYS_SIGNAL_H */
# include <sys/signal.h>
# ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
diff --git a/contrib/ntp/ntpd/cmd_args.c b/contrib/ntp/ntpd/cmd_args.c
index 9f61b4a8cb8f..3ed9b666fcf9 100644
--- a/contrib/ntp/ntpd/cmd_args.c
+++ b/contrib/ntp/ntpd/cmd_args.c
@@ -9,13 +9,21 @@
#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;
+int listen_to_virtual_ips = 1;
+
+#ifdef SYS_WINNT
+extern BOOL NoWinService;
+#endif
-static const char *ntp_options = "aAbc:dD:f:gk:l:LmnN:p:P:qr:s:t:v:V:x";
+static const char *ntp_options = "aAbB:c:C:dD:f:gi:k:l:LmnNO:p:P:qr:s:S:t:T:W:u:v:V:xY:Z:-:";
#ifdef HAVE_NETINFO
extern int check_netinfo;
@@ -72,18 +80,23 @@ getstartup(
case 'd':
case 'D':
msyslog(LOG_ERR, "ntpd not compiled with -DDEBUG option - no DEBUG support");
- fprintf(stderr, "ntpd not compiled with -DDEBUG option - no DEBUG support");
+ fprintf(stderr, "ntpd not compiled with -DDEBUG option - no DEBUG support\n");
++errflg;
break;
#endif
case 'L':
- listen_to_virtual_ips = 1;
+ listen_to_virtual_ips = 0;
break;
case 'l':
{
FILE *new_file;
- new_file = fopen(ntp_optarg, "a");
+ if(strcmp(ntp_optarg, "stderr") == 0)
+ new_file = stderr;
+ else if(strcmp(ntp_optarg, "stdout") == 0)
+ new_file = stdout;
+ else
+ new_file = fopen(ntp_optarg, "a");
if (new_file != NULL) {
NLOG(NLOG_SYSINFO)
msyslog(LOG_NOTICE, "logging to file %s", ntp_optarg);
@@ -104,16 +117,38 @@ getstartup(
case 'n':
case 'q':
++nofork;
+#ifdef SYS_WINNT
+ NoWinService = TRUE;
+#endif
break;
case 'N':
- priority_done = strcmp(ntp_optarg, "high");
+ priority_done = 0;
break;
case '?':
++errflg;
break;
+ case '-':
+ if ( ! strcmp(ntp_optarg, "version") ) {
+ printf("%.80s: %.80s\n", progname, Version);
+ exit(0);
+ } else if ( ! strcmp(ntp_optarg, "help") ) {
+ /* usage(); */
+ /* exit(0); */
+ ++errflg;
+ } else if ( ! strcmp(ntp_optarg, "copyright") ) {
+ printf("unknown\n");
+ exit(0);
+ } else {
+ fprintf(stderr, "%.80s: Error unknown argument '--%.80s'\n",
+ progname,
+ ntp_optarg);
+ exit(12);
+ }
+ break;
+
default:
break;
}
@@ -126,6 +161,9 @@ getstartup(
#if defined(HAVE_SCHED_SETSCHEDULER)
(void) fprintf(stderr, "\t\t[ -P fixed_process_priority ]\n");
#endif
+#ifdef HAVE_CLOCKCTL
+ (void) fprintf(stderr, "\t\t[ -u user[:group] ] [ -i chrootdir ]\n");
+#endif
exit(2);
}
ntp_optind = 0; /* reset ntp_optind to restart ntp_getopt */
@@ -152,6 +190,7 @@ getCmdOpts(
)
{
extern char *config_file;
+ struct sockaddr_in inaddrntp;
int errflg;
int c;
@@ -171,15 +210,15 @@ getCmdOpts(
while ((c = ntp_getopt(argc, argv, ntp_options)) != EOF) {
switch (c) {
case 'a':
- proto_config(PROTO_AUTHENTICATE, 1, 0.);
+ proto_config(PROTO_AUTHENTICATE, 1, 0., NULL);
break;
case 'A':
- proto_config(PROTO_AUTHENTICATE, 0, 0.);
+ proto_config(PROTO_AUTHENTICATE, 0, 0., NULL);
break;
case 'b':
- proto_config(PROTO_BROADCLIENT, 1, 0.);
+ proto_config(PROTO_BROADCLIENT, 1, 0., NULL);
break;
case 'c':
@@ -214,6 +253,16 @@ getCmdOpts(
allow_panic = TRUE;
break;
+ case 'i':
+#ifdef HAVE_CLOCKCTL
+ if (!ntp_optarg)
+ errflg++;
+ else
+ chrootdir = ntp_optarg;
+ break;
+#else
+ errflg++;
+#endif
case 'k':
getauthkeys(ntp_optarg);
break;
@@ -223,7 +272,10 @@ getCmdOpts(
break;
case 'm':
- proto_config(PROTO_MULTICAST_ADD, htonl(INADDR_NTP), 0.);
+ inaddrntp.sin_family = AF_INET;
+ inaddrntp.sin_port = htons(NTP_PORT);
+ inaddrntp.sin_addr.s_addr = htonl(INADDR_NTP);
+ proto_config(PROTO_MULTICAST_ADD, 0, 0., (struct sockaddr_storage*)&inaddrntp);
sys_bclient = 1;
break;
@@ -259,11 +311,24 @@ getCmdOpts(
"command line broadcast delay value %s undecodable",
ntp_optarg);
} else {
- proto_config(PROTO_BROADDELAY, 0, tmp);
+ proto_config(PROTO_BROADDELAY, 0, tmp, NULL);
}
} while (0);
break;
+ case 'u':
+#ifdef HAVE_CLOCKCTL
+ user = malloc(strlen(ntp_optarg) + 1);
+ if ((user == NULL) || (ntp_optarg == NULL))
+ errflg++;
+ (void)strncpy(user, ntp_optarg, strlen(ntp_optarg) + 1);
+ group = rindex(user, ':');
+ if (group)
+ *group++ = '\0'; /* get rid of the ':' */
+#else
+ errflg++;
+#endif
+ break;
case 's':
stats_config(STATS_STATSDIR, ntp_optarg);
break;
@@ -286,13 +351,50 @@ getCmdOpts(
case 'v':
case 'V':
set_sys_var(ntp_optarg, strlen(ntp_optarg)+1,
- RW | ((c == 'V') ? DEF : 0));
+ (u_short) (RW | ((c == 'V') ? DEF : 0)));
break;
case 'x':
- allow_step = FALSE;
+ clock_max = 600;
break;
+#ifdef SIM
+ case 'B':
+ sscanf(ntp_optarg, "%lf", &ntp_node.bdly);
+ break;
+
+ case 'C':
+ sscanf(ntp_optarg, "%lf", &ntp_node.snse);
+ break;
+
+ case 'H':
+ sscanf(ntp_optarg, "%lf", &ntp_node.slew);
+ break;
+
+ case 'O':
+ sscanf(ntp_optarg, "%lf", &ntp_node.clk_time);
+ break;
+ case 'S':
+ sscanf(ntp_optarg, "%lf", &ntp_node.sim_time);
+ break;
+
+ case 'T':
+ sscanf(ntp_optarg, "%lf", &ntp_node.ferr);
+ break;
+
+ case 'W':
+ sscanf(ntp_optarg, "%lf", &ntp_node.fnse);
+ break;
+
+ case 'Y':
+ sscanf(ntp_optarg, "%lf", &ntp_node.ndly);
+ break;
+
+ case 'Z':
+ sscanf(ntp_optarg, "%lf", &ntp_node.pdly);
+ break;
+
+#endif /* SIM */
default:
errflg++;
break;
@@ -307,6 +409,9 @@ getCmdOpts(
#if defined(HAVE_SCHED_SETSCHEDULER)
(void) fprintf(stderr, "\t\t[ -P fixed_process_priority ]\n");
#endif
+#ifdef HAVE_CLOCKCTL
+ (void) fprintf(stderr, "\t\t[ -u user[:group] ] [ -i chrootdir ]\n");
+#endif
exit(2);
}
return;
diff --git a/contrib/ntp/ntpd/ntp_config.c b/contrib/ntp/ntpd/ntp_config.c
index 660d2c531d5b..f1428b15f1c3 100644
--- a/contrib/ntp/ntpd/ntp_config.c
+++ b/contrib/ntp/ntpd/ntp_config.c
@@ -18,10 +18,6 @@
#include "ntp_config.h"
#include "ntp_cmdargs.h"
-#ifdef PUBKEY
-# include "ntp_crypto.h"
-#endif /* PUBKEY */
-
#include <stdio.h>
#include <ctype.h>
#ifdef HAVE_SYS_PARAM_H
@@ -42,6 +38,8 @@
extern HANDLE ResolverThreadHandle;
#endif /* SYS_WINNT */
+#include <netdb.h>
+
extern int priority_done;
/*
@@ -51,43 +49,6 @@ extern int priority_done;
* Lines are considered terminated when a '#' is encountered. Blank
* lines are ignored.
*/
-
-/*
- * We understand the following configuration entries and defaults.
- *
- * peer [ addr ] [ version 3 ] [ key 0 ] [ minpoll 6 ] [ maxpoll 10 ]
- * server [ addr ] [ version 3 ] [ key 0 ] [ minpoll 6 ] [ maxpoll 10 ]
- * broadcast [ addr ] [ version 3 ] [ key 0 ] [ ttl 1 ]
- * broadcastclient
- * multicastclient [ 224.0.1.1 ]
- * manycastclient [ addr ] [ version 3 ] [ key 0 ] [ minpoll 6 ] [ maxpoll 10 ]
- * manycastserver [ 224.0.1.1 ]
- * broadcastdelay 0.0102
- * restrict [ addr ] [ mask 255.255.255.0 ] ignore|noserve|notrust|noquery
- * driftfile file_name
- * keys file_name
- * publickey file_name
- * privatekey file_name
- * statsdir /var/NTP/
- * filegen peerstats [ file peerstats ] [ type day ] [ link ]
- * clientlimit [ n ]
- * clientperiod [ 3600 ]
- * trustedkey [ key ]
- * requestkey [ key]
- * controlkey [ key ]
- * trap [ addr ]
- * fudge [ addr ] [ stratum ] [ refid ] ...
- * pidfile [ ]
- * setvar [ ]
- * logfile logfile
- * logconfig [+|-|=][{sync|sys|peer|clock}{{,all}{info|statistics|events|status}}]...
- * enable auth|bclient|pll|kernel|monitor|stats|calibrate
- * disable auth|bclient|pll|kernel|monitor|stats|calibrate
- * phone ...
- * pps device [assert|clear] [hardpps]
- * priority high|normal
- */
-
/*
* Translation table - keywords to function index
*/
@@ -100,16 +61,14 @@ struct keyword {
* Command keywords
*/
static struct keyword keywords[] = {
- { "authenticate", CONFIG_AUTHENTICATE },
{ "automax", CONFIG_AUTOMAX },
{ "broadcast", CONFIG_BROADCAST },
{ "broadcastclient", CONFIG_BROADCASTCLIENT },
{ "broadcastdelay", CONFIG_BDELAY },
- { "clientlimit", CONFIG_CLIENTLIMIT },
- { "clientperiod", CONFIG_CLIENTPERIOD },
-#ifdef PUBKEY
+ { "calldelay", CONFIG_CDELAY},
+#ifdef OPENSSL
{ "crypto", CONFIG_CRYPTO },
-#endif /* PUBKEY */
+#endif /* OPENSSL */
{ "controlkey", CONFIG_CONTROLKEY },
{ "disable", CONFIG_DISABLE },
{ "driftfile", CONFIG_DRIFTFILE },
@@ -118,9 +77,7 @@ static struct keyword keywords[] = {
{ "fudge", CONFIG_FUDGE },
{ "includefile", CONFIG_INCLUDEFILE },
{ "keys", CONFIG_KEYS },
-#ifdef PUBKEY
{ "keysdir", CONFIG_KEYSDIR },
-#endif /* PUBKEY */
{ "logconfig", CONFIG_LOGCONFIG },
{ "logfile", CONFIG_LOGFILE },
{ "manycastclient", CONFIG_MANYCASTCLIENT },
@@ -129,7 +86,7 @@ static struct keyword keywords[] = {
{ "peer", CONFIG_PEER },
{ "phone", CONFIG_PHONE },
{ "pidfile", CONFIG_PIDFILE },
- { "pps", CONFIG_PPS },
+ { "discard", CONFIG_DISCARD },
{ "requestkey", CONFIG_REQUESTKEY },
{ "restrict", CONFIG_RESTRICT },
{ "revoke", CONFIG_REVOKE },
@@ -137,9 +94,12 @@ static struct keyword keywords[] = {
{ "setvar", CONFIG_SETVAR },
{ "statistics", CONFIG_STATISTICS },
{ "statsdir", CONFIG_STATSDIR },
+ { "tick", CONFIG_ADJ },
{ "tinker", CONFIG_TINKER },
+ { "tos", CONFIG_TOS },
{ "trap", CONFIG_TRAP },
{ "trustedkey", CONFIG_TRUSTEDKEY },
+ { "ttl", CONFIG_TTL },
{ "", CONFIG_UNKNOWN }
};
@@ -156,9 +116,6 @@ static struct keyword mod_keywords[] = {
{ "mode", CONF_MOD_MODE }, /* refclocks */
{ "noselect", CONF_MOD_NOSELECT },
{ "prefer", CONF_MOD_PREFER },
-#ifdef PUBKEY
- { "publickey", CONF_MOD_PUBLICKEY },
-#endif /* PUBKEY */
{ "ttl", CONF_MOD_TTL }, /* NTP peers */
{ "version", CONF_MOD_VERSION },
{ "", CONFIG_UNKNOWN }
@@ -208,7 +165,6 @@ static struct keyword fudge_keywords[] = {
{ "", CONFIG_UNKNOWN }
};
-
/*
* "filegen" modifier keywords
*/
@@ -252,12 +208,12 @@ static struct keyword flags_keywords[] = {
};
/*
- * "pps" modifier keywords
+ * "discard" modifier keywords
*/
-static struct keyword pps_keywords[] = {
- { "assert", CONF_PPS_ASSERT },
- { "clear", CONF_PPS_CLEAR },
- { "hardpps", CONF_PPS_HARDPPS },
+static struct keyword discard_keywords[] = {
+ { "average", CONF_DISCARD_AVERAGE },
+ { "minimum", CONF_DISCARD_MINIMUM },
+ { "monitor", CONF_DISCARD_MONITOR },
{ "", CONFIG_UNKNOWN }
};
@@ -269,25 +225,51 @@ static struct keyword tinker_keywords[] = {
{ "panic", CONF_CLOCK_PANIC },
{ "dispersion", CONF_CLOCK_PHI },
{ "stepout", CONF_CLOCK_MINSTEP },
- { "minpoll", CONF_CLOCK_MINPOLL },
{ "allan", CONF_CLOCK_ALLAN },
{ "huffpuff", CONF_CLOCK_HUFFPUFF },
+ { "freq", CONF_CLOCK_FREQ },
{ "", CONFIG_UNKNOWN }
};
-#ifdef PUBKEY
+/*
+ * "tos" modifier keywords
+ */
+static struct keyword tos_keywords[] = {
+ { "minclock", CONF_TOS_MINCLOCK },
+ { "minsane", CONF_TOS_MINSANE },
+ { "floor", CONF_TOS_FLOOR },
+ { "ceiling", CONF_TOS_CEILING },
+ { "cohort", CONF_TOS_COHORT },
+ { "", CONFIG_UNKNOWN }
+};
+
+#ifdef OPENSSL
/*
* "crypto" modifier keywords
*/
static struct keyword crypto_keywords[] = {
- { "dh", CONF_CRYPTO_DH },
- { "flags", CONF_CRYPTO_FLAGS },
+ { "cert", CONF_CRYPTO_CERT },
+ { "gqpar", CONF_CRYPTO_GQPAR },
+ { "host", CONF_CRYPTO_RSA },
+ { "iffpar", CONF_CRYPTO_IFFPAR },
{ "leap", CONF_CRYPTO_LEAP },
- { "privatekey", CONF_CRYPTO_PRIVATEKEY },
- { "publickey", CONF_CRYPTO_PUBLICKEY },
+ { "mvpar", CONF_CRYPTO_MVPAR },
+ { "pw", CONF_CRYPTO_PW },
+ { "randfile", CONF_CRYPTO_RAND },
+ { "sign", CONF_CRYPTO_SIGN },
+ { "", CONFIG_UNKNOWN }
+};
+#endif /* OPENSSL */
+
+/*
+ * Address type selection, IPv4 or IPv4.
+ * Used on various lines.
+ */
+static struct keyword addr_type[] = {
+ { "-4", CONF_ADDR_IPV4 },
+ { "-6", CONF_ADDR_IPV6 },
{ "", CONFIG_UNKNOWN }
};
-#endif /* PUBKEY */
/*
* "logconfig" building blocks
@@ -345,6 +327,7 @@ static struct masks logcfg_item[] = {
* File descriptor used by the resolver save routines, and temporary file
* name.
*/
+int call_resolver = 1; /* ntp-genkeys sets this to 0, for example */
static FILE *res_fp;
#ifndef SYS_WINNT
static char res_file[20]; /* enough for /tmp/ntpXXXXXX\0 */
@@ -358,9 +341,8 @@ static char res_file[MAX_PATH];
*/
char const *progname;
char sys_phone[MAXPHONE][MAXDIAL]; /* ACTS phone numbers */
+char *keysdir = NTP_KEYSDIR; /* crypto keys directory */
char pps_device[MAXPPS + 1]; /* PPS device name */
-int pps_assert;
-int pps_hardpps;
#if defined(HAVE_SCHED_SETSCHEDULER)
int config_priority_override = 0;
int config_priority;
@@ -403,13 +385,13 @@ static void free_netinfo_config P((struct netinfo_config_state *));
static int gettokens_netinfo P((struct netinfo_config_state *, char **, int *));
#endif
static int gettokens P((FILE *, char *, char **, int *));
-static int matchkey P((char *, struct keyword *));
-static int getnetnum P((const char *, struct sockaddr_in *, int));
+static int matchkey P((char *, struct keyword *, int));
+static int getnetnum P((const char *, struct sockaddr_storage *, int));
static void save_resolve P((char *, int, int, int, int, u_int, int,
keyid_t, u_char *));
static void do_resolve_internal P((void));
static void abort_resolve P((void));
-#if !defined(VMS)
+#if !defined(VMS) && !defined(SYS_WINNT)
static RETSIGTYPE catchchild P((int));
#endif /* VMS */
@@ -490,6 +472,7 @@ getconfig(
register int i;
int c;
int errflg;
+ int istart;
int peerversion;
int minpoll;
int maxpoll;
@@ -501,14 +484,14 @@ getconfig(
u_long fudgeflag;
u_int peerflags;
int hmode;
- struct sockaddr_in peeraddr;
- struct sockaddr_in maskaddr;
+ struct sockaddr_storage peeraddr;
+ struct sockaddr_storage maskaddr;
FILE *fp[MAXINCLUDELEVEL+1];
FILE *includefile;
int includelevel = 0;
char line[MAXLINE];
char *(tokens[MAXTOKENS]);
- int ntokens;
+ int ntokens = 0;
int tok = CONFIG_UNKNOWN;
struct interface *localaddr;
struct refclockstat clock_stat;
@@ -627,7 +610,20 @@ getconfig(
break;
}
- if (!getnetnum(tokens[1], &peeraddr, 0)) {
+ istart = 1;
+ memset((char *)&peeraddr, 0, sizeof(peeraddr));
+ switch (matchkey(tokens[istart], addr_type, 0)) {
+ case CONF_ADDR_IPV4:
+ peeraddr.ss_family = AF_INET;
+ istart++;
+ break;
+ case CONF_ADDR_IPV6:
+ peeraddr.ss_family = AF_INET6;
+ istart++;
+ break;
+ }
+
+ if (!getnetnum(tokens[istart], &peeraddr, 0)) {
errflg = -1;
} else {
errflg = 0;
@@ -639,7 +635,7 @@ getconfig(
ISBADADR(&peeraddr)) {
msyslog(LOG_ERR,
"attempt to configure invalid address %s",
- ntoa(&peeraddr));
+ stoa(&peeraddr));
break;
}
/*
@@ -647,23 +643,45 @@ getconfig(
* address for server/peer!
* and unicast address for manycastclient!
*/
- if (((tok == CONFIG_SERVER) ||
- (tok == CONFIG_PEER)) &&
+ if (peeraddr.ss_family == AF_INET) {
+ if (((tok == CONFIG_SERVER) ||
+ (tok == CONFIG_PEER)) &&
#ifdef REFCLOCK
- !ISREFCLOCKADR(&peeraddr) &&
+ !ISREFCLOCKADR(&peeraddr) &&
#endif
- IN_CLASSD(ntohl(peeraddr.sin_addr.s_addr))) {
- msyslog(LOG_ERR,
- "attempt to configure invalid address %s",
- ntoa(&peeraddr));
- break;
+ IN_CLASSD(ntohl(((struct sockaddr_in*)&peeraddr)->sin_addr.s_addr))) {
+ msyslog(LOG_ERR,
+ "attempt to configure invalid address %s",
+ stoa(&peeraddr));
+ break;
+ }
+ if ((tok == CONFIG_MANYCASTCLIENT) &&
+ !IN_CLASSD(ntohl(((struct sockaddr_in*)&peeraddr)->sin_addr.s_addr))) {
+ msyslog(LOG_ERR,
+ "attempt to configure invalid address %s",
+ stoa(&peeraddr));
+ break;
+ }
}
- if ((tok == CONFIG_MANYCASTCLIENT) &&
- !IN_CLASSD(ntohl(peeraddr.sin_addr.s_addr))) {
- msyslog(LOG_ERR,
- "attempt to configure invalid address %s",
- ntoa(&peeraddr));
- break;
+ else if(peeraddr.ss_family == AF_INET6) {
+ if (((tok == CONFIG_SERVER) ||
+ (tok == CONFIG_PEER)) &&
+#ifdef REFCLOCK
+ !ISREFCLOCKADR(&peeraddr) &&
+#endif
+ IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6*)&peeraddr)->sin6_addr)) {
+ msyslog(LOG_ERR,
+ "attempt to configure in valid address %s",
+ stoa(&peeraddr));
+ break;
+ }
+ if ((tok == CONFIG_MANYCASTCLIENT) &&
+ !IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6*)&peeraddr)->sin6_addr)) {
+ msyslog(LOG_ERR,
+ "attempt to configure in valid address %s",
+ stoa(&peeraddr));
+ break;
+ }
}
}
@@ -671,11 +689,12 @@ getconfig(
minpoll = NTP_MINDPOLL;
maxpoll = NTP_MAXDPOLL;
peerkey = 0;
- peerkeystr = "*";
+ peerkeystr = (u_char *)"*";
peerflags = 0;
ttl = 0;
- for (i = 2; i < ntokens; i++)
- switch (matchkey(tokens[i], mod_keywords)) {
+ istart++;
+ for (i = istart; i < ntokens; i++)
+ switch (matchkey(tokens[i], mod_keywords, 1)) {
case CONF_MOD_VERSION:
if (i >= ntokens-1) {
msyslog(LOG_ERR,
@@ -752,43 +771,34 @@ getconfig(
case CONF_MOD_IBURST:
peerflags |= FLAG_IBURST;
break;
-#ifdef AUTOKEY
+#ifdef OPENSSL
case CONF_MOD_SKEY:
peerflags |= FLAG_SKEY |
FLAG_AUTHENABLE;
break;
-
-#ifdef PUBKEY
- case CONF_MOD_PUBLICKEY:
- if (i >= ntokens - 1) {
- msyslog(LOG_ERR,
- "Public key file name required");
- errflg = 1;
- break;
- }
- peerflags |= FLAG_SKEY |
- FLAG_AUTHENABLE;
- peerkeystr = tokens[++i];
- break;
-#endif /* PUBKEY */
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
case CONF_MOD_TTL:
if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "ttl: argument required");
- errflg = 1;
- break;
+ msyslog(LOG_ERR,
+ "ttl: argument required");
+ errflg = 1;
+ break;
}
ttl = atoi(tokens[++i]);
+ if (ttl >= MAX_TTL) {
+ msyslog(LOG_ERR,
+ "ttl: invalid argument");
+ errflg = 1;
+ }
break;
case CONF_MOD_MODE:
if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "mode: argument required");
- errflg = 1;
- break;
+ msyslog(LOG_ERR,
+ "mode: argument required");
+ errflg = 1;
+ break;
}
ttl = atoi(tokens[++i]);
break;
@@ -798,17 +808,22 @@ getconfig(
break;
}
if (minpoll > maxpoll) {
- msyslog(LOG_ERR, "config error: minpoll > maxpoll");
+ msyslog(LOG_ERR,
+ "config error: minpoll > maxpoll");
errflg = 1;
}
if (errflg == 0) {
- if (peer_config(&peeraddr, any_interface, hmode,
- peerversion, minpoll, maxpoll, peerflags,
- ttl, peerkey, peerkeystr) == 0) {
+ if (peer_config(&peeraddr,
+ ANY_INTERFACE_CHOOSE(&peeraddr), hmode,
+ peerversion, minpoll, maxpoll, peerflags,
+ ttl, peerkey, peerkeystr) == 0) {
msyslog(LOG_ERR,
"configuration of %s failed",
- ntoa(&peeraddr));
+ stoa(&peeraddr));
}
+ if (tok == CONFIG_MANYCASTCLIENT)
+ proto_config(PROTO_MULTICAST_ADD,
+ 0, 0., &peeraddr);
} else if (errflg == -1) {
save_resolve(tokens[1], hmode, peerversion,
@@ -910,48 +925,63 @@ getconfig(
break;
case CONFIG_BROADCASTCLIENT:
- proto_config(PROTO_BROADCLIENT, 1, 0.);
+ proto_config(PROTO_BROADCLIENT, 1, 0., NULL);
break;
-
+
case CONFIG_MULTICASTCLIENT:
case CONFIG_MANYCASTSERVER:
if (ntokens > 1) {
- for (i = 1; i < ntokens; i++) {
+ istart = 1;
+ memset((char *)&peeraddr, 0, sizeof(peeraddr));
+ switch (matchkey(tokens[istart],
+ addr_type, 0)) {
+ case CONF_ADDR_IPV4:
+ peeraddr.ss_family = AF_INET;
+ istart++;
+ break;
+ case CONF_ADDR_IPV6:
+ peeraddr.ss_family = AF_INET6;
+ istart++;
+ break;
+ }
+ /*
+ * Abuse maskaddr to store the prefered ip
+ * version.
+ */
+ memset((char *)&maskaddr, 0, sizeof(maskaddr));
+ maskaddr.ss_family = peeraddr.ss_family;
+
+ for (i = istart; i < ntokens; i++) {
+ memset((char *)&peeraddr, 0,
+ sizeof(peeraddr));
+ peeraddr.ss_family = maskaddr.ss_family;
if (getnetnum(tokens[i], &peeraddr, 1))
proto_config(PROTO_MULTICAST_ADD,
- peeraddr.sin_addr.s_addr, 0.);
+ 0, 0., &peeraddr);
}
} else
proto_config(PROTO_MULTICAST_ADD,
- htonl(INADDR_NTP), 0.);
+ 0, 0., NULL);
if (tok == CONFIG_MULTICASTCLIENT)
sys_bclient = 1;
else if (tok == CONFIG_MANYCASTSERVER)
sys_manycastserver = 1;
break;
- case CONFIG_AUTHENTICATE:
- errflg = 0;
+ case CONFIG_KEYS:
if (ntokens >= 2) {
- if (STREQ(tokens[1], "yes"))
- proto_config(PROTO_AUTHENTICATE, 1, 0.);
- else if (STREQ(tokens[1], "no"))
- proto_config(PROTO_AUTHENTICATE, 0, 0.);
- else
- errflg++;
- } else {
- errflg++;
+ getauthkeys(tokens[1]);
}
-
- if (errflg)
- msyslog(LOG_ERR,
- "should be `authenticate yes|no'");
break;
- case CONFIG_KEYS:
- if (ntokens >= 2) {
- getauthkeys(tokens[1]);
+ case CONFIG_KEYSDIR:
+ if (ntokens < 2) {
+ msyslog(LOG_ERR,
+ "Keys directory name required");
+ break;
}
+ keysdir = emalloc(strlen(tokens[1]) + 1);
+ strcpy(keysdir, tokens[1]);
break;
case CONFIG_TINKER:
@@ -959,8 +989,7 @@ getconfig(
int temp;
double ftemp;
- temp = matchkey(tokens[i++],
- tinker_keywords);
+ temp = matchkey(tokens[i++], tinker_keywords, 1);
if (i > ntokens - 1) {
msyslog(LOG_ERR,
"tinker: missing argument");
@@ -969,6 +998,7 @@ getconfig(
}
sscanf(tokens[i], "%lf", &ftemp);
switch(temp) {
+
case CONF_CLOCK_MAX:
loop_config(LOOP_MAX, ftemp);
break;
@@ -985,10 +1015,6 @@ getconfig(
loop_config(LOOP_MINSTEP, ftemp);
break;
- case CONF_CLOCK_MINPOLL:
- loop_config(LOOP_MINPOLL, ftemp);
- break;
-
case CONF_CLOCK_ALLAN:
loop_config(LOOP_ALLAN, ftemp);
break;
@@ -996,14 +1022,96 @@ getconfig(
case CONF_CLOCK_HUFFPUFF:
loop_config(LOOP_HUFFPUFF, ftemp);
break;
+
+ case CONF_CLOCK_FREQ:
+ loop_config(LOOP_FREQ, ftemp);
+ break;
}
}
break;
-#ifdef AUTOKEY
+ case CONFIG_TOS:
+ for (i = 1; i < ntokens; i++) {
+ int temp;
+ double ftemp;
+
+ temp = matchkey(tokens[i++], tos_keywords, 1);
+ if (i > ntokens - 1) {
+ msyslog(LOG_ERR,
+ "tinker: missing argument");
+ errflg++;
+ break;
+ }
+ sscanf(tokens[i], "%lf", &ftemp);
+ switch(temp) {
+
+ case CONF_TOS_MINCLOCK:
+ proto_config(PROTO_MINCLOCK, 0, ftemp, NULL);
+ break;
+
+ case CONF_TOS_MINSANE:
+ proto_config(PROTO_MINSANE, 0, ftemp, NULL);
+ break;
+
+ case CONF_TOS_FLOOR:
+ proto_config(PROTO_FLOOR, 0, ftemp, NULL);
+ break;
+
+ case CONF_TOS_CEILING:
+ proto_config(PROTO_CEILING, 0, ftemp, NULL);
+ break;
+
+ case CONF_TOS_COHORT:
+ proto_config(PROTO_COHORT, 0, ftemp, NULL);
+ break;
+ }
+ }
+ break;
+
+ case CONFIG_TTL:
+ for (i = 1; i < ntokens && i < MAX_TTL; i++) {
+ sys_ttl[i - 1] = (u_char) atoi(tokens[i]);
+ sys_ttlmax = i - 1;
+ }
+ break;
+
+ case CONFIG_DISCARD:
+ for (i = 1; i < ntokens; i++) {
+ int temp;
+
+ temp = matchkey(tokens[i++],
+ discard_keywords, 1);
+ if (i > ntokens - 1) {
+ msyslog(LOG_ERR,
+ "discard: missing argument");
+ errflg++;
+ break;
+ }
+ switch(temp) {
+ case CONF_DISCARD_AVERAGE:
+ res_avg_interval = atoi(tokens[i++]);
+ break;
+
+ case CONF_DISCARD_MINIMUM:
+ res_min_interval = atoi(tokens[i++]);
+ break;
+
+ case CONF_DISCARD_MONITOR:
+ mon_age = atoi(tokens[i++]);
+ break;
+
+ default:
+ msyslog(LOG_ERR,
+ "discard: unknown keyword");
+ break;
+ }
+ }
+ break;
+
+#ifdef OPENSSL
case CONFIG_REVOKE:
if (ntokens >= 2)
- sys_revoke = 1 << max(atoi(tokens[1]), 10);
+ sys_revoke = (u_char) max(atoi(tokens[1]), KEY_REVOKE);
break;
case CONFIG_AUTOMAX:
@@ -1011,25 +1119,16 @@ getconfig(
sys_automax = 1 << max(atoi(tokens[1]), 10);
break;
-#ifdef PUBKEY
- case CONFIG_KEYSDIR:
- if (ntokens < 2) {
- msyslog(LOG_ERR,
- "Keys directory name required");
- break;
- }
- crypto_config(CRYPTO_CONF_KEYS, tokens[1]);
- break;
-
case CONFIG_CRYPTO:
if (ntokens == 1) {
- crypto_config(CRYPTO_CONF_FLAGS , "0");
+ crypto_config(CRYPTO_CONF_NONE, NULL);
break;
}
for (i = 1; i < ntokens; i++) {
int temp;
- temp = matchkey(tokens[i++], crypto_keywords);
+ temp = matchkey(tokens[i++],
+ crypto_keywords, 1);
if (i > ntokens - 1) {
msyslog(LOG_ERR,
"crypto: missing argument");
@@ -1037,48 +1136,88 @@ getconfig(
break;
}
switch(temp) {
- case CONF_CRYPTO_FLAGS:
- crypto_config(CRYPTO_CONF_FLAGS, tokens[i]);
+
+ case CONF_CRYPTO_CERT:
+ crypto_config(CRYPTO_CONF_CERT,
+ tokens[i]);
break;
- case CONF_CRYPTO_LEAP:
- crypto_config(CRYPTO_CONF_LEAP, tokens[i]);
+ case CONF_CRYPTO_RSA:
+ crypto_config(CRYPTO_CONF_PRIV,
+ tokens[i]);
break;
- case CONF_CRYPTO_DH:
- crypto_config(CRYPTO_CONF_DH, tokens[i]);
+ case CONF_CRYPTO_IFFPAR:
+ crypto_config(CRYPTO_CONF_IFFPAR,
+ tokens[i]);
break;
- case CONF_CRYPTO_PRIVATEKEY:
- crypto_config(CRYPTO_CONF_PRIV, tokens[i]);
+ case CONF_CRYPTO_GQPAR:
+ crypto_config(CRYPTO_CONF_GQPAR,
+ tokens[i]);
break;
- case CONF_CRYPTO_PUBLICKEY:
- crypto_config(CRYPTO_CONF_PUBL, tokens[i]);
+ case CONF_CRYPTO_MVPAR:
+ crypto_config(CRYPTO_CONF_MVPAR,
+ tokens[i]);
break;
- case CONF_CRYPTO_CERT:
- crypto_config(CRYPTO_CONF_CERT, tokens[i]);
+ case CONF_CRYPTO_LEAP:
+ crypto_config(CRYPTO_CONF_LEAP,
+ tokens[i]);
+ break;
+
+ case CONF_CRYPTO_PW:
+ crypto_config(CRYPTO_CONF_PW,
+ tokens[i]);
+ break;
+
+ case CONF_CRYPTO_RAND:
+ crypto_config(CRYPTO_CONF_RAND,
+ tokens[i]);
+ break;
+
+ case CONF_CRYPTO_SIGN:
+ crypto_config(CRYPTO_CONF_SIGN,
+ tokens[i]);
break;
default:
- msyslog(LOG_ERR, "crypto: unknown keyword");
+ msyslog(LOG_ERR,
+ "crypto: unknown keyword");
break;
}
}
break;
-#endif /* PUBKEY */
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
case CONFIG_RESTRICT:
if (ntokens < 2) {
msyslog(LOG_ERR, "restrict requires an address");
break;
}
- if (STREQ(tokens[1], "default"))
- peeraddr.sin_addr.s_addr = htonl(INADDR_ANY);
- else if (!getnetnum(tokens[1], &peeraddr, 1))
- break;
+ istart = 1;
+ memset((char *)&peeraddr, 0, sizeof(peeraddr));
+ switch (matchkey(tokens[istart], addr_type, 0)) {
+ case CONF_ADDR_IPV4:
+ peeraddr.ss_family = AF_INET;
+ istart++;
+ break;
+ case CONF_ADDR_IPV6:
+ peeraddr.ss_family = AF_INET6;
+ istart++;
+ break;
+ }
+
+ /*
+ * Assume default means an IPv4 address, except
+ * if forced by a -4 or -6.
+ */
+ if (STREQ(tokens[istart], "default")) {
+ if (peeraddr.ss_family == 0)
+ peeraddr.ss_family = AF_INET;
+ } else if (!getnetnum(tokens[istart], &peeraddr, 1))
+ break;
/*
* Use peerversion as flags, peerkey as mflags. Ick.
@@ -1086,9 +1225,10 @@ getconfig(
peerversion = 0;
peerkey = 0;
errflg = 0;
- maskaddr.sin_addr.s_addr = ~(u_int32)0;
- for (i = 2; i < ntokens; i++) {
- switch (matchkey(tokens[i], res_keywords)) {
+ SET_HOSTMASK(&maskaddr, peeraddr.ss_family);
+ istart++;
+ for (i = istart; i < ntokens; i++) {
+ switch (matchkey(tokens[i], res_keywords, 1)) {
case CONF_RES_MASK:
if (i >= ntokens-1) {
msyslog(LOG_ERR,
@@ -1154,8 +1294,8 @@ getconfig(
break;
}
}
- if (SRCADR(&peeraddr) == htonl(INADDR_ANY))
- maskaddr.sin_addr.s_addr = 0;
+ if (SOCKNUL(&peeraddr))
+ ANYSOCK(&maskaddr);
if (!errflg)
hack_restrict(RESTRICT_FLAGS, &peeraddr, &maskaddr,
(int)peerkey, peerversion);
@@ -1170,11 +1310,23 @@ getconfig(
"broadcastdelay value %s undecodable",
tokens[1]);
} else {
- proto_config(PROTO_BROADDELAY, 0, tmp);
+ proto_config(PROTO_BROADDELAY, 0, tmp, NULL);
}
}
break;
+ case CONFIG_CDELAY:
+ if (ntokens >= 2) {
+ u_long ui;
+
+ if (sscanf(tokens[1], "%ld", &ui) != 1)
+ msyslog(LOG_ERR,
+ "illegal value - line ignored");
+ else
+ proto_config(PROTO_CALLDELAY, ui, 0, NULL);
+ }
+ break;
+
case CONFIG_TRUSTEDKEY:
for (i = 1; i < ntokens; i++) {
keyid_t tkey;
@@ -1232,7 +1384,20 @@ getconfig(
"no address for trap command, line ignored");
break;
}
- if (!getnetnum(tokens[1], &peeraddr, 1))
+ istart = 1;
+ memset((char *)&peeraddr, 0, sizeof(peeraddr));
+ switch (matchkey(tokens[istart], addr_type, 0)) {
+ case CONF_ADDR_IPV4:
+ peeraddr.ss_family = AF_INET;
+ istart++;
+ break;
+ case CONF_ADDR_IPV6:
+ peeraddr.ss_family = AF_INET6;
+ istart++;
+ break;
+ }
+
+ if (!getnetnum(tokens[istart], &peeraddr, 1))
break;
/*
@@ -1241,8 +1406,9 @@ getconfig(
errflg = 0;
peerversion = 0;
localaddr = 0;
- for (i = 2; i < ntokens-1; i++)
- switch (matchkey(tokens[i], trap_keywords)) {
+ istart++;
+ for (i = istart; i < ntokens-1; i++)
+ switch (matchkey(tokens[i], trap_keywords, 1)) {
case CONF_TRAP_PORT:
if (i >= ntokens-1) {
msyslog(LOG_ERR,
@@ -1268,6 +1434,9 @@ getconfig(
break;
}
+ memset((char *)&maskaddr, 0,
+ sizeof(maskaddr));
+ maskaddr.ss_family = peeraddr.ss_family;
if (!getnetnum(tokens[++i],
&maskaddr, 1)) {
errflg = 1;
@@ -1278,7 +1447,7 @@ getconfig(
if (localaddr == NULL) {
msyslog(LOG_ERR,
"can't find interface with address %s",
- ntoa(&maskaddr));
+ stoa(&maskaddr));
errflg = 1;
}
break;
@@ -1290,16 +1459,16 @@ getconfig(
if (!errflg) {
if (peerversion != 0)
- peeraddr.sin_port = htons( (u_short) peerversion);
+ ((struct sockaddr_in6*)&peeraddr)->sin6_port = htons( (u_short) peerversion);
else
- peeraddr.sin_port = htons(TRAPPORT);
+ ((struct sockaddr_in6*)&peeraddr)->sin6_port = htons(TRAPPORT);
if (localaddr == NULL)
- localaddr = any_interface;
+ localaddr = ANY_INTERFACE_CHOOSE(&peeraddr);
if (!ctlsettrap(&peeraddr, localaddr, 0,
NTP_VERSION))
msyslog(LOG_ERR,
"can't set trap for %s, no resources",
- ntoa(&peeraddr));
+ stoa(&peeraddr));
}
break;
@@ -1309,13 +1478,14 @@ getconfig(
"no address for fudge command, line ignored");
break;
}
+ memset((char *)&peeraddr, 0, sizeof(peeraddr));
if (!getnetnum(tokens[1], &peeraddr, 1))
break;
if (!ISREFCLOCKADR(&peeraddr)) {
msyslog(LOG_ERR,
"%s is inappropriate address for the fudge command, line ignored",
- ntoa(&peeraddr));
+ stoa(&peeraddr));
break;
}
@@ -1324,13 +1494,13 @@ getconfig(
errflg = 0;
for (i = 2; i < ntokens-1; i++) {
switch (c = matchkey(tokens[i],
- fudge_keywords)) {
+ fudge_keywords, 1)) {
case CONF_FDG_TIME1:
if (sscanf(tokens[++i], "%lf",
&clock_stat.fudgetime1) != 1) {
msyslog(LOG_ERR,
"fudge %s time1 value in error",
- ntoa(&peeraddr));
+ stoa(&peeraddr));
errflg = i;
break;
}
@@ -1342,7 +1512,7 @@ getconfig(
&clock_stat.fudgetime2) != 1) {
msyslog(LOG_ERR,
"fudge %s time2 value in error",
- ntoa(&peeraddr));
+ stoa(&peeraddr));
errflg = i;
break;
}
@@ -1355,7 +1525,7 @@ getconfig(
{
msyslog(LOG_ERR,
"fudge %s stratum value in error",
- ntoa(&peeraddr));
+ stoa(&peeraddr));
errflg = i;
break;
}
@@ -1379,7 +1549,7 @@ getconfig(
|| fudgeflag > 1) {
msyslog(LOG_ERR,
"fudge %s flag value in error",
- ntoa(&peeraddr));
+ stoa(&peeraddr));
errflg = i;
break;
}
@@ -1475,7 +1645,8 @@ getconfig(
errflg = 0;
for (i = 2; i < ntokens; i++) {
- switch (matchkey(tokens[i], filegen_keywords)) {
+ switch (matchkey(tokens[i],
+ filegen_keywords, 1)) {
case CONF_FGEN_FILE:
if (i >= ntokens - 1) {
msyslog(LOG_ERR,
@@ -1494,7 +1665,8 @@ getconfig(
errflg = i;
break;
}
- peerkey = matchkey(tokens[++i], fgen_types);
+ peerkey = matchkey(tokens[++i],
+ fgen_types, 1);
if (peerkey == CONFIG_UNKNOWN) {
msyslog(LOG_ERR,
"filegen %s unknown type \"%s\"",
@@ -1532,55 +1704,12 @@ getconfig(
"no value for setvar command - line ignored");
} else {
set_sys_var(tokens[1], strlen(tokens[1])+1,
- RW |
+ (u_short) (RW |
((((ntokens > 2)
&& !strcmp(tokens[2],
"default")))
? DEF
- : 0));
- }
- break;
-
- case CONFIG_CLIENTLIMIT:
- if (ntokens < 2) {
- msyslog(LOG_ERR,
- "no value for clientlimit command - line ignored");
- } else {
- u_long ui;
-
- if (!atouint(tokens[1], &ui) || !ui) {
- msyslog(LOG_ERR,
- "illegal value for clientlimit command - line ignored");
- } else {
- char bp[80];
-
-#ifdef DEBUG
- if (debug)
- sprintf(bp, "client_limit=%lu", ui);
-#endif
- set_sys_var(bp, strlen(bp)+1, RO);
- client_limit = ui;
- }
- }
- break;
-
- case CONFIG_CLIENTPERIOD:
- if (ntokens < 2) {
- msyslog(LOG_ERR,
- "no value for clientperiod command - line ignored");
- } else {
- u_long ui;
-
- if (!atouint(tokens[1], &ui) || ui < 64) {
- msyslog(LOG_ERR,
- "illegal value for clientperiod command - line ignored");
- } else {
- char bp[80];
-
- sprintf(bp, "client_limit_period=%ld", ui);
- set_sys_var(bp, strlen(bp)+1, RO);
- client_limit_period = ui;
- }
+ : 0)));
}
break;
@@ -1588,7 +1717,7 @@ getconfig(
for (i = 1; i < ntokens; i++) {
int flag;
- flag = matchkey(tokens[i], flags_keywords);
+ flag = matchkey(tokens[i], flags_keywords, 1);
if (flag == CONFIG_UNKNOWN) {
msyslog(LOG_ERR,
"enable unknown flag %s",
@@ -1596,7 +1725,7 @@ getconfig(
errflg = 1;
break;
}
- proto_config(flag, 1, 0.);
+ proto_config(flag, 1, 0., NULL);
}
break;
@@ -1604,7 +1733,7 @@ getconfig(
for (i = 1; i < ntokens; i++) {
int flag;
- flag = matchkey(tokens[i], flags_keywords);
+ flag = matchkey(tokens[i], flags_keywords, 1);
if (flag == CONFIG_UNKNOWN) {
msyslog(LOG_ERR,
"disable unknown flag %s",
@@ -1612,7 +1741,7 @@ getconfig(
errflg = 1;
break;
}
- proto_config(flag, 0, 0.);
+ proto_config(flag, 0, 0., NULL);
}
break;
@@ -1624,38 +1753,14 @@ getconfig(
sys_phone[i - 1][0] = '\0';
break;
- case CONFIG_PPS:
- if (ntokens < 2) {
- msyslog(LOG_ERR,
- "pps missing device name");
- break;
- }
- (void)strncpy(pps_device, tokens[1], MAXPPS);
- for (i = 2; i < ntokens; i++) {
- int flag;
+ case CONFIG_ADJ: {
+ double ftemp;
- flag = matchkey(tokens[i], pps_keywords);
- switch(flag) {
- case CONF_PPS_ASSERT:
- pps_assert = 0;
- break;
- case CONF_PPS_CLEAR:
- pps_assert = 1;
- break;
- case CONF_PPS_HARDPPS:
- pps_hardpps = 1;
- break;
- default:
- msyslog(LOG_ERR,
- "pps unknown flag %s",
- tokens[i]);
- errflg = 1;
- break;
- }
- if(errflg)
- break;
+ sscanf(tokens[1], "%lf", &ftemp);
+ proto_config(PROTO_ADJ, 0, ftemp, NULL);
}
break;
+
}
}
if (fp[0])
@@ -1680,7 +1785,7 @@ getconfig(
for (i = 0; i < 8; i++)
for (j = 1; j < 100; ++j) {
- rankey[i] = RANDOM & 0xff;
+ rankey[i] = (char) (RANDOM & 0xff);
if (rankey[i] != 0) break;
}
rankey[8] = 0;
@@ -1697,10 +1802,12 @@ getconfig(
#endif /* !defined(VMS) && !defined(SYS_VXWORKS) */
if (res_fp != NULL) {
- /*
- * Need name resolution
- */
- do_resolve_internal();
+ if (call_resolver) {
+ /*
+ * Need name resolution
+ */
+ do_resolve_internal();
+ }
}
}
@@ -1801,7 +1908,7 @@ gettokens_netinfo (
for (index = 0; index < namelist.ni_namelist_len; index++) {
char *value = namelist.ni_namelist_val[index];
- if (! (val_list[index] = (char*)malloc(strlen(value+1))))
+ if (! (val_list[index] = (char*)malloc(strlen(value)+1)))
{ msyslog(LOG_ERR, "out of memory while configuring"); break; }
strcpy(val_list[index], value);
@@ -1921,7 +2028,7 @@ gettokens (
* Return the match
*/
*ntokens = ntok + 1;
- ntok = matchkey(tokenlist[0], keywords);
+ ntok = matchkey(tokenlist[0], keywords, 1);
if (ntok == CONFIG_UNKNOWN)
goto again;
return ntok;
@@ -1935,14 +2042,16 @@ gettokens (
static int
matchkey(
register char *word,
- register struct keyword *keys
+ register struct keyword *keys,
+ int complain
)
{
for (;;) {
if (keys->keytype == CONFIG_UNKNOWN) {
- msyslog(LOG_ERR,
- "configure: keyword \"%s\" unknown, line ignored",
- word);
+ if (complain)
+ msyslog(LOG_ERR,
+ "configure: keyword \"%s\" unknown, line ignored",
+ word);
return CONFIG_UNKNOWN;
}
if (STRSAME(word, keys->text))
@@ -1958,77 +2067,53 @@ matchkey(
static int
getnetnum(
const char *num,
- struct sockaddr_in *addr,
+ struct sockaddr_storage *addr,
int complain
)
{
- register const char *cp;
- register char *bp;
- register int i;
- register int temp;
- char buf[80]; /* will core dump on really stupid stuff */
- u_int32 netnum;
-
- /* XXX ELIMINATE replace with decodenetnum */
- cp = num;
- netnum = 0;
- for (i = 0; i < 4; i++) {
- bp = buf;
- while (isdigit((int)*cp))
- *bp++ = *cp++;
- if (bp == buf)
- break;
+ struct addrinfo hints;
+ struct addrinfo *ptr;
- if (i < 3) {
- if (*cp++ != '.')
- break;
- } else if (*cp != '\0')
- break;
+ /* Get host address. Looking for UDP datagram connection */
+ memset(&hints, 0, sizeof (hints));
+ if (addr->ss_family == AF_INET || addr->ss_family == AF_INET6)
+ hints.ai_family = addr->ss_family;
+ else
+ hints.ai_family = AF_UNSPEC;
- *bp = '\0';
- temp = atoi(buf);
- if (temp > 255)
- break;
- netnum <<= 8;
- netnum += temp;
+ hints.ai_socktype = SOCK_DGRAM;
#ifdef DEBUG
if (debug > 3)
- printf("getnetnum %s step %d buf %s temp %d netnum %lu\n",
- num, i, buf, temp, (u_long)netnum);
+ printf("getaddrinfo %s\n", num);
#endif
- }
-
- if (i < 4) {
+ if (getaddrinfo(num, "ntp", &hints, &ptr)!=0) {
if (complain)
msyslog(LOG_ERR,
- "getnetnum: \"%s\" invalid host number, line ignored",
+ "getaddrinfo: \"%s\" invalid host address, line ignored",
num);
#ifdef DEBUG
if (debug > 3)
printf(
- "getnetnum: \"%s\" invalid host number, line ignored\n",
- num);
+ "getaddrinfo: \"%s\" invalid host address%s.\n",
+ num, (complain)
+ ? ", line ignored"
+ : "");
#endif
return 0;
}
- /*
- * make up socket address. Clear it out for neatness.
- */
- memset((void *)addr, 0, sizeof(struct sockaddr_in));
- addr->sin_family = AF_INET;
- addr->sin_port = htons(NTP_PORT);
- addr->sin_addr.s_addr = htonl(netnum);
+ memcpy(addr, ptr->ai_addr, ptr->ai_addrlen);
#ifdef DEBUG
if (debug > 1)
- printf("getnetnum given %s, got %s (%lx)\n",
- num, ntoa(addr), (u_long)netnum);
+ printf("getnetnum given %s, got %s \n",
+ num, stoa(addr));
#endif
+ freeaddrinfo(ptr);
return 1;
}
-#if !defined(VMS)
+#if !defined(VMS) && !defined(SYS_WINNT)
/*
* catchchild - receive the resolver's exit status
*/
@@ -2072,8 +2157,7 @@ save_resolve(
#else
/* no /tmp directory under NT */
{
- DWORD len;
- if(!(len = GetTempPath((DWORD)MAX_PATH, (LPTSTR)res_file))) {
+ if(!(GetTempPath((DWORD)MAX_PATH, (LPTSTR)res_file))) {
msyslog(LOG_ERR, "cannot get pathname for temporary directory: %m");
return;
}
@@ -2211,7 +2295,7 @@ do_resolve_internal(void)
*/
closelog();
- kill_asyncio();
+ kill_asyncio(0);
(void) signal_no_reset(SIGCHLD, SIG_DFL);
@@ -2266,13 +2350,14 @@ do_resolve_internal(void)
*/
DWORD dwThreadId;
fflush(stdout);
- if (!(ResolverThreadHandle = CreateThread(
- NULL, /* no security attributes */
- 0, /* use default stack size */
+ ResolverThreadHandle = CreateThread(
+ NULL, /* no security attributes */
+ 0, /* use default stack size */
(LPTHREAD_START_ROUTINE) ntp_intres, /* thread function */
- NULL, /* argument to thread function */
- 0, /* use default creation flags */
- &dwThreadId))) { /* returns the thread identifier */
+ NULL, /* argument to thread function */
+ 0, /* use default creation flags */
+ &dwThreadId); /* returns the thread identifier */
+ if (ResolverThreadHandle == NULL) {
msyslog(LOG_ERR, "CreateThread() failed, can't start ntp_intres");
abort_resolve();
}
diff --git a/contrib/ntp/ntpd/ntp_control.c b/contrib/ntp/ntpd/ntp_control.c
index d7109cabef65..0ac040493b54 100644
--- a/contrib/ntp/ntpd/ntp_control.c
+++ b/contrib/ntp/ntpd/ntp_control.c
@@ -18,10 +18,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#ifdef PUBKEY
-#include "ntp_crypto.h"
-#endif /* PUBKEY */
-
/*
* Structure to hold request procedure information
*/
@@ -46,7 +42,9 @@ struct ctl_proc {
* Request processing routines
*/
static void ctl_error P((int));
+#ifdef REFCLOCK
static u_short ctlclkstatus P((struct refclockstat *));
+#endif
static void ctl_flushpkt P((int));
static void ctl_putdata P((const char *, unsigned int, int));
static void ctl_putstr P((const char *, const char *,
@@ -56,7 +54,7 @@ static void ctl_putuint P((const char *, u_long));
static void ctl_puthex P((const char *, u_long));
static void ctl_putint P((const char *, long));
static void ctl_putts P((const char *, l_fp *));
-static void ctl_putadr P((const char *, u_int32));
+static void ctl_putadr P((const char *, u_int32, struct sockaddr_storage*));
static void ctl_putid P((const char *, char *));
static void ctl_putarray P((const char *, double *, int));
static void ctl_putsys P((int));
@@ -74,7 +72,7 @@ static void read_clock_status P((struct recvbuf *, int));
static void write_clock_status P((struct recvbuf *, int));
static void set_trap P((struct recvbuf *, int));
static void unset_trap P((struct recvbuf *, int));
-static struct ctl_trap *ctlfindtrap P((struct sockaddr_in *,
+static struct ctl_trap *ctlfindtrap P((struct sockaddr_storage *,
struct interface *));
static struct ctl_proc control_codes[] = {
@@ -114,16 +112,16 @@ static struct ctl_var sys_var[] = {
{ CS_VERSION, RO, "version" }, /* 17 */
{ CS_STABIL, RO, "stability" }, /* 18 */
{ CS_VARLIST, RO, "sys_var_list" }, /* 19 */
-#ifdef PUBKEY
+#ifdef OPENSSL
{ CS_FLAGS, RO, "flags" }, /* 20 */
{ CS_HOST, RO, "hostname" }, /* 21 */
- { CS_PUBLIC, RO, "publickey" }, /* 22 */
- { CS_CERTIF, RO, "certificate" }, /* 23 */
- { CS_DHPARAMS, RO, "params" }, /* 24 */
- { CS_REVTIME, RO, "refresh" }, /* 25 */
- { CS_LEAPTAB, RO, "leapseconds" }, /* 26 */
- { CS_TAI, RO, "tai"}, /* 27 */
-#endif /* PUBKEY */
+ { CS_PUBLIC, RO, "hostkey" }, /* 22 */
+ { CS_CERTIF, RO, "cert" }, /* 23 */
+ { CS_REVTIME, RO, "refresh" }, /* 24 */
+ { CS_LEAPTAB, RO, "leapseconds" }, /* 25 */
+ { CS_TAI, RO, "tai" }, /* 26 */
+ { CS_DIGEST, RO, "signature" }, /* 27 */
+#endif /* OPENSSL */
{ 0, EOV, "" } /* 28 */
};
@@ -152,14 +150,15 @@ static u_char def_sys_var[] = {
CS_DRIFT,
CS_JITTER,
CS_STABIL,
-#ifdef PUBKEY
- CS_FLAGS,
+#ifdef OPENSSL
CS_HOST,
- CS_CERTIF,
- CS_DHPARAMS,
+ CS_DIGEST,
+ CS_FLAGS,
+ CS_PUBLIC,
CS_REVTIME,
CS_LEAPTAB,
-#endif /* PUBKEY */
+ CS_CERTIF,
+#endif /* OPENSSL */
0
};
@@ -205,20 +204,18 @@ static struct ctl_var peer_var[] = {
{ CP_FILTERROR, RO, "filtdisp=" }, /* 34 */
{ CP_FLASH, RO, "flash" }, /* 35 */
{ CP_TTL, RO, "ttl" }, /* 36 */
- { CP_TTLMAX, RO, "ttlmax" }, /* 37 */
+ { CP_RANK, RO, "rank" }, /* 37 */
{ CP_VARLIST, RO, "peer_var_list" }, /* 38 */
-#ifdef PUBKEY
- { CP_FLAGS, RO, "flags" }, /* 38 */
- { CP_HOST, RO, "hostname" }, /* 39 */
- { CP_PUBLIC, RO, "publickey" }, /* 40 */
- { CP_CERTIF, RO, "certificate" }, /* 41 */
- { CP_SESKEY, RO, "pcookie" }, /* 42 */
- { CP_SASKEY, RO, "hcookie" }, /* 43 */
- { CP_INITSEQ, RO, "initsequence" }, /* 44 */
- { CP_INITKEY, RO, "initkey" }, /* 45 */
- { CP_INITTSP, RO, "timestamp" }, /* 46 */
-#endif /* PUBKEY */
- { 0, EOV, "" } /* 47 */
+#ifdef OPENSSL
+ { CP_FLAGS, RO, "flags" }, /* 39 */
+ { CP_HOST, RO, "hostname" }, /* 40 */
+ { CP_INITSEQ, RO, "initsequence" }, /* 41 */
+ { CP_INITKEY, RO, "initkey" }, /* 42 */
+ { CP_INITTSP, RO, "timestamp" }, /* 43 */
+ { CP_DIGEST, RO, "signature" }, /* 44 */
+ { CP_IDENT, RO, "identity" }, /* 45 */
+#endif /* OPENSSL */
+ { 0, EOV, "" } /* 39/46 */
};
@@ -245,7 +242,6 @@ static u_char def_peer_var[] = {
CP_FLASH,
CP_KEYID,
CP_TTL,
- CP_TTLMAX,
CP_OFFSET,
CP_DELAY,
CP_DISPERSION,
@@ -257,13 +253,13 @@ static u_char def_peer_var[] = {
CP_FILTDELAY,
CP_FILTOFFSET,
CP_FILTERROR,
-#ifdef PUBKEY
- CP_FLAGS,
+#ifdef OPENSSL
CP_HOST,
- CP_CERTIF,
- CP_SESKEY,
+ CP_DIGEST,
+ CP_FLAGS,
+ CP_IDENT,
CP_INITSEQ,
-#endif /* PUBKEY */
+#endif /* OPENSSL */
0
};
@@ -450,7 +446,7 @@ static u_char * datapt;
static u_char * dataend;
static int datalinelen;
static int datanotbinflag;
-static struct sockaddr_in *rmt_addr;
+static struct sockaddr_storage *rmt_addr;
static struct interface *lcl_inter;
static u_char res_authenticate;
@@ -735,14 +731,16 @@ ctlpeerstatus(
/*
* ctlclkstatus - return a status word for this clock
*/
+#ifdef REFCLOCK
static u_short
ctlclkstatus(
struct refclockstat *this_clock
)
{
- return ((u_short)(this_clock->currentstatus) << 8) |
- (u_short)(this_clock->lastevent);
+ return ((u_short)(((this_clock->currentstatus) << 8) |
+ (this_clock->lastevent)));
}
+#endif
/*
@@ -1074,12 +1072,13 @@ ctl_putts(
/*
- * ctl_putadr - write a dotted quad IP address into the response
+ * ctl_putadr - write an IP address into the response
*/
static void
ctl_putadr(
const char *tag,
- u_int32 addr
+ u_int32 addr32,
+ struct sockaddr_storage* addr
)
{
register char *cp;
@@ -1092,7 +1091,10 @@ ctl_putadr(
*cp++ = *cq++;
*cp++ = '=';
- cq = numtoa(addr);
+ if (addr == NULL)
+ cq = numtoa(addr32);
+ else
+ cq = stoa(addr);
while (*cq != '\0')
*cp++ = *cq++;
ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
@@ -1139,7 +1141,6 @@ ctl_putarray(
register const char *cq;
char buffer[200];
int i;
-
cp = buffer;
cq = tag;
while (*cq != '\0')
@@ -1166,9 +1167,11 @@ ctl_putsys(
)
{
l_fp tmp;
-#ifdef HAVE_UNAME
char str[256];
-#endif
+#ifdef OPENSSL
+ struct cert_info *cp;
+ char cbuf[256];
+#endif /* OPENSSL */
switch (varid) {
@@ -1195,8 +1198,8 @@ ctl_putsys(
break;
case CS_REFID:
- if (sys_stratum > 1)
- ctl_putadr(sys_var[CS_REFID].text, sys_refid);
+ if (sys_stratum > 1 && sys_stratum < STRATUM_UNSPEC)
+ ctl_putadr(sys_var[CS_REFID].text, sys_refid, NULL);
else
ctl_putid(sys_var[CS_REFID].text,
(char *)&sys_refid);
@@ -1254,8 +1257,7 @@ ctl_putsys(
ctl_putstr(sys_var[CS_SYSTEM].text, str_system,
sizeof(str_system) - 1);
#else
- (void)strcpy(str, utsnamebuf.sysname);
- (void)strcat(str, utsnamebuf.release);
+ sprintf(str, "%s/%s", utsnamebuf.sysname, utsnamebuf.release);
ctl_putstr(sys_var[CS_SYSTEM].text, str, strlen(str));
#endif /* HAVE_UNAME */
break;
@@ -1333,37 +1335,50 @@ ctl_putsys(
}
break;
-#ifdef PUBKEY
+#ifdef OPENSSL
case CS_FLAGS:
- if (crypto_flags)
- ctl_puthex(sys_var[CS_FLAGS].text,
- crypto_flags);
+ if (crypto_flags) {
+ ctl_puthex(sys_var[CS_FLAGS].text, crypto_flags);
+ }
+ break;
+
+ case CS_DIGEST:
+ if (crypto_flags) {
+ const EVP_MD *dp;
+
+ dp = EVP_get_digestbynid(crypto_flags >> 16);
+ strcpy(str, OBJ_nid2ln(EVP_MD_pkey_type(dp)));
+ ctl_putstr(sys_var[CS_DIGEST].text, str,
+ strlen(str));
+ }
break;
case CS_HOST:
- ctl_putstr(sys_var[CS_HOST].text, sys_hostname,
- strlen(sys_hostname));
- if (host.fstamp != 0)
- ctl_putuint(sys_var[CS_PUBLIC].text,
- ntohl(host.fstamp));
+ if (sys_hostname != NULL)
+ ctl_putstr(sys_var[CS_HOST].text, sys_hostname,
+ strlen(sys_hostname));
break;
case CS_CERTIF:
- if (certif.fstamp != 0)
- ctl_putuint(sys_var[CS_CERTIF].text,
- ntohl(certif.fstamp));
+ for (cp = cinfo; cp != NULL; cp = cp->link) {
+ sprintf(cbuf, "%s %s 0x%x %u", cp->subject,
+ cp->issuer, cp->flags,
+ ntohl(cp->cert.fstamp));
+ ctl_putstr(sys_var[CS_CERTIF].text, cbuf,
+ strlen(cbuf));
+ }
break;
- case CS_DHPARAMS:
- if (dhparam.fstamp != 0)
- ctl_putuint(sys_var[CS_DHPARAMS].text,
- ntohl(dhparam.fstamp));
+ case CS_PUBLIC:
+ if (hostval.fstamp != 0)
+ ctl_putuint(sys_var[CS_PUBLIC].text,
+ ntohl(hostval.fstamp));
break;
case CS_REVTIME:
- if (host.tstamp != 0)
+ if (hostval.tstamp != 0)
ctl_putuint(sys_var[CS_REVTIME].text,
- ntohl(host.tstamp));
+ ntohl(hostval.tstamp));
break;
case CS_LEAPTAB:
@@ -1373,7 +1388,7 @@ ctl_putsys(
if (sys_tai != 0)
ctl_putuint(sys_var[CS_TAI].text, sys_tai);
break;
-#endif /* PUBKEY */
+#endif /* OPENSSL */
}
}
@@ -1387,6 +1402,11 @@ ctl_putpeer(
struct peer *peer
)
{
+#ifdef OPENSSL
+ char str[256];
+ struct autokey *ap;
+#endif /* OPENSSL */
+
switch (varid) {
case CP_CONFIG:
@@ -1405,24 +1425,24 @@ ctl_putpeer(
break;
case CP_SRCADR:
- ctl_putadr(peer_var[CP_SRCADR].text,
- peer->srcadr.sin_addr.s_addr);
+ ctl_putadr(peer_var[CP_SRCADR].text, 0,
+ &peer->srcadr);
break;
case CP_SRCPORT:
ctl_putuint(peer_var[CP_SRCPORT].text,
- ntohs(peer->srcadr.sin_port));
+ ntohs(((struct sockaddr_in*)&peer->srcadr)->sin_port));
break;
case CP_DSTADR:
- ctl_putadr(peer_var[CP_DSTADR].text,
- peer->dstadr->sin.sin_addr.s_addr);
+ ctl_putadr(peer_var[CP_DSTADR].text, 0,
+ &(peer->dstadr->sin));
break;
case CP_DSTPORT:
ctl_putuint(peer_var[CP_DSTPORT].text,
(u_long)(peer->dstadr ?
- ntohs(peer->dstadr->sin.sin_port) : 0));
+ ntohs(((struct sockaddr_in*)&peer->dstadr->sin)->sin_port) : 0));
break;
case CP_LEAP:
@@ -1461,16 +1481,22 @@ ctl_putpeer(
break;
case CP_REFID:
- if (peer->stratum > 1) {
- if (peer->flags & FLAG_REFCLOCK)
- ctl_putadr(peer_var[CP_REFID].text,
- peer->srcadr.sin_addr.s_addr);
+ if (peer->flags & FLAG_REFCLOCK) {
+ if (peer->stratum > 0 && peer->stratum <
+ STRATUM_UNSPEC)
+ ctl_putadr(peer_var[CP_REFID].text,
+ peer->refid, NULL);
else
- ctl_putadr(peer_var[CP_REFID].text,
- peer->refid);
+ ctl_putid(peer_var[CP_REFID].text,
+ (char *)&peer->refid);
} else {
- ctl_putid(peer_var[CP_REFID].text,
- (char *)&peer->refid);
+ if (peer->stratum > 1 && peer->stratum <
+ STRATUM_UNSPEC)
+ ctl_putadr(peer_var[CP_REFID].text,
+ peer->refid, NULL);
+ else
+ ctl_putid(peer_var[CP_REFID].text,
+ (char *)&peer->refid);
}
break;
@@ -1499,21 +1525,17 @@ ctl_putpeer(
break;
case CP_TTL:
- if (!(peer->cast_flags & MDF_ACAST))
- break;
- ctl_putint(peer_var[CP_TTL].text, peer->ttl);
- break;
-
- case CP_TTLMAX:
- if (!(peer->cast_flags & (MDF_MCAST | MDF_ACAST)))
- break;
- ctl_putint(peer_var[CP_TTLMAX].text, peer->ttlmax);
+ ctl_putint(peer_var[CP_TTL].text, sys_ttl[peer->ttl]);
break;
case CP_VALID:
ctl_putuint(peer_var[CP_VALID].text, peer->unreach);
break;
+ case CP_RANK:
+ ctl_putuint(peer_var[CP_RANK].text, peer->rank);
+ break;
+
case CP_TIMER:
ctl_putuint(peer_var[CP_TIMER].text,
peer->nextdate - current_time);
@@ -1607,47 +1629,44 @@ ctl_putpeer(
ctl_putdata(buf, (unsigned)(s - buf), 0);
}
break;
-#ifdef PUBKEY
+#ifdef OPENSSL
case CP_FLAGS:
if (peer->crypto)
ctl_puthex(peer_var[CP_FLAGS].text, peer->crypto);
break;
- case CP_HOST:
- if (peer->keystr != NULL)
- ctl_putstr(peer_var[CP_HOST].text, peer->keystr,
- strlen(peer->keystr));
- if (peer->pubkey.fstamp != 0)
- ctl_putuint(peer_var[CP_PUBLIC].text,
- peer->pubkey.fstamp);
+ case CP_DIGEST:
+ if (peer->crypto) {
+ const EVP_MD *dp;
+
+ dp = EVP_get_digestbynid(peer->crypto >> 16);
+ strcpy(str, OBJ_nid2ln(EVP_MD_pkey_type(dp)));
+ ctl_putstr(peer_var[CP_DIGEST].text, str,
+ strlen(str));
+ }
break;
- case CP_CERTIF:
- if (peer->certif.fstamp != 0)
- ctl_putuint(peer_var[CP_CERTIF].text,
- peer->certif.fstamp);
+ case CP_HOST:
+ if (peer->subject != NULL)
+ ctl_putstr(peer_var[CP_HOST].text, peer->subject,
+ strlen(peer->subject));
break;
- case CP_SESKEY:
- if (peer->pcookie.key != 0)
- ctl_puthex(peer_var[CP_SESKEY].text,
- peer->pcookie.key);
- if (peer->hcookie != 0)
- ctl_puthex(peer_var[CP_SASKEY].text,
- peer->hcookie);
+ case CP_IDENT:
+ if (peer->issuer != NULL)
+ ctl_putstr(peer_var[CP_IDENT].text, peer->issuer,
+ strlen(peer->issuer));
break;
case CP_INITSEQ:
- if (peer->recauto.key == 0)
+ if ((ap = (struct autokey *)peer->recval.ptr) == NULL)
break;
- ctl_putint(peer_var[CP_INITSEQ].text,
- peer->recauto.seq);
- ctl_puthex(peer_var[CP_INITKEY].text,
- peer->recauto.key);
+ ctl_putint(peer_var[CP_INITSEQ].text, ap->seq);
+ ctl_puthex(peer_var[CP_INITKEY].text, ap->key);
ctl_putuint(peer_var[CP_INITTSP].text,
- peer->recauto.tstamp);
+ ntohl(peer->recval.tstamp));
break;
-#endif /* PUBKEY */
+#endif /* OPENSSL */
}
}
@@ -1717,7 +1736,7 @@ ctl_putclock(
if (mustput || (clock_stat->haveflags & CLK_HAVEVAL2)) {
if (clock_stat->fudgeval1 > 1)
ctl_putadr(clock_var[CC_FUDGEVAL2].text,
- (u_int32)clock_stat->fudgeval2);
+ (u_int32)clock_stat->fudgeval2, NULL);
else
ctl_putid(clock_var[CC_FUDGEVAL2].text,
(char *)&clock_stat->fudgeval2);
@@ -1876,7 +1895,7 @@ ctl_getitem(
numctlbadpkts++;
msyslog(LOG_WARNING,
"Possible 'ntpdx' exploit from %s:%d (possibly spoofed)\n",
- inet_ntoa(rmt_addr->sin_addr), ntohs(rmt_addr->sin_port)
+ stoa(rmt_addr), SRCPORT(rmt_addr)
);
return (0);
}
@@ -1884,10 +1903,10 @@ ctl_getitem(
if (cp < reqend)
cp++;
*tp-- = '\0';
- while (tp > buf) {
- *tp-- = '\0';
+ while (tp >= buf) {
if (!isspace((int)(*tp)))
break;
+ *tp-- = '\0';
}
reqpt = cp;
*data = buf;
@@ -2130,7 +2149,7 @@ write_variables(
register struct ctl_var *v;
register int ext_var;
char *valuep;
- long val;
+ long val = 0;
/*
* If he's trying to write into a peer tell him no way
@@ -2434,7 +2453,7 @@ unset_trap(
*/
int
ctlsettrap(
- struct sockaddr_in *raddr,
+ struct sockaddr_storage *raddr,
struct interface *linter,
int traptype,
int version
@@ -2539,7 +2558,7 @@ ctlsettrap(
tptouse->tr_sequence = 1;
tptouse->tr_addr = *raddr;
tptouse->tr_localaddr = linter;
- tptouse->tr_version = version;
+ tptouse->tr_version = (u_char) version;
tptouse->tr_flags = TRAP_INUSE;
if (traptype == TRAP_TYPE_CONFIG)
tptouse->tr_flags |= TRAP_CONFIGURED;
@@ -2555,7 +2574,7 @@ ctlsettrap(
*/
int
ctlclrtrap(
- struct sockaddr_in *raddr,
+ struct sockaddr_storage *raddr,
struct interface *linter,
int traptype
)
@@ -2580,18 +2599,18 @@ ctlclrtrap(
*/
static struct ctl_trap *
ctlfindtrap(
- struct sockaddr_in *raddr,
+ struct sockaddr_storage *raddr,
struct interface *linter
)
{
register struct ctl_trap *tp;
for (tp = ctl_trap; tp < &ctl_trap[CTL_MAXTRAPS]; tp++) {
- if (tp->tr_flags & TRAP_INUSE && NSRCADR(raddr) ==
- NSRCADR(&tp->tr_addr) && NSRCPORT(raddr) ==
- NSRCPORT(&tp->tr_addr) && linter ==
- tp->tr_localaddr)
- return (tp);
+ if ((tp->tr_flags & TRAP_INUSE)
+ && (NSRCPORT(raddr) == NSRCPORT(&tp->tr_addr))
+ && SOCKCMP(raddr, &tp->tr_addr)
+ && (linter == tp->tr_localaddr) )
+ return (tp);
}
return (struct ctl_trap *)NULL;
}
@@ -2612,7 +2631,7 @@ report_event(
* Record error code in proper spots, but have mercy on the
* log file.
*/
- if (!(err & PEER_EVENT)) {
+ if (!(err & (PEER_EVENT | CRPT_EVENT))) {
if (ctl_sys_num_events < CTL_SYS_MAXEVENTS)
ctl_sys_num_events++;
if (ctl_sys_last_event != (u_char)err) {
@@ -2634,10 +2653,10 @@ report_event(
#ifdef REFCLOCK
if (ISREFCLOCKADR(&peer->srcadr))
- src = refnumtoa(peer->srcadr.sin_addr.s_addr);
+ src = refnumtoa(&peer->srcadr);
else
#endif
- src = ntoa(&peer->srcadr);
+ src = stoa(&peer->srcadr);
peer->last_event = (u_char)(err & ~PEER_EVENT);
if (peer->num_events < CTL_PEER_MAXEVENTS)
@@ -2690,10 +2709,10 @@ report_event(
* variables. Don't send crypto strings.
*/
for (i = 1; i <= CS_MAXCODE; i++) {
-#ifdef PUBKEY
+#ifdef OPENSSL
if (i > CS_VARLIST)
continue;
-#endif /* PUBKEY */
+#endif /* OPENSSL */
ctl_putsys(i);
}
#ifdef REFCLOCK
@@ -2719,7 +2738,7 @@ report_event(
strlen(kv->text), 0);
free_varlist(clock_stat.kv_list);
}
-#endif /*REFCLOCK*/
+#endif /* REFCLOCK */
} else {
rpkt.associd = htons(peer->associd);
rpkt.status = htons(ctlpeerstatus(peer));
@@ -2727,12 +2746,13 @@ report_event(
/*
* Dump it all. Later, maybe less.
*/
- for (i = 1; i <= CP_MAXCODE; i++)
-#ifdef PUBKEY
+ for (i = 1; i <= CP_MAXCODE; i++) {
+#ifdef OPENSSL
if (i > CP_VARLIST)
continue;
-#endif /* PUBKEY */
+#endif /* OPENSSL */
ctl_putpeer(i, peer);
+ }
#ifdef REFCLOCK
/*
* for clock exception events: add clock variables to
@@ -2758,7 +2778,7 @@ report_event(
strlen(kv->text), 0);
free_varlist(clock_stat.kv_list);
}
-#endif /*REFCLOCK*/
+#endif /* REFCLOCK */
}
/*
@@ -2812,7 +2832,7 @@ char *
add_var(
struct ctl_var **kv,
u_long size,
- int def
+ u_short def
)
{
register u_long c;
@@ -2841,7 +2861,7 @@ set_var(
struct ctl_var **kv,
const char *data,
u_long size,
- int def
+ u_short def
)
{
register struct ctl_var *k;
@@ -2852,7 +2872,8 @@ set_var(
if (!data || !size)
return;
- if ((k = *kv)) {
+ k = *kv;
+ if (k != NULL) {
while (!(k->flags & EOV)) {
s = data;
t = k->text;
@@ -2887,7 +2908,7 @@ void
set_sys_var(
char *data,
u_long size,
- int def
+ u_short def
)
{
set_var(&ext_sys_var, data, size, def);
diff --git a/contrib/ntp/ntpd/ntp_crypto.c b/contrib/ntp/ntpd/ntp_crypto.c
index 19f902a56a18..3e677032a164 100644
--- a/contrib/ntp/ntpd/ntp_crypto.c
+++ b/contrib/ntp/ntpd/ntp_crypto.c
@@ -5,136 +5,167 @@
#include <config.h>
#endif
-#ifdef AUTOKEY
+#ifdef OPENSSL
#include <stdio.h>
#include <sys/types.h>
+#include <sys/param.h>
#include <unistd.h>
#include <fcntl.h>
#include "ntpd.h"
#include "ntp_stdlib.h"
+#include "ntp_unixtime.h"
#include "ntp_string.h"
-#include "ntp_crypto.h"
+
+#include "openssl/asn1_mac.h"
+#include "openssl/bn.h"
+#include "openssl/err.h"
+#include "openssl/evp.h"
+#include "openssl/pem.h"
+#include "openssl/rand.h"
+#include "openssl/x509v3.h"
#ifdef KERNEL_PLL
#include "ntp_syscall.h"
#endif /* KERNEL_PLL */
/*
- * Extension field message formats
- *
- * +-------+-------+ +-------+-------+ +-------+-------+
- * 0 | 3 | len | | 2,4 | len | | 5-9 | len |
- * +-------+-------+ +-------+-------+ +-------+-------+
- * 1 | assocID | | assocID | | assocID |
- * +---------------+ +---------------+ +---------------+
- * 2 | timestamp | | timestamp | | timestamp |
- * +---------------+ +---------------+ +---------------+
- * 3 | final seq | | cookie/flags | | filestamp |
- * +---------------+ +---------------+ +---------------+
- * 4 | final key | | signature len | | value len |
- * +---------------+ +---------------+ +---------------+
- * 5 | signature len | | | | |
- * +---------------+ = signature = = value =
- * 6 | | | | | |
- * = signature = +---------------+ +---------------+
- * 7 | | CRYPTO_ASSOC rsp | signature len |
- * +---------------+ CRYPTO_PRIV rsp +---------------+
- * CRYPTO_AUTO rsp | |
- * = signature =
- * | |
- * +---------------+
- * CRYPTO_DHPAR rsp
- * CRYPTO_DH rsp
- * CRYPTO_NAME rsp
- * CRYPTO_CERT rsp
- * CRYPTO_TAI rsp
- *
- * CRYPTO_STAT 1 - offer/select
- * CRYPTO_ASSOC 2 20 association ID
- * CRYPTO_AUTO 3 88 autokey values
- * CRYPTO_PRIV 4 84 cookie value
- * CRYPTO_DHPAR 5 220 agreement parameters
- * CRYPTO_DH 6 152 public value
- * CRYPTO_NAME 7 460 host name/public key
- * CRYPTO_CERT 8 ? certificate
- * CRYPTO_TAI 9 144 leapseconds table
- *
- * Note: requests carry the association ID of the receiver; responses
- * carry the association ID of the sender.
+ * Extension field message format
+ *
+ * These are always signed and saved before sending in network byte
+ * order. They must be converted to and from host byte order for
+ * processing.
+ *
+ * +-------+-------+
+ * | op | len | <- extension pointer
+ * +-------+-------+
+ * | assocID |
+ * +---------------+
+ * | timestamp | <- value pointer
+ * +---------------+
+ * | filestamp |
+ * +---------------+
+ * | value len |
+ * +---------------+
+ * | |
+ * = value =
+ * | |
+ * +---------------+
+ * | signature len |
+ * +---------------+
+ * | |
+ * = signature =
+ * | |
+ * +---------------+
+ *
+ * The CRYPTO_RESP bit is set to 0 for requests, 1 for responses.
+ * Requests carry the association ID of the receiver; responses carry
+ * the association ID of the sender. Some messages include only the
+ * operation/length and association ID words and so have length 8
+ * octets. Ohers include the value structure and associated value and
+ * signature fields. These messages include the timestamp, filestamp,
+ * value and signature words and so have length at least 24 octets. The
+ * signature and/or value fields can be empty, in which case the
+ * respective length words are zero. An empty value with nonempty
+ * signature is syntactically valid, but semantically questionable.
+ *
+ * The filestamp represents the time when a cryptographic data file such
+ * as a public/private key pair is created. It follows every reference
+ * depending on that file and serves as a means to obsolete earlier data
+ * of the same type. The timestamp represents the time when the
+ * cryptographic data of the message were last signed. Creation of a
+ * cryptographic data file or signing a message can occur only when the
+ * creator or signor is synchronized to an authoritative source and
+ * proventicated to a trusted authority.
+ *
+ * Note there are four conditions required for server trust. First, the
+ * public key on the certificate must be verified, which involves a
+ * number of format, content and consistency checks. Next, the server
+ * identity must be confirmed by one of four schemes: private
+ * certificate, IFF scheme, GQ scheme or certificate trail hike to a
+ * self signed trusted certificate. Finally, the server signature must
+ * be verified.
*/
/*
- * Minimum sizes of fields
+ * Cryptodefines
*/
-#define COOKIE_LEN (5 * 4)
-#define AUTOKEY_LEN (6 * 4)
-#define VALUE_LEN (6 * 4)
+#define TAI_1972 10 /* initial TAI offset (s) */
+#define MAX_LEAP 100 /* max UTC leapseconds (s) */
+#define VALUE_LEN (6 * 4) /* min response field length */
+#define YEAR (60 * 60 * 24 * 365) /* seconds in year */
/*
- * Global cryptodata in host byte order.
+ * Global cryptodata in host byte order
*/
-u_int crypto_flags; /* status word */
+u_int32 crypto_flags = 0x0; /* status word */
u_int sys_tai; /* current UTC offset from TAI */
-#ifdef PUBKEY
/*
- * Cryptodefines
- */
-#define TAI_1972 10 /* initial TAI offset */
-#define MAX_LEAP 100 /* max UTC leapseconds */
-#define MAX_LINLEN 1024 /* max line */
-#define MAX_KEYLEN 1024 /* max key */
-#define MAX_ENCLEN (ENCODED_CONTENT_LEN(1024)) /* max enc key */
-
-/*
- * Private cryptodata in network byte order.
+ * Global cryptodata in network byte order
*/
-static R_RSA_PRIVATE_KEY private_key; /* private key */
-static R_RSA_PUBLIC_KEY public_key; /* public key */
-static R_DH_PARAMS dh_params; /* agreement parameters */
-static u_char *dh_private; /* private value */
-static u_int dh_keyLen; /* private value length */
-static char *keysdir = NTP_KEYSDIR; /* crypto keys directory */
-static char *private_key_file = NULL; /* private key file */
-static char *public_key_file = NULL; /* public key file */
-static char *certif_file = NULL; /* certificate file */
-static char *dh_params_file = NULL; /* agreement parameters file */
-static char *tai_leap_file = NULL; /* leapseconds file */
+struct cert_info *cinfo = NULL; /* certificate info/value */
+struct value hostval; /* host value */
+struct value pubkey; /* public key */
+struct value tai_leap; /* leapseconds table */
/*
- * Global cryptodata in network byte order
+ * Private cryptodata in host byte order
*/
-struct value host; /* host name/public key */
-struct value certif; /* certificate */
-struct value dhparam; /* agreement parameters */
-struct value dhpub; /* public value */
-struct value tai_leap; /* leapseconds table */
+static char *passwd = NULL; /* private key password */
+static EVP_PKEY *host_pkey = NULL; /* host key */
+static EVP_PKEY *sign_pkey = NULL; /* sign key */
+static EVP_PKEY *iffpar_pkey = NULL; /* IFF parameters */
+static EVP_PKEY *gqpar_pkey = NULL; /* GQ parameters */
+static EVP_PKEY *mvpar_pkey = NULL; /* MV parameters */
+static const EVP_MD *sign_digest = NULL; /* sign digest */
+static u_int sign_siglen; /* sign key length */
+static char *rand_file = NULL; /* random seed file */
+static char *host_file = NULL; /* host key file */
+static char *sign_file = NULL; /* sign key file */
+static char *iffpar_file = NULL; /* IFF parameters file */
+static char *gqpar_file = NULL; /* GQ parameters file */
+static char *mvpar_file = NULL; /* MV parameters file */
+static char *cert_file = NULL; /* certificate file */
+static char *leap_file = NULL; /* leapseconds file */
+static tstamp_t if_fstamp = 0; /* IFF file stamp */
+static tstamp_t gq_fstamp = 0; /* GQ file stamp */
+static tstamp_t mv_fstamp = 0; /* MV file stamp */
/*
* Cryptotypes
*/
-static u_int crypto_rsa P((char *, u_char *, u_int));
-static void crypto_cert P((char *));
-static void crypto_dh P((char *));
+static int crypto_verify P((struct exten *, struct value *,
+ struct peer *));
+static int crypto_encrypt P((struct exten *, struct value *,
+ keyid_t *));
+static int crypto_alice P((struct peer *, struct value *));
+static int crypto_alice2 P((struct peer *, struct value *));
+static int crypto_alice3 P((struct peer *, struct value *));
+static int crypto_bob P((struct exten *, struct value *));
+static int crypto_bob2 P((struct exten *, struct value *));
+static int crypto_bob3 P((struct exten *, struct value *));
+static int crypto_iff P((struct exten *, struct peer *));
+static int crypto_gq P((struct exten *, struct peer *));
+static int crypto_mv P((struct exten *, struct peer *));
+static u_int crypto_send P((struct exten *, struct value *));
+static tstamp_t crypto_time P((void));
+static u_long asn2ntp P((ASN1_TIME *));
+static struct cert_info *cert_parse P((u_char *, u_int, tstamp_t));
+static int cert_sign P((struct exten *, struct value *));
+static int cert_valid P((struct cert_info *, EVP_PKEY *));
+static int cert_install P((struct exten *, struct peer *));
+static void cert_free P((struct cert_info *));
+static EVP_PKEY *crypto_key P((char *, tstamp_t *));
+static int bighash P((BIGNUM *, BIGNUM *));
+static struct cert_info *crypto_cert P((char *));
static void crypto_tai P((char *));
-#endif /* PUBKEY */
-/*
- * Autokey protocol status codes
- */
-#define RV_OK 0 /* success */
-#define RV_LEN 1 /* invalid field length */
-#define RV_TSP 2 /* invalid timestamp */
-#define RV_FSP 3 /* invalid filestamp */
-#define RV_PUB 4 /* missing public key */
-#define RV_KEY 5 /* invalid RSA modulus */
-#define RV_SIG 6 /* invalid signature length */
-#define RV_DH 7 /* invalid agreement parameters */
-#define RV_FIL 8 /* missing or corrupted key file */
-#define RV_DAT 9 /* missing or corrupted data */
-#define RV_DEC 10 /* PEM decoding error */
-#define RV_DUP 11 /* duplicate flags */
-#define RV_VN 12 /* incorrect version */
+#ifdef SYS_WINNT
+int
+readlink(char * link, char * file, int len) {
+ return (-1);
+}
+#endif
/*
* session_key - generate session key
@@ -143,43 +174,61 @@ static void crypto_tai P((char *));
* destination address, key ID and private value. The value of the
* session key is the MD5 hash of these values, while the next key ID is
* the first four octets of the hash.
+ *
+ * Returns the next key ID
*/
-keyid_t /* returns next key ID */
+keyid_t
session_key(
- struct sockaddr_in *srcadr, /* source address */
- struct sockaddr_in *dstadr, /* destination address */
- keyid_t keyno, /* key ID */
- keyid_t private, /* private value */
- u_long lifetime /* key lifetime */
+ struct sockaddr_storage *srcadr, /* source address */
+ struct sockaddr_storage *dstadr, /* destination address */
+ keyid_t keyno, /* key ID */
+ keyid_t private, /* private value */
+ u_long lifetime /* key lifetime */
)
{
- MD5_CTX ctx; /* MD5 context */
- keyid_t keyid; /* key identifer */
- u_int32 header[4]; /* data in network byte order */
- u_char digest[16]; /* message digest */
+ EVP_MD_CTX ctx; /* message digest context */
+ u_char dgst[EVP_MAX_MD_SIZE]; /* message digest */
+ keyid_t keyid; /* key identifer */
+ u_int32 header[10]; /* data in network byte order */
+ u_int hdlen, len;
/*
* Generate the session key and key ID. If the lifetime is
* greater than zero, install the key and call it trusted.
*/
- header[0] = srcadr->sin_addr.s_addr;
- header[1] = dstadr->sin_addr.s_addr;
- header[2] = htonl(keyno);
- header[3] = htonl(private);
- MD5Init(&ctx);
- MD5Update(&ctx, (u_char *)header, sizeof(header));
- MD5Final(digest, &ctx);
- memcpy(&keyid, digest, 4);
+ hdlen = 0;
+ switch(srcadr->ss_family) {
+ case AF_INET:
+ header[0] = ((struct sockaddr_in *)srcadr)->sin_addr.s_addr;
+ header[1] = ((struct sockaddr_in *)dstadr)->sin_addr.s_addr;
+ header[2] = htonl(keyno);
+ header[3] = htonl(private);
+ hdlen = 4 * sizeof(u_int32);
+ break;
+ case AF_INET6:
+ memcpy(&header[0], &GET_INADDR6(*srcadr),
+ sizeof(struct in6_addr));
+ memcpy(&header[4], &GET_INADDR6(*dstadr),
+ sizeof(struct in6_addr));
+ header[8] = htonl(keyno);
+ header[9] = htonl(private);
+ hdlen = 10 * sizeof(u_int32);
+ break;
+ }
+ EVP_DigestInit(&ctx, EVP_md5());
+ EVP_DigestUpdate(&ctx, (u_char *)header, hdlen);
+ EVP_DigestFinal(&ctx, dgst, &len);
+ memcpy(&keyid, dgst, 4);
keyid = ntohl(keyid);
if (lifetime != 0) {
- MD5auth_setkey(keyno, digest, 16);
+ MD5auth_setkey(keyno, dgst, len);
authtrust(keyno, lifetime);
}
#ifdef DEBUG
if (debug > 1)
printf(
"session_key: %s > %s %08x %08x hash %08x life %lu\n",
- numtoa(header[0]), numtoa(header[1]), keyno,
+ stoa(srcadr), stoa(dstadr), keyno,
private, keyid, lifetime);
#endif
return (keyid);
@@ -201,26 +250,22 @@ make_keylist(
struct interface *dstadr /* interface */
)
{
+ EVP_MD_CTX ctx; /* signature context */
+ tstamp_t tstamp; /* NTP timestamp */
struct autokey *ap; /* autokey pointer */
- keyid_t keyid; /* next key ID */
- keyid_t cookie; /* private value */
- l_fp tstamp; /* NTP timestamp */
- u_long ltemp;
- int i;
-#ifdef PUBKEY
- R_SIGNATURE_CTX ctx; /* signature context */
- int rval; /* return value */
- u_int len;
-#endif /* PUBKEY */
+ struct value *vp; /* value pointer */
+ keyid_t keyid = 0; /* next key ID */
+ keyid_t cookie; /* private value */
+ u_long lifetime;
+ u_int len;
+ int i;
/*
* Allocate the key list if necessary.
*/
- L_CLR(&tstamp);
- if (sys_leap != LEAP_NOTINSYNC)
- get_systime(&tstamp);
+ tstamp = crypto_time();
if (peer->keylist == NULL)
- peer->keylist = (keyid_t *)emalloc(sizeof(keyid_t) *
+ peer->keylist = emalloc(sizeof(keyid_t) *
NTP_MAXSESSION);
/*
@@ -243,55 +288,57 @@ make_keylist(
* included in the hash is zero if broadcast mode, the peer
* cookie if client mode or the host cookie if symmetric modes.
*/
- ltemp = min(sys_automax, NTP_MAXSESSION * (1 << (peer->kpoll)));
- peer->hcookie = session_key(&dstadr->sin, &peer->srcadr, 0,
- sys_private, 0);
+ lifetime = min(sys_automax, (unsigned long) NTP_MAXSESSION * (1 <<(peer->kpoll)));
if (peer->hmode == MODE_BROADCAST)
cookie = 0;
else
- cookie = peer->pcookie.key;
+ cookie = peer->pcookie;
for (i = 0; i < NTP_MAXSESSION; i++) {
peer->keylist[i] = keyid;
peer->keynumber = i;
keyid = session_key(&dstadr->sin, &peer->srcadr, keyid,
- cookie, ltemp);
- ltemp -= 1 << peer->kpoll;
+ cookie, lifetime);
+ lifetime -= 1 << peer->kpoll;
if (auth_havekey(keyid) || keyid <= NTP_MAXKEY ||
- ltemp <= (1 << (peer->kpoll)))
+ lifetime <= (unsigned long)(1 << (peer->kpoll)))
break;
}
/*
* Save the last session key ID, sequence number and timestamp,
* then sign these values for later retrieval by the clients. Be
- * careful not to use invalid key media.
+ * careful not to use invalid key media. Use the public values
+ * timestamp as filestamp.
*/
- ap = &peer->sndauto;
- ap->tstamp = htonl(tstamp.l_ui);
+ vp = &peer->sndval;
+ if (vp->ptr == NULL)
+ vp->ptr = emalloc(sizeof(struct autokey));
+ ap = (struct autokey *)vp->ptr;
ap->seq = htonl(peer->keynumber);
ap->key = htonl(keyid);
- ap->siglen = 0;
-#if DEBUG
+ vp->tstamp = htonl(tstamp);
+ vp->fstamp = hostval.tstamp;
+ vp->vallen = htonl(sizeof(struct autokey));
+ vp->siglen = 0;
+ if (vp->tstamp != 0) {
+ if (vp->sig == NULL)
+ vp->sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)vp, 12);
+ EVP_SignUpdate(&ctx, vp->ptr, sizeof(struct autokey));
+ if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ vp->siglen = htonl(len);
+ else
+ msyslog(LOG_ERR, "make_keys %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ peer->flags |= FLAG_ASSOC;
+ }
+#ifdef DEBUG
if (debug)
- printf("make_keys: %d %08x %08x ts %u poll %d\n",
+ printf("make_keys: %d %08x %08x ts %u fs %u poll %d\n",
ntohl(ap->seq), ntohl(ap->key), cookie,
- ntohl(ap->tstamp), peer->kpoll);
+ ntohl(vp->tstamp), ntohl(vp->fstamp), peer->kpoll);
#endif
-#ifdef PUBKEY
- if(!crypto_flags)
- return;
- if (ap->sig == NULL)
- ap->sig = emalloc(private_key.bits / 8);
- EVP_SignInit(&ctx, DA_MD5);
- EVP_SignUpdate(&ctx, (u_char *)ap, 12);
- rval = EVP_SignFinal(&ctx, ap->sig, &len, &private_key);
- if (rval != RV_OK)
- msyslog(LOG_ERR, "crypto: keylist signature fails %x",
- rval);
- else
- ap->siglen = htonl(len);
- peer->flags |= FLAG_ASSOC;
-#endif /* PUBKEY */
}
@@ -303,688 +350,778 @@ make_keylist(
* extension field values only if the field has proper format and
* length, the timestamp and filestamp are valid and the signature has
* valid length and is verified. There are a few cases where some values
- * are believed even if the signature fails, but only if the authentic
+ * are believed even if the signature fails, but only if the proventic
* bit is not set.
*/
-void
+int
crypto_recv(
struct peer *peer, /* peer structure pointer */
struct recvbuf *rbufp /* packet buffer pointer */
)
{
- u_int32 *pkt; /* packet pointer */
- struct autokey *ap; /* autokey pointer */
- struct cookie *cp; /* cookie pointer */
- int has_mac; /* length of MAC field */
- int authlen; /* offset of MAC field */
- int len; /* extension field length */
- u_int code; /* extension field opcode */
- tstamp_t tstamp; /* timestamp */
- int i, rval;
- u_int temp;
-#ifdef PUBKEY
- R_SIGNATURE_CTX ctx; /* signature context */
- struct value *vp; /* value pointer */
- u_char dh_key[MAX_KEYLEN]; /* agreed key */
- R_RSA_PUBLIC_KEY *kp; /* temporary public key pointer */
- tstamp_t fstamp; /* filestamp */
- u_int32 *pp; /* packet pointer */
- u_int rsalen = sizeof(R_RSA_PUBLIC_KEY) - sizeof(u_int) + 4;
- u_int bits;
- int j;
+ const EVP_MD *dp; /* message digest algorithm */
+ u_int32 *pkt; /* receive packet pointer */
+ struct autokey *ap, *bp; /* autokey pointer */
+ struct exten *ep, *fp; /* extension pointers */
+ int has_mac; /* length of MAC field */
+ int authlen; /* offset of MAC field */
+ associd_t associd; /* association ID */
+ tstamp_t tstamp = 0; /* timestamp */
+ tstamp_t fstamp = 0; /* filestamp */
+ u_int len; /* extension field length */
+ u_int code; /* extension field opcode */
+ u_int vallen = 0; /* value length */
+ X509 *cert; /* X509 certificate */
+ char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
+ keyid_t cookie; /* crumbles */
+ int rval = XEVNT_OK;
+ u_char *ptr;
+ u_int32 temp32;
#ifdef KERNEL_PLL
#if NTP_API > 3
struct timex ntv; /* kernel interface structure */
#endif /* NTP_API */
#endif /* KERNEL_PLL */
-#endif /* PUBKEY */
/*
* Initialize. Note that the packet has already been checked for
- * valid format and extension field lengths. We first extract
- * the field length, command code and timestamp in host byte
- * order. These are used with all commands and modes. We discard
- * old timestamps and filestamps; but, for duplicate timestamps
- * we discard only if the authentic bit is set. Cute.
+ * valid format and extension field lengths. First extract the
+ * field length, command code and association ID in host byte
+ * order. These are used with all commands and modes. Then check
+ * the version number, which must be 2, and length, which must
+ * be at least 8 for requests and VALUE_LEN (24) for responses.
+ * Packets that fail either test sink without a trace. The
+ * association ID is saved only if nonzero.
*/
- pkt = (u_int32 *)&rbufp->recv_pkt;
authlen = LEN_PKT_NOMAC;
while ((has_mac = rbufp->recv_length - authlen) > MAX_MAC_LEN) {
- i = authlen / 4;
- len = ntohl(pkt[i]) & 0xffff;
- code = (ntohl(pkt[i]) >> 16) & 0xffff;
- temp = (code >> 8) & 0x3f;
- if (temp != CRYPTO_VN) {
- sys_unknownversion++;
-#ifdef DEBUG
- if (debug)
- printf(
- "crypto_recv: incorrect version %d should be %d\n",
- temp, CRYPTO_VN);
-#endif
- return;
- }
- tstamp = ntohl(pkt[i + 2]);
+ pkt = (u_int32 *)&rbufp->recv_pkt + authlen / 4;
+ ep = (struct exten *)pkt;
+ code = ntohl(ep->opcode) & 0xffff0000;
+ len = ntohl(ep->opcode) & 0x0000ffff;
+ associd = (associd_t) ntohl(pkt[1]);
+ rval = XEVNT_OK;
#ifdef DEBUG
if (debug)
printf(
- "crypto_recv: ext offset %d len %d code %x assocID %d\n",
- authlen, len, code, (u_int32)ntohl(pkt[i +
- 1]));
+ "crypto_recv: flags 0x%x ext offset %d len %u code %x assocID %d\n",
+ peer->crypto, authlen, len, code >> 16,
+ associd);
#endif
+
+ /*
+ * Check version number and field length. If bad,
+ * quietly ignore the packet.
+ */
+ if (((code >> 24) & 0x3f) != CRYPTO_VN || len < 8 ||
+ (len < VALUE_LEN && (code & CRYPTO_RESP))) {
+ sys_unknownversion++;
+ code |= CRYPTO_ERROR;
+ }
+
+ /*
+ * Little vulnerability bandage here. If a perp tosses a
+ * fake association ID over the fence, we better toss it
+ * out. Only the first one counts.
+ */
+ if (code & CRYPTO_RESP) {
+ if (peer->assoc == 0)
+ peer->assoc = associd;
+ else if (peer->assoc != associd)
+ code |= CRYPTO_ERROR;
+ }
+ if (len >= VALUE_LEN) {
+ tstamp = ntohl(ep->tstamp);
+ fstamp = ntohl(ep->fstamp);
+ vallen = ntohl(ep->vallen);
+ }
switch (code) {
/*
- * Install association ID and status word.
+ * Install status word, host name, signature scheme and
+ * association ID. In OpenSSL the signature algorithm is
+ * bound to the digest algorithm, so the NID completely
+ * defines the signature scheme. Note the request and
+ * response are identical, but neither is validated by
+ * signature. The request is processed here only in
+ * symmetric modes. The server name field would be
+ * useful to implement access controls in future.
*/
+ case CRYPTO_ASSOC:
+
+ /*
+ * Pass the extension field to the transmit
+ * side.
+ */
+ fp = emalloc(len);
+ memcpy(fp, ep, len);
+ temp32 = CRYPTO_RESP;
+ fp->opcode |= htonl(temp32);
+ peer->cmmd = fp;
+ /* fall through */
+
case CRYPTO_ASSOC | CRYPTO_RESP:
- cp = (struct cookie *)&pkt[i + 2];
- temp = ntohl(cp->key);
- if (len < COOKIE_LEN) {
- rval = RV_LEN;
- } else if (tstamp == 0) {
- rval = RV_TSP;
- } else {
- if (!peer->crypto)
- peer->crypto = temp;
- if (ntohl(pkt[i + 1]) != 0)
- peer->assoc = ntohl(pkt[i + 1]);
- rval = RV_OK;
+
+ /*
+ * Discard the message if it has already been
+ * stored or the server is not synchronized.
+ */
+ if (peer->crypto || !fstamp)
+ break;
+
+ if (len < VALUE_LEN + vallen) {
+ rval = XEVNT_LEN;
+ break;
+ }
+
+ /*
+ * Check the identity schemes are compatible. If
+ * the client has PC, the server must have PC,
+ * in which case the server public key and
+ * identity are presumed valid, so we skip the
+ * certificate and identity exchanges and move
+ * immediately to the cookie exchange which
+ * confirms the server signature. If the client
+ * has IFF or GC or both, the server must have
+ * the same one or both. Otherwise, the default
+ * TC scheme is used.
+ */
+ if (crypto_flags & CRYPTO_FLAG_PRIV) {
+ if (!(fstamp & CRYPTO_FLAG_PRIV))
+ rval = XEVNT_KEY;
+ else
+ fstamp |= CRYPTO_FLAG_VALID |
+ CRYPTO_FLAG_VRFY;
+ } else if (crypto_flags & CRYPTO_FLAG_MASK &&
+ !(crypto_flags & fstamp &
+ CRYPTO_FLAG_MASK)) {
+ rval = XEVNT_KEY;
}
+
+ /*
+ * Discard the message if identity error.
+ */
+ if (rval != XEVNT_OK)
+ break;
+
+ /*
+ * Discard the message if the host name length
+ * is unreasonable or the signature digest NID
+ * is not supported.
+ */
+ temp32 = (fstamp >> 16) & 0xffff;
+ dp =
+ (const EVP_MD *)EVP_get_digestbynid(temp32);
+ if (vallen == 0 || vallen > MAXHOSTNAME)
+ rval = XEVNT_LEN;
+ else if (dp == NULL)
+ rval = XEVNT_MD;
+ if (rval != XEVNT_OK)
+ break;
+
+ /*
+ * Save status word, host name and message
+ * digest/signature type. If PC identity, be
+ * sure not to sign the certificate.
+ */
+ if (crypto_flags & CRYPTO_FLAG_PRIV)
+ fstamp |= CRYPTO_FLAG_SIGN;
+ peer->crypto = fstamp;
+ peer->digest = dp;
+ peer->subject = emalloc(vallen + 1);
+ memcpy(peer->subject, ep->pkt, vallen);
+ peer->subject[vallen] = '\0';
+ peer->issuer = emalloc(vallen + 1);
+ strcpy(peer->issuer, peer->subject);
+ temp32 = (fstamp >> 16) & 0xffff;
+ sprintf(statstr,
+ "flags 0x%x host %s signature %s", fstamp,
+ peer->subject, OBJ_nid2ln(temp32));
+ record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
if (debug)
- printf(
- "crypto_recv: verify %d flags 0x%x ts %u\n",
- rval, temp, tstamp);
+ printf("crypto_recv: %s\n", statstr);
#endif
break;
/*
- * Install autokey values in broadcast client and
- * symmetric modes.
+ * Decode X509 certificate in ASN.1 format and extract
+ * the data containing, among other things, subject
+ * name and public key. In the default identification
+ * scheme, the certificate trail is followed to a self
+ * signed trusted certificate.
*/
- case CRYPTO_AUTO | CRYPTO_RESP:
- if (!(peer->flags & FLAG_AUTOKEY) &&
- ntohl(pkt[i + 1]) != 0)
- peer->assoc = ntohl(pkt[i + 1]);
- ap = (struct autokey *)&pkt[i + 2];
-#ifdef PUBKEY
- temp = ntohl(ap->siglen);
- kp = (R_RSA_PUBLIC_KEY *)peer->pubkey.ptr;
- if (len < AUTOKEY_LEN) {
- rval = RV_LEN;
- } else if (tstamp == 0 || tstamp <
- peer->recauto.tstamp || (tstamp ==
- peer->recauto.tstamp && (peer->flags &
- FLAG_AUTOKEY))) {
- rval = RV_TSP;
- } else if (!crypto_flags) {
- rval = RV_OK;
- } else if (kp == NULL) {
- rval = RV_PUB;
- } else if (temp != kp->bits / 8) {
- rval = RV_SIG;
- } else {
- EVP_VerifyInit(&ctx, DA_MD5);
- EVP_VerifyUpdate(&ctx, (u_char *)ap,
- 12);
- rval = EVP_VerifyFinal(&ctx,
- (u_char *)ap->pkt, temp, kp);
+ case CRYPTO_CERT | CRYPTO_RESP:
+
+ /*
+ * Discard the message if invalid or identity
+ * already confirmed.
+ */
+ if (peer->crypto & CRYPTO_FLAG_VRFY)
+ break;
+
+ if ((rval = crypto_verify(ep, NULL, peer)) !=
+ XEVNT_OK)
+ break;
+
+ /*
+ * Scan the certificate list to delete old
+ * versions and link the newest version first on
+ * the list.
+ */
+ if ((rval = cert_install(ep, peer)) != XEVNT_OK)
+ break;
+
+ /*
+ * If we snatch the certificate before the
+ * server certificate has been signed by its
+ * server, it will be self signed. When it is,
+ * we chase the certificate issuer, which the
+ * server has, and keep going until a self
+ * signed trusted certificate is found. Be sure
+ * to update the issuer field, since it may
+ * change.
+ */
+ if (peer->issuer != NULL)
+ free(peer->issuer);
+ peer->issuer = emalloc(strlen(cinfo->issuer) +
+ 1);
+ strcpy(peer->issuer, cinfo->issuer);
+
+ /*
+ * We plug in the public key and group key in
+ * the first certificate received. However, note
+ * that this certificate might not be signed by
+ * the server, so we can't check the
+ * signature/digest NID.
+ */
+ if (peer->pkey == NULL) {
+ ptr = (u_char *)cinfo->cert.ptr;
+ cert = d2i_X509(NULL, &ptr,
+ ntohl(cinfo->cert.vallen));
+ peer->pkey = X509_get_pubkey(cert);
+ X509_free(cert);
}
-#else /* PUBKEY */
- if (tstamp < peer->recauto.tstamp || (tstamp ==
- peer->recauto.tstamp && (peer->flags &
- FLAG_AUTOKEY)))
- rval = RV_TSP;
- else
- rval = RV_OK;
-#endif /* PUBKEY */
+ peer->flash &= ~TEST10;
+ temp32 = cinfo->nid;
+ sprintf(statstr, "cert %s 0x%x %s (%u) fs %u",
+ cinfo->subject, cinfo->flags,
+ OBJ_nid2ln(temp32), temp32,
+ ntohl(ep->fstamp));
+ record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
if (debug)
- printf(
- "crypto_recv: verify %x autokey %d %08x ts %u (%u)\n",
- rval, ntohl(ap->seq),
- ntohl(ap->key), tstamp,
- peer->recauto.tstamp);
+ printf("crypto_recv: %s\n", statstr);
#endif
- if (rval != RV_OK) {
- if (rval != RV_TSP)
- msyslog(LOG_ERR,
- "crypto: %x autokey %d %08x ts %u (%u)\n",
- rval, ntohl(ap->seq),
- ntohl(ap->key), tstamp,
- peer->recauto.tstamp);
- break;
- }
- peer->flags |= FLAG_AUTOKEY;
- peer->flash &= ~TEST10;
- peer->assoc = ntohl(pkt[i + 1]);
- peer->recauto.tstamp = tstamp;
- peer->recauto.seq = ntohl(ap->seq);
- peer->recauto.key = ntohl(ap->key);
- peer->pkeyid = peer->recauto.key;
break;
/*
- * Install session cookie in client mode. Use this also
- * in symmetric modes for test when rsaref20 has not
- * been installed.
+ * Schnorr (IFF)identity scheme. This scheme is designed
+ * for use with shared secret group keys and where the
+ * certificate may be generated by a third party. The
+ * client sends a challenge to the server, which
+ * performs a calculation and returns the result. A
+ * positive result is possible only if both client and
+ * server contain the same secret group key.
*/
- case CRYPTO_PRIV:
- peer->cmmd = ntohl(pkt[i]);
- /* fall through */
+ case CRYPTO_IFF | CRYPTO_RESP:
- case CRYPTO_PRIV | CRYPTO_RESP:
- cp = (struct cookie *)&pkt[i + 2];
-#ifdef PUBKEY
- temp = ntohl(cp->siglen);
- kp = (R_RSA_PUBLIC_KEY *)peer->pubkey.ptr;
- if (len < COOKIE_LEN) {
- rval = RV_LEN;
- } else if (tstamp == 0 || tstamp <
- peer->pcookie.tstamp || (tstamp ==
- peer->pcookie.tstamp && (peer->flags &
- FLAG_AUTOKEY))) {
- rval = RV_TSP;
- } else if (!crypto_flags) {
- rval = RV_OK;
- } else if (kp == NULL) {
- rval = RV_PUB;
- } else if (temp != kp->bits / 8) {
- rval = RV_SIG;
- } else {
- EVP_VerifyInit(&ctx, DA_MD5);
- EVP_VerifyUpdate(&ctx, (u_char *)cp, 8);
- rval = EVP_VerifyFinal(&ctx,
- (u_char *)cp->pkt, temp, kp);
- }
-#else /* PUBKEY */
- if (tstamp <= peer->pcookie.tstamp || (tstamp ==
- peer->pcookie.tstamp && (peer->flags &
- FLAG_AUTOKEY)))
- rval = RV_TSP;
- else
- rval = RV_OK;
-#endif /* PUBKEY */
+ /*
+ * Discard the message if invalid or identity
+ * already confirmed.
+ */
+ if (peer->crypto & CRYPTO_FLAG_VRFY)
+ break;
+
+ if ((rval = crypto_verify(ep, NULL, peer)) !=
+ XEVNT_OK)
+ break;
/*
- * Tricky here. If in client mode, use the
- * server cookie; otherwise, use EXOR of both
- * peer cookies. We call this Daffy-Hooligan
- * agreement.
+ * If the the challenge matches the response,
+ * the certificate public key, as well as the
+ * server public key, signatyre and identity are
+ * all verified at the same time. The server is
+ * declared trusted, so we skip further
+ * certificate stages and move immediately to
+ * the cookie stage.
*/
- if (peer->hmode == MODE_CLIENT)
- temp = ntohl(cp->key);
- else
- temp = ntohl(cp->key) ^ peer->hcookie;
+ if ((rval = crypto_iff(ep, peer)) != XEVNT_OK)
+ break;
+
+ peer->crypto |= CRYPTO_FLAG_VRFY |
+ CRYPTO_FLAG_PROV;
+ peer->flash &= ~TEST10;
+ sprintf(statstr, "iff fs %u",
+ ntohl(ep->fstamp));
+ record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
if (debug)
- printf(
- "crypto_recv: verify %x cookie %08x ts %u (%u)\n",
- rval, temp, tstamp,
- peer->pcookie.tstamp);
+ printf("crypto_recv: %s\n", statstr);
#endif
- if (rval != RV_OK) {
- if (rval != RV_TSP)
- msyslog(LOG_ERR,
- "crypto: %x cookie %08x ts %u (%u)\n",
- rval, temp, tstamp,
- peer->pcookie.tstamp);
- peer->cmmd |= CRYPTO_ERROR;
- break;
- }
- if (!(peer->cast_flags & MDF_BCLNT))
- peer->flags |= FLAG_AUTOKEY;
- peer->flash &= ~TEST10;
- peer->assoc = ntohl(pkt[i + 1]);
- peer->pcookie.tstamp = tstamp;
- if (temp != peer->pcookie.key) {
- peer->pcookie.key = temp;
- key_expire(peer);
- }
break;
/*
- * The following commands and responses work only when
- * public-key cryptography has been configured. If
- * configured, but disabled due to no crypto command in
- * the configuration file, they are ignored.
+ * Guillou-Quisquater (GQ) identity scheme. This scheme
+ * is designed for use with public certificates carrying
+ * the GQ public key in an extension field. The client
+ * sends a challenge to the server, which performs a
+ * calculation and returns the result. A positive result
+ * is possible only if both client and server contain
+ * the same group key and the server has the matching GQ
+ * private key.
*/
-#ifdef PUBKEY
- /*
- * Install public key and host name.
- */
- case CRYPTO_NAME | CRYPTO_RESP:
- if (!crypto_flags)
+ case CRYPTO_GQ | CRYPTO_RESP:
+
+ /*
+ * Discard the message if invalid or identity
+ * already confirmed.
+ */
+ if (peer->crypto & CRYPTO_FLAG_VRFY)
break;
- vp = (struct value *)&pkt[i + 2];
- fstamp = ntohl(vp->fstamp);
- temp = ntohl(vp->vallen);
- j = i + 5 + ntohl(vp->vallen) / 4;
- bits = ntohl(pkt[i + 5]);
- if (len < VALUE_LEN) {
- rval = RV_LEN;
- } else if (temp < rsalen || bits <
- MIN_RSA_MODULUS_BITS || bits >
- MAX_RSA_MODULUS_BITS) {
- rval = RV_KEY;
- } else if (ntohl(pkt[j]) != bits / 8) {
- rval = RV_SIG;
- } else if (tstamp == 0 || tstamp <
- peer->pubkey.tstamp || (tstamp ==
- peer->pubkey.tstamp && (peer->flags &
- FLAG_AUTOKEY))) {
- rval = RV_TSP;
- } else if (tstamp < peer->pubkey.fstamp ||
- fstamp < peer->pubkey.fstamp) {
- rval = RV_FSP;
- } else if (fstamp == peer->pubkey.fstamp &&
- (peer->flags & FLAG_AUTOKEY)) {
- rval = RV_FSP;
- } else {
- EVP_VerifyInit(&ctx, DA_MD5);
- EVP_VerifyUpdate(&ctx, (u_char *)vp,
- temp + 12);
- kp = emalloc(sizeof(R_RSA_PUBLIC_KEY));
- kp->bits = bits;
- memcpy(kp->modulus, &pkt[i + 6],
- rsalen - 4);
- rval = EVP_VerifyFinal(&ctx,
- (u_char *)&pkt[j + 1],
- ntohl(pkt[j]), kp);
- if (rval != 0) {
- free(kp);
- } else {
- j = i + 5 + rsalen / 4;
- peer->pubkey.ptr = (u_char *)kp;
- temp = strlen((char *)&pkt[j]);
- peer->keystr = emalloc(temp +
- 1);
- strcpy(peer->keystr,
- (char *)&pkt[j]);
- peer->pubkey.tstamp = tstamp;
- peer->pubkey.fstamp = fstamp;
- peer->flash &= ~TEST10;
- if (!(peer->crypto &
- CRYPTO_FLAG_CERT))
- peer->flags |=
- FLAG_PROVEN;
- }
- }
+
+ if ((rval = crypto_verify(ep, NULL, peer)) !=
+ XEVNT_OK)
+ break;
+
+ /*
+ * If the the challenge matches the response,
+ * the certificate public key, as well as the
+ * server public key, signatyre and identity are
+ * all verified at the same time. The server is
+ * declared trusted, so we skip further
+ * certificate stages and move immediately to
+ * the cookie stage.
+ */
+ if ((rval = crypto_gq(ep, peer)) != XEVNT_OK)
+ break;
+
+ peer->crypto |= CRYPTO_FLAG_VRFY |
+ CRYPTO_FLAG_PROV;
+ peer->flash &= ~TEST10;
+ sprintf(statstr, "gq fs %u",
+ ntohl(ep->fstamp));
+ record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
if (debug)
-
- printf(
- "crypto_recv: verify %x host %s ts %u fs %u\n",
- rval, (char *)&pkt[i + 5 + rsalen /
- 4], tstamp, fstamp);
+ printf("crypto_recv: %s\n", statstr);
#endif
- if (rval != RV_OK) {
- if (rval != RV_TSP)
- msyslog(LOG_ERR,
- "crypto: %x host %s ts %u fs %u\n",
- rval, (char *)&pkt[i + 5 +
- rsalen / 4], tstamp,
- fstamp);
- }
break;
/*
- * Install certificate.
+ * MV
*/
- case CRYPTO_CERT | CRYPTO_RESP:
- if (!crypto_flags)
+ case CRYPTO_MV | CRYPTO_RESP:
+
+ /*
+ * Discard the message if invalid or identity
+ * already confirmed.
+ */
+ if (peer->crypto & CRYPTO_FLAG_VRFY)
break;
- vp = (struct value *)&pkt[i + 2];
- fstamp = ntohl(vp->fstamp);
- temp = ntohl(vp->vallen);
- kp = (R_RSA_PUBLIC_KEY *)peer->pubkey.ptr;
- j = i + 5 + temp / 4;
- if (len < VALUE_LEN) {
- rval = RV_LEN;
- } else if (kp == NULL) {
- rval = RV_PUB;
- } else if (ntohl(pkt[j]) != kp->bits / 8) {
- rval = RV_SIG;
- } else if (tstamp == 0) {
- rval = RV_TSP;
- } else if (tstamp <
- ntohl(peer->certif.fstamp) || fstamp <
- ntohl(peer->certif.fstamp)) {
- rval = RV_FSP;
- } else if (fstamp ==
- ntohl(peer->certif.fstamp) && (peer->flags &
- FLAG_AUTOKEY)) {
- peer->crypto &= ~CRYPTO_FLAG_CERT;
- rval = RV_FSP;
- } else {
- EVP_VerifyInit(&ctx, DA_MD5);
- EVP_VerifyUpdate(&ctx, (u_char *)vp,
- temp + 12);
- rval = EVP_VerifyFinal(&ctx,
- (u_char *)&pkt[j + 1],
- ntohl(pkt[j]), kp);
- }
+
+ if ((rval = crypto_verify(ep, NULL, peer)) !=
+ XEVNT_OK)
+ break;
+
+ /*
+ * If the the challenge matches the response,
+ * the certificate public key, as well as the
+ * server public key, signatyre and identity are
+ * all verified at the same time. The server is
+ * declared trusted, so we skip further
+ * certificate stages and move immediately to
+ * the cookie stage.
+ */
+ if ((rval = crypto_mv(ep, peer)) != XEVNT_OK)
+ break;
+
+ peer->crypto |= CRYPTO_FLAG_VRFY |
+ CRYPTO_FLAG_PROV;
+ peer->flash &= ~TEST10;
+ sprintf(statstr, "mv fs %u",
+ ntohl(ep->fstamp));
+ record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
if (debug)
- printf(
- "crypto_recv: verify %x certificate %u ts %u fs %u\n",
- rval, temp, tstamp, fstamp);
+ printf("crypto_recv: %s\n", statstr);
#endif
+ break;
+
+ /*
+ * X509 certificate sign response. Validate the
+ * certificate signed by the server and install. Later
+ * this can be provided to clients of this server in
+ * lieu of the self signed certificate in order to
+ * validate the public key.
+ */
+ case CRYPTO_SIGN | CRYPTO_RESP:
/*
- * If the peer data are newer than the host
- * data, replace the host data. Otherwise,
- * wait for the peer to fetch the host data.
+ * Discard the message if invalid or identity
+ * not confirmed.
*/
- if (rval != RV_OK || temp == 0) {
- if (rval != RV_TSP)
- msyslog(LOG_ERR,
- "crypto: %x certificate %u ts %u fs %u\n",
- rval, temp, tstamp, fstamp);
+ if (!(peer->crypto & CRYPTO_FLAG_VRFY))
+ break;
+
+ if ((rval = crypto_verify(ep, NULL, peer)) !=
+ XEVNT_OK)
break;
- }
- peer->flash &= ~TEST10;
- peer->flags |= FLAG_PROVEN;
- peer->crypto &= ~CRYPTO_FLAG_CERT;
/*
- * Initialize agreement parameters and extension
- * field in network byte order. Note the private
- * key length is set arbitrarily at half the
- * prime length.
+ * Scan the certificate list to delete old
+ * versions and link the newest version first on
+ * the list.
*/
- peer->certif.tstamp = vp->tstamp;
- peer->certif.fstamp = vp->fstamp;
- peer->certif.vallen = vp->vallen;
- if (peer->certif.ptr == NULL)
- free(peer->certif.ptr);
- peer->certif.ptr = emalloc(temp);
- memcpy(peer->certif.ptr, vp->pkt, temp);
- crypto_agree();
+ if ((rval = cert_install(ep, peer)) != XEVNT_OK) break;
+
+ peer->crypto |= CRYPTO_FLAG_SIGN;
+ peer->flash &= ~TEST10;
+ temp32 = cinfo->nid;
+ sprintf(statstr, "sign %s 0x%x %s (%u) fs %u",
+ cinfo->issuer, cinfo->flags,
+ OBJ_nid2ln(temp32), temp32,
+ ntohl(ep->fstamp));
+ record_crypto_stats(&peer->srcadr, statstr);
+#ifdef DEBUG
+ if (debug)
+ printf("crypto_recv: %s\n", statstr);
+#endif
break;
/*
- * Install agreement parameters in symmetric modes.
+ * Cookie request in symmetric modes. Roll a random
+ * cookie and install in symmetric mode. Encrypt for the
+ * response, which is transmitted later.
*/
- case CRYPTO_DHPAR | CRYPTO_RESP:
- if (!crypto_flags)
+ case CRYPTO_COOK:
+
+ /*
+ * Discard the message if invalid or identity
+ * not confirmed.
+ */
+ if (!(peer->crypto & CRYPTO_FLAG_VRFY))
+ break;
+
+ if ((rval = crypto_verify(ep, NULL, peer)) !=
+ XEVNT_OK)
+ break;
+
+ /*
+ * Pass the extension field to the transmit
+ * side. If already agreed, walk away.
+ */
+ fp = emalloc(len);
+ memcpy(fp, ep, len);
+ temp32 = CRYPTO_RESP;
+ fp->opcode |= htonl(temp32);
+ peer->cmmd = fp;
+ if (peer->crypto & CRYPTO_FLAG_AGREE) {
+ peer->flash &= ~TEST10;
break;
- vp = (struct value *)&pkt[i + 2];
- fstamp = ntohl(vp->fstamp);
- temp = ntohl(vp->vallen);
- kp = (R_RSA_PUBLIC_KEY *)peer->pubkey.ptr;
- j = i + 5 + temp / 4;
- if (len < VALUE_LEN) {
- rval = RV_LEN;
- } else if (kp == NULL) {
- rval = RV_PUB;
- } else if (ntohl(pkt[j]) != kp->bits / 8) {
- rval = RV_SIG;
- } else if (tstamp == 0) {
- rval = RV_TSP;
- } else if (tstamp < ntohl(dhparam.fstamp) ||
- fstamp < ntohl(dhparam.fstamp)) {
- rval = RV_FSP;
- } else if (fstamp == ntohl(dhparam.fstamp) &&
- (peer->flags & FLAG_AUTOKEY)) {
- peer->crypto &= ~CRYPTO_FLAG_DH;
- rval = RV_FSP;
- } else {
- EVP_VerifyInit(&ctx, DA_MD5);
- EVP_VerifyUpdate(&ctx, (u_char *)vp,
- temp + 12);
- rval = EVP_VerifyFinal(&ctx,
- (u_char *)&pkt[j + 1],
- ntohl(pkt[j]), kp);
}
+
+ /*
+ * Install cookie values and light the cookie
+ * bit. The transmit side will pick up and
+ * encrypt it for the response.
+ */
+ key_expire(peer);
+ peer->cookval.tstamp = ep->tstamp;
+ peer->cookval.fstamp = ep->fstamp;
+ RAND_bytes((u_char *)&peer->pcookie, 4);
+ peer->crypto &= ~CRYPTO_FLAG_AUTO;
+ peer->crypto |= CRYPTO_FLAG_AGREE;
+ peer->flash &= ~TEST10;
+ sprintf(statstr, "cook %x ts %u fs %u",
+ peer->pcookie, ntohl(ep->tstamp),
+ ntohl(ep->fstamp));
+ record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
if (debug)
- printf(
- "crypto_recv: verify %x parameters %u ts %u fs %u\n",
- rval, temp, tstamp, fstamp);
+ printf("crypto_recv: %s\n", statstr);
#endif
+ break;
+
+ /*
+ * Cookie response in client and symmetric modes. If the
+ * cookie bit is set, the working cookie is the EXOR of
+ * the current and new values.
+ */
+ case CRYPTO_COOK | CRYPTO_RESP:
/*
- * If the peer data are newer than the host
- * data, replace the host data. Otherwise,
- * wait for the peer to fetch the host data.
+ * Discard the message if invalid or identity
+ * not confirmed or signature not verified with
+ * respect to the cookie values.
*/
- if (rval != RV_OK || temp == 0) {
- if (rval != RV_TSP)
- msyslog(LOG_ERR,
- "crypto: %x parameters %u ts %u fs %u\n",
- rval, temp, tstamp, fstamp);
+ if (!(peer->crypto & CRYPTO_FLAG_VRFY))
+ break;
+
+ if ((rval = crypto_verify(ep, &peer->cookval,
+ peer)) != XEVNT_OK)
break;
- }
- peer->flash &= ~TEST10;
- crypto_flags |= CRYPTO_FLAG_DH;
- peer->crypto &= ~CRYPTO_FLAG_DH;
/*
- * Initialize agreement parameters and extension
- * field in network byte order. Note the private
- * key length is set arbitrarily at half the
- * prime length.
+ * Decrypt the cookie, hunting all the time for
+ * errors.
*/
- dhparam.tstamp = vp->tstamp;
- dhparam.fstamp = vp->fstamp;
- dhparam.vallen = vp->vallen;
- if (dhparam.ptr != NULL)
- free(dhparam.ptr);
- pp = emalloc(temp);
- dhparam.ptr = (u_char *)pp;
- memcpy(pp, vp->pkt, temp);
- dh_params.primeLen = ntohl(*pp++);
- dh_params.prime = (u_char *)pp;
- pp += dh_params.primeLen / 4;
- dh_params.generatorLen = ntohl(*pp++);
- dh_params.generator = (u_char *)pp;
- dh_keyLen = dh_params.primeLen / 2;
- if (dh_private != NULL)
- free(dh_private);
- dh_private = emalloc(dh_keyLen);
- if (dhparam.sig == NULL)
- dhparam.sig = emalloc(private_key.bits /
- 8);
+ if (vallen == (u_int) EVP_PKEY_size(host_pkey)) {
+ RSA_private_decrypt(vallen,
+ (u_char *)ep->pkt,
+ (u_char *)&temp32,
+ host_pkey->pkey.rsa,
+ RSA_PKCS1_OAEP_PADDING);
+ cookie = ntohl(temp32);
+ } else {
+ rval = XEVNT_CKY;
+ break;
+ }
/*
- * Initialize public value extension field.
+ * Install cookie values and light the cookie
+ * bit. If this is not broadcast client mode, we
+ * are done here.
*/
- dhpub.tstamp = vp->tstamp;
- dhpub.fstamp = vp->fstamp;
- dhpub.vallen = htonl(dh_params.primeLen);
- if (dhpub.ptr != NULL)
- free(dhpub.ptr);
- dhpub.ptr = emalloc(dh_params.primeLen);
- if (dhpub.sig == NULL)
- dhpub.sig = emalloc(private_key.bits /
- 8);
- crypto_agree();
+ key_expire(peer);
+ peer->cookval.tstamp = ep->tstamp;
+ peer->cookval.fstamp = ep->fstamp;
+ if (peer->crypto & CRYPTO_FLAG_AGREE)
+ peer->pcookie ^= cookie;
+ else
+ peer->pcookie = cookie;
+ if (peer->hmode == MODE_CLIENT &&
+ !(peer->cast_flags & MDF_BCLNT))
+ peer->crypto |= CRYPTO_FLAG_AUTO;
+ else
+ peer->crypto &= ~CRYPTO_FLAG_AUTO;
+ peer->crypto |= CRYPTO_FLAG_AGREE;
+ peer->flash &= ~TEST10;
+ sprintf(statstr, "cook %x ts %u fs %u",
+ peer->pcookie, ntohl(ep->tstamp),
+ ntohl(ep->fstamp));
+ record_crypto_stats(&peer->srcadr, statstr);
+#ifdef DEBUG
+ if (debug)
+ printf("crypto_recv: %s\n", statstr);
+#endif
break;
/*
- * Verify public value and compute agreed key in
- * symmetric modes.
+ * Install autokey values in broadcast client and
+ * symmetric modes. We have to do this every time the
+ * sever/peer cookie changes or a new keylist is
+ * rolled. Ordinarily, this is automatic as this message
+ * is piggybacked on the first NTP packet sent upon
+ * either of these events. Note that a broadcast client
+ * or symmetric peer can receive this response without a
+ * matching request.
*/
- case CRYPTO_DH:
- peer->cmmd = ntohl(pkt[i]);
- if (!crypto_flags)
- peer->cmmd |= CRYPTO_ERROR;
- /* fall through */
+ case CRYPTO_AUTO | CRYPTO_RESP:
- case CRYPTO_DH | CRYPTO_RESP:
- if (!crypto_flags)
+ /*
+ * Discard the message if invalid or identity
+ * not confirmed or signature not verified with
+ * respect to the receive autokey values.
+ */
+ if (!(peer->crypto & CRYPTO_FLAG_VRFY))
+ break;
+
+ if ((rval = crypto_verify(ep, &peer->recval,
+ peer)) != XEVNT_OK)
break;
- vp = (struct value *)&pkt[i + 2];
- fstamp = ntohl(vp->fstamp);
- temp = ntohl(vp->vallen);
- kp = (R_RSA_PUBLIC_KEY *)peer->pubkey.ptr;
- j = i + 5 + temp / 4;
- if (len < VALUE_LEN) {
- rval = RV_LEN;
- } else if (temp != dh_params.primeLen) {
- rval = RV_DH;
- } else if (kp == NULL) {
- rval = RV_PUB;
- } else if (ntohl(pkt[j]) != kp->bits / 8) {
- rval = RV_SIG;
- } else if (tstamp == 0 || tstamp <
- peer->pcookie.tstamp || (tstamp ==
- peer->pcookie.tstamp && (peer->flags &
- FLAG_AUTOKEY))) {
- rval = RV_TSP;
- } else {
- EVP_VerifyInit(&ctx, DA_MD5);
- EVP_VerifyUpdate(&ctx, (u_char *)vp,
- temp + 12);
- rval = EVP_VerifyFinal(&ctx,
- (u_char *)&pkt[j + 1],
- ntohl(pkt[j]), kp);
- }
/*
- * Run the agreement algorithm and stash the key
- * value. We use only the first u_int32 for the
- * host cookie. Wasteful. If the association ID
- * is zero, the other guy hasn't seen us as
- * synchronized, in which case both of us should
- * be using a zero cookie.
+ * Install autokey values and light the
+ * autokey bit. This is not hard.
*/
- if (rval != RV_OK) {
- temp = 0;
- } else if (fstamp > dhparam.fstamp) {
- crypto_flags &= ~CRYPTO_FLAG_DH;
- rval = RV_FSP;
- } else {
- rval = R_ComputeDHAgreedKey(dh_key,
- (u_char *)&pkt[i + 5], dh_private,
- dh_keyLen, &dh_params);
- temp = ntohl(*(u_int32 *)dh_key);
- }
+ if (peer->recval.ptr == NULL)
+ peer->recval.ptr =
+ emalloc(sizeof(struct autokey));
+ bp = (struct autokey *)peer->recval.ptr;
+ peer->recval.tstamp = ep->tstamp;
+ peer->recval.fstamp = ep->fstamp;
+ ap = (struct autokey *)ep->pkt;
+ bp->seq = ntohl(ap->seq);
+ bp->key = ntohl(ap->key);
+ peer->pkeyid = bp->key;
+ peer->crypto |= CRYPTO_FLAG_AUTO;
+ peer->flash &= ~TEST10;
+ sprintf(statstr,
+ "auto seq %d key %x ts %u fs %u", bp->seq,
+ bp->key, ntohl(ep->tstamp),
+ ntohl(ep->fstamp));
+ record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
if (debug)
- printf(
- "crypto_recv: verify %x agreement %08x ts %u (%u) fs %u\n",
- rval, temp, tstamp,
- peer->pcookie.tstamp, fstamp);
+ printf("crypto_recv: %s\n", statstr);
#endif
- if (rval != RV_OK) {
- if (rval != RV_TSP)
- msyslog(LOG_ERR,
- "crypto: %x agreement %08x ts %u (%u) fs %u\n",
- rval, temp, tstamp,
- peer->pcookie.tstamp,
- fstamp);
- peer->cmmd |= CRYPTO_ERROR;
- break;
- }
- peer->flash &= ~TEST10;
- peer->flags &= ~FLAG_AUTOKEY;
- peer->assoc = ntohl(pkt[i + 1]);
- peer->pcookie.tstamp = tstamp;
- if (temp != peer->pcookie.key) {
- peer->pcookie.key = temp;
- key_expire(peer);
- }
break;
/*
- * Install leapseconds table.
+ * Install leapseconds table in symmetric modes. This
+ * table is proventicated to the NIST primary servers,
+ * either by copying the file containing the table from
+ * a NIST server to a trusted server or directly using
+ * this protocol. While the entire table is installed at
+ * the server, presently only the current TAI offset is
+ * provided via the kernel to other applications.
*/
- case CRYPTO_TAI | CRYPTO_RESP:
- if (!crypto_flags)
+ case CRYPTO_TAI:
+
+ /*
+ * Discard the message if invalid or identity
+ * not confirmed.
+ */
+ if (!(peer->crypto & CRYPTO_FLAG_VRFY))
+ break;
+
+ if ((rval = crypto_verify(ep, NULL, peer)) !=
+ XEVNT_OK)
+ break;
+
+ /*
+ * Pass the extension field to the transmit
+ * side. Continue below if a leapseconds table
+ * accompanies the message.
+ */
+ fp = emalloc(len);
+ memcpy(fp, ep, len);
+ temp32 = CRYPTO_RESP;
+ fp->opcode |= htonl(temp32);
+ peer->cmmd = fp;
+ if (len <= VALUE_LEN) {
+ peer->flash &= ~TEST10;
break;
- vp = (struct value *)&pkt[i + 2];
- fstamp = ntohl(vp->fstamp);
- temp = ntohl(vp->vallen);
- kp = (R_RSA_PUBLIC_KEY *)peer->pubkey.ptr;
- j = i + 5 + temp / 4;
- if (len < VALUE_LEN) {
- rval = RV_LEN;
- } if (kp == NULL) {
- rval = RV_PUB;
- } else if (ntohl(pkt[j]) != kp->bits / 8) {
- rval = RV_SIG;
- } else if (tstamp == 0) {
- rval = RV_TSP;
- } else if (tstamp < ntohl(tai_leap.fstamp) ||
- fstamp < ntohl(tai_leap.fstamp)) {
- rval = RV_FSP;
- } else if (fstamp == ntohl(tai_leap.fstamp) &&
- (peer->flags & FLAG_AUTOKEY)) {
- peer->crypto &= ~CRYPTO_FLAG_TAI;
- rval = RV_FSP;
- } else {
- EVP_VerifyInit(&ctx, DA_MD5);
- EVP_VerifyUpdate(&ctx, (u_char *)vp,
- temp + 12);
- rval = EVP_VerifyFinal(&ctx,
- (u_char *)&pkt[j + 1],
- ntohl(pkt[j]), kp);
}
-#ifdef DEBUG
- if (debug)
- printf(
- "crypto_recv: verify %x leapseconds %u ts %u fs %u\n",
- rval, temp, tstamp, fstamp);
-#endif
+ /* fall through */
+
+ case CRYPTO_TAI | CRYPTO_RESP:
/*
- * If the peer data are newer than the host
- * data, replace the host data. Otherwise,
- * wait for the peer to fetch the host data.
+ * Discard the message if invalid or identity
+ * not confirmed or signature not verified with
+ * respect to the leapsecond table values.
*/
- if (rval != RV_OK || temp == 0) {
- if (rval != RV_TSP)
- msyslog(LOG_ERR,
- "crypto: %x leapseconds %u ts %u fs %u\n",
- rval, temp, tstamp, fstamp);
+ if (!(peer->crypto & CRYPTO_FLAG_VRFY))
break;
+
+ if ((rval = crypto_verify(ep, &peer->tai_leap,
+ peer)) != XEVNT_OK)
+ break;
+
+ /*
+ * Initialize peer variables, leapseconds
+ * structure and extension field in network byte
+ * order. Since a filestamp may have changed,
+ * recompute the signatures.
+ */
+ peer->tai_leap.tstamp = ep->tstamp;
+ peer->tai_leap.fstamp = ep->fstamp;
+ peer->tai_leap.vallen = ep->vallen;
+
+ /*
+ * Install the new table if there is no stored
+ * table or the new table is more recent than
+ * the stored table. Since a filestamp may have
+ * changed, recompute the signatures.
+ */
+ if (ntohl(peer->tai_leap.fstamp) >
+ ntohl(tai_leap.fstamp)) {
+ tai_leap.fstamp = ep->fstamp;
+ tai_leap.vallen = ep->vallen;
+ if (tai_leap.ptr != NULL)
+ free(tai_leap.ptr);
+ tai_leap.ptr = emalloc(vallen);
+ memcpy(tai_leap.ptr, ep->pkt, vallen);
+ crypto_update();
+ sys_tai = vallen / 4 + TAI_1972 - 1;
}
- peer->flash &= ~TEST10;
crypto_flags |= CRYPTO_FLAG_TAI;
- peer->crypto &= ~CRYPTO_FLAG_TAI;
- sys_tai = temp / 4 + TAI_1972 - 1;
+ peer->crypto |= CRYPTO_FLAG_LEAP;
+ peer->flash &= ~TEST10;
#ifdef KERNEL_PLL
#if NTP_API > 3
+ /*
+ * If the kernel cooperates, initialize the
+ * current TAI offset.
+ */
ntv.modes = MOD_TAI;
ntv.constant = sys_tai;
(void)ntp_adjtime(&ntv);
#endif /* NTP_API */
#endif /* KERNEL_PLL */
-
- /*
- * Initialize leapseconds table and extension
- * field in network byte order.
- */
- tai_leap.tstamp = vp->tstamp;
- tai_leap.fstamp = vp->fstamp;
- tai_leap.vallen = vp->vallen;
- if (tai_leap.ptr == NULL)
- free(tai_leap.ptr);
- tai_leap.ptr = emalloc(temp);
- memcpy(tai_leap.ptr, vp->pkt, temp);
- if (tai_leap.sig == NULL)
- tai_leap.sig =
- emalloc(private_key.bits / 8);
- crypto_agree();
+ sprintf(statstr, "leap %u ts %u fs %u",
+ vallen, ntohl(ep->tstamp),
+ ntohl(ep->fstamp));
+ record_crypto_stats(&peer->srcadr, statstr);
+#ifdef DEBUG
+ if (debug)
+ printf("crypto_recv: %s\n", statstr);
+#endif
break;
-#endif /* PUBKEY */
/*
- * For other requests, save the request code for later;
- * for unknown responses or errors, just ignore for now.
+ * We come here in symmetric modes for miscellaneous
+ * commands that have value fields but are processed on
+ * the transmit side. All we need do here is check for
+ * valid field length. Remaining checks are below and on
+ * the transmit side.
*/
- default:
- if (code & (CRYPTO_RESP | CRYPTO_ERROR))
+ case CRYPTO_IFF:
+ case CRYPTO_GQ:
+ case CRYPTO_MV:
+ case CRYPTO_SIGN:
+ if (len < VALUE_LEN) {
+ rval = XEVNT_LEN;
break;
- peer->cmmd = ntohl(pkt[i]);
- break;
+ }
+
+ /* fall through */
+
+ /*
+ * We come here for miscellaneous requests and unknown
+ * requests and responses. If an unknown response or
+ * error, forget it. If a request, save the extension
+ * field for later. Unknown requests will be caught on
+ * the transmit side.
+ */
+ default:
+ if (code & (CRYPTO_RESP | CRYPTO_ERROR)) {
+ rval = XEVNT_LEN;
+ } else if ((rval = crypto_verify(ep, NULL,
+ peer)) == XEVNT_OK) {
+ fp = emalloc(len);
+ memcpy(fp, ep, len);
+ temp32 = CRYPTO_RESP;
+ fp->opcode |= htonl(temp32);
+ peer->cmmd = fp;
+ }
+ }
+ /*
+ * We log everything except length/format errors and
+ * duplicates, which are log clogging vulnerabilities.
+ * The first error found terminates the extension field
+ * scan and we return the laundry to the caller.
+ */
+ if (rval != XEVNT_OK) {
+ sprintf(statstr,
+ "error %x opcode %x ts %u fs %u", rval,
+ code, tstamp, fstamp);
+ if (rval > XEVNT_TSP)
+ record_crypto_stats(&peer->srcadr,
+ statstr);
+ report_event(rval, peer);
+#ifdef DEBUG
+ if (debug)
+ printf("crypto_recv: %s\n", statstr);
+#endif
+ break;
}
authlen += len;
}
+ return (rval);
}
@@ -992,255 +1129,248 @@ crypto_recv(
* crypto_xmit - construct extension fields
*
* This routine is called both when an association is configured and
- * when one is not. The only case where this matters now is to retrieve
- * the autokey information, in which case the caller has to provide the
+ * when one is not. The only case where this matters is to retrieve the
+ * autokey information, in which case the caller has to provide the
* association ID to match the association.
+ *
+ * Returns length of extension field.
*/
-int /* return length of extension field */
+int
crypto_xmit(
- u_int32 *xpkt, /* packet pointer */
- int start, /* offset to extension field */
- u_int code, /* extension field code */
- keyid_t cookie, /* session cookie */
- u_int associd /* association ID */
+ struct pkt *xpkt, /* transmit packet pointer */
+ struct sockaddr_storage *srcadr_sin, /* active runway */
+ int start, /* offset to extension field */
+ struct exten *ep, /* extension pointer */
+ keyid_t cookie /* session cookie */
)
{
+ u_int32 *pkt; /* packet pointer */
struct peer *peer; /* peer structure pointer */
- struct autokey *ap; /* autokey pointer */
- struct cookie *cp; /* cookie pointer */
- int len; /* extension field length */
- u_int opcode; /* extension field opcode */
- int i;
-#ifdef PUBKEY
- R_SIGNATURE_CTX ctx; /* signature context */
- struct value *vp; /* value pointer */
- int rval; /* return value */
- u_int temp;
- int j;
-#endif /* PUBKEY */
+ u_int opcode; /* extension field opcode */
+ struct exten *fp; /* extension pointers */
+ struct cert_info *cp; /* certificate info/value pointer */
+ char certname[MAXHOSTNAME + 1]; /* subject name buffer */
+ char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
+ u_int vallen;
+ u_int len;
+ struct value vtemp;
+ associd_t associd;
+ int rval;
+ keyid_t tcookie;
/*
* Generate the requested extension field request code, length
- * and association ID. Note that several extension fields are
- * used with and without public-key cryptography. If public-key
- * cryptography has not been configured, we do the same thing,
- * but leave off the signature.
- */
- i = start / 4;
- opcode = code;
- xpkt[i + 1] = htonl(associd);
+ * and association ID. If this is a response and the host is not
+ * synchronized, light the error bit and go home.
+ */
+ pkt = (u_int32 *)xpkt + start / 4;
+ fp = (struct exten *)pkt;
+ opcode = ntohl(ep->opcode);
+ associd = (associd_t) ntohl(ep->associd);
+ fp->associd = htonl(associd);
len = 8;
- switch (opcode) {
+ rval = XEVNT_OK;
+ switch (opcode & 0xffff0000) {
/*
- * Send association ID, timestamp and status word.
+ * Send association request and response with status word and
+ * host name. Note, this message is not signed and the filestamp
+ * contains only the status word. We check at this point whether
+ * the identity schemes are compatible to save tears later on.
*/
case CRYPTO_ASSOC | CRYPTO_RESP:
- cp = (struct cookie *)&xpkt[i + 2];
-#ifdef PUBKEY
- cp->tstamp = host.tstamp;
-#else
- cp->tstamp = 0;
-#endif /* PUBKEY */
- cp->key = htonl(crypto_flags);
- cp->siglen = 0;
- len += 12;
+ case CRYPTO_ASSOC:
+ len += crypto_send(fp, &hostval);
+ if (crypto_time() == 0)
+ fp->fstamp = 0;
+ else
+ fp->fstamp = htonl(crypto_flags);
break;
/*
- * Find peer and send autokey data and signature in broadcast
- * server and symmetric modes. If no association is found,
- * either the server has restarted with new associations or some
- * perp has replayed an old message.
+ * Send certificate request. Use the values from the extension
+ * field.
*/
- case CRYPTO_AUTO | CRYPTO_RESP:
- peer = findpeerbyassoc(associd);
- if (peer == NULL) {
+ case CRYPTO_CERT:
+ memset(&vtemp, 0, sizeof(vtemp));
+ vtemp.tstamp = ep->tstamp;
+ vtemp.fstamp = ep->fstamp;
+ vtemp.vallen = ep->vallen;
+ vtemp.ptr = (unsigned char *)ep->pkt;
+ len += crypto_send(fp, &vtemp);
+ break;
+
+ /*
+ * Send certificate response or sign request. Use the values
+ * from the certificate. If the request contains no subject
+ * name, assume the name of this host. This is for backwards
+ * compatibility. Light the error bit if no certificate with
+ * the given subject name is found. Of course, private
+ * certificates are never sent.
+ */
+ case CRYPTO_SIGN:
+ case CRYPTO_CERT | CRYPTO_RESP:
+ vallen = ntohl(ep->vallen);
+ if (vallen == 8) {
+ strcpy(certname, sys_hostname);
+ } else if (vallen == 0 || vallen > MAXHOSTNAME) {
opcode |= CRYPTO_ERROR;
break;
+
+ } else {
+ memcpy(certname, ep->pkt, vallen);
+ certname[vallen] = '\0';
}
- peer->flags &= ~FLAG_ASSOC;
- ap = (struct autokey *)&xpkt[i + 2];
- ap->tstamp = peer->sndauto.tstamp;
- ap->seq = peer->sndauto.seq;
- ap->key = peer->sndauto.key;
- ap->siglen = peer->sndauto.siglen;
- len += 16;
-#ifdef PUBKEY
- if (!crypto_flags)
- break;
- temp = ntohl(ap->siglen);
- if (temp != 0)
- memcpy(ap->pkt, peer->sndauto.sig, temp);
- len += temp;
-#endif /* PUBKEY */
+ for (cp = cinfo; cp != NULL; cp = cp->link) {
+ if (cp->flags & CERT_PRIV)
+ continue;
+ if (strcmp(certname, cp->subject) == 0) {
+ len += crypto_send(fp, &cp->cert);
+ break;
+ }
+ }
+ if (cp == NULL)
+ opcode |= CRYPTO_ERROR;
break;
/*
- * Send peer cookie and signature in server mode.
+ * Send challenge in Schnorr (IFF) identity scheme.
*/
- case CRYPTO_PRIV:
- case CRYPTO_PRIV | CRYPTO_RESP:
- cp = (struct cookie *)&xpkt[i + 2];
- cp->key = htonl(cookie);
- cp->siglen = 0;
- len += 12;
-#ifdef PUBKEY
- cp->tstamp = host.tstamp;
- if (!crypto_flags)
- break;
- EVP_SignInit(&ctx, DA_MD5);
- EVP_SignUpdate(&ctx, (u_char *)cp, 8);
- rval = EVP_SignFinal(&ctx, (u_char *)cp->pkt, &temp,
- &private_key);
- if (rval != RV_OK) {
- msyslog(LOG_ERR,
- "crypto: cookie signature fails %x", rval);
+ case CRYPTO_IFF:
+ if ((peer = findpeerbyassoc(ep->pkt[0])) == NULL) {
+ opcode |= CRYPTO_ERROR;
break;
}
- cp->siglen = htonl(temp);
- len += temp;
-#endif /* PUBKEY */
+ if ((rval = crypto_alice(peer, &vtemp)) == XEVNT_OK)
+ len += crypto_send(fp, &vtemp);
+ value_free(&vtemp);
break;
-#ifdef PUBKEY
/*
- * The following commands and responses work only when public-
- * key cryptography has been configured. If configured, but
- * disabled due to no crypto command in the configuration file,
- * they are ignored and an error response is returned.
+ * Send response in Schnorr (IFF) identity scheme.
*/
+ case CRYPTO_IFF | CRYPTO_RESP:
+ if ((rval = crypto_bob(ep, &vtemp)) == XEVNT_OK)
+ len += crypto_send(fp, &vtemp);
+ value_free(&vtemp);
+ break;
+
/*
- * Send certificate, timestamp and signature.
+ * Send challenge in Guillou-Quisquater (GQ) identity scheme.
*/
- case CRYPTO_CERT | CRYPTO_RESP:
- if (!crypto_flags) {
+ case CRYPTO_GQ:
+ if ((peer = findpeerbyassoc(ep->pkt[0])) == NULL) {
opcode |= CRYPTO_ERROR;
break;
}
- vp = (struct value *)&xpkt[i + 2];
- vp->tstamp = certif.tstamp;
- vp->fstamp = certif.fstamp;
- vp->vallen = 0;
- len += 12;
- temp = ntohl(certif.vallen);
- if (temp == 0)
- break;
- vp->vallen = htonl(temp);
- memcpy(vp->pkt, certif.ptr, temp);
- len += temp;
- j = i + 5 + temp / 4;
- temp = public_key.bits / 8;
- xpkt[j++] = htonl(temp);
- memcpy(&xpkt[j], certif.sig, temp);
- len += temp + 4;
+ if ((rval = crypto_alice2(peer, &vtemp)) == XEVNT_OK)
+ len += crypto_send(fp, &vtemp);
+ value_free(&vtemp);
+ break;
+
+ /*
+ * Send response in Guillou-Quisquater (GQ) identity scheme.
+ */
+ case CRYPTO_GQ | CRYPTO_RESP:
+ if ((rval = crypto_bob2(ep, &vtemp)) == XEVNT_OK)
+ len += crypto_send(fp, &vtemp);
+ value_free(&vtemp);
break;
/*
- * Send agreement parameters, timestamp and signature.
+ * Send challenge in MV identity scheme.
*/
- case CRYPTO_DHPAR | CRYPTO_RESP:
- if (!crypto_flags) {
+ case CRYPTO_MV:
+ if ((peer = findpeerbyassoc(ep->pkt[0])) == NULL) {
opcode |= CRYPTO_ERROR;
break;
}
- vp = (struct value *)&xpkt[i + 2];
- vp->tstamp = dhparam.tstamp;
- vp->fstamp = dhparam.fstamp;
- vp->vallen = 0;
- len += 12;
- temp = ntohl(dhparam.vallen);
- if (temp == 0)
- break;
- vp->vallen = htonl(temp);
- memcpy(vp->pkt, dhparam.ptr, temp);
- len += temp;
- j = i + 5 + temp / 4;
- temp = public_key.bits / 8;
- xpkt[j++] = htonl(temp);
- memcpy(&xpkt[j], dhparam.sig, temp);
- len += temp + 4;
+ if ((rval = crypto_alice3(peer, &vtemp)) == XEVNT_OK)
+ len += crypto_send(fp, &vtemp);
+ value_free(&vtemp);
break;
/*
- * Send public value, timestamp and signature.
+ * Send response in MV identity scheme.
*/
- case CRYPTO_DH:
- case CRYPTO_DH | CRYPTO_RESP:
- if (!crypto_flags) {
+ case CRYPTO_MV | CRYPTO_RESP:
+ if ((rval = crypto_bob3(ep, &vtemp)) == XEVNT_OK)
+ len += crypto_send(fp, &vtemp);
+ value_free(&vtemp);
+ break;
+
+ /*
+ * Send certificate sign response. The integrity of the request
+ * certificate has already been verified on the receive side.
+ * Sign the response using the local server key. Use the
+ * filestamp from the request and use the timestamp as the
+ * current time. Light the error bit if the certificate is
+ * invalid or contains an unverified signature.
+ */
+ case CRYPTO_SIGN | CRYPTO_RESP:
+ if ((rval = cert_sign(ep, &vtemp)) == XEVNT_OK)
+ len += crypto_send(fp, &vtemp);
+ value_free(&vtemp);
+ break;
+
+ /*
+ * Send public key and signature. Use the values from the public
+ * key.
+ */
+ case CRYPTO_COOK:
+ len += crypto_send(fp, &pubkey);
+ break;
+
+ /*
+ * Encrypt and send cookie and signature. Light the error bit if
+ * anything goes wrong.
+ */
+ case CRYPTO_COOK | CRYPTO_RESP:
+ if ((opcode & 0xffff) < VALUE_LEN) {
opcode |= CRYPTO_ERROR;
break;
}
- vp = (struct value *)&xpkt[i + 2];
- vp->tstamp = dhpub.tstamp;
- vp->fstamp = dhpub.fstamp;
- vp->vallen = 0;
- len += 12;
- temp = ntohl(dhpub.vallen);
- if (temp == 0)
- break;
- vp->vallen = htonl(temp);
- memcpy(vp->pkt, dhpub.ptr, temp);
- len += temp;
- j = i + 5 + temp / 4;
- temp = public_key.bits / 8;
- xpkt[j++] = htonl(temp);
- memcpy(&xpkt[j], dhpub.sig, temp);
- len += temp + 4;
+ if (PKT_MODE(xpkt->li_vn_mode) == MODE_SERVER) {
+ tcookie = cookie;
+ } else {
+ if ((peer = findpeerbyassoc(associd)) == NULL) {
+ opcode |= CRYPTO_ERROR;
+ break;
+ }
+ tcookie = peer->pcookie;
+ }
+ if ((rval = crypto_encrypt(ep, &vtemp, &tcookie)) ==
+ XEVNT_OK)
+ len += crypto_send(fp, &vtemp);
+ value_free(&vtemp);
break;
/*
- * Send public key, host name, timestamp and signature.
+ * Find peer and send autokey data and signature in broadcast
+ * server and symmetric modes. Use the values in the autokey
+ * structure. If no association is found, either the server has
+ * restarted with new associations or some perp has replayed an
+ * old message, in which case light the error bit.
*/
- case CRYPTO_NAME | CRYPTO_RESP:
- if (!crypto_flags) {
+ case CRYPTO_AUTO | CRYPTO_RESP:
+ if ((peer = findpeerbyassoc(associd)) == NULL) {
opcode |= CRYPTO_ERROR;
break;
}
- vp = (struct value *)&xpkt[i + 2];
- vp->tstamp = host.tstamp;
- vp->fstamp = host.fstamp;
- vp->vallen = 0;
- len += 12;
- temp = ntohl(host.vallen);
- if (temp == 0)
- break;
- vp->vallen = htonl(temp);
- memcpy(vp->pkt, host.ptr, temp);
- len += temp;
- j = i + 5 + temp / 4;
- temp = public_key.bits / 8;
- xpkt[j++] = htonl(temp);
- memcpy(&xpkt[j], host.sig, temp);
- len += temp + 4;
+ peer->flags &= ~FLAG_ASSOC;
+ len += crypto_send(fp, &peer->sndval);
break;
/*
- * Send leapseconds table, timestamp and signature.
+ * Send leapseconds table and signature. Use the values from the
+ * tai structure. If no table has been loaded, just send a
+ * request.
*/
+ case CRYPTO_TAI:
case CRYPTO_TAI | CRYPTO_RESP:
- if (!crypto_flags) {
- opcode |= CRYPTO_ERROR;
- break;
- }
- vp = (struct value *)&xpkt[i + 2];
- vp->tstamp = tai_leap.tstamp;
- vp->fstamp = tai_leap.fstamp;
- vp->vallen = 0;
- len += 12;
- temp = ntohl(tai_leap.vallen);
- if (temp == 0)
- break;
- vp->vallen = htonl(temp);
- memcpy(vp->pkt, tai_leap.ptr, temp);
- len += temp;
- j = i + 5 + temp / 4;
- temp = public_key.bits / 8;
- xpkt[j++] = htonl(temp);
- memcpy(&xpkt[j], tai_leap.sig, temp);
- len += temp + 4;
+ if (crypto_flags & CRYPTO_FLAG_TAI)
+ len += crypto_send(fp, &tai_leap);
break;
-#endif /* PUBKEY */
/*
* Default - Fall through for requests; for unknown responses,
@@ -1249,626 +1379,2226 @@ crypto_xmit(
default:
if (opcode & CRYPTO_RESP)
opcode |= CRYPTO_ERROR;
- break;
}
/*
- * Round up the field length to a multiple of 8 octets and save
- * the request code and length.
+ * We ignore length/format errors and duplicates. Other errors
+ * are reported to the log and deny further service. To really
+ * persistent rascals we toss back a kiss-of-death grenade.
*/
- len = ((len + 7) / 8) * 8;
- if (len >= 4) {
- xpkt[i] = htonl((u_int32)((opcode << 16) | len));
+ if (rval > XEVNT_TSP) {
+ opcode |= CRYPTO_ERROR;
+ sprintf(statstr, "error %x opcode %x", rval, opcode);
+ record_crypto_stats(srcadr_sin, statstr);
#ifdef DEBUG
if (debug)
- printf(
- "crypto_xmit: ext offset %d len %d code %x assocID %d\n",
- start, len, code, associd);
+ printf("crypto_xmit: %s\n", statstr);
#endif
}
+
+ /*
+ * Round up the field length to a multiple of 8 bytes and save
+ * the request code and length.
+ */
+ len = ((len + 7) / 8) * 8;
+ fp->opcode = htonl((opcode & 0xffff0000) | len);
+#ifdef DEBUG
+ if (debug)
+ printf(
+ "crypto_xmit: ext offset %d len %u code %x assocID %d\n",
+ start, len, opcode>> 16, associd);
+#endif
return (len);
}
-#ifdef PUBKEY
+
/*
- * crypto_setup - load private key, public key, optional agreement
- * parameters and optional leapseconds table, then initialize extension
- * fields for later signatures.
+ * crypto_verify - parse and verify the extension field and value
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_LEN bad field format or length
+ * XEVNT_TSP bad timestamp
+ * XEVNT_FSP bad filestamp
+ * XEVNT_PUB bad or missing public key
+ * XEVNT_SGL bad signature length
+ * XEVNT_SIG signature not verified
*/
-void
-crypto_setup(void)
+static int
+crypto_verify(
+ struct exten *ep, /* extension pointer */
+ struct value *vp, /* value pointer */
+ struct peer *peer /* peer structure pointer */
+ )
{
- char filename[MAXFILENAME];
- u_int fstamp; /* filestamp */
- u_int len, temp;
- u_int32 *pp;
+ EVP_PKEY *pkey; /* server public key */
+ EVP_MD_CTX ctx; /* signature context */
+ tstamp_t tstamp; /* timestamp */
+ tstamp_t fstamp; /* filestamp */
+ u_int vallen; /* value length */
+ u_int siglen; /* signature length */
+ u_int opcode, len;
+ int rval;
+ int i;
/*
- * Initialize structures.
+ * We require valid opcode and field length, timestamp,
+ * filestamp, public key, digest, signature length and
+ * signature, where relevant. Note that preliminary length
+ * checks are done in the main loop.
*/
- memset(&private_key, 0, sizeof(private_key));
- memset(&public_key, 0, sizeof(public_key));
- memset(&certif, 0, sizeof(certif));
- memset(&dh_params, 0, sizeof(dh_params));
- memset(&host, 0, sizeof(host));
- memset(&dhparam, 0, sizeof(dhparam));
- memset(&dhpub, 0, sizeof(dhpub));
- memset(&tai_leap, 0, sizeof(tai_leap));
- if (!crypto_flags)
- return;
+ len = ntohl(ep->opcode) & 0x0000ffff;
+ opcode = ntohl(ep->opcode) & 0xffff0000;
+
+ /*
+ * Check for valid operation code and protocol. The opcode must
+ * not have the error bit set. If a response, it must have a
+ * value header. If a request and does not contain a value
+ * header, no need for further checking.
+ */
+ if (opcode & CRYPTO_ERROR)
+ return (XEVNT_LEN);
+ if (opcode & CRYPTO_RESP) {
+ if (len < VALUE_LEN)
+ return (XEVNT_LEN);
+ } else {
+ if (len < VALUE_LEN)
+ return (XEVNT_OK);
+ }
+ /*
+ * We have a value header. Check for valid field lengths. The
+ * field length must be long enough to contain the value header,
+ * value and signature. If a request and a previous request of
+ * the same type is pending, discard the previous request. If a
+ * request but no signature, there is no need for further
+ * checking.
+ */
+ vallen = ntohl(ep->vallen);
+ if (len < ((VALUE_LEN + vallen + 3) / 4) * 4)
+ return (XEVNT_LEN);
+
+ i = (vallen + 3) / 4;
+ siglen = ntohl(ep->pkt[i++]);
+ if (len < VALUE_LEN + vallen + siglen)
+ return (XEVNT_LEN);
+
+ if (!(opcode & CRYPTO_RESP)) {
+ if (peer->cmmd != NULL) {
+ if ((opcode | CRYPTO_RESP) ==
+ (ntohl(peer->cmmd->opcode) & 0xffff0000)) {
+ free(peer->cmmd);
+ peer->cmmd = NULL;
+ } else {
+ return (XEVNT_LEN);
+ }
+ }
+ if (siglen == 0)
+ return (XEVNT_OK);
+ }
/*
- * Load required private key from file, default "ntpkey".
+ * We have a signature. Check for valid timestamp and filestamp.
+ * The timestamp must not precede the filestamp. The timestamp
+ * and filestamp must not precede the corresponding values in
+ * the value structure. Once the autokey values have been
+ * installed, the timestamp must always be later than the
+ * corresponding value in the value structure. Duplicate
+ * timestamps are illegal once the cookie has been validated.
*/
- if (private_key_file == NULL)
- private_key_file = "ntpkey";
- host.fstamp = htonl(crypto_rsa(private_key_file,
- (u_char *)&private_key, sizeof(R_RSA_PRIVATE_KEY)));
+ rval = XEVNT_OK;
+ if (crypto_flags & peer->crypto & CRYPTO_FLAG_PRIV)
+ pkey = sign_pkey;
+ else
+ pkey = peer->pkey;
+ tstamp = ntohl(ep->tstamp);
+ fstamp = ntohl(ep->fstamp);
+ if (tstamp == 0 || tstamp < fstamp) {
+ rval = XEVNT_TSP;
+ } else if (vp != NULL && (tstamp < ntohl(vp->tstamp) ||
+ (tstamp == ntohl(vp->tstamp) && (peer->crypto &
+ CRYPTO_FLAG_AUTO)))) {
+ rval = XEVNT_TSP;
+ } else if (vp != NULL && (tstamp < ntohl(vp->fstamp) || fstamp <
+ ntohl(vp->fstamp))) {
+ rval = XEVNT_FSP;
/*
- * Load required public key from file, default
- * "ntpkey_host", where "host" is the canonical name of this
- * machine.
+ * If a public key and digest is present, and if valid key
+ * length, check for valid signature. Note that the first valid
+ * signature lights the proventic bit.
*/
- if (public_key_file == NULL) {
- snprintf(filename, MAXFILENAME, "ntpkey_%s",
- sys_hostname);
- public_key_file = emalloc(strlen(filename) + 1);
- strcpy(public_key_file, filename);
+ } else if (pkey == NULL || peer->digest == NULL) {
+ /* fall through */
+ } else if (siglen != (u_int) EVP_PKEY_size(pkey)) {
+ rval = XEVNT_SGL;
+ } else {
+ EVP_VerifyInit(&ctx, peer->digest);
+ EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen +
+ 12);
+ if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen,
+ pkey)) {
+ if (peer->crypto & CRYPTO_FLAG_VRFY)
+ peer->crypto |= CRYPTO_FLAG_PROV;
+ } else {
+ rval = XEVNT_SIG;
+ }
}
- fstamp = htonl(crypto_rsa(public_key_file,
- (u_char *)&public_key, sizeof(R_RSA_PUBLIC_KEY)));
- if (fstamp != host.fstamp || strstr(public_key_file,
- sys_hostname) == NULL) {
- msyslog(LOG_ERR,
- "crypto: public/private key files mismatch");
- exit (-1);
+#ifdef DEBUG
+ if (debug > 1)
+ printf(
+ "crypto_recv: verify %x vallen %u siglen %u ts %u fs %u\n",
+ rval, vallen, siglen, tstamp, fstamp);
+#endif
+ return (rval);
+}
+
+
+/*
+ * crypto_encrypt - construct encrypted cookie and signature from
+ * extension field and cookie
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ * XEVNT_CKY bad or missing cookie
+ */
+static int
+crypto_encrypt(
+ struct exten *ep, /* extension pointer */
+ struct value *vp, /* value pointer */
+ keyid_t *cookie /* server cookie */
+ )
+{
+ EVP_PKEY *pkey; /* public key */
+ EVP_MD_CTX ctx; /* signature context */
+ tstamp_t tstamp; /* NTP timestamp */
+ u_int32 temp32;
+ u_int len;
+ u_char *ptr;
+
+ /*
+ * Extract the public key from the request.
+ */
+ len = ntohl(ep->vallen);
+ ptr = (u_char *)ep->pkt;
+ pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len);
+ if (pkey == NULL) {
+ msyslog(LOG_ERR, "crypto_encrypt %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (XEVNT_PUB);
}
- crypto_flags |= CRYPTO_FLAG_RSA;
/*
- * Assemble public key and host name in network byte order.
- * These data will later be signed and sent in response to
- * a client request. Note that the modulus must be a u_int32 in
- * network byte order independent of the host order or u_int
- * size.
+ * Encrypt the cookie, encode in ASN.1 and sign.
*/
- strcpy(filename, sys_hostname);
- for (len = strlen(filename) + 1; len % 4 != 0; len++)
- filename[len - 1] = 0;
- temp = sizeof(R_RSA_PUBLIC_KEY) - sizeof(u_int) + 4;
- host.vallen = htonl(temp + len);
- pp = emalloc(temp + len);
- host.ptr = (u_char *)pp;
- *pp++ = htonl(public_key.bits);
- memcpy(pp--, public_key.modulus, temp - 4);
- pp += temp / 4;
- memcpy(pp, filename, len);
- host.sig = emalloc(private_key.bits / 8);
+ tstamp = crypto_time();
+ memset(vp, 0, sizeof(struct value));
+ vp->tstamp = htonl(tstamp);
+ vp->fstamp = hostval.tstamp;
+ len = EVP_PKEY_size(pkey);
+ vp->vallen = htonl(len);
+ vp->ptr = emalloc(len);
+ temp32 = htonl(*cookie);
+ if (!RSA_public_encrypt(4, (u_char *)&temp32, vp->ptr,
+ pkey->pkey.rsa, RSA_PKCS1_OAEP_PADDING)) {
+ msyslog(LOG_ERR, "crypto_encrypt %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ EVP_PKEY_free(pkey);
+ return (XEVNT_CKY);
+ }
+ EVP_PKEY_free(pkey);
+ vp->siglen = 0;
+ if (tstamp == 0)
+ return (XEVNT_OK);
+ vp->sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
+ EVP_SignUpdate(&ctx, vp->ptr, len);
+ if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ vp->siglen = htonl(len);
+ return (XEVNT_OK);
+}
+
+
+/*
+ * crypto_ident - construct extension field for identity scheme
+ *
+ * This routine determines which identity scheme is in use and
+ * constructs an extension field for that scheme.
+ */
+u_int
+crypto_ident(
+ struct peer *peer /* peer structure pointer */
+ )
+{
+ char filename[MAXFILENAME + 1];
/*
- * Load optional certificate from file, default "ntpkey_certif".
- * If the file is missing or defective, the values can later be
- * retrieved from a server.
+ * If the server identity has already been verified, no further
+ * action is necessary. Otherwise, try to load the identity file
+ * of the certificate issuer. If the issuer file is not found,
+ * try the host file. If nothing found, declare a cryptobust.
+ * Note we can't get here unless the trusted certificate has
+ * been found and the CRYPTO_FLAG_VALID bit is set, so the
+ * certificate issuer is valid.
*/
- if (certif_file == NULL)
- snprintf(filename, MAXFILENAME, "ntpkey_certif_%s",
+ if (peer->crypto & CRYPTO_FLAG_VRFY)
+ return (0);
+
+ if (peer->ident_pkey != NULL)
+ EVP_PKEY_free(peer->ident_pkey);
+ if (peer->crypto & CRYPTO_FLAG_GQ) {
+ snprintf(filename, MAXFILENAME, "ntpkey_gq_%s",
+ peer->issuer);
+ peer->ident_pkey = crypto_key(filename, &peer->fstamp);
+ if (peer->ident_pkey != NULL)
+ return (CRYPTO_GQ);
+
+ snprintf(filename, MAXFILENAME, "ntpkey_gq_%s",
+ sys_hostname);
+ peer->ident_pkey = crypto_key(filename, &peer->fstamp);
+ if (peer->ident_pkey != NULL)
+ return (CRYPTO_GQ);
+ }
+ if (peer->crypto & CRYPTO_FLAG_IFF) {
+ snprintf(filename, MAXFILENAME, "ntpkey_iff_%s",
+ peer->issuer);
+ peer->ident_pkey = crypto_key(filename, &peer->fstamp);
+ if (peer->ident_pkey != NULL)
+ return (CRYPTO_IFF);
+
+ snprintf(filename, MAXFILENAME, "ntpkey_iff_%s",
+ sys_hostname);
+ peer->ident_pkey = crypto_key(filename, &peer->fstamp);
+ if (peer->ident_pkey != NULL)
+ return (CRYPTO_IFF);
+ }
+ if (peer->crypto & CRYPTO_FLAG_MV) {
+ snprintf(filename, MAXFILENAME, "ntpkey_mv_%s",
+ peer->issuer);
+ peer->ident_pkey = crypto_key(filename, &peer->fstamp);
+ if (peer->ident_pkey != NULL)
+ return (CRYPTO_MV);
+
+ snprintf(filename, MAXFILENAME, "ntpkey_mv_%s",
sys_hostname);
- certif_file = emalloc(strlen(filename) + 1);
- strcpy(certif_file, filename);
- crypto_cert(certif_file);
+ peer->ident_pkey = crypto_key(filename, &peer->fstamp);
+ if (peer->ident_pkey != NULL)
+ return (CRYPTO_MV);
+ }
/*
- * Load optional agreement parameters from file, default
- * "ntpkey_dh". If the file is missing or defective, the values
- * can later be retrieved from a server.
+ * No compatible identity scheme is available. Use the default
+ * TC scheme.
*/
- if (dh_params_file == NULL)
- dh_params_file = "ntpkey_dh";
- crypto_dh(dh_params_file);
+ msyslog(LOG_INFO,
+ "crypto_ident: no compatible identity scheme found");
+ return (0);
+}
+
+
+/*
+ * crypto_args - construct extension field from arguments
+ *
+ * This routine creates an extension field with current timestamps and
+ * specified opcode, association ID and optional string. Note that the
+ * extension field is created here, but freed after the crypto_xmit()
+ * call in the protocol module.
+ *
+ * Returns extension field pointer (no errors).
+ */
+struct exten *
+crypto_args(
+ struct peer *peer, /* peer structure pointer */
+ u_int opcode, /* operation code */
+ char *str /* argument string */
+ )
+{
+ tstamp_t tstamp; /* NTP timestamp */
+ struct exten *ep; /* extension field pointer */
+ u_int len; /* extension field length */
+
+ tstamp = crypto_time();
+ len = sizeof(struct exten);
+ if (str != NULL)
+ len += strlen(str);
+ ep = emalloc(len);
+ memset(ep, 0, len);
+ ep->opcode = htonl(opcode + len);
/*
- * Load optional leapseconds from file, default "ntpkey_leap".
- * If the file is missing or defective, the values can later be
- * retrieved from a server.
+ * If a response, send our ID; if a request, send the
+ * responder's ID.
*/
- if (tai_leap_file == NULL)
- tai_leap_file = "ntpkey_leap";
- crypto_tai(tai_leap_file);
+ if (opcode & CRYPTO_RESP)
+ ep->associd = htonl(peer->associd);
+ else
+ ep->associd = htonl(peer->assoc);
+ ep->tstamp = htonl(tstamp);
+ ep->fstamp = hostval.tstamp;
+ ep->vallen = 0;
+ if (str != NULL) {
+ ep->vallen = htonl(strlen(str));
+ memcpy((char *)ep->pkt, str, strlen(str));
+ } else {
+ ep->pkt[0] = peer->associd;
+ }
+ return (ep);
}
/*
- * crypto_agree - compute new public value and sign extension fields.
+ * crypto_send - construct extension field from value components
+ *
+ * Returns extension field length. Note: it is not polite to send a
+ * nonempty signature with zero timestamp or a nonzero timestamp with
+ * empty signature, but these rules are not enforced here.
*/
-void
-crypto_agree(void)
+u_int
+crypto_send(
+ struct exten *ep, /* extension field pointer */
+ struct value *vp /* value pointer */
+ )
{
- R_RANDOM_STRUCT randomstr; /* wiggle bits */
- R_SIGNATURE_CTX ctx; /* signature context */
- l_fp lstamp; /* NTP time */
- tstamp_t tstamp; /* seconds timestamp */
- u_int len, temp;
- int rval, i;
+ u_int len, temp32;
+ int i;
/*
- * Sign host name and timestamps, but only if the clock is
- * synchronized.
+ * Copy data. If the data field is empty or zero length, encode
+ * an empty value with length zero.
*/
- if (sys_leap == LEAP_NOTINSYNC)
- return;
- get_systime(&lstamp);
- tstamp = lstamp.l_ui;
- host.tstamp = htonl(tstamp);
- if (!crypto_flags)
+ ep->tstamp = vp->tstamp;
+ ep->fstamp = vp->fstamp;
+ ep->vallen = vp->vallen;
+ len = 12;
+ temp32 = ntohl(vp->vallen);
+ if (temp32 > 0 && vp->ptr != NULL)
+ memcpy(ep->pkt, vp->ptr, temp32);
+
+ /*
+ * Copy signature. If the signature field is empty or zero
+ * length, encode an empty signature with length zero.
+ */
+ i = (temp32 + 3) / 4;
+ len += i * 4 + 4;
+ ep->pkt[i++] = vp->siglen;
+ temp32 = ntohl(vp->siglen);
+ if (temp32 > 0 && vp->sig != NULL)
+ memcpy(&ep->pkt[i], vp->sig, temp32);
+ len += temp32;
+ return (len);
+}
+
+
+/*
+ * crypto_update - compute new public value and sign extension fields
+ *
+ * This routine runs periodically, like once a day, and when something
+ * changes. It updates the timestamps on three value structures and one
+ * value structure list, then signs all the structures:
+ *
+ * hostval host name (not signed)
+ * pubkey public key
+ * cinfo certificate info/value list
+ * tai_leap leapseconds file
+ *
+ * Filestamps are proventicated data, so this routine is run only when
+ * the host has been synchronized to a proventicated source. Thus, the
+ * timestamp is proventicated, too, and can be used to deflect
+ * clogging attacks and even cook breakfast.
+ *
+ * Returns void (no errors)
+ */
+void
+crypto_update(void)
+{
+ EVP_MD_CTX ctx; /* message digest context */
+ struct cert_info *cp, *cpn, **zp; /* certificate info/value */
+ char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
+ tstamp_t tstamp; /* NTP timestamp */
+ u_int len;
+
+ if ((tstamp = crypto_time()) == 0)
return;
- EVP_SignInit(&ctx, DA_MD5);
- EVP_SignUpdate(&ctx, (u_char *)&host, 12);
- EVP_SignUpdate(&ctx, host.ptr, ntohl(host.vallen));
- rval = EVP_SignFinal(&ctx, host.sig, &len, &private_key);
- if (rval != RV_OK || len != private_key.bits / 8) {
- msyslog(LOG_ERR, "crypto: host signature fails %x",
- rval);
- exit (-1);
- }
- host.siglen = ntohl(len);
+ hostval.tstamp = htonl(tstamp);
/*
- * Sign certificate and timestamps.
+ * Sign public key and timestamps. The filestamp is derived from
+ * the host key file extension from wherever the file was
+ * generated.
*/
- if (certif.vallen != 0) {
- certif.tstamp = htonl(tstamp);
- EVP_SignInit(&ctx, DA_MD5);
- EVP_SignUpdate(&ctx, (u_char *)&certif, 12);
- EVP_SignUpdate(&ctx, certif.ptr,
- ntohl(certif.vallen));
- rval = EVP_SignFinal(&ctx, certif.sig, &len,
- &private_key);
- if (rval != RV_OK || len != private_key.bits / 8) {
- msyslog(LOG_ERR,
- "crypto: certificate signature fails %x",
- rval);
- exit (-1);
- }
- certif.siglen = ntohl(len);
+ if (pubkey.vallen != 0) {
+ pubkey.tstamp = hostval.tstamp;
+ pubkey.siglen = 0;
+ if (pubkey.sig == NULL)
+ pubkey.sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)&pubkey, 12);
+ EVP_SignUpdate(&ctx, pubkey.ptr, ntohl(pubkey.vallen));
+ if (EVP_SignFinal(&ctx, pubkey.sig, &len, sign_pkey))
+ pubkey.siglen = htonl(len);
}
/*
- * Sign agreement parameters and timestamps.
+ * Sign certificates and timestamps. The filestamp is derived
+ * from the certificate file extension from wherever the file
+ * was generated. At the same time expired certificates are
+ * expunged.
*/
- if (dhparam.vallen != 0) {
- dhparam.tstamp = htonl(tstamp);
- EVP_SignInit(&ctx, DA_MD5);
- EVP_SignUpdate(&ctx, (u_char *)&dhparam, 12);
- EVP_SignUpdate(&ctx, dhparam.ptr,
- ntohl(dhparam.vallen));
- rval = EVP_SignFinal(&ctx, dhparam.sig, &len,
- &private_key);
- if (rval != RV_OK || len != private_key.bits / 8) {
- msyslog(LOG_ERR,
- "crypto: parameters signature fails %x",
- rval);
- exit (-11);
- }
- dhparam.siglen = ntohl(len);
-
- /*
- * Compute public value.
- */
- R_RandomInit(&randomstr);
- R_GetRandomBytesNeeded(&len, &randomstr);
- for (i = 0; i < len; i++) {
- temp = RANDOM;
- R_RandomUpdate(&randomstr, (u_char *)&temp, 1);
- }
- rval = R_SetupDHAgreement(dhpub.ptr, dh_private,
- dh_keyLen, &dh_params, &randomstr);
- if (rval != RV_OK) {
- msyslog(LOG_ERR,
- "crypto: invalid public value");
- exit (-1);
+ zp = &cinfo;
+ for (cp = cinfo; cp != NULL; cp = cpn) {
+ cpn = cp->link;
+ if (tstamp > cp->last) {
+ *zp = cpn;
+ cert_free(cp);
+ } else {
+ cp->cert.tstamp = hostval.tstamp;
+ cp->cert.siglen = 0;
+ if (cp->cert.sig == NULL)
+ cp->cert.sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)&cp->cert, 12);
+ EVP_SignUpdate(&ctx, cp->cert.ptr,
+ ntohl(cp->cert.vallen));
+ if (EVP_SignFinal(&ctx, cp->cert.sig, &len,
+ sign_pkey))
+ cp->cert.siglen = htonl(len);
+ zp = &cp->link;
}
-
- /*
- * Sign public value and timestamps.
- */
- dhpub.tstamp = htonl(tstamp);
- EVP_SignInit(&ctx, DA_MD5);
- EVP_SignUpdate(&ctx, (u_char *)&dhpub, 12);
- EVP_SignUpdate(&ctx, dhpub.ptr, ntohl(dhpub.vallen));
- rval = EVP_SignFinal(&ctx, dhpub.sig, &len,
- &private_key);
- if (rval != RV_OK || len != private_key.bits / 8) {
- msyslog(LOG_ERR,
- "crypto: public value signature fails %x",
- rval);
- exit (-1);
- }
- dhpub.siglen = ntohl(len);
}
/*
- * Sign leapseconds table and timestamps.
+ * Sign leapseconds table and timestamps. The filestamp is
+ * derived from the leapsecond file extension from wherever the
+ * file was generated.
*/
if (tai_leap.vallen != 0) {
- tai_leap.tstamp = htonl(tstamp);
- EVP_SignInit(&ctx, DA_MD5);
+ tai_leap.tstamp = hostval.tstamp;
+ tai_leap.siglen = 0;
+ if (tai_leap.sig == NULL)
+ tai_leap.sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
EVP_SignUpdate(&ctx, (u_char *)&tai_leap, 12);
EVP_SignUpdate(&ctx, tai_leap.ptr,
ntohl(tai_leap.vallen));
- rval = EVP_SignFinal(&ctx, tai_leap.sig, &len,
- &private_key);
- if (rval != RV_OK || len != private_key.bits / 8) {
- msyslog(LOG_ERR,
- "crypto: leapseconds signature fails %x",
- rval);
- exit (-1);
- }
- tai_leap.siglen = ntohl(len);
+ if (EVP_SignFinal(&ctx, tai_leap.sig, &len, sign_pkey))
+ tai_leap.siglen = htonl(len);
}
+ sprintf(statstr, "update ts %u", ntohl(hostval.tstamp));
+ record_crypto_stats(NULL, statstr);
#ifdef DEBUG
if (debug)
- printf(
- "cypto_agree: ts %u host %u par %u pub %u leap %u\n",
- tstamp, ntohl(host.fstamp), ntohl(dhparam.fstamp),
- ntohl(dhpub.fstamp), ntohl(tai_leap.fstamp));
+ printf("crypto_update: %s\n", statstr);
#endif
}
/*
- * crypto_rsa - read RSA key, decode and check for errors.
+ * value_free - free value structure components.
+ *
+ * Returns void (no errors)
*/
-static u_int
-crypto_rsa(
- char *cp, /* file name */
- u_char *key, /* key pointer */
- u_int keylen /* key length */
+void
+value_free(
+ struct value *vp /* value structure */
)
{
- FILE *str; /* file handle */
- u_char buf[MAX_LINLEN]; /* file line buffer */
- u_char encoded_key[MAX_ENCLEN]; /* encoded key buffer */
- char filename[MAXFILENAME]; /* name of parameter file */
- char linkname[MAXFILENAME]; /* file link (for filestamp) */
- u_int fstamp; /* filestamp */
- u_int bits, len;
- char *rptr;
- int rval;
+ if (vp->ptr != NULL)
+ free(vp->ptr);
+ if (vp->sig != NULL)
+ free(vp->sig);
+ memset(vp, 0, sizeof(struct value));
+}
+
+
+/*
+ * crypto_time - returns current NTP time in seconds.
+ */
+tstamp_t
+crypto_time()
+{
+ l_fp tstamp; /* NTP time */ L_CLR(&tstamp);
+
+ L_CLR(&tstamp);
+ if (sys_leap != LEAP_NOTINSYNC)
+ get_systime(&tstamp);
+ return (tstamp.l_ui);
+}
+
+
+/*
+ * asn2ntp - convert ASN1_TIME time structure to NTP time in seconds.
+ */
+u_long
+asn2ntp (
+ ASN1_TIME *asn1time /* pointer to ASN1_TIME structure */
+ )
+{
+ char *v; /* pointer to ASN1_TIME string */
+ struct tm tm; /* used to convert to NTP time */
/*
- * Open the file and discard comment lines. If the first
- * character of the file name is not '/', prepend the keys
- * directory string.
+ * Extract time string YYMMDDHHMMSSZ from ASN1 time structure.
+ * Note that the YY, MM, DD fields start with one, the HH, MM,
+ * SS fiels start with zero and the Z character should be 'Z'
+ * for UTC. Also note that years less than 50 map to years
+ * greater than 100. Dontcha love ASN.1? Better than MIL-188.
*/
- if (*cp == '/')
- strcpy(filename, cp);
- else
- snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp);
- str = fopen(filename, "r");
- if (str == NULL) {
- msyslog(LOG_ERR, "crypto: RSA file %s not found",
- filename);
- exit (-1);
+ if (asn1time->length > 13)
+ return ((u_long)(~0)); /* We can't use -1 here. It's invalid */
+ v = (char *)asn1time->data;
+ tm.tm_year = (v[0] - '0') * 10 + v[1] - '0';
+ if (tm.tm_year < 50)
+ tm.tm_year += 100;
+ tm.tm_mon = (v[2] - '0') * 10 + v[3] - '0' - 1;
+ tm.tm_mday = (v[4] - '0') * 10 + v[5] - '0';
+ tm.tm_hour = (v[6] - '0') * 10 + v[7] - '0';
+ tm.tm_min = (v[8] - '0') * 10 + v[9] - '0';
+ tm.tm_sec = (v[10] - '0') * 10 + v[11] - '0';
+ tm.tm_wday = 0;
+ tm.tm_yday = 0;
+ tm.tm_isdst = 0;
+ return (timegm(&tm) + JAN_1970);
+}
+
+
+/*
+ * bigdig() - compute a BIGNUM MD5 hash of a BIGNUM number.
+ */
+static int
+bighash(
+ BIGNUM *bn, /* BIGNUM * from */
+ BIGNUM *bk /* BIGNUM * to */
+ )
+{
+ EVP_MD_CTX ctx; /* message digest context */
+ u_char dgst[EVP_MAX_MD_SIZE]; /* message digest */
+ u_char *ptr; /* a BIGNUM as binary string */
+ u_int len;
+
+ len = BN_num_bytes(bn);
+ ptr = emalloc(len);
+ BN_bn2bin(bn, ptr);
+ EVP_DigestInit(&ctx, EVP_md5());
+ EVP_DigestUpdate(&ctx, ptr, len);
+ EVP_DigestFinal(&ctx, dgst, &len);
+ BN_bin2bn(dgst, len, bk);
+ return (1);
+}
+
+
+/*
+ ***********************************************************************
+ * *
+ * The following routines implement the Schnorr (IFF) identity scheme *
+ * *
+ ***********************************************************************
+ *
+ * The Schnorr (IFF) identity scheme is intended for use when
+ * the ntp-genkeys program does not generate the certificates used in
+ * the protocol and the group key cannot be conveyed in the certificate
+ * itself. For this purpose, new generations of IFF values must be
+ * securely transmitted to all members of the group before use. The
+ * scheme is self contained and independent of new generations of host
+ * keys, sign keys and certificates.
+ *
+ * The IFF identity scheme is based on DSA cryptography and algorithms
+ * described in Stinson p. 285. The IFF values hide in a DSA cuckoo
+ * structure, but only the primes and generator are used. The p is a
+ * 512-bit prime, q a 160-bit prime that divides p - 1 and is a qth root
+ * of 1 mod p; that is, g^q = 1 mod p. The TA rolls primvate random
+ * group key b disguised as a DSA structure member, then computes public
+ * key g^(q - b). These values are shared only among group members and
+ * never revealed in messages. Alice challenges Bob to confirm identity
+ * using the protocol described below.
+ *
+ * How it works
+ *
+ * The scheme goes like this. Both Alice and Bob have the public primes
+ * p, q and generator g. The TA gives private key b to Bob and public
+ * key v = g^(q - a) mod p to Alice.
+ *
+ * Alice rolls new random challenge r and sends to Bob in the IFF
+ * request message. Bob rolls new random k, then computes y = k + b r
+ * mod q and x = g^k mod p and sends (y, hash(x)) to Alice in the
+ * response message. Besides making the response shorter, the hash makes
+ * it effectivey impossible for an intruder to solve for b by observing
+ * a number of these messages.
+ *
+ * Alice receives the response and computes g^y v^r mod p. After a bit
+ * of algebra, this simplifies to g^k. If the hash of this result
+ * matches hash(x), Alice knows that Bob has the group key b. The signed
+ * response binds this knowledge to Bob's private key and the public key
+ * previously received in his certificate.
+ *
+ * crypto_alice - construct Alice's challenge in IFF scheme
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ * XEVNT_ID bad or missing identity parameters
+ */
+static int
+crypto_alice(
+ struct peer *peer, /* peer pointer */
+ struct value *vp /* value pointer */
+ )
+{
+ DSA *dsa; /* IFF parameters */
+ BN_CTX *bctx; /* BIGNUM context */
+ EVP_MD_CTX ctx; /* signature context */
+ tstamp_t tstamp;
+ u_int len;
+
+ /*
+ * The identity parameters must have correct format and content.
+ */
+ if (peer->ident_pkey == NULL)
+ return (XEVNT_ID);
+ if ((dsa = peer->ident_pkey->pkey.dsa) == NULL) {
+ msyslog(LOG_INFO, "crypto_alice: defective key");
+ return (XEVNT_PUB);
}
/*
- * Ignore initial comments and empty lines.
+ * Roll new random r (0 < r < q). The OpenSSL library has a bug
+ * omitting BN_rand_range, so we have to do it the hard way.
*/
- while ((rptr = fgets(buf, MAX_LINLEN - 1, str)) != NULL) {
- len = strlen(buf);
- if (len < 1)
- continue;
- if (*buf == '#' || *buf == '\r' || *buf == '\0')
- continue;
- break;
+ bctx = BN_CTX_new();
+ len = BN_num_bytes(dsa->q);
+ if (peer->iffval != NULL)
+ BN_free(peer->iffval);
+ peer->iffval = BN_new();
+ BN_rand(peer->iffval, len * 8, -1, 1); /* r */
+ BN_mod(peer->iffval, peer->iffval, dsa->q, bctx);
+ BN_CTX_free(bctx);
+
+ /*
+ * Sign and send to Bob. The filestamp is from the local file.
+ */
+ tstamp = crypto_time();
+ memset(vp, 0, sizeof(struct value));
+ vp->tstamp = htonl(tstamp);
+ vp->fstamp = htonl(peer->fstamp);
+ vp->vallen = htonl(len);
+ vp->ptr = emalloc(len);
+ BN_bn2bin(peer->iffval, vp->ptr);
+ vp->siglen = 0;
+ if (tstamp == 0)
+ return (XEVNT_OK);
+ vp->sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
+ EVP_SignUpdate(&ctx, vp->ptr, len);
+ if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ vp->siglen = htonl(len);
+ return (XEVNT_OK);
+}
+
+
+/*
+ * crypto_bob - construct Bob's response to Alice's challenge
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ */
+static int
+crypto_bob(
+ struct exten *ep, /* extension pointer */
+ struct value *vp /* value pointer */
+ )
+{
+ DSA *dsa; /* IFF parameters */
+ DSA_SIG *sdsa; /* DSA signature context fake */
+ BN_CTX *bctx; /* BIGNUM context */
+ EVP_MD_CTX ctx; /* signature context */
+ tstamp_t tstamp; /* NTP timestamp */
+ BIGNUM *bn, *bk, *r;
+ u_char *ptr;
+ u_int len;
+
+ /*
+ * If the IFF parameters are not valid, something awful
+ * happened or we are being tormented.
+ */
+ if (!(crypto_flags & CRYPTO_FLAG_IFF)) {
+ msyslog(LOG_INFO, "crypto_bob: scheme unavailable");
+ return (XEVNT_PUB);
}
+ dsa = iffpar_pkey->pkey.dsa;
/*
- * We are rather paranoid here, since an intruder might cause a
- * coredump by infiltrating a naughty key. The line must contain
- * a single integer followed by a PEM encoded, null-terminated
- * string.
- */
- if (rptr == NULL)
- rval = RV_DAT;
- else if (sscanf(buf, "%d %s", &bits, encoded_key) != 2)
- rval = RV_DAT;
- else if (R_DecodePEMBlock(&buf[sizeof(u_int)], &len,
- encoded_key, strlen(encoded_key)))
- rval = RV_DEC;
- else if ((len += sizeof(u_int)) != keylen)
- rval = RV_KEY;
- else if (bits < MIN_RSA_MODULUS_BITS || bits >
- MAX_RSA_MODULUS_BITS)
- rval = RV_KEY;
+ * Extract r from the challenge.
+ */
+ len = ntohl(ep->vallen);
+ if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) {
+ msyslog(LOG_ERR, "crypto_bob %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (XEVNT_PUB);
+ }
+
+ /*
+ * Bob rolls random k (0 < k < q), computes y = k + b r mod q
+ * and x = g^k mod p, then sends (y, hash(x)) to Alice.
+ */
+ bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new();
+ sdsa = DSA_SIG_new();
+ BN_rand(bk, len * 8, -1, 1); /* k */
+ BN_mod_mul(bn, dsa->priv_key, r, dsa->q, bctx); /* b r mod q */
+ BN_add(bn, bn, bk);
+ BN_mod(bn, bn, dsa->q, bctx); /* k + b r mod q */
+ sdsa->r = BN_dup(bn);
+ BN_mod_exp(bk, dsa->g, bk, dsa->p, bctx); /* g^k mod p */
+ bighash(bk, bk);
+ sdsa->s = BN_dup(bk);
+ BN_CTX_free(bctx);
+ BN_free(r); BN_free(bn); BN_free(bk);
+
+ /*
+ * Encode the values in ASN.1 and sign.
+ */
+ tstamp = crypto_time();
+ memset(vp, 0, sizeof(struct value));
+ vp->tstamp = htonl(tstamp);
+ vp->fstamp = htonl(if_fstamp);
+ len = i2d_DSA_SIG(sdsa, NULL);
+ if (len <= 0) {
+ msyslog(LOG_ERR, "crypto_bob %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ DSA_SIG_free(sdsa);
+ return (XEVNT_PUB);
+ }
+ vp->vallen = htonl(len);
+ ptr = emalloc(len);
+ vp->ptr = ptr;
+ i2d_DSA_SIG(sdsa, &ptr);
+ DSA_SIG_free(sdsa);
+ vp->siglen = 0;
+ if (tstamp == 0)
+ return (XEVNT_OK);
+ vp->sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
+ EVP_SignUpdate(&ctx, vp->ptr, len);
+ if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ vp->siglen = htonl(len);
+ return (XEVNT_OK);
+}
+
+
+/*
+ * crypto_iff - verify Bob's response to Alice's challenge
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ * XEVNT_FSP bad filestamp
+ * XEVNT_ID bad or missing identity parameters
+ */
+int
+crypto_iff(
+ struct exten *ep, /* extension pointer */
+ struct peer *peer /* peer structure pointer */
+ )
+{
+ DSA *dsa; /* IFF parameters */
+ BN_CTX *bctx; /* BIGNUM context */
+ DSA_SIG *sdsa; /* DSA parameters */
+ BIGNUM *bn, *bk;
+ u_int len;
+ const u_char *ptr;
+ int temp;
+
+ /*
+ * If the IFF parameters are not valid or no challenge was sent,
+ * something awful happened or we are being tormented.
+ */
+ if (peer->ident_pkey == NULL) {
+ msyslog(LOG_INFO, "crypto_iff: scheme unavailable");
+ return (XEVNT_PUB);
+ }
+ if (ntohl(ep->fstamp) != peer->fstamp) {
+ msyslog(LOG_INFO, "crypto_iff: invalid filestamp %u",
+ ntohl(ep->fstamp));
+ return (XEVNT_FSP);
+ }
+ if ((dsa = peer->ident_pkey->pkey.dsa) == NULL) {
+ msyslog(LOG_INFO, "crypto_iff: defective key");
+ return (XEVNT_PUB);
+ }
+ if (peer->iffval == NULL) {
+ msyslog(LOG_INFO, "crypto_iff: missing challenge");
+ return (XEVNT_PUB);
+ }
+
+ /*
+ * Extract the k + b r and g^k values from the response.
+ */
+ bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new();
+ len = ntohl(ep->vallen);
+ ptr = (const u_char *)ep->pkt;
+ if ((sdsa = d2i_DSA_SIG(NULL, &ptr, len)) == NULL) {
+ msyslog(LOG_ERR, "crypto_iff %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (XEVNT_PUB);
+ }
+
+ /*
+ * Compute g^(k + b r) g^(q - b)r mod p.
+ */
+ BN_mod_exp(bn, dsa->pub_key, peer->iffval, dsa->p, bctx);
+ BN_mod_exp(bk, dsa->g, sdsa->r, dsa->p, bctx);
+ BN_mod_mul(bn, bn, bk, dsa->p, bctx);
+
+ /*
+ * Verify the hash of the result matches hash(x).
+ */
+ bighash(bn, bn);
+ temp = BN_cmp(bn, sdsa->s);
+ BN_free(bn); BN_free(bk); BN_CTX_free(bctx);
+ BN_free(peer->iffval);
+ peer->iffval = NULL;
+ DSA_SIG_free(sdsa);
+ if (temp == 0)
+ return (XEVNT_OK);
else
- rval = RV_OK;
- if (rval != RV_OK) {
- fclose(str);
- msyslog(LOG_ERR, "crypto: RSA file %s error %x", cp,
- rval);
- exit (-1);
+ return (XEVNT_ID);
+}
+
+
+/*
+ ***********************************************************************
+ * *
+ * The following routines implement the Guillou-Quisquater (GQ) *
+ * identity scheme *
+ * *
+ ***********************************************************************
+ *
+ * The Guillou-Quisquater (GQ) identity scheme is intended for use when
+ * the ntp-genkeys program generates the certificates used in the
+ * protocol and the group key can be conveyed in a certificate extension
+ * field. The scheme is self contained and independent of new
+ * generations of host keys, sign keys and certificates.
+ *
+ * The GQ identity scheme is based on RSA cryptography and algorithms
+ * described in Stinson p. 300 (with errors). The GQ values hide in a
+ * RSA cuckoo structure, but only the modulus is used. The 512-bit
+ * public modulus is n = p q, where p and q are secret large primes. The
+ * TA rolls random group key b disguised as a RSA structure member.
+ * Except for the public key, these values are shared only among group
+ * members and never revealed in messages.
+ *
+ * When rolling new certificates, Bob recomputes the private and
+ * public keys. The private key u is a random roll, while the public key
+ * is the inverse obscured by the group key v = (u^-1)^b. These values
+ * replace the private and public keys normally generated by the RSA
+ * scheme. Alice challenges Bob to confirm identity using the protocol
+ * described below.
+ *
+ * How it works
+ *
+ * The scheme goes like this. Both Alice and Bob have the same modulus n
+ * and some random b as the group key. These values are computed and
+ * distributed in advance via secret means, although only the group key
+ * b is truly secret. Each has a private random private key u and public
+ * key (u^-1)^b, although not necessarily the same ones. Bob and Alice
+ * can regenerate the key pair from time to time without affecting
+ * operations. The public key is conveyed on the certificate in an
+ * extension field; the private key is never revealed.
+ *
+ * Alice rolls new random challenge r and sends to Bob in the GQ
+ * request message. Bob rolls new random k, then computes y = k u^r mod
+ * n and x = k^b mod n and sends (y, hash(x)) to Alice in the response
+ * message. Besides making the response shorter, the hash makes it
+ * effectivey impossible for an intruder to solve for b by observing
+ * a number of these messages.
+ *
+ * Alice receives the response and computes y^b v^r mod n. After a bit
+ * of algebra, this simplifies to k^b. If the hash of this result
+ * matches hash(x), Alice knows that Bob has the group key b. The signed
+ * response binds this knowledge to Bob's private key and the public key
+ * previously received in his certificate.
+ *
+ * crypto_alice2 - construct Alice's challenge in GQ scheme
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ * XEVNT_ID bad or missing identity parameters
+ */
+static int
+crypto_alice2(
+ struct peer *peer, /* peer pointer */
+ struct value *vp /* value pointer */
+ )
+{
+ RSA *rsa; /* GQ parameters */
+ BN_CTX *bctx; /* BIGNUM context */
+ EVP_MD_CTX ctx; /* signature context */
+ tstamp_t tstamp;
+ u_int len;
+
+ /*
+ * The identity parameters must have correct format and content.
+ */
+ if (peer->ident_pkey == NULL)
+ return (XEVNT_ID);
+ if ((rsa = peer->ident_pkey->pkey.rsa) == NULL) {
+ msyslog(LOG_INFO, "crypto_alice2: defective key");
+ return (XEVNT_PUB);
}
- fclose(str);
- *(u_int *)buf = bits;
- memcpy(key, buf, keylen);
/*
- * Extract filestamp if present.
+ * Roll new random r (0 < r < n). The OpenSSL library has a bug
+ * omitting BN_rand_range, so we have to do it the hard way.
*/
- rval = readlink(filename, linkname, MAXFILENAME - 1);
- if (rval > 0) {
- linkname[rval] = '\0';
- rptr = strrchr(linkname, '.');
- } else {
- rptr = strrchr(filename, '.');
+ bctx = BN_CTX_new();
+ len = BN_num_bytes(rsa->n);
+ if (peer->iffval != NULL)
+ BN_free(peer->iffval);
+ peer->iffval = BN_new();
+ BN_rand(peer->iffval, len * 8, -1, 1); /* r mod n */
+ BN_mod(peer->iffval, peer->iffval, rsa->n, bctx);
+ BN_CTX_free(bctx);
+
+ /*
+ * Sign and send to Bob. The filestamp is from the local file.
+ */
+ tstamp = crypto_time();
+ memset(vp, 0, sizeof(struct value));
+ vp->tstamp = htonl(tstamp);
+ vp->fstamp = htonl(peer->fstamp);
+ vp->vallen = htonl(len);
+ vp->ptr = emalloc(len);
+ BN_bn2bin(peer->iffval, vp->ptr);
+ vp->siglen = 0;
+ if (tstamp == 0)
+ return (XEVNT_OK);
+ vp->sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
+ EVP_SignUpdate(&ctx, vp->ptr, len);
+ if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ vp->siglen = htonl(len);
+ return (XEVNT_OK);
+}
+
+
+/*
+ * crypto_bob2 - construct Bob's response to Alice's challenge
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ */
+static int
+crypto_bob2(
+ struct exten *ep, /* extension pointer */
+ struct value *vp /* value pointer */
+ )
+{
+ RSA *rsa; /* GQ parameters */
+ DSA_SIG *sdsa; /* DSA parameters */
+ BN_CTX *bctx; /* BIGNUM context */
+ EVP_MD_CTX ctx; /* signature context */
+ tstamp_t tstamp; /* NTP timestamp */
+ BIGNUM *r, *k, *g, *y;
+ u_char *ptr;
+ u_int len;
+
+ /*
+ * If the GQ parameters are not valid, something awful
+ * happened or we are being tormented.
+ */
+ if (!(crypto_flags & CRYPTO_FLAG_GQ)) {
+ msyslog(LOG_INFO, "crypto_bob2: scheme unavailable");
+ return (XEVNT_PUB);
+ }
+ rsa = gqpar_pkey->pkey.rsa;
+
+ /*
+ * Extract r from the challenge.
+ */
+ len = ntohl(ep->vallen);
+ if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) {
+ msyslog(LOG_ERR, "crypto_bob2 %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (XEVNT_PUB);
+ }
+
+ /*
+ * Bob rolls random k (0 < k < n), computes y = k u^r mod n and
+ * x = k^b mod n, then sends (y, hash(x)) to Alice.
+ */
+ bctx = BN_CTX_new(); k = BN_new(); g = BN_new(); y = BN_new();
+ sdsa = DSA_SIG_new();
+ BN_rand(k, len * 8, -1, 1); /* k */
+ BN_mod(k, k, rsa->n, bctx);
+ BN_mod_exp(y, rsa->p, r, rsa->n, bctx); /* u^r mod n */
+ BN_mod_mul(y, k, y, rsa->n, bctx); /* k u^r mod n */
+ sdsa->r = BN_dup(y);
+ BN_mod_exp(g, k, rsa->e, rsa->n, bctx); /* k^b mod n */
+ bighash(g, g);
+ sdsa->s = BN_dup(g);
+ BN_CTX_free(bctx);
+ BN_free(r); BN_free(k); BN_free(g); BN_free(y);
+
+ /*
+ * Encode the values in ASN.1 and sign.
+ */
+ tstamp = crypto_time();
+ memset(vp, 0, sizeof(struct value));
+ vp->tstamp = htonl(tstamp);
+ vp->fstamp = htonl(gq_fstamp);
+ len = i2d_DSA_SIG(sdsa, NULL);
+ if (len <= 0) {
+ msyslog(LOG_ERR, "crypto_bob2 %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ DSA_SIG_free(sdsa);
+ return (XEVNT_PUB);
+ }
+ vp->vallen = htonl(len);
+ ptr = emalloc(len);
+ vp->ptr = ptr;
+ i2d_DSA_SIG(sdsa, &ptr);
+ DSA_SIG_free(sdsa);
+ vp->siglen = 0;
+ if (tstamp == 0)
+ return (XEVNT_OK);
+ vp->sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
+ EVP_SignUpdate(&ctx, vp->ptr, len);
+ if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ vp->siglen = htonl(len);
+ return (XEVNT_OK);
+}
+
+
+/*
+ * crypto_gq - verify Bob's response to Alice's challenge
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ * XEVNT_FSP bad filestamp
+ * XEVNT_ID bad or missing identity parameters
+ */
+int
+crypto_gq(
+ struct exten *ep, /* extension pointer */
+ struct peer *peer /* peer structure pointer */
+ )
+{
+ RSA *rsa; /* GQ parameters */
+ BN_CTX *bctx; /* BIGNUM context */
+ DSA_SIG *sdsa; /* RSA signature context fake */
+ BIGNUM *y, *v;
+ const u_char *ptr;
+ u_int len;
+ int temp;
+
+ /*
+ * If the GQ parameters are not valid or no challenge was sent,
+ * something awful happened or we are being tormented.
+ */
+ if (peer->ident_pkey == NULL) {
+ msyslog(LOG_INFO, "crypto_gq: scheme unavailable");
+ return (XEVNT_PUB);
+ }
+ if (ntohl(ep->fstamp) != peer->fstamp) {
+ msyslog(LOG_INFO, "crypto_gq: invalid filestamp %u",
+ ntohl(ep->fstamp));
+ return (XEVNT_FSP);
+ }
+ if ((rsa = peer->ident_pkey->pkey.rsa) == NULL) {
+ msyslog(LOG_INFO, "crypto_gq: defective key");
+ return (XEVNT_PUB);
+ }
+ if (peer->iffval == NULL) {
+ msyslog(LOG_INFO, "crypto_gq: missing challenge");
+ return (XEVNT_PUB);
+ }
+
+ /*
+ * Extract the y = k u^r and hash(x = k^b) values from the
+ * response.
+ */
+ bctx = BN_CTX_new(); y = BN_new(); v = BN_new();
+ len = ntohl(ep->vallen);
+ ptr = (const u_char *)ep->pkt;
+ if ((sdsa = d2i_DSA_SIG(NULL, &ptr, len)) == NULL) {
+ msyslog(LOG_ERR, "crypto_gq %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (XEVNT_PUB);
}
- if (rptr != NULL)
- sscanf(++rptr, "%u", &fstamp);
+
+ /*
+ * Compute v^r y^b mod n.
+ */
+ BN_mod_exp(v, peer->grpkey, peer->iffval, rsa->n, bctx);
+ /* v^r mod n */
+ BN_mod_exp(y, sdsa->r, rsa->e, rsa->n, bctx); /* y^b mod n */
+ BN_mod_mul(y, v, y, rsa->n, bctx); /* v^r y^b mod n */
+
+ /*
+ * Verify the hash of the result matches hash(x).
+ */
+ bighash(y, y);
+ temp = BN_cmp(y, sdsa->s);
+ BN_CTX_free(bctx); BN_free(y); BN_free(v);
+ BN_free(peer->iffval);
+ peer->iffval = NULL;
+ DSA_SIG_free(sdsa);
+ if (temp == 0)
+ return (XEVNT_OK);
else
- fstamp = 0;
-#ifdef DEBUG
- if (debug)
- printf(
- "crypto_rsa: key file %s link %d fs %u modulus %d\n",
- cp, rval, fstamp, bits);
-#endif
- return (fstamp);
+ return (XEVNT_ID);
}
/*
- * crypto_cert - read certificate
+ ***********************************************************************
+ * *
+ * The following routines implement the Mu-Varadharajan (MV) identity *
+ * scheme *
+ * *
+ ***********************************************************************
*/
-static void
-crypto_cert(
- char *cp /* file name */
+/*
+ * The Mu-Varadharajan (MV) cryptosystem was originally intended when
+ * servers broadcast messages to clients, but clients never send
+ * messages to servers. There is one encryption key for the server and a
+ * separate decryption key for each client. It operated something like a
+ * pay-per-view satellite broadcasting system where the session key is
+ * encrypted by the broadcaster and the decryption keys are held in a
+ * tamperproof set-top box.
+ *
+ * The MV parameters and private encryption key hide in a DSA cuckoo
+ * structure which uses the same parameters, but generated in a
+ * different way. The values are used in an encryption scheme similar to
+ * El Gamal cryptography and a polynomial formed from the expansion of
+ * product terms (x - x[j]), as described in Mu, Y., and V.
+ * Varadharajan: Robust and Secure Broadcasting, Proc. Indocrypt 2001,
+ * 223-231. The paper has significant errors and serious omissions.
+ *
+ * Let q be the product of n distinct primes s'[j] (j = 1...n), where
+ * each s'[j] has m significant bits. Let p be a prime p = 2 * q + 1, so
+ * that q and each s'[j] divide p - 1 and p has M = n * m + 1
+ * significant bits. The elements x mod q of Zq with the elements 2 and
+ * the primes removed form a field Zq* valid for polynomial arithetic.
+ * Let g be a generator of Zp; that is, gcd(g, p - 1) = 1 and g^q = 1
+ * mod p. We expect M to be in the 500-bit range and n relatively small,
+ * like 25, so the likelihood of a randomly generated element of x mod q
+ * of Zq colliding with a factor of p - 1 is very small and can be
+ * avoided. Associated with each s'[j] is an element s[j] such that s[j]
+ * s'[j] = s'[j] mod q. We find s[j] as the quotient (q + s'[j]) /
+ * s'[j]. These are the parameters of the scheme and they are expensive
+ * to compute.
+ *
+ * We set up an instance of the scheme as follows. A set of random
+ * values x[j] mod q (j = 1...n), are generated as the zeros of a
+ * polynomial of order n. The product terms (x - x[j]) are expanded to
+ * form coefficients a[i] mod q (i = 0...n) in powers of x. These are
+ * used as exponents of the generator g mod p to generate the private
+ * encryption key A. The pair (gbar, ghat) of public server keys and the
+ * pairs (xbar[j], xhat[j]) (j = 1...n) of private client keys are used
+ * to construct the decryption keys. The devil is in the details.
+ *
+ * The distinguishing characteristic of this scheme is the capability to
+ * revoke keys. Included in the calculation of E, gbar and ghat is the
+ * product s = prod(s'[j]) (j = 1...n) above. If the factor s'[j] is
+ * subsequently removed from the product and E, gbar and ghat
+ * recomputed, the jth client will no longer be able to compute E^-1 and
+ * thus unable to decrypt the block.
+ *
+ * How it works
+ *
+ * The scheme goes like this. Bob has the server values (p, A, q, gbar,
+ * ghat) and Alice the client values (p, xbar, xhat).
+ *
+ * Alice rolls new random challenge r (0 < r < p) and sends to Bob in
+ * the MV request message. Bob rolls new random k (0 < k < q), encrypts
+ * y = A^k mod p (a permutation) and sends (hash(y), gbar^k, ghat^k) to
+ * Alice.
+ *
+ * Alice receives the response and computes the decryption key (the
+ * inverse permutation) from previously obtained (xbar, xhat) and
+ * (gbar^k, ghat^k) in the message. She computes the inverse, which is
+ * unique by reasons explained in the ntp-keygen.c program sources. If
+ * the hash of this result matches hash(y), Alice knows that Bob has the
+ * group key b. The signed response binds this knowledge to Bob's
+ * private key and the public key previously received in his
+ * certificate.
+ *
+ * crypto_alice3 - construct Alice's challenge in MV scheme
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ * XEVNT_ID bad or missing identity parameters
+ */
+static int
+crypto_alice3(
+ struct peer *peer, /* peer pointer */
+ struct value *vp /* value pointer */
)
{
- u_char buf[5000]; /* file line buffer */
- char filename[MAXFILENAME]; /* name of certificate file */
- char linkname[MAXFILENAME]; /* file link (for filestamp) */
- u_int fstamp; /* filestamp */
- u_int32 *pp;
- u_int len;
- char *rptr;
- int rval, fd;
+ DSA *dsa; /* MV parameters */
+ BN_CTX *bctx; /* BIGNUM context */
+ EVP_MD_CTX ctx; /* signature context */
+ tstamp_t tstamp;
+ u_int len;
/*
- * Open the file and discard comment lines. If the first
- * character of the file name is not '/', prepend the keys
- * directory string. If the file is not found, not to worry; it
- * can be retrieved over the net. But, if it is found with
- * errors, we crash and burn.
+ * The identity parameters must have correct format and content.
*/
- if (*cp == '/')
- strcpy(filename, cp);
+ if (peer->ident_pkey == NULL)
+ return (XEVNT_ID);
+ if ((dsa = peer->ident_pkey->pkey.dsa) == NULL) {
+ msyslog(LOG_INFO, "crypto_alice3: defective key");
+ return (XEVNT_PUB);
+ }
+
+ /*
+ * Roll new random r (0 < r < q). The OpenSSL library has a bug
+ * omitting BN_rand_range, so we have to do it the hard way.
+ */
+ bctx = BN_CTX_new();
+ len = BN_num_bytes(dsa->p);
+ if (peer->iffval != NULL)
+ BN_free(peer->iffval);
+ peer->iffval = BN_new();
+ BN_rand(peer->iffval, len * 8, -1, 1); /* r */
+ BN_mod(peer->iffval, peer->iffval, dsa->p, bctx);
+ BN_CTX_free(bctx);
+
+ /*
+ * Sign and send to Bob. The filestamp is from the local file.
+ */
+ tstamp = crypto_time();
+ memset(vp, 0, sizeof(struct value));
+ vp->tstamp = htonl(tstamp);
+ vp->fstamp = htonl(peer->fstamp);
+ vp->vallen = htonl(len);
+ vp->ptr = emalloc(len);
+ BN_bn2bin(peer->iffval, vp->ptr);
+ vp->siglen = 0;
+ if (tstamp == 0)
+ return (XEVNT_OK);
+ vp->sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
+ EVP_SignUpdate(&ctx, vp->ptr, len);
+ if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ vp->siglen = htonl(len);
+ return (XEVNT_OK);
+}
+
+
+/*
+ * crypto_bob3 - construct Bob's response to Alice's challenge
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ */
+static int
+crypto_bob3(
+ struct exten *ep, /* extension pointer */
+ struct value *vp /* value pointer */
+ )
+{
+ DSA *dsa; /* MV parameters */
+ DSA *sdsa; /* DSA signature context fake */
+ BN_CTX *bctx; /* BIGNUM context */
+ EVP_MD_CTX ctx; /* signature context */
+ tstamp_t tstamp; /* NTP timestamp */
+ BIGNUM *r, *k, *u;
+ u_char *ptr;
+ u_int len;
+
+ /*
+ * If the MV parameters are not valid, something awful
+ * happened or we are being tormented.
+ */
+ if (!(crypto_flags & CRYPTO_FLAG_MV)) {
+ msyslog(LOG_INFO, "crypto_bob3: scheme unavailable");
+ return (XEVNT_PUB);
+ }
+ dsa = mvpar_pkey->pkey.dsa;
+
+ /*
+ * Extract r from the challenge.
+ */
+ len = ntohl(ep->vallen);
+ if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) {
+ msyslog(LOG_ERR, "crypto_bob3 %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (XEVNT_PUB);
+ }
+
+ /*
+ * Bob rolls random k (0 < k < q), making sure it is not a
+ * factor of q. He then computes y = A^k r and sends (hash(y),
+ * gbar^k, ghat^k) to Alice.
+ */
+ bctx = BN_CTX_new(); k = BN_new(); u = BN_new();
+ sdsa = DSA_new();
+ sdsa->p = BN_new(); sdsa->q = BN_new(); sdsa->g = BN_new();
+ while (1) {
+ BN_rand(k, BN_num_bits(dsa->q), 0, 0);
+ BN_mod(k, k, dsa->q, bctx);
+ BN_gcd(u, k, dsa->q, bctx);
+ if (BN_is_one(u))
+ break;
+ }
+ BN_mod_exp(u, dsa->g, k, dsa->p, bctx); /* A r */
+ BN_mod_mul(u, u, r, dsa->p, bctx);
+ bighash(u, sdsa->p);
+ BN_mod_exp(sdsa->q, dsa->priv_key, k, dsa->p, bctx); /* gbar */
+ BN_mod_exp(sdsa->g, dsa->pub_key, k, dsa->p, bctx); /* ghat */
+ BN_CTX_free(bctx); BN_free(k); BN_free(r); BN_free(u);
+
+ /*
+ * Encode the values in ASN.1 and sign.
+ */
+ tstamp = crypto_time();
+ memset(vp, 0, sizeof(struct value));
+ vp->tstamp = htonl(tstamp);
+ vp->fstamp = htonl(mv_fstamp);
+ len = i2d_DSAparams(sdsa, NULL);
+ if (len <= 0) {
+ msyslog(LOG_ERR, "crypto_bob3 %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ DSA_free(sdsa);
+ return (XEVNT_PUB);
+ }
+ vp->vallen = htonl(len);
+ ptr = emalloc(len);
+ vp->ptr = ptr;
+ i2d_DSAparams(sdsa, &ptr);
+ DSA_free(sdsa);
+ vp->siglen = 0;
+ if (tstamp == 0)
+ return (XEVNT_OK);
+ vp->sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
+ EVP_SignUpdate(&ctx, vp->ptr, len);
+ if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ vp->siglen = htonl(len);
+ return (XEVNT_OK);
+}
+
+
+/*
+ * crypto_mv - verify Bob's response to Alice's challenge
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ * XEVNT_FSP bad filestamp
+ * XEVNT_ID bad or missing identity parameters
+ */
+int
+crypto_mv(
+ struct exten *ep, /* extension pointer */
+ struct peer *peer /* peer structure pointer */
+ )
+{
+ DSA *dsa; /* MV parameters */
+ DSA *sdsa; /* DSA parameters */
+ BN_CTX *bctx; /* BIGNUM context */
+ BIGNUM *k, *u, *v;
+ u_int len;
+ const u_char *ptr;
+ int temp;
+
+ /*
+ * If the MV parameters are not valid or no challenge was sent,
+ * something awful happened or we are being tormented.
+ */
+ if (peer->ident_pkey == NULL) {
+ msyslog(LOG_INFO, "crypto_mv: scheme unavailable");
+ return (XEVNT_PUB);
+ }
+ if (ntohl(ep->fstamp) != peer->fstamp) {
+ msyslog(LOG_INFO, "crypto_mv: invalid filestamp %u",
+ ntohl(ep->fstamp));
+ return (XEVNT_FSP);
+ }
+ if ((dsa = peer->ident_pkey->pkey.dsa) == NULL) {
+ msyslog(LOG_INFO, "crypto_mv: defective key");
+ return (XEVNT_PUB);
+ }
+ if (peer->iffval == NULL) {
+ msyslog(LOG_INFO, "crypto_mv: missing challenge");
+ return (XEVNT_PUB);
+ }
+
+ /*
+ * Extract the (hash(y), gbar, ghat) values from the response.
+ */
+ bctx = BN_CTX_new(); k = BN_new(); u = BN_new(); v = BN_new();
+ len = ntohl(ep->vallen);
+ ptr = (const u_char *)ep->pkt;
+ if ((sdsa = d2i_DSAparams(NULL, &ptr, len)) == NULL) {
+ msyslog(LOG_ERR, "crypto_mv %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (XEVNT_PUB);
+ }
+
+ /*
+ * Compute (gbar^xhat ghat^xbar)^-1 mod p.
+ */
+ BN_mod_exp(u, sdsa->q, dsa->pub_key, dsa->p, bctx);
+ BN_mod_exp(v, sdsa->g, dsa->priv_key, dsa->p, bctx);
+ BN_mod_mul(u, u, v, dsa->p, bctx);
+ BN_mod_inverse(u, u, dsa->p, bctx);
+ BN_mod_mul(v, u, peer->iffval, dsa->p, bctx);
+
+ /*
+ * The result should match the hash of r mod p.
+ */
+ bighash(v, v);
+ temp = BN_cmp(v, sdsa->p);
+ BN_CTX_free(bctx); BN_free(k); BN_free(u); BN_free(v);
+ BN_free(peer->iffval);
+ peer->iffval = NULL;
+ DSA_free(sdsa);
+ if (temp == 0)
+ return (XEVNT_OK);
else
- snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp);
- fd = open(filename, O_RDONLY, 0777);
- if (fd <= 0) {
+ return (XEVNT_ID);
+}
+
+
+/*
+ ***********************************************************************
+ * *
+ * The following routines are used to manipulate certificates *
+ * *
+ ***********************************************************************
+ */
+/*
+ * cert_parse - parse x509 certificate and create info/value structures.
+ *
+ * The server certificate includes the version number, issuer name,
+ * subject name, public key and valid date interval. If the issuer name
+ * is the same as the subject name, the certificate is self signed and
+ * valid only if the server is configured as trustable. If the names are
+ * different, another issuer has signed the server certificate and
+ * vouched for it. In this case the server certificate is valid if
+ * verified by the issuer public key.
+ *
+ * Returns certificate info/value pointer if valid, NULL if not.
+ */
+struct cert_info * /* certificate information structure */
+cert_parse(
+ u_char *asn1cert, /* X509 certificate */
+ u_int len, /* certificate length */
+ tstamp_t fstamp /* filestamp */
+ )
+{
+ X509 *cert; /* X509 certificate */
+ X509_EXTENSION *ext; /* X509v3 extension */
+ struct cert_info *ret; /* certificate info/value */
+ BIO *bp;
+ X509V3_EXT_METHOD *method;
+ char pathbuf[MAXFILENAME];
+ u_char *uptr;
+ char *ptr;
+ int temp, cnt, i;
+
+ /*
+ * Decode ASN.1 objects and construct certificate structure.
+ */
+ uptr = asn1cert;
+ if ((cert = d2i_X509(NULL, &uptr, len)) == NULL) {
+ msyslog(LOG_ERR, "cert_parse %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (NULL);
+ }
+
+ /*
+ * Extract version, subject name and public key.
+ */
+ ret = emalloc(sizeof(struct cert_info));
+ memset(ret, 0, sizeof(struct cert_info));
+ if ((ret->pkey = X509_get_pubkey(cert)) == NULL) {
+ msyslog(LOG_ERR, "cert_parse %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ cert_free(ret);
+ X509_free(cert);
+ return (NULL);
+ }
+ ret->version = X509_get_version(cert);
+ X509_NAME_oneline(X509_get_subject_name(cert), pathbuf,
+ MAXFILENAME - 1);
+ ptr = strstr(pathbuf, "CN=");
+ if (ptr == NULL) {
+ msyslog(LOG_INFO, "cert_parse: invalid subject %s",
+ pathbuf);
+ cert_free(ret);
+ X509_free(cert);
+ return (NULL);
+ }
+ ret->subject = emalloc(strlen(ptr) + 1);
+ strcpy(ret->subject, ptr + 3);
+
+ /*
+ * Extract remaining objects. Note that the NTP serial number is
+ * the NTP seconds at the time of signing, but this might not be
+ * the case for other authority. We don't bother to check the
+ * objects at this time, since the real crunch can happen only
+ * when the time is valid but not yet certificated.
+ */
+ ret->nid = OBJ_obj2nid(cert->cert_info->signature->algorithm);
+ ret->digest = (const EVP_MD *)EVP_get_digestbynid(ret->nid);
+ ret->serial =
+ (u_long)ASN1_INTEGER_get(X509_get_serialNumber(cert));
+ X509_NAME_oneline(X509_get_issuer_name(cert), pathbuf,
+ MAXFILENAME);
+ if ((ptr = strstr(pathbuf, "CN=")) == NULL) {
+ msyslog(LOG_INFO, "cert_parse: invalid issuer %s",
+ pathbuf);
+ cert_free(ret);
+ X509_free(cert);
+ return (NULL);
+ }
+ ret->issuer = emalloc(strlen(ptr) + 1);
+ strcpy(ret->issuer, ptr + 3);
+ ret->first = asn2ntp(X509_get_notBefore(cert));
+ ret->last = asn2ntp(X509_get_notAfter(cert));
+
+ /*
+ * Extract extension fields. These are ad hoc ripoffs of
+ * currently assigned functions and will certainly be changed
+ * before prime time.
+ */
+ cnt = X509_get_ext_count(cert);
+ for (i = 0; i < cnt; i++) {
+ ext = X509_get_ext(cert, i);
+ method = X509V3_EXT_get(ext);
+ temp = OBJ_obj2nid(ext->object);
+ switch (temp) {
+
+ /*
+ * If a key_usage field is present, we decode whether
+ * this is a trusted or private certificate. This is
+ * dorky; all we want is to compare NIDs, but OpenSSL
+ * insists on BIO text strings.
+ */
+ case NID_ext_key_usage:
+ bp = BIO_new(BIO_s_mem());
+ X509V3_EXT_print(bp, ext, 0, 0);
+ BIO_gets(bp, pathbuf, MAXFILENAME);
+ BIO_free(bp);
+#if DEBUG
+ if (debug)
+ printf("cert_parse: %s: %s\n",
+ OBJ_nid2ln(temp), pathbuf);
+#endif
+ if (strcmp(pathbuf, "Trust Root") == 0)
+ ret->flags |= CERT_TRUST;
+ else if (strcmp(pathbuf, "Private") == 0)
+ ret->flags |= CERT_PRIV;
+ break;
+
+ /*
+ * If a NID_subject_key_identifier field is present, it
+ * contains the GQ public key.
+ */
+ case NID_subject_key_identifier:
+ ret->grplen = ext->value->length - 2;
+ ret->grpkey = emalloc(ret->grplen);
+ memcpy(ret->grpkey, &ext->value->data[2],
+ ret->grplen);
+ break;
+ }
+ }
+
+ /*
+ * If certificate is self signed, verify signature.
+ */
+ if (strcmp(ret->subject, ret->issuer) == 0) {
+ if (!X509_verify(cert, ret->pkey)) {
+ msyslog(LOG_INFO,
+ "cert_parse: invalid signature not verified %s",
+ pathbuf);
+ cert_free(ret);
+ X509_free(cert);
+ return (NULL);
+ }
+ }
+
+ /*
+ * Verify certificate valid times. Note that certificates cannot
+ * be retroactive.
+ */
+ if (ret->first > ret->last || ret->first < fstamp) {
msyslog(LOG_INFO,
- "crypto: certificate file %s not found",
- filename);
- return;
+ "cert_parse: expired %s",
+ ret->subject);
+ cert_free(ret);
+ X509_free(cert);
+ return (NULL);
}
/*
- * We are rather paranoid here, since an intruder might cause a
- * coredump by infiltrating naughty values.
+ * Build the value structure to sign and send later.
*/
- rval = RV_OK;
- len = read(fd, buf, 5000);
- close(fd);
- if (rval != RV_OK) {
- msyslog(LOG_ERR,
- "crypto: certificate file %s error %d", cp,
- rval);
- exit (-1);
+ ret->cert.fstamp = htonl(fstamp);
+ ret->cert.vallen = htonl(len);
+ ret->cert.ptr = emalloc(len);
+ memcpy(ret->cert.ptr, asn1cert, len);
+#ifdef DEBUG
+ if (debug > 1)
+ X509_print_fp(stdout, cert);
+#endif
+ X509_free(cert);
+ return (ret);
+}
+
+
+/*
+ * cert_sign - sign x509 certificate and update value structure.
+ *
+ * The certificate request is a copy of the client certificate, which
+ * includes the version number, subject name and public key of the
+ * client. The resulting certificate includes these values plus the
+ * serial number, issuer name and validity interval of the server. The
+ * validity interval extends from the current time to the same time one
+ * year hence. For NTP purposes, it is convenient to use the NTP seconds
+ * of the current time as the serial number.
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PUB bad or missing public key
+ * XEVNT_CRT bad or missing certificate
+ * XEVNT_VFY certificate not verified
+ */
+static int
+cert_sign(
+ struct exten *ep, /* extension field pointer */
+ struct value *vp /* value pointer */
+ )
+{
+ X509 *req; /* X509 certificate request */
+ X509 *cert; /* X509 certificate */
+ X509_EXTENSION *ext; /* certificate extension */
+ ASN1_INTEGER *serial; /* serial number */
+ X509_NAME *subj; /* distinguished (common) name */
+ EVP_PKEY *pkey; /* public key */
+ EVP_MD_CTX ctx; /* message digest context */
+ tstamp_t tstamp; /* NTP timestamp */
+ u_int len;
+ u_char *ptr;
+ int i, temp;
+
+ /*
+ * Decode ASN.1 objects and construct certificate structure.
+ */
+ tstamp = crypto_time();
+ if (tstamp == 0)
+ return (XEVNT_TSP);
+
+ ptr = (u_char *)ep->pkt;
+ if ((req = d2i_X509(NULL, &ptr, ntohl(ep->vallen))) == NULL) {
+ msyslog(LOG_ERR, "cert_sign %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (XEVNT_CRT);
+ }
+ /*
+ * Extract public key and check for errors.
+ */
+ if ((pkey = X509_get_pubkey(req)) == NULL) {
+ msyslog(LOG_ERR, "cert_sign %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ X509_free(req);
+ return (XEVNT_PUB);
}
/*
- * The extension field entry consists of the raw certificate.
+ * Generate X509 certificate signed by this server. For this
+ * prupose the issuer name is the server name. Also copy any
+ * extensions that might be present.
*/
- certif.vallen = htonl(200); /* xxxxxxxxxxxxxxxxxx */
- pp = emalloc(len);
- certif.ptr = (u_char *)pp;
- memcpy(pp, buf, len);
- certif.sig = emalloc(private_key.bits / 8);
- crypto_flags |= CRYPTO_FLAG_CERT;
+ cert = X509_new();
+ X509_set_version(cert, X509_get_version(req));
+ serial = ASN1_INTEGER_new();
+ ASN1_INTEGER_set(serial, tstamp);
+ X509_set_serialNumber(cert, serial);
+ X509_gmtime_adj(X509_get_notBefore(cert), 0L);
+ X509_gmtime_adj(X509_get_notAfter(cert), YEAR);
+ subj = X509_get_issuer_name(cert);
+ X509_NAME_add_entry_by_txt(subj, "commonName", MBSTRING_ASC,
+ (unsigned char *) sys_hostname, strlen(sys_hostname), -1, 0);
+ subj = X509_get_subject_name(req);
+ X509_set_subject_name(cert, subj);
+ X509_set_pubkey(cert, pkey);
+ ext = X509_get_ext(req, 0);
+ temp = X509_get_ext_count(req);
+ for (i = 0; i < temp; i++) {
+ ext = X509_get_ext(req, i);
+ X509_add_ext(cert, ext, -1);
+ }
+ X509_free(req);
/*
- * Extract filestamp if present.
+ * Sign and verify the certificate.
*/
- rval = readlink(filename, linkname, MAXFILENAME - 1);
- if (rval > 0) {
- linkname[rval] = '\0';
- rptr = strrchr(linkname, '.');
- } else {
- rptr = strrchr(filename, '.');
+ X509_sign(cert, sign_pkey, sign_digest);
+ if (!X509_verify(cert, sign_pkey)) {
+ printf("cert_sign\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ X509_free(cert);
+ return (XEVNT_VFY);
}
- if (rptr != NULL)
- sscanf(++rptr, "%u", &fstamp);
- else
- fstamp = 0;
- certif.fstamp = htonl(fstamp);
+ len = i2d_X509(cert, NULL);
+
+ /*
+ * Build and sign the value structure. We have to sign it here,
+ * since the response has to be returned right away. This is a
+ * clogging hazard.
+ */
+ memset(vp, 0, sizeof(struct value));
+ vp->tstamp = htonl(tstamp);
+ vp->fstamp = ep->fstamp;
+ vp->vallen = htonl(len);
+ vp->ptr = emalloc(len);
+ ptr = vp->ptr;
+ i2d_X509(cert, &ptr);
+ vp->siglen = 0;
+ vp->sig = emalloc(sign_siglen);
+ EVP_SignInit(&ctx, sign_digest);
+ EVP_SignUpdate(&ctx, (u_char *)vp, 12);
+ EVP_SignUpdate(&ctx, vp->ptr, len);
+ if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ vp->siglen = htonl(len);
#ifdef DEBUG
- if (debug)
- printf(
- "crypto_cert: certif file %s link %d fs %u len %d\n",
- cp, rval, fstamp, len);
+ if (debug > 1)
+ X509_print_fp(stdout, cert);
#endif
+ X509_free(cert);
+ return (XEVNT_OK);
}
/*
- * crypto_dh - read agreement parameters, decode and check for errors.
+ * cert_valid - verify certificate with given public key
+ *
+ * This is pretty ugly, as the certificate has to be verified in the
+ * OpenSSL X509 structure, not in the DER format in the info/value
+ * structure.
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_VFY certificate not verified
*/
-static void
-crypto_dh(
- char *cp /* file name */
+int
+cert_valid(
+ struct cert_info *cinf, /* certificate information structure */
+ EVP_PKEY *pkey /* public key */
)
{
- FILE *str; /* file handle */
- u_char buf[MAX_LINLEN]; /* file line buffer */
- u_char encoded_key[MAX_ENCLEN]; /* encoded key buffer */
- u_char prime[MAX_KEYLEN]; /* decoded prime */
- u_char generator[MAX_KEYLEN]; /* decode generator */
- u_int primelen; /* prime length (octets) */
- u_int generatorlen; /* generator length (octets) */
- char filename[MAXFILENAME]; /* name of parameter file */
- char linkname[MAXFILENAME]; /* file link (for filestamp) */
- u_int fstamp; /* filestamp */
- u_int32 *pp;
- u_int len;
- char *rptr;
- int rval;
+ X509 *cert; /* X509 certificate */
+ u_char *ptr;
+
+ if (cinf->flags & CERT_SIGN)
+ return (XEVNT_OK);
+ ptr = (u_char *)cinf->cert.ptr;
+ cert = d2i_X509(NULL, &ptr, ntohl(cinf->cert.vallen));
+ if (!X509_verify(cert, pkey))
+ return (XEVNT_VFY);
+ cinf->flags |= CERT_SIGN;
+ X509_free(cert);
+ return (XEVNT_OK);
+}
+
+
+/*
+ * cert - install certificate in certificate list
+ *
+ * This routine encodes an extension field into a certificate info/value
+ * structure. It searches the certificate list for duplicates and
+ * expunges whichever is older. It then searches the list for other
+ * certificates that might be verified by this latest one. Finally, it
+ * inserts this certificate first on the list.
+ *
+ * Returns
+ * XEVNT_OK success
+ * XEVNT_PER certificate expired
+ * XEVNT_CRT bad or missing certificate
+ */
+int
+cert_install(
+ struct exten *ep, /* cert info/value */
+ struct peer *peer /* peer structure */
+ )
+{
+ struct cert_info *cp, *xp, *yp, **zp;
+ int rval;
+ tstamp_t tstamp;
/*
- * Open the file and discard comment lines. If the first
- * character of the file name is not '/', prepend the keys
- * directory string. If the file is not found, not to worry; it
- * can be retrieved over the net. But, if it is found with
- * errors, we crash and burn.
+ * Parse and validate the signed certificate. If valid,
+ * construct the info/value structure; otherwise, scamper home.
+ * Note this allows a certificate not-before time to be in the
+ * future, but not a not-after time to be in the past.
+ */
+ if ((cp = cert_parse((u_char *)ep->pkt, ntohl(ep->vallen),
+ ntohl(ep->fstamp))) == NULL)
+ return (XEVNT_CRT);
+
+ tstamp = crypto_time();
+ if (tstamp > cp->last) {
+ cert_free(cp);
+ return (XEVNT_PER);
+ }
+
+ /*
+ * Scan certificate list looking for another certificate with
+ * the same subject and issuer. If another is found with the
+ * same or older filestamp, unlink it and return the goodies to
+ * the heap. If another is found with a later filetsamp, discard
+ * the new one and leave the building.
+ */
+ rval = XEVNT_OK;
+ yp = cp;
+ zp = &cinfo;
+ for (xp = cinfo; xp != NULL; xp = xp->link) {
+ if (strcmp(cp->subject, xp->subject) == 0 &&
+ strcmp(cp->issuer, xp->issuer) == 0) {
+ if (ntohl(cp->cert.fstamp) <=
+ ntohl(xp->cert.fstamp)) {
+ *zp = xp->link;;
+ cert_free(xp);
+ } else {
+ cert_free(cp);
+ return (XEVNT_TSP);
+ }
+ break;
+ }
+ zp = &xp->link;
+ }
+ yp->link = cinfo;
+ cinfo = yp;
+
+ /*
+ * Scan the certificate list to see if Y is signed by X.
+ */
+ for (yp = cinfo; yp != NULL; yp = yp->link) {
+ for (xp = cinfo; xp != NULL; xp = xp->link) {
+ if (yp->flags & CERT_ERROR)
+ continue;
+
+ /*
+ * If issuer Y matches subject X and signature Y
+ * is valid using public key X, then Y is valid.
+ */
+ if (strcmp(yp->issuer, xp->subject) != 0)
+ continue;
+
+ if (cert_valid(yp, xp->pkey) != XEVNT_OK) {
+ yp->flags |= CERT_ERROR;
+ continue;
+ }
+ xp->flags |= CERT_SIGN;
+
+ /*
+ * If X is trusted, then Y is trusted. Note that
+ * we might stumble over a self signed
+ * certificate that is not trusted, at least
+ * temporarily. This can happen when a dude
+ * first comes up, but has not synchronized the
+ * clock and had its certificate signed by its
+ * server. In case of broken certificate trail,
+ * this might result in a loop that could
+ * persist until timeout.
+ */
+ if (!(xp->flags & CERT_TRUST))
+ continue;
+
+ yp->flags |= CERT_TRUST;
+
+ /*
+ * If subject Y matches the server subject name,
+ * then Y has completed the certificate trail.
+ * Save the group key and light the valid bit.
+ */
+ if (strcmp(yp->subject, peer->subject) != 0)
+ continue;
+
+ if (yp->grpkey != NULL) {
+ if (peer->grpkey != NULL)
+ BN_free(peer->grpkey);
+ peer->grpkey = BN_bin2bn(yp->grpkey,
+ yp->grplen, NULL);
+ }
+ peer->crypto |= CRYPTO_FLAG_VALID;
+
+ /*
+ * If the server has an an identity scheme,
+ * fetch the identity credentials. If not, the
+ * identity is verified only by the trusted
+ * certificate. The next signature will set the
+ * server proventic.
+ */
+ if (peer->crypto & (CRYPTO_FLAG_GQ |
+ CRYPTO_FLAG_IFF | CRYPTO_FLAG_MV))
+ continue;
+
+ peer->crypto |= CRYPTO_FLAG_VRFY;
+ }
+ }
+
+ /*
+ * That was awesome. Now update the timestamps and signatures.
+ */
+ crypto_update();
+ return (rval);
+}
+
+
+/*
+ * cert_free - free certificate information structure
+ */
+void
+cert_free(
+ struct cert_info *cinf /* certificate info/value structure */
+ )
+{
+ if (cinf->pkey != NULL)
+ EVP_PKEY_free(cinf->pkey);
+ if (cinf->subject != NULL)
+ free(cinf->subject);
+ if (cinf->issuer != NULL)
+ free(cinf->issuer);
+ if (cinf->grpkey != NULL)
+ free(cinf->grpkey);
+ value_free(&cinf->cert);
+ free(cinf);
+}
+
+
+/*
+ ***********************************************************************
+ * *
+ * The following routines are used only at initialization time *
+ * *
+ ***********************************************************************
+ */
+/*
+ * crypto_key - load cryptographic parameters and keys from files
+ *
+ * This routine loads a PEM-encoded public/private key pair and extracts
+ * the filestamp from the file name.
+ *
+ * Returns public key pointer if valid, NULL if not. Side effect updates
+ * the filestamp if valid.
+ */
+static EVP_PKEY *
+crypto_key(
+ char *cp, /* file name */
+ tstamp_t *fstamp /* filestamp */
+ )
+{
+ FILE *str; /* file handle */
+ EVP_PKEY *pkey = NULL; /* public/private key */
+ char filename[MAXFILENAME]; /* name of key file */
+ char linkname[MAXFILENAME]; /* filestamp buffer) */
+ char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
+ char *ptr;
+
+ /*
+ * Open the key file. If the first character of the file name is
+ * not '/', prepend the keys directory string. If something goes
+ * wrong, abandon ship.
*/
if (*cp == '/')
strcpy(filename, cp);
else
snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp);
str = fopen(filename, "r");
- if (str == NULL) {
- msyslog(LOG_INFO,
- "crypto: parameters file %s not found", filename);
- return;
- }
+ if (str == NULL)
+ return (NULL);
/*
- * Ignore initial comments and empty lines.
+ * Read the filestamp, which is contained in the first line.
*/
- while ((rptr = fgets(buf, MAX_LINLEN - 1, str)) != NULL) {
- if (strlen(buf) < 1)
- continue;
- if (*buf == '#' || *buf == '\r' || *buf == '\0')
- continue;
- break;
+ if ((ptr = fgets(linkname, MAXFILENAME, str)) == NULL) {
+ msyslog(LOG_ERR, "crypto_key: no data %s\n",
+ filename);
+ return (NULL);
+ }
+ if ((ptr = strrchr(ptr, '.')) == NULL) {
+ msyslog(LOG_ERR, "crypto_key: no filestamp %s\n",
+ filename);
+ return (NULL);
+ }
+ if (sscanf(++ptr, "%u", fstamp) != 1) {
+ msyslog(LOG_ERR, "crypto_key: invalid timestamp %s\n",
+ filename);
+ return (NULL);
}
/*
- * We are rather paranoid here, since an intruder might cause a
- * coredump by infiltrating a naughty key. There must be two
- * lines; the first contains the prime, the second the
- * generator. Each line must contain a single integer followed
- * by a PEM encoded, null-terminated string.
- */
- if (rptr == NULL)
- rval = RV_DAT;
- else if (sscanf(buf, "%u %s", &primelen, encoded_key) != 2)
- rval = RV_DAT;
- else if (primelen > MAX_KEYLEN)
- rval = RV_KEY;
- else if (R_DecodePEMBlock(prime, &len, encoded_key,
- strlen(encoded_key)))
- rval = RV_DEC;
- else if (primelen != len || primelen >
- DECODED_CONTENT_LEN(strlen(encoded_key)))
- rval = RV_DAT;
- else if (fscanf(str, "%u %s", &generatorlen, encoded_key) != 2)
- rval = RV_DAT;
- else if (generatorlen > MAX_KEYLEN)
- rval = RV_KEY;
- else if (R_DecodePEMBlock(generator, &len, encoded_key,
- strlen(encoded_key)))
- rval = RV_DEC;
- else if (generatorlen != len || generatorlen >
- DECODED_CONTENT_LEN(strlen(encoded_key)))
- rval = RV_DAT;
- else
- rval = RV_OK;
- if (rval != RV_OK) {
- msyslog(LOG_ERR,
- "crypto: parameters file %s error %x", cp,
- rval);
- exit (-1);
- }
+ * Read and decrypt PEM-encoded private key.
+ */
+ pkey = PEM_read_PrivateKey(str, NULL, NULL, passwd);
fclose(str);
+ if (pkey == NULL) {
+ msyslog(LOG_ERR, "crypto_key %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (NULL);
+ }
/*
- * Initialize agreement parameters and extension field in
- * network byte order. Note the private key length is set
- * arbitrarily at half the prime length.
+ * Leave tracks in the cryptostats.
*/
- len = 4 + primelen + 4 + generatorlen;
- dhparam.vallen = htonl(len);
- pp = emalloc(len);
- dhparam.ptr = (u_char *)pp;
- *pp++ = htonl(primelen);
- memcpy(pp, prime, primelen);
- dh_params.prime = (u_char *)pp;
- pp += primelen / 4;
- *pp++ = htonl(generatorlen);
- memcpy(pp, &generator, generatorlen);
- dh_params.generator = (u_char *)pp;
+ if ((ptr = strrchr(linkname, '\n')) != NULL)
+ *ptr = '\0';
+ sprintf(statstr, "%s mod %d", &linkname[2],
+ EVP_PKEY_size(pkey) * 8);
+ record_crypto_stats(NULL, statstr);
+#ifdef DEBUG
+ if (debug)
+ printf("crypto_key: %s\n", statstr);
+ if (debug > 1) {
+ if (EVP_MD_type(pkey) == EVP_PKEY_DSA)
+ DSA_print_fp(stdout, pkey->pkey.dsa, 0);
+ else
+ RSA_print_fp(stdout, pkey->pkey.rsa, 0);
+ }
+#endif
+ return (pkey);
+}
- dh_params.primeLen = primelen;
- dh_params.generatorLen = generatorlen;
- dh_keyLen = primelen / 2;
- dh_private = emalloc(dh_keyLen);
- dhparam.sig = emalloc(private_key.bits / 8);
- crypto_flags |= CRYPTO_FLAG_DH;
+
+/*
+ * crypto_cert - load certificate from file
+ *
+ * This routine loads a X.509 RSA or DSA certificate from a file and
+ * constructs a info/cert value structure for this machine. The
+ * structure includes a filestamp extracted from the file name. Later
+ * the certificate can be sent to another machine by request.
+ *
+ * Returns certificate info/value pointer if valid, NULL if not.
+ */
+static struct cert_info * /* certificate information */
+crypto_cert(
+ char *cp /* file name */
+ )
+{
+ struct cert_info *ret; /* certificate information */
+ FILE *str; /* file handle */
+ char filename[MAXFILENAME]; /* name of certificate file */
+ char linkname[MAXFILENAME]; /* filestamp buffer */
+ char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
+ tstamp_t fstamp; /* filestamp */
+ long len;
+ char *ptr;
+ char *name, *header;
+ u_char *data;
/*
- * Initialize public value extension field.
+ * Open the certificate file. If the first character of the file
+ * name is not '/', prepend the keys directory string. If
+ * something goes wrong, abandon ship.
*/
- dhpub.vallen = htonl(dh_params.primeLen);
- dhpub.ptr = emalloc(dh_params.primeLen);
- dhpub.sig = emalloc(private_key.bits / 8);
+ if (*cp == '/')
+ strcpy(filename, cp);
+ else
+ snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp);
+ str = fopen(filename, "r");
+ if (str == NULL)
+ return (NULL);
/*
- * Extract filestamp if present.
+ * Read the filestamp, which is contained in the first line.
*/
- rval = readlink(filename, linkname, MAXFILENAME - 1);
- if (rval > 0) {
- linkname[rval] = '\0';
- rptr = strrchr(linkname, '.');
- } else {
- rptr = strrchr(filename, '.');
+ if ((ptr = fgets(linkname, MAXFILENAME, str)) == NULL) {
+ msyslog(LOG_ERR, "crypto_cert: no data %s\n",
+ filename);
+ return (NULL);
}
- if (rptr != NULL)
- sscanf(++rptr, "%u", &fstamp);
- else
- fstamp = 0;
- dhparam.fstamp = htonl(fstamp);
- dhpub.fstamp = htonl(fstamp);
+ if ((ptr = strrchr(ptr, '.')) == NULL) {
+ msyslog(LOG_ERR, "crypto_cert: no filestamp %s\n",
+ filename);
+ return (NULL);
+ }
+ if (sscanf(++ptr, "%u", &fstamp) != 1) {
+ msyslog(LOG_ERR, "crypto_cert: invalid filestamp %s\n",
+ filename);
+ return (NULL);
+ }
+
+ /*
+ * Read PEM-encoded certificate and install.
+ */
+ if (!PEM_read(str, &name, &header, &data, &len)) {
+ msyslog(LOG_ERR, "crypto_cert %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (NULL);
+ }
+ free(header);
+ if (strcmp(name, "CERTIFICATE") !=0) {
+ msyslog(LOG_INFO, "crypto_cert: wrong PEM type %s",
+ name);
+ free(name);
+ free(data);
+ return (NULL);
+ }
+ free(name);
+
+ /*
+ * Parse certificate and generate info/value structure.
+ */
+ ret = cert_parse(data, len, fstamp);
+ free(data);
+ if (ret == NULL)
+ return (NULL);
+ if ((ptr = strrchr(linkname, '\n')) != NULL)
+ *ptr = '\0';
+ sprintf(statstr, "%s 0x%x len %lu", &linkname[2], ret->flags,
+ len);
+ record_crypto_stats(NULL, statstr);
#ifdef DEBUG
if (debug)
- printf(
- "crypto_dh: pars file %s link %d fs %u prime %u gen %u\n",
- cp, rval, fstamp, dh_params.primeLen,
- dh_params.generatorLen);
+ printf("crypto_cert: %s\n", statstr);
#endif
+ return (ret);
}
/*
- * crypto_tai - read leapseconds table and check for errors.
+ * crypto_tai - load leapseconds table from file
+ *
+ * This routine loads the ERTS leapsecond file in NIST text format,
+ * converts to a value structure and extracts a filestamp from the file
+ * name. The data are used to establish the TAI offset from UTC, which
+ * is provided to the kernel if supported. Later the data can be sent to
+ * another machine on request.
*/
static void
crypto_tai(
- char *cp /* file name */
+ char *cp /* file name */
)
{
- FILE *str; /* file handle */
- u_char buf[MAX_LINLEN]; /* file line buffer */
- u_int leapsec[MAX_LEAP]; /* NTP time at leaps */
- u_int offset; /* offset at leap (s) */
- char filename[MAXFILENAME]; /* name of leapseconds file */
- char linkname[MAXFILENAME]; /* file link (for filestamp) */
- u_int fstamp; /* filestamp */
- u_int32 *pp;
- u_int len;
- char *rptr;
- int rval, i;
+ FILE *str; /* file handle */
+ char buf[NTP_MAXSTRLEN]; /* file line buffer */
+ u_int leapsec[MAX_LEAP]; /* NTP time at leaps */
+ u_int offset; /* offset at leap (s) */
+ char filename[MAXFILENAME]; /* name of leapseconds file */
+ char linkname[MAXFILENAME]; /* file link (for filestamp) */
+ char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
+ tstamp_t fstamp; /* filestamp */
+ u_int len;
+ char *ptr;
+ int rval, i;
#ifdef KERNEL_PLL
#if NTP_API > 3
struct timex ntv; /* kernel interface structure */
@@ -1886,13 +3616,24 @@ crypto_tai(
strcpy(filename, cp);
else
snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp);
- str = fopen(filename, "r");
- if (str == NULL) {
- msyslog(LOG_INFO,
- "crypto: leapseconds file %s not found",
- filename);
+ if ((str = fopen(filename, "r")) == NULL)
return;
+
+ /*
+ * Extract filestamp if present.
+ */
+ rval = readlink(filename, linkname, MAXFILENAME - 1);
+ if (rval > 0) {
+ linkname[rval] = '\0';
+ ptr = strrchr(linkname, '.');
+ } else {
+ ptr = strrchr(filename, '.');
}
+ if (ptr != NULL)
+ sscanf(++ptr, "%u", &fstamp);
+ else
+ fstamp = 0;
+ tai_leap.fstamp = htonl(fstamp);
/*
* We are rather paranoid here, since an intruder might cause a
@@ -1905,10 +3646,9 @@ crypto_tai(
* 1972 plus one second for each succeeding insertion.
*/
i = 0;
- rval = RV_OK;
while (i < MAX_LEAP) {
- rptr = fgets(buf, MAX_LINLEN - 1, str);
- if (rptr == NULL)
+ ptr = fgets(buf, NTP_MAXSTRLEN - 1, str);
+ if (ptr == NULL)
break;
if (strlen(buf) < 1)
continue;
@@ -1916,16 +3656,15 @@ crypto_tai(
continue;
if (sscanf(buf, "%u %u", &leapsec[i], &offset) != 2)
continue;
- if (i != offset - TAI_1972) {
- rval = RV_DAT;
+ if (i != (int)(offset - TAI_1972)) {
break;
}
i++;
}
fclose(str);
- if (rval != RV_OK || i == 0) {
- msyslog(LOG_ERR,
- "crypto: leapseconds file %s error %d", cp,
+ if (ptr != NULL) {
+ msyslog(LOG_INFO,
+ "crypto_tai: leapseconds file %s error %d", cp,
rval);
exit (-1);
}
@@ -1937,12 +3676,11 @@ crypto_tai(
*/
len = i * 4;
tai_leap.vallen = htonl(len);
- pp = emalloc(len);
- tai_leap.ptr = (u_char *)pp;
+ ptr = emalloc(len);
+ tai_leap.ptr = (unsigned char *) ptr;
for (; i >= 0; i--) {
- *pp++ = htonl(leapsec[i]);
+ *ptr++ = (char) htonl(leapsec[i]);
}
- tai_leap.sig = emalloc(private_key.bits / 8);
crypto_flags |= CRYPTO_FLAG_TAI;
sys_tai = len / 4 + TAI_1972 - 1;
#ifdef KERNEL_PLL
@@ -1950,109 +3688,344 @@ crypto_tai(
ntv.modes = MOD_TAI;
ntv.constant = sys_tai;
if (ntp_adjtime(&ntv) == TIME_ERROR)
- msyslog(LOG_ERR,
- "crypto: kernel TAI update failed");
+ msyslog(LOG_INFO,
+ "crypto_tai: kernel TAI update failed");
#endif /* NTP_API */
#endif /* KERNEL_PLL */
+ sprintf(statstr, "%s link %d fs %u offset %u", cp, rval, fstamp,
+ ntohl(tai_leap.vallen) / 4 + TAI_1972 - 1);
+ record_crypto_stats(NULL, statstr);
+#ifdef DEBUG
+ if (debug)
+ printf("crypto_tai: %s\n", statstr);
+#endif
+}
+/*
+ * crypto_setup - load keys, certificate and leapseconds table
+ *
+ * This routine loads the public/private host key and certificate. If
+ * available, it loads the public/private sign key, which defaults to
+ * the host key, and leapseconds table. The host key must be RSA, but
+ * the sign key can be either RSA or DSA. In either case, the public key
+ * on the certificate must agree with the sign key.
+ */
+void
+crypto_setup(void)
+{
+ EVP_PKEY *pkey; /* private/public key pair */
+ char filename[MAXFILENAME]; /* file name buffer */
+ l_fp seed; /* crypto PRNG seed as NTP timestamp */
+ tstamp_t fstamp; /* filestamp */
+ tstamp_t sstamp; /* sign filestamp */
+ u_int len, bytes;
+ u_char *ptr;
+
/*
- * Extract filestamp if present.
+ * Initialize structures.
*/
- rval = readlink(filename, linkname, MAXFILENAME - 1);
- if (rval > 0) {
- linkname[rval] = '\0';
- rptr = strrchr(linkname, '.');
- } else {
- rptr = strrchr(filename, '.');
+ if (!crypto_flags)
+ return;
+ gethostname(filename, MAXFILENAME);
+ bytes = strlen(filename) + 1;
+ sys_hostname = emalloc(bytes);
+ memcpy(sys_hostname, filename, bytes);
+ if (passwd == NULL)
+ passwd = sys_hostname;
+ memset(&hostval, 0, sizeof(hostval));
+ memset(&pubkey, 0, sizeof(pubkey));
+ memset(&tai_leap, 0, sizeof(tai_leap));
+
+ /*
+ * Load required random seed file and seed the random number
+ * generator. Be default, it is found in the user home
+ * directory. The root home directory may be / or /root,
+ * depending on the system. Wiggle the contents a bit and write
+ * it back so the sequence does not repeat when we next restart.
+ */
+ ERR_load_crypto_strings();
+ if (rand_file == NULL) {
+ if ((RAND_file_name(filename, MAXFILENAME)) != NULL) {
+ rand_file = emalloc(strlen(filename) + 1);
+ strcpy(rand_file, filename);
+ }
+ } else if (*rand_file != '/') {
+ snprintf(filename, MAXFILENAME, "%s/%s", keysdir,
+ rand_file);
+ free(rand_file);
+ rand_file = emalloc(strlen(filename) + 1);
+ strcpy(rand_file, filename);
}
- if (rptr != NULL)
- sscanf(++rptr, "%u", &fstamp);
- else
- fstamp = 0;
- tai_leap.fstamp = htonl(fstamp);
+ if (rand_file == NULL) {
+ msyslog(LOG_ERR,
+ "crypto_setup: random seed file not specified");
+ exit (-1);
+ }
+ if ((bytes = RAND_load_file(rand_file, -1)) == 0) {
+ msyslog(LOG_ERR,
+ "crypto_setup: random seed file %s not found\n",
+ rand_file);
+ exit (-1);
+ }
+ get_systime(&seed);
+ RAND_seed(&seed, sizeof(l_fp));
+ RAND_write_file(rand_file);
+ OpenSSL_add_all_algorithms();
#ifdef DEBUG
if (debug)
printf(
- "crypto_tai: leapseconds file %s link %d fs %u offset %u\n",
- cp, rval, fstamp, ntohl(tai_leap.vallen) / 4 +
- TAI_1972);
+ "crypto_setup: OpenSSL version %lx random seed file %s bytes read %d\n",
+ SSLeay(), rand_file, bytes);
+#endif
+
+ /*
+ * Load required host key from file "ntpkey_host_<hostname>". It
+ * also becomes the default sign key.
+ */
+ if (host_file == NULL) {
+ snprintf(filename, MAXFILENAME, "ntpkey_host_%s",
+ sys_hostname);
+ host_file = emalloc(strlen(filename) + 1);
+ strcpy(host_file, filename);
+ }
+ pkey = crypto_key(host_file, &fstamp);
+ if (pkey == NULL) {
+ msyslog(LOG_ERR,
+ "crypto_setup: host key file %s not found or corrupt",
+ host_file);
+ exit (-1);
+ }
+ host_pkey = pkey;
+ sign_pkey = pkey;
+ sstamp = fstamp;
+ hostval.fstamp = htonl(fstamp);
+ if (EVP_MD_type(host_pkey) != EVP_PKEY_RSA) {
+ msyslog(LOG_ERR,
+ "crypto_setup: host key is not RSA key type");
+ exit (-1);
+ }
+ hostval.vallen = htonl(strlen(sys_hostname));
+ hostval.ptr = (unsigned char *) sys_hostname;
+
+ /*
+ * Construct public key extension field for agreement scheme.
+ */
+ len = i2d_PublicKey(host_pkey, NULL);
+ ptr = emalloc(len);
+ pubkey.ptr = ptr;
+ i2d_PublicKey(host_pkey, &ptr);
+ pubkey.vallen = htonl(len);
+ pubkey.fstamp = hostval.fstamp;
+
+ /*
+ * Load optional sign key from file "ntpkey_sign_<hostname>". If
+ * loaded, it becomes the sign key.
+ */
+ if (sign_file == NULL) {
+ snprintf(filename, MAXFILENAME, "ntpkey_sign_%s",
+ sys_hostname);
+ sign_file = emalloc(strlen(filename) + 1);
+ strcpy(sign_file, filename);
+ }
+ pkey = crypto_key(sign_file, &fstamp);
+ if (pkey != NULL) {
+ sign_pkey = pkey;
+ sstamp = fstamp;
+ }
+ sign_siglen = EVP_PKEY_size(sign_pkey);
+
+ /*
+ * Load optional IFF parameters from file
+ * "ntpkey_iff_<hostname>".
+ */
+ if (iffpar_file == NULL) {
+ snprintf(filename, MAXFILENAME, "ntpkey_iff_%s",
+ sys_hostname);
+ iffpar_file = emalloc(strlen(filename) + 1);
+ strcpy(iffpar_file, filename);
+ }
+ iffpar_pkey = crypto_key(iffpar_file, &if_fstamp);
+ if (iffpar_pkey != NULL)
+ crypto_flags |= CRYPTO_FLAG_IFF;
+
+ /*
+ * Load optional GQ parameters from file "ntpkey_gq_<hostname>".
+ */
+ if (gqpar_file == NULL) {
+ snprintf(filename, MAXFILENAME, "ntpkey_gq_%s",
+ sys_hostname);
+ gqpar_file = emalloc(strlen(filename) + 1);
+ strcpy(gqpar_file, filename);
+ }
+ gqpar_pkey = crypto_key(gqpar_file, &gq_fstamp);
+ if (gqpar_pkey != NULL)
+ crypto_flags |= CRYPTO_FLAG_GQ;
+
+ /*
+ * Load optional MV parameters from file "ntpkey_mv_<hostname>".
+ */
+ if (mvpar_file == NULL) {
+ snprintf(filename, MAXFILENAME, "ntpkey_mv_%s",
+ sys_hostname);
+ mvpar_file = emalloc(strlen(filename) + 1);
+ strcpy(mvpar_file, filename);
+ }
+ mvpar_pkey = crypto_key(mvpar_file, &mv_fstamp);
+ if (mvpar_pkey != NULL)
+ crypto_flags |= CRYPTO_FLAG_MV;
+
+ /*
+ * Load required certificate from file "ntpkey_cert_<hostname>".
+ */
+ if (cert_file == NULL) {
+ snprintf(filename, MAXFILENAME, "ntpkey_cert_%s",
+ sys_hostname);
+ cert_file = emalloc(strlen(filename) + 1);
+ strcpy(cert_file, filename);
+ }
+ if ((cinfo = crypto_cert(cert_file)) == NULL) {
+ msyslog(LOG_ERR,
+ "certificate file %s not found or corrupt",
+ cert_file);
+ exit (-1);
+ }
+
+ /*
+ * The subject name must be the same as the host name, unless
+ * the certificate is private, in which case it may have come
+ * from another host.
+ */
+ if (!(cinfo->flags & CERT_PRIV) && strcmp(cinfo->subject,
+ sys_hostname) != 0) {
+ msyslog(LOG_ERR,
+ "crypto_setup: certificate %s not for this host",
+ cert_file);
+ cert_free(cinfo);
+ exit (-1);
+ }
+
+ /*
+ * It the certificate is trusted, the subject must be the same
+ * as the issuer, in other words it must be self signed.
+ */
+ if (cinfo->flags & CERT_PRIV && strcmp(cinfo->subject,
+ cinfo->issuer) != 0) {
+ if (cert_valid(cinfo, sign_pkey) != XEVNT_OK) {
+ msyslog(LOG_ERR,
+ "crypto_setup: certificate %s is trusted, but not self signed.",
+ cert_file);
+ cert_free(cinfo);
+ exit (-1);
+ }
+ }
+ sign_digest = cinfo->digest;
+ if (cinfo->flags & CERT_PRIV)
+ crypto_flags |= CRYPTO_FLAG_PRIV;
+ crypto_flags |= cinfo->nid << 16;
+
+ /*
+ * Load optional leapseconds table from file "ntpkey_leap". If
+ * the file is missing or defective, the values can later be
+ * retrieved from a server.
+ */
+ if (leap_file == NULL)
+ leap_file = "ntpkey_leap";
+ crypto_tai(leap_file);
+#ifdef DEBUG
+ if (debug)
+ printf(
+ "crypto_setup: flags 0x%x host %s signature %s\n",
+ crypto_flags, sys_hostname, OBJ_nid2ln(cinfo->nid));
#endif
}
/*
- * crypto_config - configure crypto data from crypto configuration
- * command.
+ * crypto_config - configure data from crypto configuration command.
*/
void
crypto_config(
- int item, /* configuration item */
- char *cp /* file name */
+ int item, /* configuration item */
+ char *cp /* file name */
)
{
switch (item) {
/*
- * Initialize flags
+ * Set random seed file name.
+ */
+ case CRYPTO_CONF_RAND:
+ rand_file = emalloc(strlen(cp) + 1);
+ strcpy(rand_file, cp);
+ break;
+
+ /*
+ * Set private key password.
*/
- case CRYPTO_CONF_FLAGS:
- sscanf(cp, "%x", &crypto_flags);
+ case CRYPTO_CONF_PW:
+ passwd = emalloc(strlen(cp) + 1);
+ strcpy(passwd, cp);
break;
/*
- * Set private key file name.
+ * Set host file name.
*/
case CRYPTO_CONF_PRIV:
- private_key_file = emalloc(strlen(cp) + 1);
- strcpy(private_key_file, cp);
+ host_file = emalloc(strlen(cp) + 1);
+ strcpy(host_file, cp);
break;
/*
- * Set public key file name.
+ * Set sign key file name.
*/
- case CRYPTO_CONF_PUBL:
- public_key_file = emalloc(strlen(cp) + 1);
- strcpy(public_key_file, cp);
+ case CRYPTO_CONF_SIGN:
+ sign_file = emalloc(strlen(cp) + 1);
+ strcpy(sign_file, cp);
break;
/*
- * Set certificate file name.
+ * Set iff parameters file name.
*/
- case CRYPTO_CONF_CERT:
- certif_file = emalloc(strlen(cp) + 1);
- strcpy(certif_file, cp);
+ case CRYPTO_CONF_IFFPAR:
+ iffpar_file = emalloc(strlen(cp) + 1);
+ strcpy(iffpar_file, cp);
break;
/*
- * Set agreement parameter file name.
+ * Set gq parameters file name.
*/
- case CRYPTO_CONF_DH:
- dh_params_file = emalloc(strlen(cp) + 1);
- strcpy(dh_params_file, cp);
+ case CRYPTO_CONF_GQPAR:
+ gqpar_file = emalloc(strlen(cp) + 1);
+ strcpy(gqpar_file, cp);
break;
/*
- * Set leapseconds table file name.
+ * Set mv parameters file name.
*/
- case CRYPTO_CONF_LEAP:
- tai_leap_file = emalloc(strlen(cp) + 1);
- strcpy(tai_leap_file, cp);
+ case CRYPTO_CONF_MVPAR:
+ mvpar_file = emalloc(strlen(cp) + 1);
+ strcpy(mvpar_file, cp);
+ break;
+
+ /*
+ * Set certificate file name.
+ */
+ case CRYPTO_CONF_CERT:
+ cert_file = emalloc(strlen(cp) + 1);
+ strcpy(cert_file, cp);
break;
/*
- * Set crypto keys directory.
+ * Set leapseconds file name.
*/
- case CRYPTO_CONF_KEYS:
- keysdir = emalloc(strlen(cp) + 1);
- strcpy(keysdir, cp);
+ case CRYPTO_CONF_LEAP:
+ leap_file = emalloc(strlen(cp) + 1);
+ strcpy(leap_file, cp);
break;
}
crypto_flags |= CRYPTO_FLAG_ENAB;
}
# else
int ntp_crypto_bs_pubkey;
-# endif /* PUBKEY */
-#else
-int ntp_crypto_bs_autokey;
-#endif /* AUTOKEY */
+# endif /* OPENSSL */
diff --git a/contrib/ntp/ntpd/ntp_filegen.c b/contrib/ntp/ntpd/ntp_filegen.c
index bcf3f9c19cd1..59a1d91bae6e 100644
--- a/contrib/ntp/ntpd/ntp_filegen.c
+++ b/contrib/ntp/ntpd/ntp_filegen.c
@@ -214,7 +214,7 @@ filegen_open(
*
* If the file was open before keep the previous generation.
* This will cause output to end up in the 'wrong' file,
- * but I think this is still better than loosing output
+ * but I think this is still better than losing output
*
* ignore errors due to missing directories
*/
@@ -316,7 +316,7 @@ filegen_setup(
case FILEGEN_MONTH:
caljulian(now, &cal);
- cal.yearday -= cal.monthday - 1;
+ cal.yearday = (u_short) (cal.yearday - cal.monthday + 1);
cal.monthday = 1;
cal.hour = cal.minute = cal.second = 0;
new_gen = caltontp(&cal);
@@ -378,8 +378,8 @@ filegen_config(
gen->basename = (char*)emalloc(strlen(basename) + 1);
strcpy(gen->basename, basename);
}
- gen->type = type;
- gen->flag = flag;
+ gen->type = (u_char) type;
+ gen->flag = (u_char) flag;
/*
* make filegen use the new settings
diff --git a/contrib/ntp/ntpd/ntp_intres.c b/contrib/ntp/ntpd/ntp_intres.c
index b6cd45b9501f..7f27f21c9613 100644
--- a/contrib/ntp/ntpd/ntp_intres.c
+++ b/contrib/ntp/ntpd/ntp_intres.c
@@ -50,8 +50,10 @@ struct conf_entry {
struct conf_entry *ce_next;
char *ce_name; /* name we are trying to resolve */
struct conf_peer ce_config; /* configuration info for peer */
+ struct sockaddr_storage peer_store; /* address info for both fams */
};
#define ce_peeraddr ce_config.peeraddr
+#define ce_peeraddr6 ce_config.peeraddr6
#define ce_hmode ce_config.hmode
#define ce_version ce_config.version
#define ce_minpoll ce_config.minpoll
@@ -123,8 +125,7 @@ static int resolve_value; /* next value of resolve timer */
/*
* File descriptor for ntp request code.
*/
-static int sockfd = -1;
-
+static SOCKET sockfd = INVALID_SOCKET; /* NT uses SOCKET */
/* stuff to be filled in by caller */
@@ -410,6 +411,8 @@ addentry(
ce = (struct conf_entry *)emalloc(sizeof(struct conf_entry));
ce->ce_name = cp;
ce->ce_peeraddr = 0;
+ ce->ce_peeraddr6 = in6addr_any;
+ ANYSOCK(&ce->peer_store);
ce->ce_hmode = (u_char)mode;
ce->ce_version = (u_char)version;
ce->ce_minpoll = (u_char)minpoll;
@@ -446,18 +449,18 @@ findhostaddr(
struct conf_entry *entry
)
{
- struct hostent *hp;
- struct in_addr in;
+ struct addrinfo *addr;
+ int error;
checkparent(); /* make sure our guy is still running */
- if (entry->ce_name && entry->ce_peeraddr) {
+ if (entry->ce_name != NULL && SOCKNUL(&entry->peer_store)) {
/* HMS: Squawk? */
msyslog(LOG_ERR, "findhostaddr: both ce_name and ce_peeraddr are defined...");
return 1;
}
- if (!entry->ce_name && !entry->ce_peeraddr) {
+ if (entry->ce_name == NULL && !SOCKNUL(&entry->peer_store)) {
msyslog(LOG_ERR, "findhostaddr: both ce_name and ce_peeraddr are undefined!");
return 0;
}
@@ -468,20 +471,33 @@ findhostaddr(
msyslog(LOG_INFO, "findhostaddr: Resolving <%s>",
entry->ce_name);
#endif /* DEBUG */
- hp = gethostbyname(entry->ce_name);
+ error = getaddrinfo(entry->ce_name, NULL, NULL, &addr);
+ if (error == 0) {
+ entry->peer_store = *((struct sockaddr_storage*)(addr->ai_addr));
+ if (entry->peer_store.ss_family == AF_INET) {
+ entry->ce_peeraddr =
+ GET_INADDR(entry->peer_store);
+ entry->ce_config.v6_flag = 0;
+ } else {
+ entry->ce_peeraddr6 =
+ GET_INADDR6(entry->peer_store);
+ entry->ce_config.v6_flag = 1;
+ }
+ }
} else {
#ifdef DEBUG
if (debug > 2)
- msyslog(LOG_INFO, "findhostaddr: Resolving %x>",
- entry->ce_peeraddr);
+ msyslog(LOG_INFO, "findhostaddr: Resolving %s>",
+ stoa(&entry->peer_store));
#endif
- in.s_addr = entry->ce_peeraddr;
- hp = gethostbyaddr((const char *)&in,
- sizeof entry->ce_peeraddr,
- AF_INET);
+ entry->ce_name = emalloc(MAXHOSTNAMELEN);
+ error = getnameinfo((const struct sockaddr *)&entry->peer_store,
+ SOCKLEN(&entry->peer_store),
+ (char *)&entry->ce_name, MAXHOSTNAMELEN,
+ NULL, 0, 0);
}
- if (hp == NULL) {
+ if (error != 0) {
/*
* If the resolver is in use, see if the failure is
* temporary. If so, return success.
@@ -496,29 +512,11 @@ findhostaddr(
if (debug > 2)
msyslog(LOG_INFO, "findhostaddr: name resolved.");
#endif
- /*
- * Use the first address. We don't have any way to tell
- * preferences and older gethostbyname() implementations
- * only return one.
- */
- memmove((char *)&(entry->ce_peeraddr),
- (char *)hp->h_addr,
- sizeof(struct in_addr));
- if (entry->ce_keystr[0] == '*')
- strncpy((char *)&(entry->ce_keystr), hp->h_name,
- MAXFILENAME);
- } else {
- char *cp;
- size_t s;
#ifdef DEBUG
if (debug > 2)
msyslog(LOG_INFO, "findhostaddr: address resolved.");
#endif
- s = strlen(hp->h_name) + 1;
- cp = (char *)emalloc(s);
- strcpy(cp, hp->h_name);
- entry->ce_name = cp;
}
return (1);
@@ -531,22 +529,26 @@ findhostaddr(
static void
openntp(void)
{
- struct sockaddr_in saddr;
+ struct addrinfo hints;
+ struct addrinfo *addrResult;
if (sockfd >= 0)
return;
-
- sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_DGRAM;
+ if (getaddrinfo(NULL, "ntp", &hints, &addrResult)!=0) {
+ msyslog(LOG_ERR, "getaddrinfo failed: %m");
+ exit(1);
+ }
+ sockfd = socket(addrResult->ai_family, addrResult->ai_socktype, 0);
+
if (sockfd == -1) {
msyslog(LOG_ERR, "socket() failed: %m");
exit(1);
}
- memset((char *)&saddr, 0, sizeof(saddr));
- saddr.sin_family = AF_INET;
- saddr.sin_port = htons(NTP_PORT); /* trash */
- saddr.sin_addr.s_addr = htonl(LOCALHOST); /* garbage */
-
/*
* Make the socket non-blocking. We'll wait with select()
*/
@@ -575,12 +577,11 @@ openntp(void)
}
}
#endif /* SYS_WINNT */
-
-
- if (connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr)) == -1) {
+ if (connect(sockfd, addrResult->ai_addr, addrResult->ai_addrlen) == -1) {
msyslog(LOG_ERR, "openntp: connect() failed: %m");
exit(1);
}
+ freeaddrinfo(addrResult);
}
@@ -711,7 +712,8 @@ request(
if (n < 0)
{
- msyslog(LOG_ERR, "select() fails: %m");
+ if (errno != EINTR)
+ msyslog(LOG_ERR, "select() fails: %m");
return 0;
}
else if (n == 0)
@@ -832,32 +834,32 @@ request(
case INFO_ERR_IMPL:
msyslog(LOG_ERR,
- "server reports implementation mismatch!!");
+ "ntpd reports implementation mismatch!");
return 0;
case INFO_ERR_REQ:
msyslog(LOG_ERR,
- "server claims configuration request is unknown");
+ "ntpd says configuration request is unknown!");
return 0;
case INFO_ERR_FMT:
msyslog(LOG_ERR,
- "server indicates a format error occurred(!!)");
+ "ntpd indicates a format error occurred!");
return 0;
case INFO_ERR_NODATA:
msyslog(LOG_ERR,
- "server indicates no data available (shouldn't happen)");
+ "ntpd indicates no data available!");
return 0;
case INFO_ERR_AUTH:
msyslog(LOG_ERR,
- "server returns a permission denied error");
+ "ntpd returns a permission denied error!");
return 0;
default:
msyslog(LOG_ERR,
- "server returns unknown error code %d", n);
+ "ntpd returns unknown error code %d!", n);
return 0;
}
}
@@ -1029,10 +1031,10 @@ doconfigure(
#ifdef DEBUG
if (debug > 1)
msyslog(LOG_INFO,
- "doconfigure: <%s> has peeraddr %#x",
- ce->ce_name, ce->ce_peeraddr);
+ "doconfigure: <%s> has peeraddr %s",
+ ce->ce_name, stoa(&ce->peer_store));
#endif
- if (dores && ce->ce_peeraddr == 0) {
+ if (dores && !SOCKNUL(&(ce->peer_store))) {
if (!findhostaddr(ce)) {
msyslog(LOG_ERR,
"couldn't resolve `%s', giving up on it",
@@ -1044,7 +1046,7 @@ doconfigure(
}
}
- if (ce->ce_peeraddr != 0) {
+ if (!SOCKNUL(&ce->peer_store)) {
if (request(&ce->ce_config)) {
ceremove = ce;
ce = ceremove->ce_next;
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c
index ef0c14698f5b..9f2acea8bb35 100644
--- a/contrib/ntp/ntpd/ntp_io.c
+++ b/contrib/ntp/ntpd/ntp_io.c
@@ -14,6 +14,17 @@
#include "ntp_refclock.h"
#include "ntp_if.h"
#include "ntp_stdlib.h"
+#include "ntp.h"
+
+/* Don't include ISC's version of IPv6 variables and structures */
+#define ISC_IPV6_H 1
+#include <isc/interfaceiter.h>
+#include <isc/list.h>
+#include <isc/result.h>
+
+#ifdef SIM
+#include "ntpsim.h"
+#endif
#include <stdio.h>
#include <signal.h>
@@ -43,46 +54,20 @@
extern int listen_to_virtual_ips;
-#if _BSDI_VERSION >= 199510
-# include <ifaddrs.h>
+#if defined(SYS_WINNT)
+#include <transmitbuff.h>
+#include <isc/win32os.h>
+/*
+ * Define this macro to control the behavior of connection
+ * resets on UDP sockets. See Microsoft KnowledgeBase Article Q263823
+ * for details.
+ * NOTE: This requires that Windows 2000 systems install Service Pack 2
+ * or later.
+ */
+#ifndef SIO_UDP_CONNRESET
+#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12)
#endif
-#if defined(VMS) /* most likely UCX-specific */
-
-#include <UCX$INETDEF.H>
-
-/* "un*x"-compatible names for some items in UCX$INETDEF.H */
-#define ifreq IFREQDEF
-#define ifr_name IFR$T_NAME
-#define ifr_addr IFR$R_DUMMY.IFR$T_ADDR
-#define ifr_broadaddr IFR$R_DUMMY.IFR$T_BROADADDR
-#define ifr_flags IFR$R_DUMMY.IFR$R_DUMMY_1_OVRL.IFR$W_FLAGS
-#define IFF_UP IFR$M_IFF_UP
-#define IFF_BROADCAST IFR$M_IFF_BROADCAST
-#define IFF_LOOPBACK IFR$M_IFF_LOOPBACK
-
-#endif /* VMS */
-
-
-#if defined(VMS) || defined(SYS_WINNT)
-/* structure used in SIOCGIFCONF request (after [KSR] OSF/1) */
-struct ifconf {
- int ifc_len; /* size of buffer */
- union {
- caddr_t ifcu_buf;
- struct ifreq *ifcu_req;
- } ifc_ifcu;
-};
-#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
-#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
-
-#endif /* VMS */
-
-#if defined(USE_TTY_SIGPOLL) || defined(USE_UDP_SIGPOLL)
-# if defined(SYS_AIX) && defined(_IO) /* XXX Identify AIX some other way */
-# undef _IO
-# endif
-# include <stropts.h>
#endif
/*
@@ -118,10 +103,15 @@ u_long io_timereset; /* time counters were reset */
/*
* Interface stuff
*/
-struct interface *any_interface; /* default interface */
-struct interface *loopback_interface; /* loopback interface */
-struct interface inter_list[MAXINTERFACES];
-int ninterfaces;
+struct interface *any_interface; /* default ipv4 interface */
+struct interface *any6_interface; /* default ipv6 interface */
+struct interface *loopback_interface; /* loopback ipv4 interface */
+struct interface *loopback6_interface; /* loopback ipv6 interface */
+struct interface inter_list[MAXINTERFACES]; /* Interface list */
+int ninterfaces; /* Total number of interfaces */
+int nwilds; /* Total number of wildcard intefaces */
+int wildipv4 = -1; /* Index into inter_list for IPv4 wildcard */
+int wildipv6 = -1; /* Index into inter_list for IPv6 wildcard */
#ifdef REFCLOCK
/*
@@ -131,18 +121,94 @@ int ninterfaces;
static struct refclockio *refio;
#endif /* REFCLOCK */
+
+/*
+ * Define what the possible "soft" errors can be. These are non-fatal returns
+ * of various network related functions, like recv() and so on.
+ *
+ * For some reason, BSDI (and perhaps others) will sometimes return <0
+ * from recv() but will have errno==0. This is broken, but we have to
+ * work around it here.
+ */
+#define SOFT_ERROR(e) ((e) == EAGAIN || \
+ (e) == EWOULDBLOCK || \
+ (e) == EINTR || \
+ (e) == 0)
+
/*
* File descriptor masks etc. for call to select
+ * Not needed for I/O Completion Ports
*/
fd_set activefds;
int maxactivefd;
-static int create_sockets P((u_int));
-static int open_socket P((struct sockaddr_in *, int, int));
-static void close_socket P((int));
-static void close_file P((int));
+static int create_sockets P((u_short));
+static SOCKET open_socket P((struct sockaddr_storage *, int, int));
+static void close_socket P((SOCKET));
+#ifdef REFCLOCK
+static void close_file P((SOCKET));
+#endif
static char * fdbits P((int, fd_set *));
+static void set_reuseaddr P((int));
+
+typedef struct vsock vsock_t;
+
+struct vsock {
+ SOCKET fd;
+ ISC_LINK(vsock_t) link;
+};
+
+ISC_LIST(vsock_t) sockets_list;
+
+typedef struct remaddr remaddr_t;
+
+struct remaddr {
+ struct sockaddr_storage addr;
+ int if_index;
+ ISC_LINK(remaddr_t) link;
+};
+
+ISC_LIST(remaddr_t) remoteaddr_list;
+
+void add_socket_to_list P((SOCKET));
+void delete_socket_from_list P((SOCKET));
+void add_addr_to_list P((struct sockaddr_storage *, int));
+void delete_addr_from_list P((struct sockaddr_storage *));
+int find_addr_in_list P((struct sockaddr_storage *));
+int create_wildcards P((u_short));
+isc_boolean_t address_okay P((isc_interface_t *));
+void convert_isc_if P((isc_interface_t *, struct interface *, u_short));
+#ifdef SYS_WINNT
+/*
+ * Windows 2000 systems incorrectly cause UDP sockets using WASRecvFrom
+ * to not work correctly, returning a WSACONNRESET error when a WSASendTo
+ * fails with an "ICMP port unreachable" response and preventing the
+ * socket from using the WSARecvFrom in subsequent operations.
+ * The function below fixes this, but requires that Windows 2000
+ * Service Pack 2 or later be installed on the system. NT 4.0
+ * systems are not affected by this and work correctly.
+ * See Microsoft Knowledge Base Article Q263823 for details of this.
+ */
+isc_result_t
+connection_reset_fix(SOCKET fd) {
+ DWORD dwBytesReturned = 0;
+ BOOL bNewBehavior = FALSE;
+ DWORD status;
+
+ if(isc_win32os_majorversion() < 5)
+ return (ISC_R_SUCCESS); /* NT 4.0 has no problem */
+
+ /* disable bad behavior using IOCTL: SIO_UDP_CONNRESET */
+ status = WSAIoctl(fd, SIO_UDP_CONNRESET, &bNewBehavior,
+ sizeof(bNewBehavior), NULL, 0,
+ &dwBytesReturned, NULL, NULL);
+ if (status != SOCKET_ERROR)
+ return (ISC_R_SUCCESS);
+ else
+ return (ISC_R_UNEXPECTED);
+}
+#endif
/*
* init_io - initialize I/O data structures and call socket creation routine
*/
@@ -150,8 +216,6 @@ void
init_io(void)
{
#ifdef SYS_WINNT
- WORD wVersionRequested;
- WSADATA wsaData;
init_transmitbuff();
#endif /* SYS_WINNT */
@@ -165,7 +229,8 @@ init_io(void)
packets_sent = packets_notsent = 0;
handler_calls = handler_pkts = 0;
io_timereset = 0;
- loopback_interface = 0;
+ loopback_interface = NULL;
+ loopback6_interface = NULL;
#ifdef REFCLOCK
refio = 0;
@@ -176,14 +241,17 @@ init_io(void)
#endif
#ifdef SYS_WINNT
- wVersionRequested = MAKEWORD(1,1);
- if (WSAStartup(wVersionRequested, &wsaData))
+ if (!Win32InitSockets())
{
- msyslog(LOG_ERR, "No useable winsock.dll: %m");
+ netsyslog(LOG_ERR, "No useable winsock.dll: %m");
exit(1);
}
#endif /* SYS_WINNT */
+ ISC_LIST_INIT(sockets_list);
+
+ ISC_LIST_INIT(remoteaddr_list);
+
/*
* Create the sockets
*/
@@ -197,456 +265,274 @@ init_io(void)
#endif
}
-/*
- * create_sockets - create a socket for each interface plus a default
- * socket for when we don't know where to send
- */
-static int
-create_sockets(
- u_int port
- )
-{
-#if _BSDI_VERSION >= 199510
- int i, j;
- struct ifaddrs *ifaddrs, *ifap;
- struct sockaddr_in resmask;
-#if _BSDI_VERSION < 199701
- struct ifaddrs *lp;
- int num_if;
-#endif
-#else /* _BSDI_VERSION >= 199510 */
-# ifdef STREAMS_TLI
- struct strioctl ioc;
-# endif /* STREAMS_TLI */
- char buf[MAXINTERFACES*sizeof(struct ifreq)];
- struct ifconf ifc;
- struct ifreq ifreq, *ifr;
- int n, i, j, vs, size = 0;
- struct sockaddr_in resmask;
-#endif /* _BSDI_VERSION >= 199510 */
+int
+create_wildcards(u_short port) {
-#ifdef DEBUG
- if (debug)
- printf("create_sockets(%d)\n", ntohs( (u_short) port));
-#endif
+ int idx = 0;
+ /*
+ * create pseudo-interface with wildcard IPv4 address
+ */
+ inter_list[idx].sin.ss_family = AF_INET;
+ ((struct sockaddr_in*)&inter_list[idx].sin)->sin_addr.s_addr = htonl(INADDR_ANY);
+ ((struct sockaddr_in*)&inter_list[idx].sin)->sin_port = port;
+ (void) strncpy(inter_list[idx].name, "wildcard", sizeof(inter_list[idx].name));
+ inter_list[idx].mask.ss_family = AF_INET;
+ ((struct sockaddr_in*)&inter_list[idx].mask)->sin_addr.s_addr = htonl(~(u_int32)0);
+ inter_list[idx].bfd = INVALID_SOCKET;
+ inter_list[idx].num_mcast = 0;
+ inter_list[idx].received = 0;
+ inter_list[idx].sent = 0;
+ inter_list[idx].notsent = 0;
+ inter_list[idx].flags = INT_BROADCAST;
+ any_interface = &inter_list[idx];
+#if defined(MCAST)
+ /*
+ * enable possible multicast reception on the broadcast socket
+ */
+ inter_list[idx].bcast.ss_family = AF_INET;
+ ((struct sockaddr_in*)&inter_list[idx].bcast)->sin_port = port;
+ ((struct sockaddr_in*)&inter_list[idx].bcast)->sin_addr.s_addr = htonl(INADDR_ANY);
+#endif /* MCAST */
+ wildipv4 = idx;
+ idx++;
+#ifdef HAVE_IPV6
/*
- * create pseudo-interface with wildcard address
+ * create pseudo-interface with wildcard IPv6 address
*/
- inter_list[0].sin.sin_family = AF_INET;
- inter_list[0].sin.sin_port = port;
- inter_list[0].sin.sin_addr.s_addr = htonl(INADDR_ANY);
- (void) strncpy(inter_list[0].name, "wildcard",
- sizeof(inter_list[0].name));
- inter_list[0].mask.sin_addr.s_addr = htonl(~ (u_int32)0);
- inter_list[0].received = 0;
- inter_list[0].sent = 0;
- inter_list[0].notsent = 0;
- inter_list[0].flags = INT_BROADCAST;
- any_interface = &inter_list[0];
-
-#if _BSDI_VERSION >= 199510
-#if _BSDI_VERSION >= 199701
- if (getifaddrs(&ifaddrs) < 0)
- {
- msyslog(LOG_ERR, "getifaddrs: %m");
- exit(1);
+ if (isc_net_probeipv6() == ISC_R_SUCCESS) {
+ inter_list[idx].sin.ss_family = AF_INET6;
+ ((struct sockaddr_in6*)&inter_list[idx].sin)->sin6_addr = in6addr_any;
+ ((struct sockaddr_in6*)&inter_list[idx].sin)->sin6_port = port;
+ (void) strncpy(inter_list[idx].name, "wildcard", sizeof(inter_list[idx].name));
+ inter_list[idx].mask.ss_family = AF_INET6;
+ memset(&((struct sockaddr_in6*)&inter_list[idx].mask)->sin6_addr.s6_addr, 0xff, sizeof(struct in6_addr));
+ inter_list[idx].bfd = INVALID_SOCKET;
+ inter_list[idx].num_mcast = 0;
+ inter_list[idx].received = 0;
+ inter_list[idx].sent = 0;
+ inter_list[idx].notsent = 0;
+ inter_list[idx].flags = 0;
+ any6_interface = &inter_list[idx];
+ wildipv6 = idx;
+ idx++;
}
- i = 1;
- for (ifap = ifaddrs; ifap != NULL; ifap = ifap->ifa_next)
-#else
- if (getifaddrs(&ifaddrs, &num_if) < 0)
- {
- msyslog(LOG_ERR, "create_sockets: getifaddrs() failed: %m");
- exit(1);
- }
+#endif
+ return (idx);
+}
- i = 1;
+isc_boolean_t
+address_okay(isc_interface_t *isc_if) {
- for (ifap = ifaddrs, lp = ifap + num_if; ifap < lp; ifap++)
+#ifdef DEBUG
+ if (debug > 2)
+ printf("address_okay: listen Virtual: %d, IF name: %s, Up Flag: %d\n",
+ listen_to_virtual_ips, isc_if->name, (isc_if->flags & INTERFACE_F_UP));
#endif
- {
- struct sockaddr_in *sin;
- if (!ifap->ifa_addr)
- continue;
+ if (listen_to_virtual_ips == 0 && (strchr(isc_if->name, (int)':') != NULL))
+ return (ISC_FALSE);
- if (ifap->ifa_addr->sa_family != AF_INET)
- continue;
+ /* XXXPDM This should be fixed later, but since we may not have set
+ * the UP flag, we at least get to use the interface.
+ * The UP flag is not always set so we don't do this right now.
+ */
+/* if ((isc_if->flags & INTERFACE_F_UP) == 0)
+ return (ISC_FALSE);
+*/
+ return (ISC_TRUE);
+}
+void
+convert_isc_if(isc_interface_t *isc_if, struct interface *itf, u_short port) {
+
+ if(isc_if->af == AF_INET) {
+ itf->sin.ss_family = (u_short) isc_if->af;
+ strcpy(itf->name, isc_if->name);
+ memcpy(&(((struct sockaddr_in*)&itf->sin)->sin_addr),
+ &(isc_if->address.type.in),
+ sizeof(struct in_addr));
+ ((struct sockaddr_in*)&itf->sin)->sin_port = port;
+
+ if((isc_if->flags & INTERFACE_F_BROADCAST) != 0) {
+ itf->flags |= INT_BROADCAST;
+ itf->bcast.ss_family = itf->sin.ss_family;
+ memcpy(&(((struct sockaddr_in*)&itf->bcast)->sin_addr),
+ &(isc_if->broadcast.type.in),
+ sizeof(struct in_addr));
+ ((struct sockaddr_in*)&itf->bcast)->sin_port = port;
+ }
- if ((ifap->ifa_flags & IFF_UP) == 0)
- continue;
+ itf->mask.ss_family = itf->sin.ss_family;
+ memcpy(&(((struct sockaddr_in*)&itf->mask)->sin_addr),
+ &(isc_if->netmask.type.in),
+ sizeof(struct in_addr));
+ ((struct sockaddr_in*)&itf->mask)->sin_port = port;
- if (debug)
- printf("after getifaddrs(), considering %s (%s)\n",
- ifap->ifa_name,
- inet_ntoa(((struct sockaddr_in *)ifap->ifa_addr)->sin_addr));
-
- if (ifap->ifa_flags & IFF_LOOPBACK) {
- sin = (struct sockaddr_in *)ifap->ifa_addr;
- if (ntohl(sin->sin_addr.s_addr) != 0x7f000001 &&
- !listen_to_virtual_ips)
- continue;
- }
- inter_list[i].flags = 0;
- if (ifap->ifa_flags & IFF_BROADCAST)
- inter_list[i].flags |= INT_BROADCAST;
- strcpy(inter_list[i].name, ifap->ifa_name);
- sin = (struct sockaddr_in *)ifap->ifa_addr;
- inter_list[i].sin = *sin;
- inter_list[i].sin.sin_port = port;
- if (ifap->ifa_flags & IFF_LOOPBACK) {
- inter_list[i].flags = INT_LOOPBACK;
- if (loopback_interface == NULL
- || ntohl(sin->sin_addr.s_addr) != 0x7f000001)
- loopback_interface = &inter_list[i];
- }
- if (inter_list[i].flags & INT_BROADCAST) {
- sin = (struct sockaddr_in *)ifap->ifa_broadaddr;
- inter_list[i].bcast = *sin;
- inter_list[i].bcast.sin_port = port;
- }
- if (ifap->ifa_flags & (IFF_LOOPBACK|IFF_POINTOPOINT)) {
- inter_list[i].mask.sin_addr.s_addr = 0xffffffff;
- } else {
- sin = (struct sockaddr_in *)ifap->ifa_netmask;
- inter_list[i].mask = *sin;
+ if (((isc_if->flags & INTERFACE_F_LOOPBACK) != 0) && (loopback_interface == NULL))
+ {
+ loopback_interface = itf;
}
- inter_list[i].mask.sin_family = AF_INET;
- inter_list[i].mask.sin_len = sizeof *sin;
-
- /*
- * look for an already existing source interface address. If
- * the machine has multiple point to point interfaces, then
- * the local address may appear more than once.
- *
- * A second problem exists if we have two addresses on
- * the same network (via "ifconfig alias ..."). Don't
- * make two xntp interfaces for the two aliases on the
- * one physical interface. -wsr
- */
- for (j=0; j < i; j++)
- if ((inter_list[j].sin.sin_addr.s_addr &
- inter_list[j].mask.sin_addr.s_addr) ==
- (inter_list[i].sin.sin_addr.s_addr &
- inter_list[i].mask.sin_addr.s_addr))
- {
- if (inter_list[j].flags & INT_LOOPBACK)
- inter_list[j] = inter_list[i];
- break;
- }
- if (j == i)
- i++;
- if (i > MAXINTERFACES)
- break;
}
- free(ifaddrs);
-#else /* _BSDI_VERSION >= 199510 */
-# ifdef USE_STREAMS_DEVICE_FOR_IF_CONFIG
- if ((vs = open("/dev/ip", O_RDONLY)) < 0)
- {
- msyslog(LOG_ERR, "create_sockets: open(/dev/ip) failed: %m");
- exit(1);
- }
-# else /* not USE_STREAMS_DEVICE_FOR_IF_CONFIG */
- if (
- (vs = socket(AF_INET, SOCK_DGRAM, 0))
-# ifndef SYS_WINNT
- < 0
-# else /* SYS_WINNT */
- == INVALID_SOCKET
-# endif /* SYS_WINNT */
- ) {
- msyslog(LOG_ERR, "create_sockets: socket(AF_INET, SOCK_DGRAM) failed: %m");
- exit(1);
+#ifdef HAVE_IPV6
+ else if (isc_if->af == AF_INET6) {
+ itf->sin.ss_family = (u_short) isc_if->af;
+ strcpy(itf->name, isc_if->name);
+ memcpy(&(((struct sockaddr_in6 *)&itf->sin)->sin6_addr),
+ &(isc_if->address.type.in6),
+ sizeof(struct in6_addr));
+ ((struct sockaddr_in6 *)&itf->sin)->sin6_port = port;
+
+ itf->mask.ss_family = itf->sin.ss_family;
+ memcpy(&(((struct sockaddr_in6 *)&itf->mask)->sin6_addr),
+ &(isc_if->netmask.type.in6),
+ sizeof(struct in6_addr));
+ ((struct sockaddr_in6 *)&itf->mask)->sin6_port = port;
+
+ if (((isc_if->flags & INTERFACE_F_LOOPBACK) != 0) && (loopback6_interface == NULL))
+ {
+ loopback6_interface = itf;
+ }
}
-# endif /* not USE_STREAMS_DEVICE_FOR_IF_CONFIG */
+#endif /* HAVE_IPV6 */
- i = 1;
-# if !defined(SYS_WINNT)
- ifc.ifc_len = sizeof(buf);
-# endif
-# ifdef STREAMS_TLI
- ioc.ic_cmd = SIOCGIFCONF;
- ioc.ic_timout = 0;
- ioc.ic_dp = (caddr_t)buf;
- ioc.ic_len = sizeof(buf);
- if(ioctl(vs, I_STR, &ioc) < 0 ||
- ioc.ic_len < sizeof(struct ifreq))
- {
- msyslog(LOG_ERR, "create_sockets: ioctl(I_STR:SIOCGIFCONF) failed: %m - exiting");
- exit(1);
- }
-# ifdef SIZE_RETURNED_IN_BUFFER
- ifc.ifc_len = ioc.ic_len - sizeof(int);
- ifc.ifc_buf = buf + sizeof(int);
-# else /* not SIZE_RETURNED_IN_BUFFER */
- ifc.ifc_len = ioc.ic_len;
- ifc.ifc_buf = buf;
-# endif /* not SIZE_RETURNED_IN_BUFFER */
-
-# else /* not STREAMS_TLI */
- ifc.ifc_len = sizeof(buf);
- ifc.ifc_buf = buf;
-# ifndef SYS_WINNT
- if (ioctl(vs, SIOCGIFCONF, (char *)&ifc) < 0)
-# else
- if (WSAIoctl(vs, SIO_GET_INTERFACE_LIST, 0, 0, ifc.ifc_buf, ifc.ifc_len, &ifc.ifc_len, 0, 0) == SOCKET_ERROR)
-# endif /* SYS_WINNT */
-{
- msyslog(LOG_ERR, "create_sockets: ioctl(SIOCGIFCONF) failed: %m - exiting");
- exit(1);
+ /* Process the rest of the flags */
+
+ if((isc_if->flags & INTERFACE_F_UP) != 0)
+ itf->flags |= INT_UP;
+ if((isc_if->flags & INTERFACE_F_LOOPBACK) != 0)
+ itf->flags |= INT_LOOPBACK;
+ if((isc_if->flags & INTERFACE_F_POINTTOPOINT) != 0)
+ itf->flags |= INT_PPP;
}
+/*
+ * create_sockets - create a socket for each interface plus a default
+ * socket for when we don't know where to send
+ */
+static int
+create_sockets(
+ u_short port
+ )
+{
+ struct sockaddr_storage resmask;
+ int i;
+ isc_mem_t *mctx = NULL;
+ isc_interfaceiter_t *iter = NULL;
+ isc_boolean_t scan_ipv4 = ISC_FALSE;
+ isc_boolean_t scan_ipv6 = ISC_FALSE;
+ isc_result_t result;
+ int idx = 0;
-# endif /* not STREAMS_TLI */
+#ifdef DEBUG
+ if (debug)
+ printf("create_sockets(%d)\n", ntohs( (u_short) port));
+#endif
+
+ if (isc_net_probeipv6() == ISC_R_SUCCESS)
+ scan_ipv6 = ISC_TRUE;
+#ifdef HAVE_IPV6
+ else
+ netsyslog(LOG_ERR, "no IPv6 interfaces found");
+#endif
- for(n = ifc.ifc_len, ifr = ifc.ifc_req; n > 0;
- ifr = (struct ifreq *)((char *)ifr + size))
+ if (isc_net_probeipv4() == ISC_R_SUCCESS)
+ scan_ipv4 = ISC_TRUE;
+ else
+ netsyslog(LOG_ERR, "no IPv4 interfaces found");
+
+ nwilds = create_wildcards(port);
+ idx = nwilds;
+
+ result = isc_interfaceiter_create(mctx, &iter);
+ if (result != ISC_R_SUCCESS)
+ return (result);
+
+ for (result = isc_interfaceiter_first(iter);
+ result == ISC_R_SUCCESS;
+ result = isc_interfaceiter_next(iter))
{
- size = sizeof(*ifr);
+ isc_interface_t isc_if;
+ unsigned int family;
-# ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
- if (ifr->ifr_addr.sa_len > sizeof(ifr->ifr_addr))
- size += ifr->ifr_addr.sa_len - sizeof(struct sockaddr);
-# endif
- n -= size;
+ result = isc_interfaceiter_current(iter, &isc_if);
+ if (result != ISC_R_SUCCESS)
+ break;
-# if !defined(SYS_WINNT)
- /* Exclude logical interfaces (indicated by ':' in the interface name) */
- if (debug)
- printf("interface <%s> ", ifr->ifr_name);
- if ((listen_to_virtual_ips == 0)
- && (strchr(ifr->ifr_name, (int)':') != NULL)) {
- if (debug)
- printf("ignored\n");
+ /* See if we have a valid family to use */
+ family = isc_if.address.family;
+ if (family != AF_INET && family != AF_INET6)
continue;
- }
- if (debug)
- printf("OK\n");
-
- if (
-# ifdef VMS /* VMS+UCX */
- (((struct sockaddr *)&(ifr->ifr_addr))->sa_family != AF_INET)
-# else
- (ifr->ifr_addr.sa_family != AF_INET)
-# endif /* VMS+UCX */
- ) {
- if (debug)
- printf("ignoring %s - not AF_INET\n",
- ifr->ifr_name);
+ if (scan_ipv4 == ISC_FALSE && family == AF_INET)
continue;
- }
-# endif /* SYS_WINNT */
- ifreq = *ifr;
- inter_list[i].flags = 0;
- /* is it broadcast capable? */
-# ifndef SYS_WINNT
-# ifdef STREAMS_TLI
- ioc.ic_cmd = SIOCGIFFLAGS;
- ioc.ic_timout = 0;
- ioc.ic_dp = (caddr_t)&ifreq;
- ioc.ic_len = sizeof(struct ifreq);
- if(ioctl(vs, I_STR, &ioc)) {
- msyslog(LOG_ERR, "create_sockets: ioctl(I_STR:SIOCGIFFLAGS) failed: %m");
- continue;
- }
-# else /* not STREAMS_TLI */
- if (ioctl(vs, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
- if (errno != ENXIO)
- msyslog(LOG_ERR, "create_sockets: ioctl(SIOCGIFFLAGS) failed: %m");
+ if (scan_ipv6 == ISC_FALSE && family == AF_INET6)
continue;
- }
-# endif /* not STREAMS_TLI */
- if ((ifreq.ifr_flags & IFF_UP) == 0) {
- if (debug)
- printf("ignoring %s - interface not UP\n",
- ifr->ifr_name);
- continue;
- }
- inter_list[i].flags = 0;
- if (ifreq.ifr_flags & IFF_BROADCAST)
- inter_list[i].flags |= INT_BROADCAST;
-# endif /* not SYS_WINNT */
-# if !defined(SUN_3_3_STINKS)
- if (
-# if defined(IFF_LOCAL_LOOPBACK) /* defined(SYS_HPUX) && (SYS_HPUX < 8) */
- (ifreq.ifr_flags & IFF_LOCAL_LOOPBACK)
-# elif defined(IFF_LOOPBACK)
- (ifreq.ifr_flags & IFF_LOOPBACK)
-# else /* not IFF_LOCAL_LOOPBACK and not IFF_LOOPBACK */
- /* test against 127.0.0.1 (yuck!!) */
- ((*(struct sockaddr_in *)&ifr->ifr_addr).sin_addr.s_addr == inet_addr("127.0.0.1"))
-# endif /* not IFF_LOCAL_LOOPBACK and not IFF_LOOPBACK */
- )
- {
-# ifndef SYS_WINNT
- inter_list[i].flags |= INT_LOOPBACK;
-# endif /* not SYS_WINNT */
- if (loopback_interface == 0)
- {
- loopback_interface = &inter_list[i];
- }
- }
-# endif /* not SUN_3_3_STINKS */
-#if 0
-# ifndef SYS_WINNT
-# ifdef STREAMS_TLI
- ioc.ic_cmd = SIOCGIFADDR;
- ioc.ic_timout = 0;
- ioc.ic_dp = (caddr_t)&ifreq;
- ioc.ic_len = sizeof(struct ifreq);
- if (ioctl(vs, I_STR, &ioc))
- {
- msyslog(LOG_ERR, "create_sockets: ioctl(I_STR:SIOCGIFADDR) failed: %m");
- continue;
+ /* Check to see if we are going to use the interface */
+ if (address_okay(&isc_if) == ISC_TRUE) {
+ convert_isc_if(&isc_if, &inter_list[idx], port);
+ inter_list[idx].fd = INVALID_SOCKET;
+ inter_list[idx].bfd = INVALID_SOCKET;
+ inter_list[idx].num_mcast = 0;
+ inter_list[idx].received = 0;
+ inter_list[idx].sent = 0;
+ inter_list[idx].notsent = 0;
+ idx++;
}
-# else /* not STREAMS_TLI */
- if (ioctl(vs, SIOCGIFADDR, (char *)&ifreq) < 0)
- {
- if (errno != ENXIO)
- msyslog(LOG_ERR, "create_sockets: ioctl(SIOCGIFADDR) failed: %m");
- continue;
- }
-# endif /* not STREAMS_TLI */
-# endif /* not SYS_WINNT */
-#endif /* 0 */
-# if defined(SYS_WINNT)
- {int TODO_FillInTheNameWithSomeThingReasonble;}
-# else
- (void)strncpy(inter_list[i].name, ifreq.ifr_name,
- sizeof(inter_list[i].name));
-# endif
- inter_list[i].sin = *(struct sockaddr_in *)&ifr->ifr_addr;
- inter_list[i].sin.sin_family = AF_INET;
- inter_list[i].sin.sin_port = port;
-
-# if defined(SUN_3_3_STINKS)
- /*
- * Oh, barf! I'm too disgusted to even explain this
- */
- if (SRCADR(&inter_list[i].sin) == 0x7f000001)
- {
- inter_list[i].flags |= INT_LOOPBACK;
- if (loopback_interface == 0)
- loopback_interface = &inter_list[i];
- }
-# endif /* SUN_3_3_STINKS */
-# if !defined SYS_WINNT && !defined SYS_CYGWIN32 /* no interface flags on NT */
- if (inter_list[i].flags & INT_BROADCAST) {
-# ifdef STREAMS_TLI
- ioc.ic_cmd = SIOCGIFBRDADDR;
- ioc.ic_timout = 0;
- ioc.ic_dp = (caddr_t)&ifreq;
- ioc.ic_len = sizeof(struct ifreq);
- if(ioctl(vs, I_STR, &ioc)) {
- msyslog(LOG_ERR, "create_sockets: ioctl(I_STR:SIOCGIFBRDADDR) failed: %m");
- exit(1);
- }
-# else /* not STREAMS_TLI */
- if (ioctl(vs, SIOCGIFBRDADDR, (char *)&ifreq) < 0) {
- msyslog(LOG_ERR, "create_sockets: ioctl(SIOCGIFBRDADDR) failed: %m");
- exit(1);
- }
-# endif /* not STREAMS_TLI */
-
-# ifndef ifr_broadaddr
- inter_list[i].bcast =
- *(struct sockaddr_in *)&ifreq.ifr_addr;
-# else
- inter_list[i].bcast =
- *(struct sockaddr_in *)&ifreq.ifr_broadaddr;
-# endif /* ifr_broadaddr */
- inter_list[i].bcast.sin_family = AF_INET;
- inter_list[i].bcast.sin_port = port;
- }
-
-# ifdef STREAMS_TLI
- ioc.ic_cmd = SIOCGIFNETMASK;
- ioc.ic_timout = 0;
- ioc.ic_dp = (caddr_t)&ifreq;
- ioc.ic_len = sizeof(struct ifreq);
- if(ioctl(vs, I_STR, &ioc)) {
- msyslog(LOG_ERR, "create_sockets: ioctl(I_STR:SIOCGIFNETMASK) failed: %m");
- exit(1);
- }
-# else /* not STREAMS_TLI */
- if (ioctl(vs, SIOCGIFNETMASK, (char *)&ifreq) < 0) {
- msyslog(LOG_ERR, "create_sockets: ioctl(SIOCGIFNETMASK) failed: %m");
- exit(1);
- }
-# endif /* not STREAMS_TLI */
- inter_list[i].mask = *(struct sockaddr_in *)&ifreq.ifr_addr;
-# else
- /* winnt here */
- inter_list[i].bcast = ifreq.ifr_broadaddr;
- inter_list[i].bcast.sin_family = AF_INET;
- inter_list[i].bcast.sin_port = port;
- inter_list[i].mask = ifreq.ifr_mask;
-# endif /* not SYS_WINNT */
-
- /*
- * look for an already existing source interface address. If
- * the machine has multiple point to point interfaces, then
- * the local address may appear more than once.
- */
- for (j=0; j < i; j++)
- if (inter_list[j].sin.sin_addr.s_addr ==
- inter_list[i].sin.sin_addr.s_addr) {
- break;
- }
- if (j == i)
- i++;
- if (i > MAXINTERFACES)
- break;
}
- closesocket(vs);
-#endif /* _BSDI_VERSION >= 199510 */
+ isc_interfaceiter_destroy(&iter);
- ninterfaces = i;
+ ninterfaces = idx;
+ /*
+ * I/O Completion Ports don't care about the select and FD_SET
+ */
+#ifndef HAVE_IO_COMPLETION_PORT
maxactivefd = 0;
FD_ZERO(&activefds);
+#endif
for (i = 0; i < ninterfaces; i++) {
inter_list[i].fd = open_socket(&inter_list[i].sin,
inter_list[i].flags & INT_BROADCAST, 0);
- }
-
- /*
- * Now that we have opened all the sockets, turn off the reuse flag for
- * security.
- */
- for (i = 0; i < ninterfaces; i++) {
- int off = 0;
-
- /*
- * if inter_list[ n ].fd is -1, we might have a adapter
- * configured but not present
- */
- if ( inter_list[ i ].fd != -1 ) {
- if (setsockopt(inter_list[i].fd, SOL_SOCKET,
- SO_REUSEADDR, (char *)&off,
- sizeof(off))) {
- msyslog(LOG_ERR, "create_sockets: setsockopt(SO_REUSEADDR,off) failed: %m");
- }
+ if (inter_list[i].bfd != INVALID_SOCKET)
+ msyslog(LOG_INFO, "Listening on interface %s, %s#%d",
+ inter_list[i].name,
+ stoa((&inter_list[i].sin)),
+ NTP_PORT);
+ if ((inter_list[i].flags & INT_BROADCAST) &&
+ inter_list[i].bfd != INVALID_SOCKET)
+ msyslog(LOG_INFO, "Listening on broadcast address %s#%d",
+ stoa((&inter_list[i].bcast)),
+ NTP_PORT);
+#if defined (HAVE_IO_COMPLETION_PORT)
+ if (inter_list[i].fd != INVALID_SOCKET) {
+ io_completion_port_add_socket(inter_list[i].fd, &inter_list[i]);
}
+#endif
}
-#if defined(MCAST)
/*
- * enable possible multicast reception on the broadcast socket
+ * Now that we have opened all the sockets, turn off the reuse
+ * flag for security.
*/
- inter_list[0].bcast.sin_addr.s_addr = htonl(INADDR_ANY);
- inter_list[0].bcast.sin_family = AF_INET;
- inter_list[0].bcast.sin_port = port;
-#endif /* MCAST */
+ set_reuseaddr(0);
/*
* Blacklist all bound interface addresses
+ * Wildcard interfaces are ignored.
*/
- resmask.sin_addr.s_addr = ~ (u_int32)0;
- for (i = 1; i < ninterfaces; i++)
+
+ for (i = nwilds; i < ninterfaces; i++) {
+ SET_HOSTMASK(&resmask, inter_list[i].sin.ss_family);
hack_restrict(RESTRICT_FLAGS, &inter_list[i].sin, &resmask,
RESM_NTPONLY|RESM_INTERFACE, RES_IGNORE);
+ }
+
+ /*
+ * Calculate the address hash for each interface address.
+ */
+ for (i = 0; i < ninterfaces; i++) {
+ inter_list[i].addr_refid = addr2refid(&inter_list[i].sin);
+ }
+
+
#ifdef DEBUG
if (debug > 1) {
printf("create_sockets: ninterfaces=%d\n", ninterfaces);
@@ -659,20 +545,15 @@ create_sockets(
inter_list[i].flags);
/* Leave these as three printf calls. */
printf(" sin=%s",
- inet_ntoa((inter_list[i].sin.sin_addr)));
+ stoa((&inter_list[i].sin)));
if (inter_list[i].flags & INT_BROADCAST)
printf(" bcast=%s,",
- inet_ntoa((inter_list[i].bcast.sin_addr)));
+ stoa((&inter_list[i].bcast)));
printf(" mask=%s\n",
- inet_ntoa((inter_list[i].mask.sin_addr)));
+ stoa((&inter_list[i].mask)));
}
}
#endif
-#if defined (HAVE_IO_COMPLETION_PORT)
- for (i = 0; i < ninterfaces; i++) {
- io_completion_port_add_socket(&inter_list[i]);
- }
-#endif
return ninterfaces;
}
@@ -684,10 +565,19 @@ io_setbclient(void)
{
int i;
- for (i = 1; i < ninterfaces; i++) {
+#ifdef OPEN_BCAST_SOCKET
+ set_reuseaddr(1);
+#endif
+ for (i = nwilds; i < ninterfaces; i++) {
+ /* Only IPv4 addresses are valid for broadcast */
+ if (inter_list[i].bcast.ss_family != AF_INET)
+ continue;
+
+ /* Is this a broadcast address? */
if (!(inter_list[i].flags & INT_BROADCAST))
continue;
+ /* Do we already have the broadcast address open? */
if (inter_list[i].flags & INT_BCASTOPEN)
continue;
@@ -697,8 +587,54 @@ io_setbclient(void)
#ifdef OPEN_BCAST_SOCKET /* Was: !SYS_DOMAINOS && !SYS_LINUX */
inter_list[i].bfd = open_socket(&inter_list[i].bcast,
INT_BROADCAST, 1);
- inter_list[i].flags |= INT_BCASTOPEN;
+ if (inter_list[i].bfd != INVALID_SOCKET) {
+ inter_list[i].flags |= INT_BCASTOPEN;
+#if defined (HAVE_IO_COMPLETION_PORT)
+ io_completion_port_add_socket(inter_list[i].bfd, &inter_list[i]);
+#endif
+ }
+#ifdef DEBUG
+ if (debug) {
+ if (inter_list[i].bfd != INVALID_SOCKET)
+ printf("io_setbclient: Opened broadcast client on interface %d, socket: %d\n",
+ i, inter_list[i].bfd);
+ else
+ printf("io_setbclient: Unable to Open broadcast client on interface %d\n",
+ i);
+ }
+#endif
+#endif
+ }
+#ifdef OPEN_BCAST_SOCKET
+ set_reuseaddr(0);
+#endif
+#ifdef DEBUG
+ if (debug)
+ printf("io_setbclient: Opened broadcast clients\n");
#endif
+}
+
+/*
+ * set_reuseaddr() - set/clear REUSEADDR on all sockets
+ * NB possible hole - should we be doing this on broadcast
+ * fd's also?
+ */
+static void
+set_reuseaddr(int flag) {
+ int i;
+
+ for (i=0; i < ninterfaces; i++) {
+ /*
+ * if inter_list[ n ].fd is -1, we might have a adapter
+ * configured but not present
+ */
+ if (inter_list[i].fd != INVALID_SOCKET) {
+ if (setsockopt(inter_list[i].fd, SOL_SOCKET,
+ SO_REUSEADDR, (char *)&flag,
+ sizeof(flag))) {
+ netsyslog(LOG_ERR, "set_reuseaddr: setsockopt(SO_REUSEADDR, %s) failed: %m", flag ? "on" : "off");
+ }
+ }
}
}
@@ -708,83 +644,196 @@ io_setbclient(void)
*/
void
io_multicast_add(
- u_int32 addr
+ struct sockaddr_storage addr
)
{
#ifdef MCAST
struct ip_mreq mreq;
int i = ninterfaces; /* Use the next interface */
- u_int32 haddr = ntohl(addr);
+ u_int32 haddr = ntohl(((struct sockaddr_in*)&addr)->sin_addr.s_addr);
struct in_addr iaddr;
- int s;
+ SOCKET s;
struct sockaddr_in *sinp;
- iaddr.s_addr = addr;
- if (!IN_CLASSD(haddr)) {
- msyslog(LOG_ERR,
- "multicast address %s not class D",
- inet_ntoa(iaddr));
- return;
- }
- for (i = 0; i < ninterfaces; i++) {
- /* Already have this address */
- if (inter_list[i].sin.sin_addr.s_addr == addr)
+#ifdef HAVE_IPV6
+ struct ipv6_mreq mreq6;
+ struct in6_addr iaddr6;
+ struct sockaddr_in6 *sin6p;
+#endif /* HAVE_IPV6 */
+
+ switch (addr.ss_family)
+ {
+ case AF_INET :
+ iaddr = (((struct sockaddr_in*)&addr)->sin_addr);
+ if (!IN_CLASSD(haddr)) {
+ netsyslog(LOG_ERR,
+ "multicast address %s not class D",
+ inet_ntoa(iaddr));
return;
- /* found a free slot */
- if (inter_list[i].sin.sin_addr.s_addr == 0 &&
- inter_list[i].fd <= 0 && inter_list[i].bfd <= 0 &&
- inter_list[i].flags == 0)
+ }
+ for (i = nwilds; i < ninterfaces; i++) {
+ /* Be sure it's the correct family */
+ if (inter_list[i].sin.ss_family != AF_INET)
+ continue;
+ /* Already have this address */
+ if (SOCKCMP(&inter_list[i].sin, &addr))
+ return;
+ /* found a free slot */
+ if (SOCKNUL(&inter_list[i].sin) &&
+ inter_list[i].fd <= 0 && inter_list[i].bfd <= 0 &&
+ inter_list[i].flags == 0)
+ break;
+ }
+ sinp = (struct sockaddr_in*)&(inter_list[i].sin);
+ memset((char *)&mreq, 0, sizeof(mreq));
+ memset((char *)&inter_list[i], 0, sizeof(struct interface));
+ sinp->sin_family = AF_INET;
+ sinp->sin_addr = iaddr;
+ sinp->sin_port = htons(NTP_PORT);
+
+ /*
+ * Try opening a socket for the specified class D address. This
+ * works under SunOS 4.x, but not OSF1 .. :-(
+ */
+ set_reuseaddr(1);
+ s = open_socket((struct sockaddr_storage*)sinp, 0, 1);
+ set_reuseaddr(0);
+ if (s == INVALID_SOCKET) {
+ memset((char *)&inter_list[i], 0, sizeof(struct interface));
+ if (wildipv4 >= 0) {
+ i = wildipv4;
+ /* HACK ! -- stuff in an address */
+ inter_list[i].bcast = addr;
+ netsyslog(LOG_ERR,
+ "...multicast address %s using wildcard socket",
+ inet_ntoa(iaddr));
+ } else {
+ netsyslog(LOG_ERR,
+ "No wildcard socket available to use for address %s",
+ inet_ntoa(iaddr));
+ return;
+ }
+ } else {
+ inter_list[i].fd = s;
+ inter_list[i].bfd = INVALID_SOCKET;
+ (void) strncpy(inter_list[i].name, "multicast",
+ sizeof(inter_list[i].name));
+ ((struct sockaddr_in*)&inter_list[i].mask)->sin_addr.s_addr = htonl(~(u_int32)0);
+#if defined (HAVE_IO_COMPLETION_PORT)
+ io_completion_port_add_socket(inter_list[i].fd, &inter_list[i]);
+#endif
+ }
+
+ /*
+ * enable reception of multicast packets
+ */
+ mreq.imr_multiaddr = iaddr;
+ mreq.imr_interface.s_addr = htonl(INADDR_ANY);
+ if (setsockopt(inter_list[i].fd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
+ (char *)&mreq, sizeof(mreq)) == -1)
+ netsyslog(LOG_ERR,
+ "setsockopt IP_ADD_MEMBERSHIP fails: %m for %x / %x (%s)",
+ mreq.imr_multiaddr.s_addr,
+ mreq.imr_interface.s_addr, inet_ntoa(iaddr));
+ inter_list[i].flags |= INT_MULTICAST;
+ inter_list[i].num_mcast++;
+ if (i >= ninterfaces)
+ ninterfaces = i+1;
+
+ add_addr_to_list(&addr, i);
break;
- }
- sinp = &(inter_list[i].sin);
- memset((char *)&mreq, 0, sizeof(mreq));
- memset((char *)&inter_list[i], 0, sizeof inter_list[0]);
- sinp->sin_family = AF_INET;
- sinp->sin_addr = iaddr;
- sinp->sin_port = htons(123);
- /*
- * Try opening a socket for the specified class D address. This
- * works under SunOS 4.x, but not OSF1 .. :-(
- */
- s = open_socket(sinp, 0, 1);
- if (s < 0) {
- memset((char *)&inter_list[i], 0, sizeof inter_list[0]);
- i = 0;
- /* HACK ! -- stuff in an address */
- inter_list[i].bcast.sin_addr.s_addr = addr;
- msyslog(LOG_ERR,
- "...multicast address %s using wildcard socket",
- inet_ntoa(iaddr));
- } else {
- inter_list[i].fd = s;
- inter_list[i].bfd = -1;
- (void) strncpy(inter_list[i].name, "multicast",
- sizeof(inter_list[i].name));
- inter_list[i].mask.sin_addr.s_addr = htonl(~(u_int32)0);
+#ifdef HAVE_IPV6
+ case AF_INET6 :
+
+ iaddr6 = ((struct sockaddr_in6*)&addr)->sin6_addr;
+ if (!IN6_IS_ADDR_MULTICAST(&iaddr6)) {
+ netsyslog(LOG_ERR,
+ "address %s not IPv6 multicast address",
+ stoa(&addr));
+ return;
+ }
+ for (i = nwilds; i < ninterfaces; i++) {
+ /* Be sure it's the correct family */
+ if(inter_list[i].sin.ss_family != AF_INET6)
+ continue;
+ /* Already have this address */
+ if (SOCKCMP(&inter_list[i].sin, &addr))
+ return;
+ /* found a free slot */
+ if (SOCKNUL(&inter_list[i].sin) &&
+ inter_list[i].fd <= 0 && inter_list[i].bfd <= 0 &&
+ inter_list[i].flags == 0)
+ break;
+ }
+ sin6p = (struct sockaddr_in6*)&inter_list[i].sin;
+ memset((char *)&mreq6, 0, sizeof(mreq6));
+ memset((char *)&inter_list[i], 0, sizeof(struct interface));
+ sin6p->sin6_family = AF_INET6;
+ sin6p->sin6_addr = iaddr6;
+ sin6p->sin6_port = htons(NTP_PORT);
+
+ /*
+ * Try opening a socket for the specified class D address. This
+ * works under SunOS 4.x, but not OSF1 .. :-(
+ */
+ set_reuseaddr(1);
+ s = open_socket((struct sockaddr_storage*)sin6p, 0, 1);
+ set_reuseaddr(0);
+ if(s == INVALID_SOCKET){
+ memset((char *)&inter_list[i], 0, sizeof(struct interface));
+ if (wildipv6 >= 0) {
+ i = wildipv6;
+ /* HACK ! -- stuff in an address */
+ inter_list[i].bcast = addr;
+ netsyslog(LOG_ERR,
+ "...multicast address %s using wildcard socket",
+ stoa(&addr));
+ } else {
+ netsyslog(LOG_ERR,
+ "No wildcard socket available to use for address %s",
+ stoa(&addr));
+ return;
+ }
+ } else {
+ inter_list[i].fd = s;
+ inter_list[i].bfd = INVALID_SOCKET;
+ (void)strncpy(inter_list[i].name, "multicast",
+ sizeof(inter_list[i].name));
+ memset(&(((struct sockaddr_in6*)&inter_list[i].mask)->sin6_addr), 1, sizeof(struct in6_addr));
+#if defined (HAVE_IO_COMPLETION_PORT)
+ io_completion_port_add_socket(inter_list[i].fd, &inter_list[i]);
+#endif
+ }
+
+ /*
+ * enable reception of multicast packets
+ */
+ mreq6.ipv6mr_multiaddr = iaddr6;
+ mreq6.ipv6mr_interface = 0;
+ if(setsockopt(inter_list[i].fd, IPPROTO_IPV6, IPV6_JOIN_GROUP,
+ (char *)&mreq6, sizeof(mreq6)) == -1)
+ netsyslog(LOG_ERR,
+ "setsockopt IPV6_JOIN_GROUP fails: %m on interface %d(%s)",
+ mreq6.ipv6mr_interface, stoa(&addr));
+ inter_list[i].flags |= INT_MULTICAST;
+ inter_list[i].num_mcast++;
+ if(i >= ninterfaces)
+ ninterfaces = i+1;
+
+ add_addr_to_list(&addr, i);
+ break;
+#endif /* HAVE_IPV6 */
}
- /*
- * enable reception of multicast packets
- */
- mreq.imr_multiaddr = iaddr;
- mreq.imr_interface.s_addr = htonl(INADDR_ANY);
- if (setsockopt(inter_list[i].fd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
- (char *)&mreq, sizeof(mreq)) == -1)
- msyslog(LOG_ERR,
- "setsockopt IP_ADD_MEMBERSHIP fails: %m for %x / %x (%s)",
- mreq.imr_multiaddr.s_addr,
- mreq.imr_interface.s_addr, inet_ntoa(iaddr));
- inter_list[i].flags |= INT_MULTICAST;
- if (i >= ninterfaces)
- ninterfaces = i+1;
+#ifdef DEBUG
+ if (debug)
+ printf("io_multicast_add %s\n", stoa(&addr));
+#endif
#else /* MCAST */
- struct in_addr iaddr;
-
- iaddr.s_addr = addr;
- msyslog(LOG_ERR,
+ netsyslog(LOG_ERR,
"cannot add multicast address %s as no MCAST support",
- inet_ntoa(iaddr));
+ stoa(&addr));
#endif /* MCAST */
}
@@ -796,12 +845,12 @@ io_unsetbclient(void)
{
int i;
- for (i = 1; i < ninterfaces; i++)
+ for (i = nwilds; i < ninterfaces; i++)
{
if (!(inter_list[i].flags & INT_BCASTOPEN))
continue;
close_socket(inter_list[i].bfd);
- inter_list[i].bfd = -1;
+ inter_list[i].bfd = INVALID_SOCKET;
inter_list[i].flags &= ~INT_BCASTOPEN;
}
}
@@ -812,57 +861,125 @@ io_unsetbclient(void)
*/
void
io_multicast_del(
- u_int32 addr
+ struct sockaddr_storage addr
)
{
#ifdef MCAST
int i;
struct ip_mreq mreq;
- u_int32 haddr = ntohl(addr);
- struct sockaddr_in sinaddr;
+ u_int32 haddr;
- if (!IN_CLASSD(haddr))
- {
- sinaddr.sin_addr.s_addr = addr;
- msyslog(LOG_ERR,
- "invalid multicast address %s", ntoa(&sinaddr));
- return;
- }
+#ifdef HAVE_IPV6
+ struct ipv6_mreq mreq6;
+ struct in6_addr haddr6;
+#endif /* HAVE_IPV6 */
- /*
- * Disable reception of multicast packets
- */
- mreq.imr_multiaddr.s_addr = addr;
- mreq.imr_interface.s_addr = htonl(INADDR_ANY);
- for (i = 0; i < ninterfaces; i++)
+ switch (addr.ss_family)
{
- if (!(inter_list[i].flags & INT_MULTICAST))
- continue;
- if (!(inter_list[i].fd < 0))
- continue;
- if (addr != inter_list[i].sin.sin_addr.s_addr)
- continue;
- if (i != 0)
+ case AF_INET :
+
+ haddr = ntohl(((struct sockaddr_in*)&addr)->sin_addr.s_addr);
+
+ if (!IN_CLASSD(haddr))
{
- /* we have an explicit fd, so we can close it */
- close_socket(inter_list[i].fd);
- memset((char *)&inter_list[i], 0, sizeof inter_list[0]);
- inter_list[i].fd = -1;
- inter_list[i].bfd = -1;
+ netsyslog(LOG_ERR,
+ "invalid multicast address %s", stoa(&addr));
+ return;
}
- else
+
+ /*
+ * Disable reception of multicast packets
+ */
+ mreq.imr_multiaddr = ((struct sockaddr_in*)&addr)->sin_addr;
+ mreq.imr_interface.s_addr = htonl(INADDR_ANY);
+ for (i = 0; i < ninterfaces; i++)
{
- /* We are sharing "any address" port :-( Don't close it! */
- if (setsockopt(inter_list[i].fd, IPPROTO_IP, IP_DROP_MEMBERSHIP,
- (char *)&mreq, sizeof(mreq)) == -1)
- msyslog(LOG_ERR, "setsockopt IP_DROP_MEMBERSHIP fails: %m");
- /* This is **WRONG** -- there may be others ! */
- /* There should be a count of users ... */
- inter_list[i].flags &= ~INT_MULTICAST;
+ /* Be sure it's the correct family */
+ if (inter_list[i].sin.ss_family != AF_INET)
+ continue;
+ if (!(inter_list[i].flags & INT_MULTICAST))
+ continue;
+ if (!(inter_list[i].fd < 0))
+ continue;
+ if (!SOCKCMP(&addr, &inter_list[i].sin))
+ continue;
+ if (i != wildipv4)
+ {
+ /* we have an explicit fd, so we can close it */
+ close_socket(inter_list[i].fd);
+ memset((char *)&inter_list[i], 0, sizeof(struct interface));
+ inter_list[i].fd = INVALID_SOCKET;
+ inter_list[i].bfd = INVALID_SOCKET;
+ }
+ else
+ {
+ /* We are sharing "any address" port :-( Don't close it! */
+ if (setsockopt(inter_list[i].fd, IPPROTO_IP, IP_DROP_MEMBERSHIP,
+ (char *)&mreq, sizeof(mreq)) == -1)
+ netsyslog(LOG_ERR, "setsockopt IP_DROP_MEMBERSHIP fails on address: %s %m",
+ stoa(&addr));
+ inter_list[i].num_mcast--;
+ /* If there are none left negate the Multicast flag */
+ if(inter_list[i].num_mcast == 0)
+ inter_list[i].flags &= ~INT_MULTICAST;
+ }
}
- }
+ break;
+
+#ifdef HAVE_IPV6
+ case AF_INET6 :
+ haddr6 = ((struct sockaddr_in6*)&addr)->sin6_addr;
+
+ if (!IN6_IS_ADDR_MULTICAST(&haddr6))
+ {
+ netsyslog(LOG_ERR,
+ "invalid multicast address %s", stoa(&addr));
+ return;
+ }
+
+ /*
+ * Disable reception of multicast packets
+ */
+ mreq6.ipv6mr_multiaddr = ((struct sockaddr_in6*)&addr)->sin6_addr;
+ mreq6.ipv6mr_interface = 0;
+ for (i = 0; i < ninterfaces; i++)
+ {
+ /* Be sure it's the correct family */
+ if (inter_list[i].sin.ss_family != AF_INET6)
+ continue;
+ if (!(inter_list[i].flags & INT_MULTICAST))
+ continue;
+ if (!(inter_list[i].fd < 0))
+ continue;
+ if (!SOCKCMP(&addr, &inter_list[i].sin))
+ continue;
+ if (i != wildipv6)
+ {
+ /* we have an explicit fd, so we can close it */
+ close_socket(inter_list[i].fd);
+ memset((char *)&inter_list[i], 0, sizeof(struct interface));
+ inter_list[i].fd = INVALID_SOCKET;
+ inter_list[i].bfd = INVALID_SOCKET;
+ }
+ else
+ {
+ /* We are sharing "any address" port :-( Don't close it! */
+ if (setsockopt(inter_list[i].fd, IPPROTO_IPV6, IPV6_LEAVE_GROUP,
+ (char *)&mreq6, sizeof(mreq6)) == -1)
+ netsyslog(LOG_ERR, "setsockopt IP_DROP_MEMBERSHIP fails on address %s: %m",
+ stoa(&addr));
+ /* If there are none left negate the Multicast flag */
+ if(inter_list[i].num_mcast == 0)
+ inter_list[i].flags &= ~INT_MULTICAST;
+ }
+ }
+ break;
+#endif /* HAVE_IPV6 */
+ }/* switch */
+ delete_addr_from_list(&addr);
+
#else /* not MCAST */
- msyslog(LOG_ERR, "this function requires multicast kernel");
+ netsyslog(LOG_ERR, "this function requires multicast kernel");
#endif /* not MCAST */
}
@@ -870,87 +987,163 @@ io_multicast_del(
/*
* open_socket - open a socket, returning the file descriptor
*/
-static int
+
+static SOCKET
open_socket(
- struct sockaddr_in *addr,
+ struct sockaddr_storage *addr,
int flags,
int turn_off_reuse
)
{
- int fd;
+ int errval;
+ SOCKET fd;
int on = 1, off = 0;
#if defined(IPTOS_LOWDELAY) && defined(IPPROTO_IP) && defined(IP_TOS)
int tos;
#endif /* IPTOS_LOWDELAY && IPPROTO_IP && IP_TOS */
+ if ((addr->ss_family == AF_INET6) && (isc_net_probeipv6() != ISC_R_SUCCESS))
+ return (INVALID_SOCKET);
+
/* create a datagram (UDP) socket */
- if ( (fd = socket(AF_INET, SOCK_DGRAM, 0))
#ifndef SYS_WINNT
- < 0
+ if ( (fd = socket(addr->ss_family, SOCK_DGRAM, 0)) < 0) {
+ errval = errno;
+ if(addr->ss_family == AF_INET)
+ netsyslog(LOG_ERR, "socket(AF_INET, SOCK_DGRAM, 0) failed on address %s: %m",
+ stoa(addr));
+ else if(addr->ss_family == AF_INET6)
+ netsyslog(LOG_ERR, "socket(AF_INET6, SOCK_DGRAM, 0) failed on address %s: %m",
+ stoa(addr));
+ if (errval == EPROTONOSUPPORT || errval == EAFNOSUPPORT ||
+ errval == EPFNOSUPPORT)
+ return (INVALID_SOCKET);
+ exit(1);
+ /*NOTREACHED*/
+ }
#else
- == INVALID_SOCKET
-#endif /* SYS_WINNT */
- )
- {
- msyslog(LOG_ERR, "socket(AF_INET, SOCK_DGRAM, 0) failed: %m");
+ if ( (fd = socket(addr->ss_family, SOCK_DGRAM, 0)) == INVALID_SOCKET) {
+ errval = WSAGetLastError();
+ if(addr->ss_family == AF_INET)
+ netsyslog(LOG_ERR, "socket(AF_INET, SOCK_DGRAM, 0) failed on address %s: %m",
+ stoa(addr));
+ else if(addr->ss_family == AF_INET6)
+ netsyslog(LOG_ERR, "socket(AF_INET6, SOCK_DGRAM, 0) failed on address %s: %m",
+ stoa(addr));
+ if (errval == WSAEPROTONOSUPPORT || errval == WSAEAFNOSUPPORT ||
+ errval == WSAEPFNOSUPPORT)
+ return (INVALID_SOCKET);
exit(1);
/*NOTREACHED*/
}
+ if (connection_reset_fix(fd) != ISC_R_SUCCESS) {
+ netsyslog(LOG_ERR, "connection_reset_fix(fd) failed on address %s: %m",
+ stoa(addr));
+ }
+
+#endif /* SYS_WINNT */
/* set SO_REUSEADDR since we will be binding the same port
number on each interface */
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
(char *)&on, sizeof(on)))
{
- msyslog(LOG_ERR, "setsockopt SO_REUSEADDR on fails: %m");
+ netsyslog(LOG_ERR, "setsockopt SO_REUSEADDR on fails on address %s: %m",
+ stoa(addr));
}
#if defined(IPTOS_LOWDELAY) && defined(IPPROTO_IP) && defined(IP_TOS)
/* set IP_TOS to minimize packet delay */
tos = IPTOS_LOWDELAY;
- if (setsockopt(fd, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(tos)) < 0)
- {
- msyslog(LOG_ERR, "setsockopt IPTOS_LOWDELAY on fails: %m");
- }
+ if (addr->ss_family == AF_INET)
+ if (setsockopt(fd, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(tos)) < 0)
+ {
+ netsyslog(LOG_ERR, "setsockopt IPTOS_LOWDELAY on fails on address %s: %m",
+ stoa(addr));
+ }
+
+#if defined(IPV6_V6ONLY)
+ if (addr->ss_family == AF_INET6)
+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY,
+ (char*)&on, sizeof(on)))
+ {
+ netsyslog(LOG_ERR, "setsockopt IPV6_V6ONLY on fails on address %s: %m",
+ stoa(addr));
+ }
+#else /* IPV6_V6ONLY */
+#if defined(IPV6_BINDV6ONLY)
+ if (addr->ss_family == AF_INET6)
+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_BINDV6ONLY,
+ (char*)&on, sizeof(on)))
+ {
+ netsyslog(LOG_ERR,
+ "setsockopt IPV6_BINDV6ONLY on fails on address %s: %m",
+ stoa(addr));
+ }
+#endif /* IPV6_BINDV6ONLY */
+#endif /* IPV6_V6ONLY */
+
#endif /* IPTOS_LOWDELAY && IPPROTO_IP && IP_TOS */
/*
* bind the local address.
*/
- if (bind(fd, (struct sockaddr *)addr, sizeof(*addr)) < 0) {
+ if (bind(fd, (struct sockaddr *)addr, SOCKLEN(addr)) < 0) {
char buff[160];
- sprintf(buff,
- "bind() fd %d, family %d, port %d, addr %s, in_classd=%d flags=%d fails: %%m",
- fd, addr->sin_family, (int)ntohs(addr->sin_port),
- ntoa(addr),
- IN_CLASSD(ntohl(addr->sin_addr.s_addr)), flags);
- msyslog(LOG_ERR, buff);
+
+ if(addr->ss_family == AF_INET)
+ sprintf(buff,
+ "bind() fd %d, family %d, port %d, addr %s, in_classd=%d flags=%d fails: %%m",
+ fd, addr->ss_family, (int)ntohs(((struct sockaddr_in*)addr)->sin_port),
+ stoa(addr),
+ IN_CLASSD(ntohl(((struct sockaddr_in*)addr)->sin_addr.s_addr)), flags);
+ else if(addr->ss_family == AF_INET6)
+ sprintf(buff,
+ "bind() fd %d, family %d, port %d, addr %s, in6_is_addr_multicast=%d flags=%d fails: %%m",
+ fd, addr->ss_family, (int)ntohs(((struct sockaddr_in6*)addr)->sin6_port),
+ stoa(addr),
+ IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6*)addr)->sin6_addr), flags);
+ else return INVALID_SOCKET;
+
+ netsyslog(LOG_ERR, buff);
closesocket(fd);
/*
- * soft fail if opening a class D address
+ * soft fail if opening a multicast address
*/
- if (IN_CLASSD(ntohl(addr->sin_addr.s_addr)))
- return -1;
+ if(addr->ss_family == AF_INET){
+ if(IN_CLASSD(ntohl(((struct sockaddr_in*)addr)->sin_addr.s_addr)))
+ return (INVALID_SOCKET);
+ }
+ else {
+ if(IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6*)addr)->sin6_addr))
+ return (INVALID_SOCKET);
+ }
#if 0
exit(1);
#else
- return -1;
+ return INVALID_SOCKET;
#endif
}
#ifdef DEBUG
if (debug)
printf("bind() fd %d, family %d, port %d, addr %s, flags=%d\n",
fd,
- addr->sin_family,
- (int)ntohs(addr->sin_port),
- ntoa(addr),
+ addr->ss_family,
+ (int)ntohs(((struct sockaddr_in*)addr)->sin_port),
+ stoa(addr),
flags);
#endif
+
+ /*
+ * I/O Completion Ports don't care about the select and FD_SET
+ */
+#ifndef HAVE_IO_COMPLETION_PORT
if (fd > maxactivefd)
maxactivefd = fd;
FD_SET(fd, &activefds);
-
+#endif
+ add_socket_to_list(fd);
/*
* set non-blocking,
*/
@@ -967,43 +1160,46 @@ open_socket(
#if defined(O_NONBLOCK) /* POSIX */
if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
{
- msyslog(LOG_ERR, "fcntl(O_NONBLOCK) fails: %m");
+ netsyslog(LOG_ERR, "fcntl(O_NONBLOCK) fails on address %s: %m",
+ stoa(addr));
exit(1);
/*NOTREACHED*/
}
#elif defined(FNDELAY)
if (fcntl(fd, F_SETFL, FNDELAY) < 0)
{
- msyslog(LOG_ERR, "fcntl(FNDELAY) fails: %m");
+ netsyslog(LOG_ERR, "fcntl(FNDELAY) fails on address %s: %m",
+ stoa(addr));
exit(1);
/*NOTREACHED*/
}
#elif defined(O_NDELAY) /* generally the same as FNDELAY */
if (fcntl(fd, F_SETFL, O_NDELAY) < 0)
{
- msyslog(LOG_ERR, "fcntl(O_NDELAY) fails: %m");
+ netsyslog(LOG_ERR, "fcntl(O_NDELAY) fails on address %s: %m",
+ stoa(addr));
exit(1);
/*NOTREACHED*/
}
#elif defined(FIONBIO)
- if (
# if defined(VMS)
- (ioctl(fd,FIONBIO,&1) < 0)
+ if (ioctl(fd,FIONBIO,&on) < 0)
# elif defined(SYS_WINNT)
- (ioctlsocket(fd,FIONBIO,(u_long *) &on) == SOCKET_ERROR)
+ if (ioctlsocket(fd,FIONBIO,(u_long *) &on) == SOCKET_ERROR)
# else
- (ioctl(fd,FIONBIO,&on) < 0)
+ if (ioctl(fd,FIONBIO,&on) < 0)
# endif
- )
{
- msyslog(LOG_ERR, "ioctl(FIONBIO) fails: %m");
+ netsyslog(LOG_ERR, "ioctl(FIONBIO) fails on address %s: %m",
+ stoa(addr));
exit(1);
/*NOTREACHED*/
}
#elif defined(FIOSNBIO)
if (ioctl(fd,FIOSNBIO,&on) < 0)
{
- msyslog(LOG_ERR, "ioctl(FIOSNBIO) fails: %m");
+ netsyslog(LOG_ERR, "ioctl(FIOSNBIO) fails on address %s: %m",
+ stoa(addr));
exit(1);
/*NOTREACHED*/
}
@@ -1025,7 +1221,8 @@ open_socket(
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
(char *)&off, sizeof(off)))
{
- msyslog(LOG_ERR, "setsockopt SO_REUSEADDR off fails: %m");
+ netsyslog(LOG_ERR, "setsockopt SO_REUSEADDR off fails on address %s: %m",
+ stoa(addr));
}
#ifdef SO_BROADCAST
@@ -1035,7 +1232,8 @@ open_socket(
if (setsockopt(fd, SOL_SOCKET, SO_BROADCAST,
(char *)&on, sizeof(on)))
{
- msyslog(LOG_ERR, "setsockopt(SO_BROADCAST): %m");
+ netsyslog(LOG_ERR, "setsockopt(SO_BROADCAST) on address %s: %m",
+ stoa(addr));
}
}
#endif /* SO_BROADCAST */
@@ -1057,21 +1255,29 @@ open_socket(
*/
static void
close_socket(
- int fd
+ SOCKET fd
)
{
- int i, newmax;
+ SOCKET i, newmax;
(void) closesocket(fd);
+
+ /*
+ * I/O Completion Ports don't care about select and fd_set
+ */
+#ifndef HAVE_IO_COMPLETION_PORT
FD_CLR( (u_int) fd, &activefds);
- if (fd >= maxactivefd) {
+ if (fd == maxactivefd) {
newmax = 0;
for (i = 0; i < maxactivefd; i++)
if (FD_ISSET(i, &activefds))
newmax = i;
maxactivefd = newmax;
}
+#endif
+ delete_socket_from_list(fd);
+
}
@@ -1079,24 +1285,33 @@ close_socket(
* close_file - close a file and remove from the activefd list
* added 1/31/1997 Greg Schueman for Windows NT portability
*/
+#ifdef REFCLOCK
static void
close_file(
- int fd
+ SOCKET fd
)
{
int i, newmax;
(void) close(fd);
+ /*
+ * I/O Completion Ports don't care about select and fd_set
+ */
+#ifndef HAVE_IO_COMPLETION_PORT
FD_CLR( (u_int) fd, &activefds);
- if (fd >= maxactivefd) {
+ if (fd == maxactivefd) {
newmax = 0;
for (i = 0; i < maxactivefd; i++)
if (FD_ISSET(i, &activefds))
newmax = i;
maxactivefd = newmax;
}
+#endif
+ delete_socket_from_list(fd);
+
}
+#endif
/* XXX ELIMINATE sendpkt similar in ntpq.c, ntpdc.c, ntp_io.c, ntptrace.c */
@@ -1107,7 +1322,7 @@ close_file(
*/
void
sendpkt(
- struct sockaddr_in *dest,
+ struct sockaddr_storage *dest,
struct interface *inter,
int ttl,
struct pkt *pkt,
@@ -1120,7 +1335,7 @@ sendpkt(
#endif /* SYS_WINNT */
/*
- * Send error cache. Empty slots have port == 0
+ * Send error caches. Empty slots have port == 0
* Set ERRORCACHESIZE to 0 to disable
*/
struct cache {
@@ -1128,57 +1343,121 @@ sendpkt(
struct in_addr addr;
};
+#ifdef HAVE_IPV6
+ struct cache6 {
+ u_short port;
+ struct in6_addr addr;
+ };
+#endif /* HAVE_IPV6 */
+
#ifndef ERRORCACHESIZE
#define ERRORCACHESIZE 8
#endif
#if ERRORCACHESIZE > 0
static struct cache badaddrs[ERRORCACHESIZE];
+#ifdef HAVE_IPV6
+ static struct cache6 badaddrs6[ERRORCACHESIZE];
+#endif /* HAVE_IPV6 */
#else
#define badaddrs ((struct cache *)0) /* Only used in empty loops! */
+#ifdef HAVE_IPV6
+#define badaddrs6 ((struct cache6 *)0) /* Only used in empty loops! */
+#endif /* HAVE_IPV6 */
#endif
#ifdef DEBUG
if (debug > 1)
printf("%ssendpkt(fd=%d dst=%s, src=%s, ttl=%d, len=%d)\n",
(ttl >= 0) ? "\tMCAST\t*****" : "",
- inter->fd, ntoa(dest),
- ntoa(&inter->sin), ttl, len);
+ inter->fd, stoa(dest),
+ stoa(&inter->sin), ttl, len);
#endif
#ifdef MCAST
- /*
- * for the moment we use the bcast option to set multicast ttl
- */
- if (ttl > 0 && ttl != inter->last_ttl) {
- char mttl = ttl;
+
+ switch (inter->sin.ss_family) {
+
+ case AF_INET :
/*
- * set the multicast ttl for outgoing packets
+ * for the moment we use the bcast option to set multicast ttl
+ */
+ if (ttl > 0 && ttl != inter->last_ttl) {
+
+ /*
+ * set the multicast ttl for outgoing packets
+ */
+ if (setsockopt(inter->fd, IPPROTO_IP, IP_MULTICAST_TTL,
+ (char *) &ttl, sizeof(ttl)) != 0) {
+ netsyslog(LOG_ERR, "setsockopt IP_MULTICAST_TTL fails on address %s: %m",
+ stoa(&inter->sin));
+ }
+ else
+ inter->last_ttl = ttl;
+ }
+ break;
+
+#ifdef HAVE_IPV6
+ case AF_INET6 :
+
+ /*
+ * for the moment we use the bcast option to set
+ * multicast max hops
*/
- if (setsockopt(inter->fd, IPPROTO_IP, IP_MULTICAST_TTL,
- &mttl, sizeof(mttl)) == -1)
- msyslog(LOG_ERR, "setsockopt IP_MULTICAST_TTL fails: %m");
- else
- inter->last_ttl = ttl;
+ if (ttl > 0 && ttl != inter->last_ttl) {
+
+ /*
+ * set the multicast ttl for outgoing packets
+ */
+ if (setsockopt(inter->fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
+ &ttl, sizeof(ttl)) == -1)
+ netsyslog(LOG_ERR, "setsockopt IP_MULTICAST_TTL fails on address %s: %m",
+ stoa(&inter->sin));
+ else
+ inter->last_ttl = ttl;
+ }
+ break;
+#endif /* HAVE_IPV6 */
+
+ default :
+ exit(1);
+
}
+
+
#endif /* MCAST */
for (slot = ERRORCACHESIZE; --slot >= 0; )
- if (badaddrs[slot].port == dest->sin_port &&
- badaddrs[slot].addr.s_addr == dest->sin_addr.s_addr)
- break;
+ if(dest->ss_family == AF_INET) {
+ if (badaddrs[slot].port == ((struct sockaddr_in*)dest)->sin_port &&
+ badaddrs[slot].addr.s_addr == ((struct sockaddr_in*)dest)->sin_addr.s_addr)
+ break;
+ }
+#ifdef HAVE_IPV6
+ else if (dest->ss_family == AF_INET6) {
+ if (badaddrs6[slot].port == ((struct sockaddr_in6*)dest)->sin6_port &&
+ badaddrs6[slot].addr.s6_addr == ((struct sockaddr_in6*)dest)->sin6_addr.s6_addr)
+ break;
+ }
+#endif /* HAVE_IPV6 */
+ else exit(1); /* address family not supported yet */
#if defined(HAVE_IO_COMPLETION_PORT)
err = io_completion_port_sendto(inter, pkt, len, dest);
if (err != ERROR_SUCCESS)
#else
- cc = sendto(inter->fd, (char *)pkt, (size_t)len, 0, (struct sockaddr *)dest,
- sizeof(struct sockaddr_in));
+#ifdef SIM
+ cc = srvr_rply(&ntp_node, dest, inter, pkt);
+#else /* SIM */
+ cc = sendto(inter->fd, (char *)pkt, (unsigned int)len, 0, (struct sockaddr *)dest,
+ SOCKLEN(dest));
+#endif /* SIM */
if (cc == -1)
#endif
{
inter->notsent++;
packets_notsent++;
#if defined(HAVE_IO_COMPLETION_PORT)
+ err = WSAGetLastError();
if (err != WSAEWOULDBLOCK && err != WSAENOBUFS && slot < 0)
#else
if (errno != EWOULDBLOCK && errno != ENOBUFS && slot < 0)
@@ -1187,14 +1466,37 @@ sendpkt(
/*
* Remember this, if there's an empty slot
*/
- for (slot = ERRORCACHESIZE; --slot >= 0; )
- if (badaddrs[slot].port == 0)
- {
- badaddrs[slot].port = dest->sin_port;
- badaddrs[slot].addr = dest->sin_addr;
- break;
- }
- msyslog(LOG_ERR, "sendto(%s): %m", ntoa(dest));
+ switch (dest->ss_family) {
+
+ case AF_INET :
+
+ for (slot = ERRORCACHESIZE; --slot >= 0; )
+ if (badaddrs[slot].port == 0)
+ {
+ badaddrs[slot].port = SRCPORT(dest);
+ badaddrs[slot].addr = ((struct sockaddr_in*)dest)->sin_addr;
+ break;
+ }
+ break;
+
+#ifdef HAVE_IPV6
+ case AF_INET6 :
+
+ for (slot = ERRORCACHESIZE; --slot >= 0; )
+ if (badaddrs6[slot].port == 0)
+ {
+ badaddrs6[slot].port = SRCPORT(dest);
+ badaddrs6[slot].addr = ((struct sockaddr_in6*)dest)->sin6_addr;
+ break;
+ }
+ break;
+#endif /* HAVE_IPV6 */
+
+ default :
+ exit(1);
+ }
+
+ netsyslog(LOG_ERR, "sendto(%s): %m", stoa(dest));
}
}
else
@@ -1206,8 +1508,17 @@ sendpkt(
*/
if (slot >= 0)
{
- msyslog(LOG_INFO, "Connection re-established to %s", ntoa(dest));
- badaddrs[slot].port = 0;
+ netsyslog(LOG_INFO, "Connection re-established to %s", stoa(dest));
+ switch (dest->ss_family) {
+ case AF_INET :
+ badaddrs[slot].port = 0;
+ break;
+#ifdef HAVE_IPV6
+ case AF_INET6 :
+ badaddrs6[slot].port = 0;
+ break;
+#endif /* HAVE_IPV6 */
+ }
}
}
}
@@ -1249,7 +1560,7 @@ input_handler(
register int i, n;
register struct recvbuf *rb;
register int doing;
- register int fd;
+ register SOCKET fd;
struct timeval tvzero;
int fromlen;
l_fp ts; /* Timestamp at BOselect() gob */
@@ -1315,14 +1626,17 @@ input_handler(
if (rb->recv_length == -1)
{
- msyslog(LOG_ERR, "clock read fd %d: %m", fd);
+ netsyslog(LOG_ERR, "clock read fd %d: %m", fd);
freerecvbuf(rb);
goto select_again;
}
/*
- * Got one. Mark how and when it got here,
- * put it on the full list and do bookkeeping.
+ * Got one. Mark how
+ * and when it got here,
+ * put it on the full
+ * list and do
+ * bookkeeping.
*/
rb->recv_srcclock = rp->srcclock;
rb->dstadr = 0;
@@ -1333,13 +1647,25 @@ input_handler(
if (rp->io_input)
{
/*
- * have direct input routine for refclocks
+ * have direct
+ * input routine
+ * for refclocks
*/
if (rp->io_input(rb) == 0)
{
/*
- * data was consumed - nothing to pass up
- * into block input machine
+ * data
+ * was
+ * consumed
+ * -
+ * nothing
+ * to
+ * pass
+ * up
+ * into
+ * block
+ * input
+ * machine
*/
freerecvbuf(rb);
#if 1
@@ -1360,7 +1686,8 @@ input_handler(
#endif /* REFCLOCK */
/*
- * Loop through the interfaces looking for data to read.
+ * Loop through the interfaces looking for data
+ * to read.
*/
for (i = ninterfaces - 1; (i >= 0) && (n > 0); i--)
{
@@ -1382,9 +1709,12 @@ input_handler(
n--;
/*
- * Get a buffer and read the frame. If we
- * haven't got a buffer, or this is received
- * on the wild card socket, just dump the
+ * Get a buffer and read
+ * the frame. If we
+ * haven't got a buffer,
+ * or this is received
+ * on the wild card
+ * socket, just dump the
* packet.
*/
if (
@@ -1395,23 +1725,24 @@ input_handler(
*/
(free_recvbuffs() == 0)
#else
- ((i == 0) || (free_recvbuffs() == 0))
+ ((i == wildipv4) || (i == wildipv6)||
+ (free_recvbuffs() == 0))
#endif
)
{
char buf[RX_BUFF_SIZE];
- struct sockaddr from;
+ struct sockaddr_storage from;
fromlen = sizeof from;
- (void) recvfrom(fd, buf, sizeof(buf), 0, &from, &fromlen);
+ (void) recvfrom(fd, buf, sizeof(buf), 0, (struct sockaddr*)&from, &fromlen);
#ifdef DEBUG
if (debug)
printf("%s on %d(%lu) fd=%d from %s\n",
(i) ? "drop" : "ignore",
i, free_recvbuffs(), fd,
- inet_ntoa(((struct sockaddr_in *) &from)->sin_addr));
+ stoa(&from));
#endif
- if (i == 0)
+ if (i == wildipv4 || i == wildipv6)
packets_ignored++;
else
packets_dropped++;
@@ -1420,7 +1751,7 @@ input_handler(
rb = get_free_recv_buffer();
- fromlen = sizeof(struct sockaddr_in);
+ fromlen = sizeof(struct sockaddr_storage);
rb->recv_length = recvfrom(fd,
(char *)&rb->recv_space,
sizeof(rb->recv_space), 0,
@@ -1439,8 +1770,8 @@ input_handler(
}
else if (rb->recv_length < 0)
{
- msyslog(LOG_ERR, "recvfrom(%s) fd=%d: %m",
- inet_ntoa(rb->recv_srcadr.sin_addr), fd);
+ netsyslog(LOG_ERR, "recvfrom(%s) fd=%d: %m",
+ stoa(&rb->recv_srcadr), fd);
#ifdef DEBUG
if (debug)
printf("input_handler: fd=%d dropped (bad recvfrom)\n", fd);
@@ -1449,12 +1780,18 @@ input_handler(
continue;
}
#ifdef DEBUG
- if (debug > 2)
- printf("input_handler: if=%d fd=%d length %d from %08lx %s\n",
- i, fd, rb->recv_length,
- (u_long)ntohl(rb->recv_srcadr.sin_addr.s_addr) &
- 0x00000000ffffffff,
- inet_ntoa(rb->recv_srcadr.sin_addr));
+ if (debug > 2) {
+ if(rb->recv_srcadr.ss_family == AF_INET)
+ printf("input_handler: if=%d fd=%d length %d from %08lx %s\n",
+ i, fd, rb->recv_length,
+ (u_long)ntohl(((struct sockaddr_in*)&rb->recv_srcadr)->sin_addr.s_addr) &
+ 0x00000000ffffffff,
+ stoa(&rb->recv_srcadr));
+ else
+ printf("input_handler: if=%d fd=%d length %d from %s\n",
+ i, fd, rb->recv_length,
+ stoa(&rb->recv_srcadr));
+ }
#endif
/*
@@ -1467,7 +1804,7 @@ input_handler(
rb->receiver = receive;
add_full_recv_buffer(rb);
-
+
inter_list[i].received++;
packets_received++;
goto select_again;
@@ -1491,19 +1828,20 @@ input_handler(
if (select_count == 0) /* We really had nothing to do */
{
if (debug)
- msyslog(LOG_DEBUG, "input_handler: select() returned 0");
+ netsyslog(LOG_DEBUG, "input_handler: select() returned 0");
--handler_count;
return;
}
/* We've done our work */
get_systime(&ts_e);
/*
- * (ts_e - ts) is the amount of time we spent processing
- * this gob of file descriptors. Log it.
+ * (ts_e - ts) is the amount of time we spent
+ * processing this gob of file descriptors. Log
+ * it.
*/
L_SUB(&ts_e, &ts);
if (debug > 3)
- msyslog(LOG_INFO, "input_handler: Processed a gob of fd's in %s msec", lfptoms(&ts_e, 6));
+ netsyslog(LOG_INFO, "input_handler: Processed a gob of fd's in %s msec", lfptoms(&ts_e, 6));
/* just bail. */
--handler_count;
@@ -1516,8 +1854,11 @@ input_handler(
/*
* extended FAU debugging output
*/
- msyslog(LOG_ERR, "select(%d, %s, 0L, 0L, &0.000000) error: %m",
- maxactivefd+1, fdbits(maxactivefd, &activefds));
+ if (err != EINTR)
+ netsyslog(LOG_ERR,
+ "select(%d, %s, 0L, 0L, &0.0) error: %m",
+ maxactivefd+1,
+ fdbits(maxactivefd, &activefds));
if (err == EBADF) {
int j, b;
@@ -1526,7 +1867,7 @@ input_handler(
if (
(FD_ISSET(j, &fds) && (read(j, &b, 0) == -1))
)
- msyslog(LOG_ERR, "Bad file descriptor %d", j);
+ netsyslog(LOG_ERR, "Bad file descriptor %d", j);
}
--handler_count;
return;
@@ -1538,70 +1879,91 @@ input_handler(
}
#endif
-
/*
* findinterface - find interface corresponding to address
*/
struct interface *
findinterface(
- struct sockaddr_in *addr
+ struct sockaddr_storage *addr
)
{
- int s, rtn, i;
- struct sockaddr_in saddr;
- int saddrlen = sizeof(saddr);
- u_int32 xaddr;
-
+ SOCKET s;
+ int rtn, i;
+ struct sockaddr_storage saddr;
+ int saddrlen = SOCKLEN(addr);
/*
* This is considerably hoke. We open a socket, connect to it
* and slap a getsockname() on it. If anything breaks, as it
* probably will in some j-random knockoff, we just return the
* wildcard interface.
*/
- saddr.sin_family = AF_INET;
- saddr.sin_addr.s_addr = addr->sin_addr.s_addr;
- saddr.sin_port = htons(2000);
- s = socket(AF_INET, SOCK_DGRAM, 0);
- if (s < 0)
- return (any_interface);
-
- rtn = connect(s, (struct sockaddr *)&saddr, sizeof(saddr));
+ memset(&saddr, 0, sizeof(saddr));
+ saddr.ss_family = addr->ss_family;
+ if(addr->ss_family == AF_INET)
+ memcpy(&((struct sockaddr_in*)&saddr)->sin_addr, &((struct sockaddr_in*)addr)->sin_addr, sizeof(struct in_addr));
+ else if(addr->ss_family == AF_INET6)
+ memcpy(&((struct sockaddr_in6*)&saddr)->sin6_addr, &((struct sockaddr_in6*)addr)->sin6_addr, sizeof(struct in6_addr));
+ ((struct sockaddr_in*)&saddr)->sin_port = htons(2000);
+ s = socket(addr->ss_family, SOCK_DGRAM, 0);
+ if (s == INVALID_SOCKET)
+ return ANY_INTERFACE_CHOOSE(addr);
+
+ rtn = connect(s, (struct sockaddr *)&saddr, SOCKLEN(&saddr));
+#ifndef SYS_WINNT
if (rtn < 0)
- return (any_interface);
+#else
+ if (rtn == SOCKET_ERROR)
+#endif
+ {
+ closesocket(s);
+ return ANY_INTERFACE_CHOOSE(addr);
+ }
rtn = getsockname(s, (struct sockaddr *)&saddr, &saddrlen);
+ closesocket(s);
+#ifndef SYS_WINNT
if (rtn < 0)
- return (any_interface);
-
- close(s);
- xaddr = NSRCADR(&saddr);
- for (i = 1; i < ninterfaces; i++) {
+#else
+ if (rtn == SOCKET_ERROR)
+#endif
+ return ANY_INTERFACE_CHOOSE(addr);
+ for (i = 0; i < ninterfaces; i++) {
+ /*
+ * First look if is the the correct family
+ */
+ if(inter_list[i].sin.ss_family != saddr.ss_family)
+ continue;
/*
* We match the unicast address only.
*/
- if (NSRCADR(&inter_list[i].sin) == xaddr)
+ if (SOCKCMP(&inter_list[i].sin, &saddr))
return (&inter_list[i]);
}
- return (any_interface);
+ return ANY_INTERFACE_CHOOSE(addr);
}
-
/*
* findbcastinter - find broadcast interface corresponding to address
*/
struct interface *
findbcastinter(
- struct sockaddr_in *addr
+ struct sockaddr_storage *addr
)
{
#if !defined(MPE) && (defined(SIOCGIFCONF) || defined(SYS_WINNT))
register int i;
- register u_int32 xaddr;
-
- xaddr = NSRCADR(addr);
- for (i = 1; i < ninterfaces; i++) {
+
+ i = find_addr_in_list(addr);
+ if(i >= 0)
+ return (&inter_list[i]);
+ for (i = 0; i < ninterfaces; i++) {
+ /*
+ * First look if this is the correct family
+ */
+ if(inter_list[i].sin.ss_family != addr->ss_family)
+ continue;
/*
* We match only those interfaces marked as
* broadcastable and either the explicit broadcast
@@ -1610,15 +1972,23 @@ findbcastinter(
*/
if (!(inter_list[i].flags & INT_BROADCAST))
continue;
- if (NSRCADR(&inter_list[i].bcast) == xaddr)
- return (&inter_list[i]);
- if ((NSRCADR(&inter_list[i].sin) &
- NSRCADR(&inter_list[i].mask)) == (xaddr &
- NSRCADR(&inter_list[i].mask)))
- return (&inter_list[i]);
+ if(addr->ss_family == AF_INET) {
+ if (SOCKCMP(&inter_list[i].bcast, addr))
+ return (&inter_list[i]);
+ if ((NSRCADR(&inter_list[i].sin) &
+ NSRCADR(&inter_list[i].mask)) == (NSRCADR(addr) &
+ NSRCADR(&inter_list[i].mask)))
+ return (&inter_list[i]);
+ }
+ else if(addr->ss_family == AF_INET6) {
+ if (SOCKCMP(&inter_list[i].bcast, addr))
+ return (&inter_list[i]);
+ if (SOCKCMP(netof(&inter_list[i].sin), netof(addr)))
+ return (&inter_list[i]);
+ }
}
#endif /* SIOCGIFCONF */
- return (any_interface);
+ return ANY_INTERFACE_CHOOSE(addr);
}
@@ -1659,9 +2029,14 @@ io_addclock_simple(
rio->next = refio;
refio = rio;
+ /*
+ * I/O Completion Ports don't care about select and fd_set
+ */
+#ifndef HAVE_IO_COMPLETION_PORT
if (rio->fd > maxactivefd)
maxactivefd = rio->fd;
FD_SET(rio->fd, &activefds);
+#endif
UNBLOCKIO();
return 1;
}
@@ -1693,16 +2068,21 @@ io_addclock(
# elif defined(HAVE_IO_COMPLETION_PORT)
if (io_completion_port_add_clock_io(rio))
{
+ add_socket_to_list(rio->fd);
refio = rio->next;
UNBLOCKIO();
return 0;
}
# endif
+ /*
+ * I/O Completion Ports don't care about select and fd_set
+ */
+#ifndef HAVE_IO_COMPLETION_PORT
if (rio->fd > maxactivefd)
maxactivefd = rio->fd;
FD_SET(rio->fd, &activefds);
-
+#endif
UNBLOCKIO();
return 1;
}
@@ -1751,12 +2131,127 @@ io_closeclock(
}
#endif /* REFCLOCK */
+ /*
+ * I/O Completion Ports don't care about select and fd_set
+ */
+#ifndef HAVE_IO_COMPLETION_PORT
void
-kill_asyncio(void)
+kill_asyncio(
+ int startfd
+ )
{
- int i;
+ SOCKET i;
BLOCKIO();
- for (i = 0; i <= maxactivefd; i++)
+ for (i = startfd; i <= maxactivefd; i++)
(void)close_socket(i);
}
+#else
+/*
+ * On NT a SOCKET is an unsigned int so we cannot possibly keep it in
+ * an array. So we use one of the ISC_LIST functions to hold the
+ * socket value and use that when we want to enumerate it.
+ */
+void
+kill_asyncio(int startfd)
+{
+ vsock_t *lsock;
+ vsock_t *next;
+
+ BLOCKIO();
+
+ lsock = ISC_LIST_HEAD(sockets_list);
+ while (lsock != NULL) {
+ next = ISC_LIST_NEXT(lsock, link);
+ close_socket(lsock->fd);
+ lsock = next;
+ }
+
+}
+#endif
+/*
+ * Add and delete functions for the list of open sockets
+ */
+void
+add_socket_to_list(SOCKET fd){
+ vsock_t *lsock = malloc(sizeof(vsock_t));
+ lsock->fd = fd;
+
+ ISC_LIST_APPEND(sockets_list, lsock, link);
+}
+void
+delete_socket_from_list(SOCKET fd) {
+
+ vsock_t *next;
+ vsock_t *lsock = ISC_LIST_HEAD(sockets_list);
+
+ while(lsock != NULL) {
+ next = ISC_LIST_NEXT(lsock, link);
+ if(lsock->fd == fd) {
+ ISC_LIST_DEQUEUE(sockets_list, lsock, link);
+ free(lsock);
+ break;
+ }
+ else
+ lsock = next;
+ }
+}
+void
+add_addr_to_list(struct sockaddr_storage *addr, int if_index){
+ remaddr_t *laddr = malloc(sizeof(remaddr_t));
+ memcpy(&laddr->addr, addr, sizeof(addr));
+ laddr->if_index = if_index;
+
+ ISC_LIST_APPEND(remoteaddr_list, laddr, link);
+#ifdef DEBUG
+ if (debug)
+ printf("Added addr %s to list of addresses\n",
+ stoa(addr));
+#endif
+
+
+}
+void
+delete_addr_from_list(struct sockaddr_storage *addr) {
+
+ remaddr_t *next;
+ remaddr_t *laddr = ISC_LIST_HEAD(remoteaddr_list);
+
+ while(laddr != NULL) {
+ next = ISC_LIST_NEXT(laddr, link);
+ if(SOCKCMP(&laddr->addr, addr)) {
+ ISC_LIST_DEQUEUE(remoteaddr_list, laddr, link);
+ free(laddr);
+ break;
+ }
+ else
+ laddr = next;
+ }
+#ifdef DEBUG
+ if (debug)
+ printf("Deleted addr %s from list of addresses\n",
+ stoa(addr));
+#endif
+}
+int
+find_addr_in_list(struct sockaddr_storage *addr) {
+
+ remaddr_t *next;
+ remaddr_t *laddr = ISC_LIST_HEAD(remoteaddr_list);
+#ifdef DEBUG
+ if (debug)
+ printf("Finding addr %s in list of addresses\n",
+ stoa(addr));
+#endif
+
+ while(laddr != NULL) {
+ next = ISC_LIST_NEXT(laddr, link);
+ if(SOCKCMP(&laddr->addr, addr)) {
+ return (laddr->if_index);
+ break;
+ }
+ else
+ laddr = next;
+ }
+ return (-1); /* Not found */
+}
diff --git a/contrib/ntp/ntpd/ntp_loopfilter.c b/contrib/ntp/ntpd/ntp_loopfilter.c
index 1d24897fdecc..99d1cc482450 100644
--- a/contrib/ntp/ntpd/ntp_loopfilter.c
+++ b/contrib/ntp/ntpd/ntp_loopfilter.c
@@ -1,6 +1,8 @@
/*
* ntp_loopfilter.c - implements the NTP loop filter algorithm
*
+ * ATTENTION: Get approval from Dave Mills on all changes to this file!
+ *
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -32,18 +34,17 @@
* included to protect against timewarps, timespikes and general mayhem.
* All units are in s and s/s, unless noted otherwise.
*/
-#define CLOCK_MAX .128 /* default step offset (s) */
-#define CLOCK_PANIC 1000. /* default panic offset (s) */
+#define CLOCK_MAX .128 /* default step threshold (s) */
+#define CLOCK_MINSTEP 900. /* default stepout threshold (s) */
+#define CLOCK_PANIC 1000. /* default panic threshold (s) */
#define CLOCK_PHI 15e-6 /* max frequency error (s/s) */
-#define SHIFT_PLL 4 /* PLL loop gain (shift) */
+#define CLOCK_PLL 16. /* PLL loop gain */
#define CLOCK_FLL 8. /* FLL loop gain */
#define CLOCK_AVG 4. /* parameter averaging constant */
-#define CLOCK_MINSEC 256. /* min FLL update interval (s) */
-#define CLOCK_MINSTEP 900. /* step-change timeout (s) */
-#define CLOCK_DAY 86400. /* one day of seconds (s) */
+#define CLOCK_ALLAN 1500. /* compromise Allan intercept (s) */
+#define CLOCK_DAY 86400. /* one day in seconds (s) */
#define CLOCK_LIMIT 30 /* poll-adjust threshold */
#define CLOCK_PGATE 4. /* poll-adjust gate */
-#define CLOCK_ALLAN 10 /* min Allan intercept (log2 s) */
#define PPS_MAXAGE 120 /* kernel pps signal timeout (s) */
/*
@@ -108,22 +109,11 @@
/*
* Program variables that can be tinkered.
*/
-double clock_max = CLOCK_MAX; /* max offset before step (s) */
-double clock_panic = CLOCK_PANIC; /* max offset before panic (s) */
+double clock_max = CLOCK_MAX; /* step threshold (s) */
+double clock_minstep = CLOCK_MINSTEP; /* stepout threshold (s) */
+double clock_panic = CLOCK_PANIC; /* panic threshold (s) */
double clock_phi = CLOCK_PHI; /* dispersion rate (s/s) */
-double clock_minstep = CLOCK_MINSTEP; /* step timeout (s) */
-u_char allan_xpt = CLOCK_ALLAN; /* minimum Allan intercept (log2 s) */
-
-/*
- * Hybrid PLL/FLL parameters. These were chosen by experiment using a
- * MatLab program. The parameters were fudged to match a pure PLL at
- * poll intervals of 64 s and lower and a pure FLL at poll intervals of
- * 4096 s and higher. Between these extremes the parameters were chosen
- * as a geometric series of intervals while holding the overshoot to
- * less than 5 percent.
- */
-static double fll[] = {0., 1./64, 1./32, 1./16, 1./8, 1./4, 1.};
-static double pll[] = {1., 1.4, 2., 2.8, 4.1, 7., 12.};
+double allan_xpt = CLOCK_ALLAN; /* Allan intercept (s) */
/*
* Program variables
@@ -132,7 +122,7 @@ static double clock_offset; /* clock offset adjustment (s) */
double drift_comp; /* clock frequency (s/s) */
double clock_stability; /* clock stability (s/s) */
u_long pps_control; /* last pps sample time */
-static void rstclock P((int, double, double)); /* transition function */
+static void rstclock P((int, u_long, double)); /* transition function */
#ifdef KERNEL_PLL
struct timex ntv; /* kernel API parameters */
@@ -149,17 +139,15 @@ int kern_enable; /* kernel support enabled */
int pps_enable; /* kernel PPS discipline enabled */
int ext_enable; /* external clock enabled */
int pps_stratum; /* pps stratum */
-int allow_step = TRUE; /* allow step correction */
int allow_panic = FALSE; /* allow panic correction */
int mode_ntpdate = FALSE; /* exit on first clock set */
/*
* Clock state machine variables
*/
-u_char sys_minpoll = NTP_MINDPOLL; /* min sys poll interval (log2 s) */
u_char sys_poll = NTP_MINDPOLL; /* system poll interval (log2 s) */
int state; /* clock discipline state */
-int tc_counter; /* poll-adjust counter */
+int tc_counter; /* hysteresis counter */
u_long last_time; /* time of last clock update (s) */
double last_offset; /* last clock offset (s) */
double sys_jitter; /* system RMS jitter (s) */
@@ -200,6 +188,9 @@ init_loopfilter(void)
/*
* local_clock - the NTP logical clock loop filter. Returns 1 if the
* clock was stepped, 0 if it was slewed and -1 if it is hopeless.
+ *
+ * LOCKCLOCK: The only thing this routine does is set the
+ * sys_rootdispersion variable equal to the peer dispersion.
*/
int
local_clock(
@@ -208,14 +199,13 @@ local_clock(
double epsil /* jittter (square s*s) */
)
{
- double mu; /* interval since last update (s) */
+ u_long mu; /* interval since last update (s) */
double oerror; /* previous error estimate */
double flladj; /* FLL frequency adjustment (ppm) */
double plladj; /* PLL frequency adjustment (ppm) */
double clock_frequency; /* clock frequency adjustment (ppm) */
double dtemp, etemp; /* double temps */
int retval; /* return value */
- int i;
/*
* If the loop is opened, monitor and record the offsets
@@ -224,9 +214,14 @@ local_clock(
#ifdef DEBUG
if (debug)
printf(
- "local_clock: assocID %d off %.6f jit %.6f sta %d\n",
+ "local_clock: assocID %d offset %.9f jitter %.9f state %d\n",
peer->associd, fp_offset, SQRT(epsil), state);
#endif
+#ifdef LOCKCLOCK
+ sys_rootdispersion = peer->rootdispersion;
+ return (0);
+
+#else /* LOCKCLOCK */
if (!ntp_enable) {
record_loop_stats(fp_offset, drift_comp, SQRT(epsil),
clock_stability, sys_poll);
@@ -262,19 +257,16 @@ local_clock(
* so the termination comments print directly to the console.
*/
if (mode_ntpdate) {
- if (allow_step && fabs(fp_offset) > clock_max &&
- clock_max > 0) {
+ if (fabs(fp_offset) > clock_max && clock_max > 0) {
step_systime(fp_offset);
- NLOG(NLOG_SYNCEVENT|NLOG_SYSEVENT)
- msyslog(LOG_NOTICE, "time reset %.6f s",
+ msyslog(LOG_NOTICE, "time reset %+.6f s",
fp_offset);
- printf("ntpd: time reset %.6fs\n", fp_offset);
+ printf("ntpd: time set %+.6fs\n", fp_offset);
} else {
adj_systime(fp_offset);
- NLOG(NLOG_SYNCEVENT|NLOG_SYSEVENT)
- msyslog(LOG_NOTICE, "time slew %.6f s",
+ msyslog(LOG_NOTICE, "time slew %+.6f s",
fp_offset);
- printf("ntpd: time slew %.6fs\n", fp_offset);
+ printf("ntpd: time slew %+.6fs\n", fp_offset);
}
record_loop_stats(fp_offset, drift_comp, SQRT(epsil),
clock_stability, sys_poll);
@@ -289,9 +281,12 @@ local_clock(
* get here again.
*/
if (state == S_NSET) {
- step_systime(fp_offset);
- NLOG(NLOG_SYNCEVENT|NLOG_SYSEVENT)
- msyslog(LOG_NOTICE, "time set %.6f s", fp_offset);
+ if (fabs(fp_offset) > clock_max && clock_max > 0) {
+ step_systime(fp_offset);
+ msyslog(LOG_NOTICE, "time reset %+.6f s",
+ fp_offset);
+ reinit_timer();
+ }
rstclock(S_FREQ, peer->epoch, 0);
return (1);
}
@@ -396,20 +391,12 @@ local_clock(
* reset or shaken, but never stirred.
*/
default:
- if (allow_step) {
- step_systime(fp_offset);
- NLOG(NLOG_SYNCEVENT|NLOG_SYSEVENT)
- msyslog(LOG_NOTICE, "time reset %.6f s",
- fp_offset);
- rstclock(S_TSET, peer->epoch, 0);
- retval = 1;
- } else {
- NLOG(NLOG_SYNCEVENT|NLOG_SYSEVENT)
- msyslog(LOG_NOTICE, "time slew %.6f s",
- fp_offset);
- rstclock(S_FREQ, peer->epoch,
- fp_offset);
- }
+ step_systime(fp_offset);
+ msyslog(LOG_NOTICE, "time reset %+.6f s",
+ fp_offset);
+ reinit_timer();
+ rstclock(S_TSET, peer->epoch, 0);
+ retval = 1;
break;
}
} else {
@@ -449,58 +436,52 @@ local_clock(
/*
* We come here in the normal case for linear phase and
- * frequency adjustments. If the offset exceeds the
- * previous time error estimate by CLOCK_SGATE and the
- * interval since the last update is less than twice the
- * poll interval, consider the update a popcorn spike
- * and ignore it.
+ * frequency adjustments. If the difference between the
+ * last offset and the current one exceeds the jitter by
+ * CLOCK_SGATE and the interval since the last update is
+ * less than twice the system poll interval, consider
+ * the update a popcorn spike and ignore it..
*/
default:
allow_panic = FALSE;
- if (fabs(fp_offset - last_offset) >
- CLOCK_SGATE * oerror && mu <
- ULOGTOD(sys_poll + 1)) {
+ dtemp = fabs(fp_offset - last_offset);
+/*
+ if (dtemp > CLOCK_SGATE * oerror && mu <
+ (u_long) ULOGTOD(sys_poll + 1)) {
#ifdef DEBUG
if (debug)
printf(
"local_clock: popcorn %.6f %.6f\n",
- fabs(fp_offset -
- last_offset), CLOCK_SGATE *
- oerror);
+ dtemp, oerror);
#endif
last_offset = fp_offset;
return (0);
}
+*/
/*
- * Compute the FLL and PLL frequency adjustments
- * conditioned on intricate weighting factors.
- * The gain factors depend on the poll interval
- * and Allan intercept. For the FLL, the
- * averaging interval is clamped to a minimum of
- * 1024 s and the gain increased in stages from
- * zero for poll intervals below half the Allan
- * intercept to unity above twice the Allan
- * intercept. For the PLL, the averaging
- * interval is clamped not to exceed the poll
- * interval. No gain factor is necessary, since
- * the frequency steering above the Allan
- * intercept is negligible. Particularly for the
- * PLL, these measures allow oversampling, but
- * not undersampling and insure stability even
- * when the rules of fair engagement are broken.
+ * The FLL and PLL frequency gain constants
+ * depend on the poll interval and Allan
+ * intercept. The PLL constant is calculated
+ * throughout the poll interval range, but the
+ * update interval is clamped so as not to
+ * exceed the poll interval. The FLL gain is
+ * zero below one-half the Allan intercept and
+ * unity at MAXPOLL. It decreases as 1 /
+ * (MAXPOLL + 1 - poll interval) in a feeble
+ * effort to match the loop stiffness to the
+ * Allan wobble. Particularly for the PLL, these
+ * measures allow oversampling, but not
+ * undersampling and insure stability even when
+ * the rules of fair engagement are broken.
*/
- i = sys_poll - allan_xpt + 4;
- if (i < 0)
- i = 0;
- else if (i > 6)
- i = 6;
- etemp = fll[i];
- dtemp = max(mu, ULOGTOD(allan_xpt));
- flladj = (fp_offset - clock_offset) * etemp /
- (dtemp * CLOCK_FLL);
- dtemp = ULOGTOD(SHIFT_PLL + 2 + sys_poll);
- etemp = min(mu, ULOGTOD(sys_poll));
+ if (ULOGTOD(sys_poll) > allan_xpt / 2) {
+ dtemp = NTP_MAXPOLL + 1 - sys_poll;
+ flladj = (fp_offset - clock_offset) /
+ (max(mu, allan_xpt) * dtemp);
+ }
+ etemp = min(mu, (u_long)ULOGTOD(sys_poll));
+ dtemp = 4 * CLOCK_PLL * ULOGTOD(sys_poll);
plladj = fp_offset * etemp / (dtemp * dtemp);
last_time = peer->epoch;
last_offset = clock_offset = fp_offset;
@@ -508,7 +489,7 @@ local_clock(
}
}
-#if defined(KERNEL_PLL)
+#ifdef KERNEL_PLL
/*
* This code segment works when clock adjustments are made using
* precision time kernel support and the ntp_adjtime() system
@@ -607,10 +588,17 @@ local_clock(
*/
if (ntp_adjtime(&ntv) == TIME_ERROR) {
if (ntv.status != pll_status)
- msyslog(LOG_ERR,
- "kernel time discipline status change %x",
+ NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
+ msyslog(LOG_NOTICE,
+ "kernel time sync disabled %04x",
ntv.status);
ntv.status &= ~(STA_PPSFREQ | STA_PPSTIME);
+ } else {
+ if (ntv.status != pll_status)
+ NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
+ msyslog(LOG_NOTICE,
+ "kernel time sync enabled %04x",
+ ntv.status);
}
pll_status = ntv.status;
if (pll_nano)
@@ -640,15 +628,23 @@ local_clock(
* drift_comp is a sham and used only for updating the drift
* file and for billboard eye candy.
*/
- etemp = clock_frequency + flladj + plladj;
- drift_comp += etemp;
- if (drift_comp > NTP_MAXFREQ)
+ dtemp = clock_frequency + flladj + plladj;
+ etemp = drift_comp + dtemp;
+ if (etemp > NTP_MAXFREQ)
drift_comp = NTP_MAXFREQ;
- else if (drift_comp <= -NTP_MAXFREQ)
+ else if (etemp <= -NTP_MAXFREQ)
drift_comp = -NTP_MAXFREQ;
- dtemp = SQUARE(clock_stability);
- etemp = SQUARE(etemp) - dtemp;
- clock_stability = SQRT(dtemp + etemp / CLOCK_AVG);
+ else
+ drift_comp = etemp;
+ if (fabs(etemp) > NTP_MAXFREQ)
+ NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
+ msyslog(LOG_NOTICE,
+ "frequency error %.0f PPM exceeds tolerance %.0f PPM",
+ etemp * 1e6, NTP_MAXFREQ * 1e6);
+
+ etemp = SQUARE(clock_stability);
+ dtemp = SQUARE(dtemp);
+ clock_stability = SQRT(etemp + (dtemp - etemp) / CLOCK_AVG);
/*
* In SYNC state, adjust the poll interval. The trick here is to
@@ -660,7 +656,7 @@ local_clock(
* helps calm the dance. Works best using burst mode.
*/
if (state == S_SYNC) {
- if (sys_jitter / ULOGTOD(sys_poll) > clock_stability &&
+ if (sys_jitter > ULOGTOD(sys_poll) * clock_stability &&
fabs(clock_offset) < CLOCK_PGATE * sys_jitter) {
tc_counter += sys_poll;
if (tc_counter > CLOCK_LIMIT) {
@@ -685,33 +681,38 @@ local_clock(
/*
* Update the system time variables.
*/
- dtemp = peer->disp + sys_jitter;
- if ((peer->flags & FLAG_REFCLOCK) == 0 && dtemp < MINDISPERSE)
+ dtemp = peer->disp + (current_time - peer->epoch) * clock_phi +
+ sys_jitter + fabs(last_offset);
+ if (!(peer->flags & FLAG_REFCLOCK) && dtemp < MINDISPERSE)
dtemp = MINDISPERSE;
sys_rootdispersion = peer->rootdispersion + dtemp;
record_loop_stats(last_offset, drift_comp, sys_jitter,
clock_stability, sys_poll);
+
#ifdef DEBUG
if (debug)
printf(
- "local_clock: mu %.0f noi %.3f stb %.3f pol %d cnt %d\n",
- mu, sys_jitter * 1e6, clock_stability * 1e6, sys_poll,
+ "local_clock: mu %lu rootjit %.6f stab %.3f poll %d count %d\n",
+ mu, dtemp, clock_stability * 1e6, sys_poll,
tc_counter);
#endif /* DEBUG */
return (retval);
+#endif /* LOCKCLOCK */
}
/*
* adj_host_clock - Called once every second to update the local clock.
+ *
+ * LOCKCLOCK: The only thing this routine does is increment the
+ * sys_rootdispersion variable.
*/
void
adj_host_clock(
void
)
{
- double adjustment;
- int i;
+ double adjustment;
/*
* Update the dispersion since the last update. In contrast to
@@ -725,24 +726,23 @@ adj_host_clock(
*/
sys_rootdispersion += clock_phi;
+#ifndef LOCKCLOCK
/*
* Declare PPS kernel unsync if the pps signal has not been
* heard for a few minutes.
*/
if (pps_control && current_time - pps_control > PPS_MAXAGE) {
if (pps_control)
- NLOG(NLOG_SYSEVENT) /* conditional if clause */
- msyslog(LOG_INFO, "pps sync disabled");
+ NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
+ msyslog(LOG_NOTICE, "pps sync disabled");
pps_control = 0;
}
- if (!ntp_enable)
- return;
/*
- * If the phase-lock loop is implemented in the kernel, we
- * have no business going further.
+ * If NTP is disabled or ntpdate mode enabled or the kernel
+ * discipline enabled, we have no business going further.
*/
- if (pll_control && kern_enable)
+ if (!ntp_enable || mode_ntpdate || (pll_control && kern_enable))
return;
/*
@@ -759,19 +759,13 @@ adj_host_clock(
}
/*
- * This ugly bit of business is necessary in order to move the
- * pole frequency higher in FLL mode. This is necessary for loop
- * stability.
+ * Implement the phase and frequency adjustments. Note the
+ * black art formerly practiced here has been whitewashed.
*/
- i = sys_poll - allan_xpt + 4;
- if (i < 0)
- i = 0;
- else if (i > 6)
- i = 6;
- adjustment = clock_offset / (pll[i] * ULOGTOD(SHIFT_PLL +
- sys_poll));
+ adjustment = clock_offset / (CLOCK_PLL * ULOGTOD(sys_poll));
clock_offset -= adjustment;
adj_systime(adjustment + drift_comp);
+#endif /* LOCKCLOCK */
}
@@ -781,7 +775,7 @@ adj_host_clock(
static void
rstclock(
int trans, /* new state */
- double epoch, /* last time */
+ u_long epoch, /* last time */
double offset /* last offset */
)
{
@@ -790,6 +784,11 @@ rstclock(
state = trans;
last_time = epoch;
last_offset = clock_offset = offset;
+#ifdef DEBUG
+ if (debug)
+ printf("local_clock: at %lu state %d\n", last_time,
+ trans);
+#endif
}
@@ -815,6 +814,8 @@ huffpuff()
/*
* loop_config - configure the loop filter
+ *
+ * LOCKCLOCK: The LOOP_DRIFTINIT and LOOP_DRIFTCOMP cases are no-ops.
*/
void
loop_config(
@@ -828,6 +829,7 @@ loop_config(
case LOOP_DRIFTINIT:
+#ifndef LOCKCLOCK
#ifdef KERNEL_PLL
/*
* Assume the kernel supports the ntp_adjtime() syscall.
@@ -836,7 +838,15 @@ loop_config(
* behind. While at it, ask to set nanosecond mode. If
* the kernel agrees, rejoice; othewise, it does only
* microseconds.
+ *
+ * Call out the safety patrol. If ntpdate mode or if the
+ * step threshold has been changed by the -x option or
+ * tinker command, kernel discipline is unsafe, so don't
+ * do any of this stuff.
*/
+ if (mode_ntpdate || clock_max != CLOCK_MAX)
+ break;
+
pll_control = 1;
memset(&ntv, 0, sizeof(ntv));
#ifdef STA_NANO
@@ -879,27 +889,31 @@ loop_config(
if (pll_status & STA_CLK)
ext_enable = 1;
#endif /* STA_NANO */
- msyslog(LOG_NOTICE,
- "kernel time discipline status %04x",
+ NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
+ msyslog(LOG_INFO,
+ "kernel time sync status %04x",
pll_status);
}
#endif /* KERNEL_PLL */
+#endif /* LOCKCLOCK */
break;
case LOOP_DRIFTCOMP:
+#ifndef LOCKCLOCK
/*
- * Initialize the kernel frequency and clamp to
- * reasonable value. Also set the initial state to
- * S_FSET to indicated the frequency has been
- * initialized from the previously saved drift file.
+ * If the frequency value is reasonable, set the initial
+ * frequency to the given value and the state to S_FSET.
+ * Otherwise, the drift file may be missing or broken,
+ * so set the frequency to zero. This erases past
+ * history should somebody break something.
*/
- rstclock(S_FSET, current_time, 0);
- drift_comp = freq;
- if (drift_comp > NTP_MAXFREQ)
- drift_comp = NTP_MAXFREQ;
- if (drift_comp < -NTP_MAXFREQ)
- drift_comp = -NTP_MAXFREQ;
+ if (freq <= NTP_MAXFREQ && freq >= -NTP_MAXFREQ) {
+ drift_comp = freq;
+ rstclock(S_FSET, current_time, 0);
+ } else {
+ drift_comp = 0;
+ }
#ifdef KERNEL_PLL
/*
@@ -921,6 +935,7 @@ loop_config(
(void)ntp_adjtime(&ntv);
}
#endif /* KERNEL_PLL */
+#endif /* LOCKCLOCK */
break;
/*
@@ -930,7 +945,7 @@ loop_config(
clock_max = freq;
break;
- case LOOP_PANIC: /* panic exit threshold */
+ case LOOP_PANIC: /* panic threshold */
clock_panic = freq;
break;
@@ -942,16 +957,8 @@ loop_config(
clock_minstep = freq;
break;
- case LOOP_MINPOLL: /* ephemeral association poll */
- if (freq < NTP_MINPOLL)
- freq = NTP_MINPOLL;
- sys_minpoll = (u_char)freq;
- break;
-
- case LOOP_ALLAN: /* minimum Allan intercept */
- if (freq < CLOCK_ALLAN)
- freq = CLOCK_ALLAN;
- allan_xpt = (u_char)freq;
+ case LOOP_ALLAN: /* Allan intercept */
+ allan_xpt = freq;
break;
case LOOP_HUFFPUFF: /* huff-n'-puff filter length */
@@ -964,6 +971,11 @@ loop_config(
sys_huffpuff[i] = 1e9;
sys_mindly = 1e9;
break;
+
+ case LOOP_FREQ: /* initial frequency */
+ drift_comp = freq / 1e6;
+ rstclock(S_FSET, current_time, 0);
+ break;
}
}
diff --git a/contrib/ntp/ntpd/ntp_monitor.c b/contrib/ntp/ntpd/ntp_monitor.c
index 8526aacecf38..6b288fc32fec 100644
--- a/contrib/ntp/ntpd/ntp_monitor.c
+++ b/contrib/ntp/ntpd/ntp_monitor.c
@@ -1,7 +1,6 @@
/*
- * ntp_monitor.c - monitor who is using the ntpd server
+ * ntp_monitor - monitor ntpd statistics
*/
-
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -18,30 +17,29 @@
#endif
/*
- * I'm still not sure I like what I've done here. It certainly consumes
+ * I'm still not sure I like what I've done here. It certainly consumes
* memory like it is going out of style, and also may not be as low
* overhead as I'd imagined.
*
- * Anyway, we record statistics based on source address, mode and version
- * (for now, anyway. Check the code). The receive procedure calls us with
- * the incoming rbufp before it does anything else.
+ * Anyway, we record statistics based on source address, mode and
+ * version (for now, anyway. Check the code). The receive procedure
+ * calls us with the incoming rbufp before it does anything else.
*
* Each entry is doubly linked into two lists, a hash table and a
- * most-recently-used list. When a packet arrives it is looked up
- * in the hash table. If found, the statistics are updated and the
- * entry relinked at the head of the MRU list. If not found, a new
- * entry is allocated, initialized and linked into both the hash
- * table and at the head of the MRU list.
+ * most-recently-used list. When a packet arrives it is looked up in
+ * the hash table. If found, the statistics are updated and the entry
+ * relinked at the head of the MRU list. If not found, a new entry is
+ * allocated, initialized and linked into both the hash table and at the
+ * head of the MRU list.
*
- * Memory is usually allocated by grabbing a big chunk of new memory
- * and cutting it up into littler pieces. The exception to this when we
- * hit the memory limit. Then we free memory by grabbing entries off
- * the tail for the MRU list, unlinking from the hash table, and
+ * Memory is usually allocated by grabbing a big chunk of new memory and
+ * cutting it up into littler pieces. The exception to this when we hit
+ * the memory limit. Then we free memory by grabbing entries off the
+ * tail for the MRU list, unlinking from the hash table, and
* reinitializing.
*
* trimmed back memory consumption ... jdg 8/94
*/
-
/*
* Limits on the number of structures allocated. This limit is picked
* with the illicit knowlege that we can only return somewhat less
@@ -62,31 +60,31 @@
*/
#define MON_HASH_SIZE 128
#define MON_HASH_MASK (MON_HASH_SIZE-1)
-#define MON_HASH(addr) ((int)(ntohl((addr)) & MON_HASH_MASK))
+#define MON_HASH(addr) sock_hash(addr)
/*
* Pointers to the hash table, the MRU list and the count table. Memory
- * for the hash and count tables is only allocated if monitoring is turned on.
+ * for the hash and count tables is only allocated if monitoring is
+ * turned on.
*/
-static struct mon_data *mon_hash[MON_HASH_SIZE]; /* array of list ptrs */
-struct mon_data mon_mru_list;
-struct mon_data mon_fifo_list;
+static struct mon_data *mon_hash[MON_HASH_SIZE]; /* list ptrs */
+struct mon_data mon_mru_list;
+
/*
* List of free structures structures, and counters of free and total
* structures. The free structures are linked with the hash_next field.
*/
-static struct mon_data *mon_free; /* the free list or null if none */
-
-static int mon_total_mem; /* total number of structures allocated */
-static int mon_mem_increments; /* number of times we've called malloc() */
+static struct mon_data *mon_free; /* free list or null if none */
+static int mon_total_mem; /* total structures allocated */
+static int mon_mem_increments; /* times called malloc() */
/*
* Initialization state. We may be monitoring, we may not. If
* we aren't, we may not even have allocated any memory yet.
*/
-int mon_enabled;
+int mon_enabled; /* enable switch */
+u_long mon_age = 3000; /* preemption limit */
static int mon_have_memory;
-
static void mon_getmoremem P((void));
static void remove_from_hash P((struct mon_data *));
@@ -106,9 +104,8 @@ init_mon(void)
mon_total_mem = 0;
mon_mem_increments = 0;
mon_free = NULL;
- memset((char *)&mon_hash[0], 0, sizeof mon_hash);
- memset((char *)&mon_mru_list, 0, sizeof mon_mru_list);
- memset((char *)&mon_fifo_list, 0, sizeof mon_fifo_list);
+ memset(&mon_hash[0], 0, sizeof mon_hash);
+ memset(&mon_mru_list, 0, sizeof mon_mru_list);
}
@@ -126,7 +123,7 @@ mon_start(
return;
}
if (mode == MON_OFF)
- return; /* Ooops.. */
+ return;
if (!mon_have_memory) {
mon_total_mem = 0;
@@ -138,10 +135,6 @@ mon_start(
mon_mru_list.mru_next = &mon_mru_list;
mon_mru_list.mru_prev = &mon_mru_list;
-
- mon_fifo_list.fifo_next = &mon_fifo_list;
- mon_fifo_list.fifo_prev = &mon_fifo_list;
-
mon_enabled = mode;
}
@@ -182,9 +175,6 @@ mon_stop(
mon_mru_list.mru_next = &mon_mru_list;
mon_mru_list.mru_prev = &mon_mru_list;
-
- mon_fifo_list.fifo_next = &mon_fifo_list;
- mon_fifo_list.fifo_prev = &mon_fifo_list;
}
@@ -198,31 +188,34 @@ ntp_monitor(
{
register struct pkt *pkt;
register struct mon_data *md;
- register u_long netnum;
+ struct sockaddr_storage addr;
register int hash;
register int mode;
if (mon_enabled == MON_OFF)
- return;
+ return;
pkt = &rbufp->recv_pkt;
- netnum = NSRCADR(&rbufp->recv_srcadr);
- hash = MON_HASH(netnum);
+ memset(&addr, 0, sizeof(addr));
+ memcpy(&addr, &(rbufp->recv_srcadr), sizeof(addr));
+ hash = MON_HASH(&addr);
mode = PKT_MODE(pkt->li_vn_mode);
-
md = mon_hash[hash];
while (md != NULL) {
- if (md->rmtadr == netnum &&
- /* ?? md->interface == rbufp->dstadr && ?? */
- md->mode == (u_char)mode) {
+
+ /*
+ * Match address only to conserve MRU size.
+ */
+ if (SOCKCMP(&md->rmtadr, &addr)) {
+ md->drop_count = current_time - md->lasttime;
md->lasttime = current_time;
md->count++;
- md->version = PKT_VERSION(pkt->li_vn_mode);
md->rmtport = NSRCPORT(&rbufp->recv_srcadr);
+ md->mode = (u_char) mode;
+ md->version = PKT_VERSION(pkt->li_vn_mode);
/*
- * Shuffle him to the head of the
- * mru list. What a crock.
+ * Shuffle to the head of the MRU list.
*/
md->mru_next->mru_prev = md->mru_prev;
md->mru_prev->mru_next = md->mru_next;
@@ -230,7 +223,6 @@ ntp_monitor(
md->mru_prev = &mon_mru_list;
mon_mru_list.mru_next->mru_prev = md;
mon_mru_list.mru_next = md;
-
return;
}
md = md->hash_next;
@@ -242,24 +234,21 @@ ntp_monitor(
* or from the tail of the MRU list.
*/
if (mon_free == NULL && mon_total_mem >= MAXMONMEM) {
+
/*
- * Get it from MRU list
+ * Preempt from the MRU list if old enough.
*/
md = mon_mru_list.mru_prev;
+ if (((u_long)RANDOM & 0xffffffff) / FRAC >
+ (double)(current_time - md->lasttime) / mon_age)
+ return;
+
md->mru_prev->mru_next = &mon_mru_list;
mon_mru_list.mru_prev = md->mru_prev;
-
remove_from_hash(md);
-
- /*
- * Get it from FIFO list
- */
- md->fifo_prev->fifo_next = md->fifo_next;
- md->fifo_next->fifo_prev = md->fifo_prev;
-
} else {
- if (mon_free == NULL) /* if free list empty */
- mon_getmoremem(); /* then get more */
+ if (mon_free == NULL)
+ mon_getmoremem();
md = mon_free;
mon_free = md->hash_next;
}
@@ -267,36 +256,30 @@ ntp_monitor(
/*
* Got one, initialize it
*/
- md->lasttime = md->firsttime = current_time;
- md->lastdrop = 0;
+ md->avg_interval = 0;
+ md->lasttime = current_time;
md->count = 1;
- md->rmtadr = netnum;
+ md->drop_count = 0;
+ memset(&md->rmtadr, 0, sizeof(md->rmtadr));
+ memcpy(&md->rmtadr, &addr, sizeof(addr));
md->rmtport = NSRCPORT(&rbufp->recv_srcadr);
md->mode = (u_char) mode;
md->version = PKT_VERSION(pkt->li_vn_mode);
md->interface = rbufp->dstadr;
- md->cast_flags = ((rbufp->dstadr->flags & INT_MULTICAST) &&
- rbufp->fd == md->interface->fd) ? MDF_MCAST: rbufp->fd ==
- md->interface->bfd ? MDF_BCAST : MDF_UCAST;
+ md->cast_flags = (u_char)(((rbufp->dstadr->flags & INT_MULTICAST) &&
+ rbufp->fd == md->interface->fd) ? MDF_MCAST: rbufp->fd ==
+ md->interface->bfd ? MDF_BCAST : MDF_UCAST);
/*
- * Drop him into front of the hash table.
- * Also put him on top of the MRU list
- * and at bottom of FIFO list
+ * Drop him into front of the hash table. Also put him on top of
+ * the MRU list.
*/
-
md->hash_next = mon_hash[hash];
mon_hash[hash] = md;
-
md->mru_next = mon_mru_list.mru_next;
md->mru_prev = &mon_mru_list;
mon_mru_list.mru_next->mru_prev = md;
mon_mru_list.mru_next = md;
-
- md->fifo_prev = mon_fifo_list.fifo_prev;
- md->fifo_next = &mon_fifo_list;
- mon_fifo_list.fifo_prev->fifo_next = md;
- mon_fifo_list.fifo_prev = md;
}
@@ -310,10 +293,10 @@ mon_getmoremem(void)
register int i;
struct mon_data *freedata; /* 'old' free list (null) */
- md = (struct mon_data *)emalloc(MONMEMINC * sizeof(struct mon_data));
+ md = (struct mon_data *)emalloc(MONMEMINC *
+ sizeof(struct mon_data));
freedata = mon_free;
mon_free = md;
-
for (i = 0; i < (MONMEMINC-1); i++) {
md->hash_next = (md + 1);
md++;
@@ -323,7 +306,6 @@ mon_getmoremem(void)
* md now points at the last. Link in the rest of the chain.
*/
md->hash_next = freedata;
-
mon_total_mem += MONMEMINC;
mon_mem_increments++;
}
@@ -336,7 +318,7 @@ remove_from_hash(
register int hash;
register struct mon_data *md_prev;
- hash = MON_HASH(md->rmtadr);
+ hash = MON_HASH(&md->rmtadr);
if (mon_hash[hash] == md) {
mon_hash[hash] = md->hash_next;
} else {
diff --git a/contrib/ntp/ntpd/ntp_peer.c b/contrib/ntp/ntpd/ntp_peer.c
index b1641817f165..cf8a60067908 100644
--- a/contrib/ntp/ntpd/ntp_peer.c
+++ b/contrib/ntp/ntpd/ntp_peer.c
@@ -10,9 +10,9 @@
#include "ntpd.h"
#include "ntp_stdlib.h"
-#ifdef AUTOKEY
-#include "ntp_crypto.h"
-#endif /* AUTOKEY */
+#ifdef OPENSSL
+#include "openssl/rand.h"
+#endif /* OPENSSL */
/*
* Table of valid association combinations
@@ -181,7 +181,7 @@ getmorepeermem(void)
*/
struct peer *
findexistingpeer(
- struct sockaddr_in *addr,
+ struct sockaddr_storage *addr,
struct peer *start_peer,
int mode
)
@@ -198,7 +198,7 @@ findexistingpeer(
peer = start_peer->next;
while (peer != 0) {
- if (NSRCADR(addr) == NSRCADR(&peer->srcadr)
+ if (SOCKCMP(addr, &peer->srcadr)
&& NSRCPORT(addr) == NSRCPORT(&peer->srcadr)) {
if (mode == -1)
return (peer);
@@ -216,7 +216,7 @@ findexistingpeer(
*/
struct peer *
findpeer(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *dstadr,
int fd,
int pkt_mode,
@@ -228,11 +228,11 @@ findpeer(
findpeer_calls++;
hash = HASH_ADDR(srcadr);
- for (peer = peer_hash[hash]; peer != 0; peer = peer->next) {
- if (NSRCADR(srcadr) == NSRCADR(&peer->srcadr)
+ for (peer = peer_hash[hash]; peer != NULL; peer = peer->next) {
+ if (SOCKCMP(srcadr, &peer->srcadr)
&& NSRCPORT(srcadr) == NSRCPORT(&peer->srcadr)) {
- /*
+ /*
* if the association matching rules determine
* that this is not a valid combination, then
* look for the next valid peer association.
@@ -312,7 +312,13 @@ clear_all(void)
for (n = 0; n < HASH_SIZE; n++) {
for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
next_peer = peer->next;
- peer_clear(peer);
+ if (peer->flags & FLAG_CONFIG) {
+ if (!(peer->cast_flags & (MDF_ACAST |
+ MDF_MCAST | MDF_BCAST)))
+ peer_clear(peer, "STEP");
+ } else {
+ unpeer(peer);
+ }
}
}
#ifdef DEBUG
@@ -331,14 +337,26 @@ unpeer(
)
{
int hash;
-
- peer_associations--;
+#ifdef OPENSSL
+ char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
+
+ if (peer_to_remove->flags & FLAG_SKEY) {
+ sprintf(statstr, "unpeer %d flash %x reach %03o flags %04x",
+ peer_to_remove->associd, peer_to_remove->flash,
+ peer_to_remove->reach, peer_to_remove->flags);
+ record_crypto_stats(&peer_to_remove->srcadr, statstr);
+#ifdef DEBUG
+ if (debug)
+ printf("peer: %s\n", statstr);
+#endif
+ }
+#endif /* OPENSSL */
#ifdef DEBUG
if (debug)
printf("demobilize %u %d\n", peer_to_remove->associd,
peer_associations);
#endif
- peer_clear(peer_to_remove);
+ peer_clear(peer_to_remove, "NULL");
hash = HASH_ADDR(&peer_to_remove->srcadr);
peer_hash_count[hash]--;
peer_demobilizations++;
@@ -362,7 +380,7 @@ unpeer(
if (peer == 0) {
peer_hash_count[hash]++;
msyslog(LOG_ERR, "peer struct for %s not in table!",
- ntoa(&peer->srcadr));
+ stoa(&peer->srcadr));
} else {
peer->next = peer_to_remove->next;
}
@@ -386,7 +404,7 @@ unpeer(
assoc_hash_count[hash]++;
msyslog(LOG_ERR,
"peer struct for %s not in association table!",
- ntoa(&peer->srcadr));
+ stoa(&peer->srcadr));
} else {
peer->ass_next = peer_to_remove->ass_next;
}
@@ -394,6 +412,7 @@ unpeer(
peer_to_remove->next = peer_free;
peer_free = peer_to_remove;
peer_free_count++;
+ peer_associations--;
}
@@ -402,7 +421,7 @@ unpeer(
*/
struct peer *
peer_config(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *dstadr,
int hmode,
int version,
@@ -415,7 +434,7 @@ peer_config(
)
{
register struct peer *peer;
- u_int cast_flags;
+ u_char cast_flags;
/*
* First search from the beginning for an association with given
@@ -440,22 +459,39 @@ peer_config(
switch (hmode) {
case MODE_BROADCAST:
- if (IN_CLASSD(ntohl(srcadr->sin_addr.s_addr)))
- cast_flags = MDF_MCAST;
- else
- cast_flags = MDF_BCAST;
- break;
+ if(srcadr->ss_family == AF_INET) {
+ if (IN_CLASSD(ntohl(((struct sockaddr_in*)srcadr)->sin_addr.s_addr)))
+ cast_flags = MDF_MCAST;
+ else
+ cast_flags = MDF_BCAST;
+ break;
+ }
+ else {
+ if (IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6*)srcadr)->sin6_addr))
+ cast_flags = MDF_MCAST;
+ else
+ cast_flags = MDF_BCAST;
+ break;
+ }
case MODE_CLIENT:
- if (IN_CLASSD(ntohl(srcadr->sin_addr.s_addr)))
- cast_flags = MDF_ACAST;
- else
- cast_flags = MDF_UCAST;
- break;
+ if(srcadr->ss_family == AF_INET) {
+ if (IN_CLASSD(ntohl(((struct sockaddr_in*)srcadr)->sin_addr.s_addr)))
+ cast_flags = MDF_ACAST;
+ else
+ cast_flags = MDF_UCAST;
+ break;
+ }
+ else {
+ if (IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6*)srcadr)->sin6_addr))
+ cast_flags = MDF_ACAST;
+ else
+ cast_flags = MDF_UCAST;
+ break;
+ }
default:
cast_flags = MDF_UCAST;
- break;
}
/*
@@ -464,24 +500,26 @@ peer_config(
*/
if (peer != 0) {
peer->hmode = (u_char)hmode;
- peer->version = (u_char)version;
- peer->minpoll = (u_char)minpoll;
- peer->maxpoll = (u_char)maxpoll;
- peer->hpoll = peer->kpoll = peer->minpoll;
- peer->ppoll = peer->maxpoll;
+ peer->version = (u_char) version;
+ peer->minpoll = (u_char) minpoll;
+ peer->maxpoll = (u_char) maxpoll;
peer->flags = flags | FLAG_CONFIG |
(peer->flags & FLAG_REFCLOCK);
peer->cast_flags = cast_flags;
- peer->ttlmax = ttl;
+ peer->ttl = (u_char) ttl;
peer->keyid = key;
+ peer->precision = sys_precision;
+ peer_clear(peer, "RMOT");
return (peer);
}
/*
* Here no match has been found, so presumably this is a new
* persistent association. Mobilize the thing and initialize its
- * variables.
+ * variables. If emulating ntpdate, force iburst.
*/
+ if (mode_ntpdate)
+ flags |= FLAG_IBURST;
peer = newpeer(srcadr, dstadr, hmode, version, minpoll, maxpoll,
flags | FLAG_CONFIG, cast_flags, ttl, key);
return (peer);
@@ -493,20 +531,23 @@ peer_config(
*/
struct peer *
newpeer(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *dstadr,
int hmode,
int version,
int minpoll,
int maxpoll,
u_int flags,
- u_int cast_flags,
+ u_char cast_flags,
int ttl,
keyid_t key
)
{
register struct peer *peer;
register int i;
+#ifdef OPENSSL
+ char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
+#endif /* OPENSSL */
/*
* Allocate a new peer structure. Some dirt here, since some of
@@ -521,6 +562,13 @@ newpeer(
memset((char *)peer, 0, sizeof(struct peer));
/*
+ * Assign an association ID and increment the system variable.
+ */
+ peer->associd = current_association_ID;
+ if (++current_association_ID == 0)
+ ++current_association_ID;
+
+ /*
* Initialize the peer structure and dance the interface jig.
* Reference clocks step the loopback waltz, the others
* squaredance around the interface list looking for a buddy. If
@@ -530,9 +578,15 @@ newpeer(
*/
if (ISREFCLOCKADR(srcadr))
peer->dstadr = loopback_interface;
- else if (cast_flags & MDF_BCLNT)
+ else if (cast_flags & (MDF_BCLNT | MDF_ACAST | MDF_MCAST | MDF_BCAST)) {
peer->dstadr = findbcastinter(srcadr);
- else if (dstadr != any_interface)
+ /*
+ * If it was a multicast packet, findbcastinter() may not
+ * find it, so try a little harder.
+ */
+ if (peer->dstadr == ANY_INTERFACE_CHOOSE(srcadr))
+ peer->dstadr = findinterface(srcadr);
+ } else if (dstadr != NULL && dstadr != ANY_INTERFACE_CHOOSE(srcadr))
peer->dstadr = dstadr;
else
peer->dstadr = findinterface(srcadr);
@@ -541,23 +595,27 @@ newpeer(
peer->version = (u_char)version;
peer->minpoll = (u_char)max(NTP_MINPOLL, minpoll);
peer->maxpoll = (u_char)min(NTP_MAXPOLL, maxpoll);
- peer->flags = flags | (key > NTP_MAXKEY ? FLAG_SKEY : 0);
+ peer->flags = flags;
+ if (key != 0)
+ peer->flags |= FLAG_AUTHENABLE;
+ if (key > NTP_MAXKEY)
+ peer->flags |= FLAG_SKEY;
peer->cast_flags = cast_flags;
- peer->ttlmax = ttl;
+ peer->ttl = (u_char)ttl;
peer->keyid = key;
peer->precision = sys_precision;
- peer_clear(peer);
+ if (cast_flags & MDF_ACAST)
+ peer_clear(peer, "ACST");
+ else if (cast_flags & MDF_MCAST)
+ peer_clear(peer, "MCST");
+ else if (cast_flags & MDF_BCAST)
+ peer_clear(peer, "BCST");
+ else
+ peer_clear(peer, "INIT");
if (mode_ntpdate)
peer_ntpdate++;
/*
- * Assign an association ID and increment the system variable.
- */
- peer->associd = current_association_ID;
- if (++current_association_ID == 0)
- ++current_association_ID;
-
- /*
* Note time on statistics timers.
*/
peer->timereset = current_time;
@@ -594,14 +652,25 @@ newpeer(
peer->ass_next = assoc_hash[i];
assoc_hash[i] = peer;
assoc_hash_count[i]++;
+#ifdef OPENSSL
+ if (peer->flags & FLAG_SKEY) {
+ sprintf(statstr, "newpeer %d", peer->associd);
+ record_crypto_stats(&peer->srcadr, statstr);
+#ifdef DEBUG
+ if (debug)
+ printf("peer: %s\n", statstr);
+#endif
+ }
+#endif /* OPENSSL */
#ifdef DEBUG
if (debug)
printf(
- "newpeer: %s->%s mode %d vers %d poll %d %d flags %x %x ttl %d key %08x\n",
- ntoa(&peer->dstadr->sin), ntoa(&peer->srcadr),
+ "newpeer: %s->%s mode %d vers %d poll %d %d flags 0x%x 0x%x ttl %d key %08x\n",
+ peer->dstadr == NULL ? "null" : stoa(&peer->dstadr->sin),
+ stoa(&peer->srcadr),
peer->hmode, peer->version, peer->minpoll,
peer->maxpoll, peer->flags, peer->cast_flags,
- peer->ttlmax, peer->keyid);
+ peer->ttl, peer->keyid);
#endif
return (peer);
}
@@ -612,7 +681,7 @@ newpeer(
*/
int
peer_unconfig(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *dstadr,
int mode
)
@@ -681,6 +750,7 @@ peer_reset(
peer->oldpkt = 0;
peer->seldisptoolarge = 0;
peer->selbroken = 0;
+ peer->rank = 0;
peer->timereset = current_time;
}
@@ -700,7 +770,7 @@ peer_all_reset(void)
}
-#ifdef AUTOKEY
+#ifdef OPENSSL
/*
* expire_all - flush all crypto data and update timestamps.
*/
@@ -718,30 +788,29 @@ expire_all(void)
* everything. Then, recompute and sign the agreement public
* value, if present.
*/
+ if (!crypto_flags)
+ return;
for (n = 0; n < HASH_SIZE; n++) {
for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
next_peer = peer->next;
- if (peer->cast_flags & MDF_ACAST) {
- peer_clear(peer);
-#ifdef AUTOKEY
- } else {
+ if (!(peer->flags & FLAG_SKEY)) {
+ continue;
+ } else if (peer->cast_flags & MDF_ACAST) {
+ peer_clear(peer, "ACST");
+ } else if (peer->hmode == MODE_ACTIVE ||
+ peer->hmode == MODE_PASSIVE) {
key_expire(peer);
- peer->pcookie.tstamp = 0;
-#endif /* AUTOKEY */
+ peer->crypto &= ~(CRYPTO_FLAG_AUTO |
+ CRYPTO_FLAG_AGREE);
}
}
}
- sys_private = (u_int32)RANDOM & 0xffffffff;
-#ifdef PUBKEY
- crypto_agree();
-#endif /* PUBKEY */
-#ifdef DEBUG
- if (debug)
- printf("expire_all: at %lu\n", current_time);
-#endif
+ RAND_bytes((u_char *)&sys_private, 4);
+ crypto_update();
+ resetmanycast();
}
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
/*
@@ -804,7 +873,7 @@ resetmanycast(void)
peer->next) {
if (peer->cast_flags & MDF_ACAST) {
peer->ttl = 0;
- poll_update(peer, peer->hpoll);
+ poll_update(peer, 0);
}
}
}
diff --git a/contrib/ntp/ntpd/ntp_proto.c b/contrib/ntp/ntpd/ntp_proto.c
index fc95016e52a0..451bc9ab4242 100644
--- a/contrib/ntp/ntpd/ntp_proto.c
+++ b/contrib/ntp/ntpd/ntp_proto.c
@@ -1,5 +1,8 @@
/*
* ntp_proto.c - NTP version 4 protocol machinery
+ *
+ * ATTENTION: Get approval from Dave Mills on all changes to this file!
+ *
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -10,7 +13,6 @@
#include "ntp_unixtime.h"
#include "ntp_control.h"
#include "ntp_string.h"
-#include "ntp_crypto.h"
#include <stdio.h>
@@ -32,45 +34,61 @@ s_char sys_precision; /* local clock precision */
double sys_rootdelay; /* roundtrip delay to primary source */
double sys_rootdispersion; /* dispersion to primary source */
u_int32 sys_refid; /* reference source for local clock */
+u_int32 sys_peer_refid; /* hashed refid of our current peer */
static double sys_offset; /* current local clock offset */
l_fp sys_reftime; /* time we were last updated */
-struct peer *sys_peer; /* our current peer */
+struct peer *sys_peer; /* our current peer */
struct peer *sys_prefer; /* our cherished peer */
-#ifdef AUTOKEY
+int sys_kod; /* kod credit */
+int sys_kod_rate = 2; /* max kod packets per second */
+#ifdef OPENSSL
u_long sys_automax; /* maximum session key lifetime */
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
/*
* Nonspecified system state variables.
*/
-int sys_bclient; /* we set our time to broadcasts */
-double sys_bdelay; /* broadcast client default delay */
+int sys_bclient; /* broadcast client enable */
+double sys_bdelay; /* broadcast client default delay */
+int sys_calldelay; /* modem callup delay (s) */
int sys_authenticate; /* requre authentication for config */
l_fp sys_authdelay; /* authentication delay */
-static u_long sys_authdly[2]; /* authentication delay shift reg */
+static u_long sys_authdly[2]; /* authentication delay shift reg */
static u_char leap_consensus; /* consensus of survivor leap bits */
-static double sys_selerr; /* select error (squares) */
+static double sys_selerr; /* select error (squares) */
static double sys_syserr; /* system error (squares) */
keyid_t sys_private; /* private value for session seed */
int sys_manycastserver; /* respond to manycast client pkts */
-u_int sys_survivors; /* truest of the truechimers */
int peer_ntpdate; /* active peers in ntpdate mode */
-#ifdef AUTOKEY
+int sys_survivors; /* truest of the truechimers */
+#ifdef OPENSSL
char *sys_hostname; /* gethostname() name */
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
+
+/*
+ * TOS and multicast mapping stuff
+ */
+int sys_floor = 1; /* cluster stratum floor */
+int sys_ceiling = STRATUM_UNSPEC; /* cluster stratum ceiling*/
+int sys_minsane = 1; /* minimum candidates */
+int sys_minclock = NTP_MINCLOCK; /* minimum survivors */
+int sys_cohort = 0; /* cohort switch */
+int sys_ttlmax; /* max ttl mapping vector index */
+u_char sys_ttl[MAX_TTL]; /* ttl mapping vector */
/*
* Statistics counters
*/
-u_long sys_stattime; /* time when we started recording */
-u_long sys_badstratum; /* packets with invalid stratum */
-u_long sys_oldversionpkt; /* old version packets received */
-u_long sys_newversionpkt; /* new version packets received */
-u_long sys_unknownversion; /* don't know version packets */
-u_long sys_badlength; /* packets with bad length */
+u_long sys_stattime; /* time since reset */
+u_long sys_received; /* packets received */
u_long sys_processed; /* packets processed */
-u_long sys_badauth; /* packets dropped because of auth */
-u_long sys_limitrejected; /* pkts rejected due to client count per net */
+u_long sys_newversionpkt; /* current version */
+u_long sys_oldversionpkt; /* recent version */
+u_long sys_unknownversion; /* invalid version */
+u_long sys_restricted; /* access denied */
+u_long sys_badlength; /* bad length or format */
+u_long sys_badauth; /* bad authentication */
+u_long sys_limitrejected; /* rate exceeded */
static double root_distance P((struct peer *));
static double clock_combine P((struct peer **, int));
@@ -78,7 +96,7 @@ static void peer_xmit P((struct peer *));
static void fast_xmit P((struct recvbuf *, int, keyid_t, int));
static void clock_update P((void));
int default_get_precision P((void));
-
+static int peer_unfit P((struct peer *));
/*
* transmit - Transmit Procedure. See Section 3.4.2 of the
@@ -89,180 +107,193 @@ transmit(
struct peer *peer /* peer structure pointer */
)
{
- int hpoll;
+ int hpoll;
+
+ /*
+ * The polling state machine. There are two kinds of machines,
+ * those that never expect a reply (broadcast and manycast
+ * server modes) and those that do (all other modes). The dance
+ * is intricate...
+ */
hpoll = peer->hpoll;
- if (peer->burst == 0) {
- u_char oreach;
+ if (peer->cast_flags & (MDF_BCAST | MDF_MCAST)) {
/*
- * The polling state machine. There are two kinds of
- * machines, those that never expect a reply (broadcast
- * and manycast server modes) and those that do (all
- * other modes). The dance is intricate...
+ * In broadcast mode the poll interval is fixed
+ * at minpoll.
*/
- if (peer->cast_flags & (MDF_BCAST | MDF_MCAST)) {
+ hpoll = peer->minpoll;
+ } else if (peer->cast_flags & MDF_ACAST) {
- /*
- * In broadcast mode the poll interval is fixed
- * at minpoll and the ttl at ttlmax.
- */
- hpoll = peer->minpoll;
- peer->ttl = peer->ttlmax;
-#ifdef AUTOKEY
- } else if (peer->cast_flags & MDF_ACAST) {
+ /*
+ * In manycast mode we start with the minpoll interval
+ * and ttl. However, the actual poll interval is eight
+ * times the nominal poll interval shown here. If fewer
+ * than sys_minclock servers are found, the ttl is
+ * increased by one and we try again. If this continues
+ * to the max ttl, the poll interval is bumped by one
+ * and we try again. If at least sys_minclock servers
+ * are found, the poll interval increases with the
+ * system poll interval to the max and we continue
+ * indefinately. However, about once per day when the
+ * agreement parameters are refreshed, the manycast
+ * clients are reset and we start from the beginning.
+ * This is to catch and clamp the ttl to the lowest
+ * practical value and avoid knocking on spurious doors.
+ */
+ if (sys_survivors < sys_minclock && peer->ttl <
+ sys_ttlmax)
+ peer->ttl++;
+ hpoll = sys_poll;
+ } else {
- /*
- * In manycast mode we start with the minpoll
- * interval and ttl. However, the actual poll
- * interval is eight times the nominal poll
- * interval shown here. If fewer than three
- * servers are found, the ttl is increased by
- * one and we try again. If this continues to
- * the max ttl, the poll interval is bumped by
- * one and we try again. If at least three
- * servers are found, the poll interval
- * increases with the system poll interval to
- * the max and we continue indefinately.
- * However, about once per day when the
- * agreement parameters are refreshed, the
- * manycast clients are reset and we start from
- * the beginning. This is to catch and clamp the
- * ttl to the lowest practical value and avoid
- * knocking on spurious doors.
- */
- if (sys_survivors < NTP_MINCLOCK && peer->ttl <
- peer->ttlmax)
- peer->ttl++;
- hpoll = sys_poll;
-#endif /* AUTOKEY */
- } else {
+ /*
+ * For associations expecting a reply, the watchdog
+ * counter is bumped by one if the peer has not been
+ * heard since the previous poll. If the counter reaches
+ * the max, the poll interval is doubled and the peer is
+ * demobilized if not configured.
+ */
+ peer->unreach++;
+ if (peer->unreach >= NTP_UNREACH) {
+ hpoll++;
+ if (peer->flags & FLAG_CONFIG) {
- /*
- * For associations expecting a reply, the
- * watchdog counter is bumped by one if the peer
- * has not been heard since the previous poll.
- * If the counter reaches the max, the peer is
- * demobilized if not configured and just
- * cleared if it is, but in this case the poll
- * interval is bumped by one.
- */
- if (peer->unreach < NTP_UNREACH) {
- peer->unreach++;
- } else if (!(peer->flags & FLAG_CONFIG)) {
+ /*
+ * If nothing is likely to change in
+ * future, flash the access denied bit
+ * so we won't bother the dude again.
+ */
+ if (memcmp((char *)&peer->refid,
+ "DENY", 4) == 0 ||
+ memcmp((char *)&peer->refid,
+ "CRYP", 4) == 0)
+ peer->flash |= TEST4;
+ } else {
unpeer(peer);
- clock_select();
return;
-
- } else {
- peer_clear(peer);
- hpoll++;
}
}
- oreach = peer->reach;
- peer->reach <<= 1;
- if (peer->reach == 0) {
+ if (peer->burst == 0) {
+ u_char oreach;
- /*
- * If this association has become unreachable,
- * clear it and raise a trap.
- */
- if (oreach != 0) {
- report_event(EVNT_UNREACH, peer);
- peer->timereachable = current_time;
- if (!(peer->flags & FLAG_CONFIG)) {
- unpeer(peer);
+ oreach = peer->reach;
+ peer->reach <<= 1;
+ peer->hyst *= HYST_TC;
+ if (peer->reach == 0) {
+
+ /*
+ * If this association has become
+ * unreachable, clear it and raise a
+ * trap.
+ */
+ if (oreach != 0) {
+ report_event(EVNT_UNREACH,
+ peer);
+ peer->timereachable =
+ current_time;
+ if (peer->flags & FLAG_CONFIG) {
+ peer_clear(peer,
+ "INIT");
+ } else {
+ unpeer(peer);
+ return;
+ }
+ }
+ if (peer->flags & FLAG_IBURST)
+ peer->burst = NTP_BURST;
+ } else {
+ /*
+ * Here the peer is reachable. If it has
+ * not been heard for three consecutive
+ * polls, stuff the clock filter. Next,
+ * determine the poll interval. If the
+ * peer is unfit for synchronization,
+ * increase it by one; otherwise, use
+ * the system poll interval.
+ */
+ if (!(peer->reach & 0x07)) {
+ clock_filter(peer, 0., 0.,
+ MAXDISPERSE);
clock_select();
- return;
- } else {
- peer_clear(peer);
- hpoll = peer->minpoll;
}
+ if (peer_unfit(peer))
+ hpoll++;
+ else
+ hpoll = sys_poll;
+ if (peer->flags & FLAG_BURST)
+ peer->burst = NTP_BURST;
}
- if (peer->flags & FLAG_IBURST)
- peer->burst = NTP_SHIFT;
} else {
/*
- * Here the peer is reachable. If it has not
- * been heard for three consecutive polls, stuff
- * the clock filter. Next, determine the poll
- * interval. If the peer is a synchronization
- * candidate, use the system poll interval. If
- * the peer is not sane, increase it by one. If
- * the number of valid updates is not greater
- * than half the register size, clamp it to the
- * minimum. This is to quickly recover the time
- * variables when a noisy peer shows life.
+ * Source rate control. If we are restrained,
+ * each burst consists of only one packet.
*/
- if (!(peer->reach & 0x07)) {
- clock_filter(peer, 0., 0., MAXDISPERSE);
- clock_select();
- }
- if ((peer->stratum > 1 && peer->refid ==
- peer->dstadr->sin.sin_addr.s_addr) ||
- peer->stratum >= STRATUM_UNSPEC)
- hpoll++;
+ if (memcmp((char *)&peer->refid, "RSTR", 4) ==
+ 0)
+ peer->burst = 0;
else
- hpoll = sys_poll;
- if (peer->flags & FLAG_BURST)
- peer->burst = NTP_SHIFT;
- }
- } else {
- peer->burst--;
- if (peer->burst == 0) {
-
- /*
- * If a broadcast client at this point, the
- * burst has concluded, so we switch to client
- * mode and purge the keylist, since no further
- * transmissions will be made.
- */
- if (peer->cast_flags & MDF_BCLNT) {
- peer->hmode = MODE_BCLIENT;
-#ifdef AUTOKEY
- key_expire(peer);
-#endif /* AUTOKEY */
- }
- poll_update(peer, hpoll);
- clock_select();
+ peer->burst--;
+ if (peer->burst == 0) {
+ /*
+ * If a broadcast client at this point,
+ * the burst has concluded, so we switch
+ * to client mode and purge the keylist,
+ * since no further transmissions will
+ * be made.
+ */
+ if (peer->cast_flags & MDF_BCLNT) {
+ peer->hmode = MODE_BCLIENT;
+#ifdef OPENSSL
+ key_expire(peer);
+#endif /* OPENSSL */
+ }
+ poll_update(peer, hpoll);
+ clock_select();
- /*
- * If ntpdate mode and the clock has not been
- * set and all peers have completed the burst,
- * we declare a successful failure.
- */
- if (mode_ntpdate) {
- peer_ntpdate--;
- if (peer_ntpdate > 0)
- return;
- NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
- msyslog(LOG_NOTICE,
- "no reply; clock not set");
- printf(
- "ntpd: no reply; clock not set\n");
- exit(0);
+ /*
+ * If ntpdate mode and the clock has not
+ * been set and all peers have completed
+ * the burst, we declare a successful
+ * failure.
+ */
+ if (mode_ntpdate) {
+ peer_ntpdate--;
+ if (peer_ntpdate > 0) {
+ poll_update(
+ peer, hpoll);
+ return;
+ }
+ msyslog(LOG_NOTICE,
+ "no reply; clock not set");
+ exit (0);
+ }
+ poll_update(peer, hpoll);
+ return;
}
- return;
-
}
}
peer->outdate = current_time;
- poll_update(peer, hpoll);
/*
- * We need to be very careful about honking uncivilized time.
- * Never transmit if in broadcast client mode or access denied.
- * If in broadcast mode, transmit only if synchronized to a
- * valid source.
+ * Do not transmit if in broadcast cclient mode or access has
+ * been denied.
*/
if (peer->hmode == MODE_BCLIENT || peer->flash & TEST4) {
+ poll_update(peer, hpoll);
+ return;
+
+ /*
+ * Do not transmit in broadcast mode unless we are synchronized.
+ */
+ } else if (peer->hmode == MODE_BROADCAST && sys_peer == NULL) {
+ poll_update(peer, hpoll);
return;
- } else if (peer->hmode == MODE_BROADCAST) {
- if (sys_peer == NULL)
- return;
}
peer_xmit(peer);
+ poll_update(peer, hpoll);
}
/*
@@ -273,20 +304,24 @@ receive(
struct recvbuf *rbufp
)
{
- register struct peer *peer;
- register struct pkt *pkt;
- int hismode;
- int oflags;
- int restrict_mask;
- int has_mac; /* length of MAC field */
- int authlen; /* offset of MAC field */
- int is_authentic; /* cryptosum ok */
- keyid_t skeyid; /* cryptographic keys */
- struct sockaddr_in *dstadr_sin; /* active runway */
-#ifdef AUTOKEY
- keyid_t pkeyid, tkeyid; /* cryptographic keys */
-#endif /* AUTOKEY */
- struct peer *peer2;
+ register struct peer *peer; /* peer structure pointer */
+ register struct pkt *pkt; /* receive packet pointer */
+ int hismode; /* packet mode */
+ int restrict_mask; /* restrict bits */
+ int has_mac; /* length of MAC field */
+ int authlen; /* offset of MAC field */
+ int is_authentic; /* cryptosum ok */
+ keyid_t skeyid = 0; /* key ID */
+ struct sockaddr_storage *dstadr_sin; /* active runway */
+ struct peer *peer2; /* aux peer structure pointer */
+ l_fp p_org; /* originate timestamp */
+ l_fp p_xmt; /* transmit timestamp */
+#ifdef OPENSSL
+ keyid_t tkeyid = 0; /* temporary key ID */
+ keyid_t pkeyid = 0; /* previous key ID */
+ struct autokey *ap; /* autokey structure pointer */
+ int rval; /* cookie snatcher */
+#endif /* OPENSSL */
int retcode = AM_NOMATCH;
/*
@@ -299,61 +334,103 @@ receive(
* simply discarded without prejudice. Some restrictions have to
* be handled later in order to generate a kiss-of-death packet.
*/
+ /*
+ * Bogus port check is before anything, since it probably
+ * reveals a clogging attack.
+ */
+ sys_received++;
+ if (SRCPORT(&rbufp->recv_srcadr) == 0) {
+ sys_badlength++;
+ return; /* bogus port */
+ }
ntp_monitor(rbufp);
restrict_mask = restrictions(&rbufp->recv_srcadr);
#ifdef DEBUG
- if (debug > 2)
- printf("receive: at %ld %s<-%s restrict %02x\n",
- current_time, ntoa(&rbufp->dstadr->sin),
- ntoa(&rbufp->recv_srcadr), restrict_mask);
+ if (debug > 1)
+ printf("receive: at %ld %s<-%s restrict %03x\n",
+ current_time, stoa(&rbufp->dstadr->sin),
+ stoa(&rbufp->recv_srcadr), restrict_mask);
#endif
- if (restrict_mask & RES_IGNORE)
+ if (restrict_mask & RES_IGNORE) {
+ sys_restricted++;
return; /* no anything */
-
- pkt = &rbufp->recv_pkt;
- if (PKT_VERSION(pkt->li_vn_mode) == NTP_VERSION) {
- sys_newversionpkt++; /* new version */
- } else if (!(restrict_mask & RES_VERSION) &&
- PKT_VERSION(pkt->li_vn_mode) >= NTP_OLDVERSION) {
- sys_oldversionpkt++; /* old version */
- } else {
- sys_unknownversion++;
- return; /* invalid version */
}
- if (PKT_MODE(pkt->li_vn_mode) == MODE_PRIVATE) {
- if (restrict_mask & RES_NOQUERY)
+ pkt = &rbufp->recv_pkt;
+ hismode = (int)PKT_MODE(pkt->li_vn_mode);
+ if (hismode == MODE_PRIVATE) {
+ if (restrict_mask & RES_NOQUERY) {
+ sys_restricted++;
return; /* no query private */
+ }
process_private(rbufp, ((restrict_mask &
RES_NOMODIFY) == 0));
return;
}
- if (PKT_MODE(pkt->li_vn_mode) == MODE_CONTROL) {
- if (restrict_mask & RES_NOQUERY)
+ if (hismode == MODE_CONTROL) {
+ if (restrict_mask & RES_NOQUERY) {
+ sys_restricted++;
return; /* no query control */
+ }
process_control(rbufp, restrict_mask);
return;
}
+ if (restrict_mask & RES_DONTSERVE) {
+ sys_restricted++;
+ return; /* no time */
+ }
if (rbufp->recv_length < LEN_PKT_NOMAC) {
sys_badlength++;
return; /* runt packet */
}
+
+ /*
+ * Version check must be after the query packets, since they
+ * intentionally use early version.
+ */
+ if (PKT_VERSION(pkt->li_vn_mode) == NTP_VERSION) {
+ sys_newversionpkt++; /* new version */
+ } else if (!(restrict_mask & RES_VERSION) &&
+ PKT_VERSION(pkt->li_vn_mode) >= NTP_OLDVERSION) {
+ sys_oldversionpkt++; /* previous version */
+ } else {
+ sys_unknownversion++;
+ return; /* old version */
+ }
/*
- * Validate mode. Note that NTPv1 is no longer supported.
+ * Figure out his mode and validate the packet. This has some
+ * legacy raunch that probably should be removed. In very early
+ * NTP versions mode 0 was equivalent to what later versions
+ * would interpret as client mode.
*/
- hismode = (int)PKT_MODE(pkt->li_vn_mode);
if (hismode == MODE_UNSPEC) {
- sys_badlength++;
- return; /* invalid mode */
+ if (PKT_VERSION(pkt->li_vn_mode) == NTP_OLDVERSION) {
+ hismode = MODE_CLIENT;
+ } else {
+ sys_badlength++;
+ return; /* invalid mode */
+ }
}
/*
- * Discard broadcast packets received on the wildcard interface
- * or if not enabled as broadcast client.
+ * Discard broadcast if not enabled as broadcast client. If
+ * Autokey, the wildcard interface cannot be used, so dump
+ * packets gettiing off the bus at that stop as well. This means
+ * that some systems with broken interface code, specifically
+ * Linux, will not work with Autokey.
*/
- if (PKT_MODE(pkt->li_vn_mode) == MODE_BROADCAST &&
- (rbufp->dstadr == any_interface || !sys_bclient))
- return;
+ if (hismode == MODE_BROADCAST) {
+ if (!sys_bclient || restrict_mask & RES_NOPEER) {
+ sys_restricted++;
+ return; /* no client */
+ }
+#ifdef OPENSSL
+ if (crypto_flags && rbufp->dstadr == any_interface) {
+ sys_restricted++;
+ return; /* no client */
+ }
+#endif /* OPENSSL */
+ }
/*
* Parse the extension field if present. We figure out whether
@@ -366,17 +443,14 @@ receive(
* an extension field is present. If 2 or 4, the packet is a
* runt and goes poof! with a brilliant flash.
*/
- skeyid = 0;
-#ifdef AUTOKEY
- pkeyid = tkeyid = 0;
-#endif /* AUTOKEY */
authlen = LEN_PKT_NOMAC;
- while ((has_mac = rbufp->recv_length - authlen) > 0) {
+ has_mac = rbufp->recv_length - authlen;
+ while (has_mac > 0) {
int temp;
if (has_mac % 4 != 0 || has_mac < 0) {
sys_badlength++;
- return;
+ return; /* bad MAC length */
}
if (has_mac == 1 * 4 || has_mac == 3 * 4 || has_mac ==
MAX_MAC_LEN) {
@@ -386,23 +460,28 @@ receive(
} else if (has_mac > MAX_MAC_LEN) {
temp = ntohl(((u_int32 *)pkt)[authlen / 4]) &
0xffff;
- if (temp < 4 || temp % 4 != 0) {
+ if (temp < 4 || temp > NTP_MAXEXTEN || temp % 4
+ != 0) {
sys_badlength++;
- return;
+ return; /* bad MAC length */
}
authlen += temp;
+ has_mac -= temp;
} else {
sys_badlength++;
- return;
+ return; /* bad MAC length */
}
}
+#ifdef OPENSSL
+ pkeyid = tkeyid = 0;
+#endif /* OPENSSL */
/*
* We have tossed out as many buggy packets as possible early in
* the game to reduce the exposure to a clogging attack. Now we
* have to burn some cycles to find the association and
* authenticate the packet if required. Note that we burn only
- * MD5 or DES cycles, again to reduce exposure. There may be no
+ * MD5 cycles, again to reduce exposure. There may be no
* matching association and that's okay.
*
* More on the autokey mambo. Normally the local interface is
@@ -424,11 +503,12 @@ receive(
#ifdef DEBUG
if (debug)
printf("receive: at %ld %s<-%s mode %d code %d\n",
- current_time, ntoa(&rbufp->dstadr->sin),
- ntoa(&rbufp->recv_srcadr), hismode, retcode);
+ current_time, stoa(&rbufp->dstadr->sin),
+ stoa(&rbufp->recv_srcadr), hismode,
+ retcode);
#endif
} else {
-#ifdef AUTOKEY
+#ifdef OPENSSL
/*
* For autokey modes, generate the session key
* and install in the key cache. Use the socket
@@ -471,8 +551,7 @@ receive(
* mobilized.
*/
pkeyid = 0;
- if (rbufp->dstadr->bcast.sin_addr.s_addr
- != 0)
+ if (!SOCKNUL(&rbufp->dstadr->bcast))
dstadr_sin =
&rbufp->dstadr->bcast;
} else if (peer == NULL) {
@@ -480,7 +559,7 @@ receive(
&rbufp->recv_srcadr, dstadr_sin, 0,
sys_private, 0);
} else {
- pkeyid = peer->pcookie.key;
+ pkeyid = peer->pcookie;
}
/*
@@ -503,29 +582,32 @@ receive(
}
}
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
/*
* Compute the cryptosum. Note a clogging attack may
* succeed in bloating the key cache. If an autokey,
* purge it immediately, since we won't be needing it
- * again.
+ * again. If the packet is authentic, it may mobilize an
+ * association.
*/
if (authdecrypt(skeyid, (u_int32 *)pkt, authlen,
- has_mac))
+ has_mac)) {
is_authentic = 1;
- else
+ restrict_mask &= ~RES_DONTTRUST;
+ } else {
sys_badauth++;
-#ifdef AUTOKEY
+ }
+#ifdef OPENSSL
if (skeyid > NTP_MAXKEY)
authtrust(skeyid, 0);
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
#ifdef DEBUG
if (debug)
printf(
"receive: at %ld %s<-%s mode %d code %d keyid %08x len %d mac %d auth %d\n",
- current_time, ntoa(dstadr_sin),
- ntoa(&rbufp->recv_srcadr), hismode, retcode,
+ current_time, stoa(dstadr_sin),
+ stoa(&rbufp->recv_srcadr), hismode, retcode,
skeyid, authlen, has_mac,
is_authentic);
#endif
@@ -537,9 +619,10 @@ receive(
* association is processed by that association. If not and
* certain conditions prevail, then an ephemeral association is
* mobilized: a broadcast packet mobilizes a broadcast client
- * aassociation; a server packet mobilizes a client association;
- * a symmetric active packet mobilizes a symmetric passive
- * association. And, the adventure continues...
+ * aassociation; a manycast server packet mobilizes a manycast
+ * client association; a symmetric active packet mobilizes a
+ * symmetric passive association. And, the adventure
+ * continues...
*/
switch (retcode) {
case AM_FXMIT:
@@ -555,33 +638,29 @@ receive(
INT_MULTICAST)) {
/*
- * We are picky about responding to a
- * manycaster. There is no reason to respond to
- * a request if our time is worse than the
- * manycaster. We certainly don't reply if not
- * synchronized to proventic time.
+ * There is no reason to respond to a request if
+ * our time is worse than the manycaster or it
+ * has already synchronized to us.
*/
- if (sys_peer == NULL)
- return;
-
- /*
- * We don't reply if the our stratum is greater
- * than the manycaster.
- */
- if (PKT_TO_STRATUM(pkt->stratum) < sys_stratum)
- return;
+ if (sys_peer == NULL ||
+ PKT_TO_STRATUM(pkt->stratum) <
+ sys_stratum || (sys_cohort &&
+ PKT_TO_STRATUM(pkt->stratum) ==
+ sys_stratum) ||
+ rbufp->dstadr->addr_refid == pkt->refid)
+ return; /* manycast dropped */
}
/*
* Note that we don't require an authentication check
* here, since we can't set the system clock; but, we do
- * set the key ID to zero to tell the caller about this.
+ * send a crypto-NAK to tell the caller about this.
*/
- if (is_authentic)
+ if (has_mac && !is_authentic)
+ fast_xmit(rbufp, MODE_SERVER, 0, restrict_mask);
+ else
fast_xmit(rbufp, MODE_SERVER, skeyid,
restrict_mask);
- else
- fast_xmit(rbufp, MODE_SERVER, 0, restrict_mask);
return;
case AM_MANYCAST:
@@ -594,100 +673,166 @@ receive(
* there is no match, that's curious and could be an
* intruder attempting to clog, so we just ignore it.
*
- * First, make sure the packet is authentic. If so and
- * the manycast association is found, we mobilize a
- * client mode association, copy pertinent variables
- * from the manycast to the client mode association and
- * wind up the spring.
+ * First, make sure the packet is authentic and not
+ * restricted. If so and the manycast association is
+ * found, we mobilize a client association and copy
+ * pertinent variables from the manycast association to
+ * the new client association.
*
* There is an implosion hazard at the manycast client,
* since the manycast servers send the server packet
- * immediately.
+ * immediately. If the guy is already here, don't fire
+ * up a duplicate.
*/
- if ((restrict_mask & (RES_DONTSERVE | RES_LIMITED |
- RES_NOPEER)) || (sys_authenticate &&
- !is_authentic))
- return;
+ if (restrict_mask & RES_DONTTRUST) {
+ sys_restricted++;
+ return; /* no trust */
+ }
- peer2 = findmanycastpeer(rbufp);
- if (peer2 == 0)
- return;
+ if (sys_authenticate && !is_authentic)
+ return; /* bad auth */
- peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
+ if ((peer2 = findmanycastpeer(rbufp)) == NULL)
+ return; /* no assoc match */
+
+ if ((peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
MODE_CLIENT, PKT_VERSION(pkt->li_vn_mode),
- sys_minpoll, NTP_MAXDPOLL, FLAG_IBURST |
- (peer2->flags & (FLAG_AUTHENABLE | FLAG_SKEY)),
- MDF_UCAST, 0, skeyid);
- if (peer == NULL)
- return;
+ NTP_MINDPOLL, NTP_MAXDPOLL, FLAG_IBURST, MDF_UCAST |
+ MDF_ACLNT, 0, skeyid)) == NULL)
+ return; /* system error */
+
+ /*
+ * We don't need these, but it warms the billboards.
+ */
+ peer->ttl = peer2->ttl;
break;
case AM_NEWPASS:
/*
* This is the first packet received from a symmetric
- * active peer. First, make sure the packet is
- * authentic. If so, mobilize a symmetric passive
- * association.
+ * active peer. First, make sure it is authentic and not
+ * restricted. If so, mobilize a passive association.
+ * If authentication fails send a crypto-NAK; otherwise,
+ * kiss the frog.
*/
- if ((restrict_mask & (RES_DONTSERVE | RES_LIMITED |
- RES_NOPEER)) || (sys_authenticate &&
- !is_authentic)) {
+ if (restrict_mask & RES_DONTTRUST) {
+ sys_restricted++;
+ return; /* no trust */
+ }
+ if (sys_authenticate && !is_authentic) {
fast_xmit(rbufp, MODE_PASSIVE, 0,
restrict_mask);
- return;
+ return; /* bad auth */
}
- peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
+ if ((peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
MODE_PASSIVE, PKT_VERSION(pkt->li_vn_mode),
- sys_minpoll, NTP_MAXDPOLL, sys_authenticate ?
- FLAG_AUTHENABLE : 0, MDF_UCAST, 0, skeyid);
- if (peer == NULL)
- return;
+ NTP_MINDPOLL, NTP_MAXDPOLL, 0, MDF_UCAST, 0,
+ skeyid)) == NULL)
+ return; /* system error */
+
break;
case AM_NEWBCL:
/*
* This is the first packet received from a broadcast
- * server. First, make sure the packet is authentic, not
- * restricted and that we are a broadcast or multicast
- * client. If so, mobilize a broadcast client
- * association.
+ * server. First, make sure it is authentic and not
+ * restricted and that we are a broadcast client. If so,
+ * mobilize a broadcast client association. We don't
+ * kiss any frogs here.
*/
- if ((restrict_mask & (RES_DONTSERVE | RES_LIMITED |
- RES_NOPEER)) || (sys_authenticate &&
- !is_authentic) || !sys_bclient)
- return;
+ if (restrict_mask & RES_DONTTRUST) {
+ sys_restricted++;
+ return; /* no trust */
+ }
+ if (sys_authenticate && !is_authentic)
+ return; /* bad auth */
- peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
+ if (!sys_bclient)
+ return; /* not a client */
+
+ if ((peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
MODE_CLIENT, PKT_VERSION(pkt->li_vn_mode),
- sys_minpoll, NTP_MAXDPOLL, FLAG_MCAST |
- FLAG_IBURST | (sys_authenticate ?
- FLAG_AUTHENABLE : 0), MDF_BCLNT, 0, skeyid);
-#ifdef AUTOKEY
-#ifdef PUBKEY
- if (peer == NULL)
- return;
- if (peer->flags & FLAG_SKEY)
- crypto_recv(peer, rbufp);
-#endif /* PUBKEY */
-#endif /* AUTOKEY */
+ NTP_MINDPOLL, NTP_MAXDPOLL, FLAG_MCAST |
+ FLAG_IBURST, MDF_BCLNT, 0, skeyid)) == NULL)
+ return; /* system error */
+#ifdef OPENSSL
+ /*
+ * Danger looms. If this is autokey, go process the
+ * extension fields. If something goes wrong, abandon
+ * ship and don't trust subsequent packets.
+ */
+ if (crypto_flags) {
+ if ((rval = crypto_recv(peer, rbufp)) !=
+ XEVNT_OK) {
+ struct sockaddr_storage mskadr_sin;
+
+ unpeer(peer);
+ sys_restricted++;
+ SET_HOSTMASK(&mskadr_sin,
+ rbufp->recv_srcadr.ss_family);
+ hack_restrict(RESTRICT_FLAGS,
+ &rbufp->recv_srcadr, &mskadr_sin,
+ 0, RES_DONTTRUST | RES_TIMEOUT);
+#ifdef DEBUG
+ if (debug)
+ printf(
+ "packet: bad exten %x\n",
+ rval);
+#endif
+ }
+ }
+#endif /* OPENSSL */
return;
case AM_POSSBCL:
+
+ /*
+ * This is a broadcast packet received in client mode.
+ * It could happen if the initial client/server volley
+ * is not complete before the next broadcast packet is
+ * received. Be liberal in what we accept.
+ */
case AM_PROCPKT:
/*
- * Happiness and nothing broke. Earn some revenue.
+ * This is a symmetric mode packet received in symmetric
+ * mode, a server packet received in client mode or a
+ * broadcast packet received in broadcast client mode.
+ * If it is restricted, this is very strange because it
+ * is rude to send a packet to a restricted address. If
+ * anyway, flash a restrain kiss and skedaddle to
+ * Seattle. If not authentic, leave a light on and
+ * continue.
*/
+ peer->flash = 0;
+ if (restrict_mask & RES_DONTTRUST) {
+ sys_restricted++;
+ if (peer->flags & FLAG_CONFIG)
+ peer_clear(peer, "RSTR");
+ else
+ unpeer(peer);
+ return; /* no trust */
+ }
+ if (has_mac && !is_authentic)
+ peer->flash |= TEST5; /* bad auth */
break;
default:
/*
- * Invalid mode combination. Leave the island
- * immediately.
+ * Invalid mode combination. This happens when a passive
+ * mode packet arrives and matches another passive
+ * association or no association at all, or when a
+ * server mode packet arrives and matches a broadcast
+ * client association. This is usually the result of
+ * reconfiguring a client on-fly. If authenticated
+ * passive mode packet, send a crypto-NAK; otherwise,
+ * ignore it.
*/
+ if (has_mac && hismode == MODE_PASSIVE)
+ fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask);
#ifdef DEBUG
if (debug)
printf("receive: bad protocol %d\n", retcode);
@@ -696,128 +841,242 @@ receive(
}
/*
- * If the peer isn't configured, set his authenable and autokey
- * status based on the packet. Once the status is set, it can't
- * be unset. It seems like a silly idea to do this here, rather
- * in the configuration routine, but in some goofy cases the
- * first packet sent cannot be authenticated and we need a way
- * for the dude to change his mind.
+ * We do a little homework. Note we can get here with an
+ * authentication error. We Need to do this in order to validate
+ * a crypto-NAK later. Note the order of processing; it is very
+ * important to avoid livelocks, deadlocks and lockpicks.
*/
- oflags = peer->flags;
peer->timereceived = current_time;
peer->received++;
- if (!(peer->flags & FLAG_CONFIG) && has_mac) {
- peer->flags |= FLAG_AUTHENABLE;
-#ifdef AUTOKEY
- if (skeyid > NTP_MAXKEY)
- peer->flags |= FLAG_SKEY;
-#endif /* AUTOKEY */
- }
+ if (peer->flash & TEST5)
+ peer->flags &= ~FLAG_AUTHENTIC;
+ else
+ peer->flags |= FLAG_AUTHENTIC;
+ NTOHL_FP(&pkt->org, &p_org);
+ NTOHL_FP(&pkt->xmt, &p_xmt);
/*
- * A valid packet must be from an authentic and allowed source.
- * All packets must pass the authentication allowed tests.
- * Autokey authenticated packets must pass additional tests and
- * public-key authenticated packets must have the credentials
- * verified. If all tests are passed, the packet is forwarded
- * for processing. If not, the packet is discarded and the
- * association demobilized if appropriate.
+ * If the packet is an old duplicate, we let it through so the
+ * extension fields will be processed.
+ */
+ if (L_ISEQU(&peer->org, &p_xmt)) { /* test 1 */
+ peer->flash |= TEST1; /* dupe */
+ /* fall through */
+
+ /*
+ * For broadcast server mode, loopback checking is disabled. An
+ * authentication error probably means the server restarted or
+ * rolled a new private value. If so, dump the association
+ * and wait for the next message.
+ */
+ } else if (hismode == MODE_BROADCAST) {
+ if (peer->flash & TEST5) {
+ unpeer(peer);
+ return;
+ }
+ /* fall through */
+
+ /*
+ * For server and symmetric modes, if the association transmit
+ * timestamp matches the packet originate timestamp, loopback is
+ * confirmed. Note in symmetric modes this also happens when the
+ * first packet from the active peer arrives at the newly
+ * mobilized passive peer. An authentication error probably
+ * means the server or peer restarted or rolled a new private
+ * value, but could be an intruder trying to stir up trouble.
+ * However, if this is a crypto-NAK, we know it is authentic, so
+ * dump the association and wait for the next message.
+ */
+ } else if (L_ISEQU(&peer->xmt, &p_org)) {
+ if (peer->flash & TEST5) {
+ if (has_mac == 4 && pkt->exten[0] == 0) {
+ if (peer->flags & FLAG_CONFIG)
+ peer_clear(peer, "AUTH");
+ else
+ unpeer(peer);
+ }
+ return;
+ }
+ /* fall through */
+
+ /*
+ * If the client or passive peer has never transmitted anything,
+ * this is either the first message from a symmetric peer or
+ * possibly a duplicate received before the transmit timeout.
+ * Pass it on.
+ */
+ } else if (L_ISZERO(&peer->xmt)) {
+ /* fall through */
+
+ /*
+ * Now it gets interesting. We have transmitted at least one
+ * packet. If the packet originate timestamp is nonzero, it
+ * does not match the association transmit timestamp, which is a
+ * loopback error. This error might mean a manycast server has
+ * answered a manycast honk from us and we already have an
+ * association for him, in which case quietly drop the packet
+ * here. It might mean an old duplicate, dropped packet or
+ * intruder replay, in which case we drop it later after
+ * extension field processing, but never let it touch the time
+ * values.
+ */
+ } else if (!L_ISZERO(&p_org)) {
+ if (peer->cast_flags & MDF_ACLNT)
+ return; /* not a client */
+
+ peer->flash |= TEST2;
+ /* fall through */
+
+ /*
+ * The packet originate timestamp is zero, meaning the other guy
+ * either didn't receive the first packet or died and restarted.
+ * If the association originate timestamp is zero, this is the
+ * first packet received, so we pass it on.
+ */
+ } else if (L_ISZERO(&peer->org)) {
+ /* fall through */
+
+ /*
+ * The other guy has restarted and we are still on the wire. We
+ * should demobilize/clear and get out of Dodge. If this is
+ * symmetric mode, we should also send a crypto-NAK.
*/
- peer->flash = 0;
- if (is_authentic) {
- peer->flags |= FLAG_AUTHENTIC;
} else {
- peer->flags &= ~FLAG_AUTHENTIC;
- }
- if (peer->hmode == MODE_BROADCAST &&
- (restrict_mask & RES_DONTTRUST)) /* test 4 */
- peer->flash |= TEST4; /* access denied */
- if (peer->flags & FLAG_AUTHENABLE) {
- if (!(peer->flags & FLAG_AUTHENTIC)) /* test 5 */
- peer->flash |= TEST5; /* auth failed */
- else if (!(oflags & FLAG_AUTHENABLE))
- report_event(EVNT_PEERAUTH, peer);
- }
- if (peer->flash) {
-#ifdef DEBUG
+ if (hismode == MODE_ACTIVE)
+ fast_xmit(rbufp, MODE_PASSIVE, 0,
+ restrict_mask);
+ else if (hismode == MODE_PASSIVE)
+ fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask);
+#if DEBUG
if (debug)
- printf("receive: bad auth %03x\n", peer->flash);
+ printf("receive: dropped %03x\n", peer->flash);
#endif
+ if (peer->flags & FLAG_CONFIG)
+ peer_clear(peer, "DROP");
+ else
+ unpeer(peer);
+ return;
+ }
+ if (peer->flash & ~TEST2) {
return;
}
-#ifdef AUTOKEY
+#ifdef OPENSSL
/*
* More autokey dance. The rules of the cha-cha are as follows:
*
* 1. If there is no key or the key is not auto, do nothing.
*
- * 2. If an extension field contains a verified signature, it is
+ * 2. If this packet is in response to the one just previously
+ * sent or from a broadcast server, do the extension fields.
+ * Otherwise, assume bogosity and bail out.
+ *
+ * 3. If an extension field contains a verified signature, it is
* self-authenticated and we sit the dance.
*
- * 3. If this is a server reply, check only to see that the
+ * 4. If this is a server reply, check only to see that the
* transmitted key ID matches the received key ID.
*
- * 4. Check to see that one or more hashes of the current key ID
+ * 5. Check to see that one or more hashes of the current key ID
* matches the previous key ID or ultimate original key ID
* obtained from the broadcaster or symmetric peer. If no
* match, sit the dance and wait for timeout.
*/
- if (peer->flags & FLAG_SKEY) {
+ if (crypto_flags && (peer->flags & FLAG_SKEY)) {
peer->flash |= TEST10;
- crypto_recv(peer, rbufp);
- poll_update(peer, peer->hpoll);
- if (hismode == MODE_SERVER) {
+ rval = crypto_recv(peer, rbufp);
+ if (rval != XEVNT_OK) {
+ /* fall through */
+
+ } else if (hismode == MODE_SERVER) {
if (skeyid == peer->keyid)
peer->flash &= ~TEST10;
} else if (!peer->flash & TEST10) {
peer->pkeyid = skeyid;
- } else {
+ } else if ((ap = (struct autokey *)peer->recval.ptr) !=
+ NULL) {
int i;
for (i = 0; ; i++) {
if (tkeyid == peer->pkeyid ||
- tkeyid == peer->recauto.key) {
+ tkeyid == ap->key) {
peer->flash &= ~TEST10;
peer->pkeyid = skeyid;
break;
}
- if (i > peer->recauto.seq)
+ if (i > ap->seq)
break;
tkeyid = session_key(
&rbufp->recv_srcadr, dstadr_sin,
tkeyid, pkeyid, 0);
}
}
-#ifdef PUBKEY
+ if (!(peer->crypto & CRYPTO_FLAG_PROV)) /* test 11 */
+ peer->flash |= TEST11; /* not proventic */
/*
- * This is delicious. Ordinarily, we kick out all errors
- * at this point; however, in symmetric mode and just
- * warming up, an unsynchronized peer must inject the
- * timestamps, even if it fails further up the road. So,
- * let the dude by here, but only if the jerk is not yet
- * reachable. After that, he's on his own.
+ * If the transmit queue is nonempty, clamp the host
+ * poll interval to the packet poll interval.
*/
- if (!(peer->flags & FLAG_PROVEN))
- peer->flash |= TEST11;
- if (peer->flash && peer->reach) {
+ if (peer->cmmd != 0) {
+ peer->ppoll = pkt->ppoll;
+ poll_update(peer, 0);
+ }
+
+ /*
+ * If the return code from extension field processing is
+ * not okay, we scrub the association and start over.
+ */
+ if (rval != XEVNT_OK) {
+
+ /*
+ * If the return code is bad, the crypto machine
+ * may be jammed or an intruder may lurk. First,
+ * we demobilize the association, then see if
+ * the error is recoverable.
+ */
+ if (peer->flags & FLAG_CONFIG)
+ peer_clear(peer, "CRYP");
+ else
+ unpeer(peer);
#ifdef DEBUG
if (debug)
- printf("packet: bad autokey %03x\n",
+ printf("packet: bad exten %x\n", rval);
+#endif
+ return;
+ }
+
+ /*
+ * If TEST10 is lit, the autokey sequence has broken,
+ * which probably means the server has refreshed its
+ * private value. We reset the poll interval to the
+ & minimum and scrub the association clean.
+ */
+ if (peer->flash & TEST10 && peer->crypto &
+ CRYPTO_FLAG_AUTO) {
+ poll_update(peer, peer->minpoll);
+#ifdef DEBUG
+ if (debug)
+ printf(
+ "packet: bad auto %03x\n",
peer->flash);
#endif
+ if (peer->flags & FLAG_CONFIG)
+ peer_clear(peer, "AUTO");
+ else
+ unpeer(peer);
return;
}
-#endif /* PUBKEY */
}
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
/*
* We have survived the gaunt. Forward to the packet routine. If
* a symmetric passive association has been mobilized and the
* association doesn't deserve to live, it will die in the
- * transmit routine if not reachable after timeout.
+ * transmit routine if not reachable after timeout. However, if
+ * either symmetric mode and the crypto code has something
+ * urgent to say, we expedite the response.
*/
process_packet(peer, pkt, &rbufp->recv_time);
}
@@ -833,15 +1092,15 @@ void
process_packet(
register struct peer *peer,
register struct pkt *pkt,
- l_fp *recv_ts
+ l_fp *recv_ts
)
{
- l_fp t10, t23;
- double p_offset, p_del, p_disp;
- double dtemp;
- l_fp p_rec, p_xmt, p_org, p_reftime;
- l_fp ci;
- int pmode, pleap, pstratum;
+ l_fp t34, t21;
+ double p_offset, p_del, p_disp;
+ double dtemp;
+ l_fp p_rec, p_xmt, p_org, p_reftime;
+ l_fp ci;
+ u_char pmode, pleap, pstratum;
/*
* Swap header fields and keep the books. The books amount to
@@ -856,70 +1115,46 @@ process_packet(
NTOHL_FP(&pkt->reftime, &p_reftime);
NTOHL_FP(&pkt->rec, &p_rec);
NTOHL_FP(&pkt->xmt, &p_xmt);
- if (PKT_MODE(pkt->li_vn_mode) != MODE_BROADCAST)
+ pmode = PKT_MODE(pkt->li_vn_mode);
+ pleap = PKT_LEAP(pkt->li_vn_mode);
+ if (pmode != MODE_BROADCAST)
NTOHL_FP(&pkt->org, &p_org);
else
p_org = peer->rec;
+ pstratum = PKT_TO_STRATUM(pkt->stratum);
/*
- * Test for old, duplicate or unsynch packets (tests 1-3).
+ * Test for unsynchronized server.
*/
- peer->rec = *recv_ts;
- pmode = PKT_MODE(pkt->li_vn_mode);
- pleap = PKT_LEAP(pkt->li_vn_mode);
- pstratum = PKT_TO_STRATUM(pkt->stratum);
if (L_ISHIS(&peer->org, &p_xmt)) /* count old packets */
peer->oldpkt++;
- if (L_ISEQU(&peer->org, &p_xmt)) /* 1 */
- peer->flash |= TEST1; /* dupe */
- if (pmode != MODE_BROADCAST) {
- if (!L_ISEQU(&peer->xmt, &p_org)) /* 2 */
- peer->flash |= TEST2; /* bogus */
- if (L_ISZERO(&p_rec) || L_ISZERO(&p_org)) /* test 3 */
- peer->flash |= TEST3; /* unsynch */
- }
- if (L_ISZERO(&p_xmt)) /* 3 */
+ if (pmode != MODE_BROADCAST && (L_ISZERO(&p_rec) ||
+ L_ISZERO(&p_org))) /* test 3 */
+ peer->flash |= TEST3; /* unsynch */
+ if (L_ISZERO(&p_xmt)) /* test 3 */
peer->flash |= TEST3; /* unsynch */
- peer->org = p_xmt;
/*
- * If tests 1-3 fail, the packet is discarded leaving only the
- * receive and origin timestamps and poll interval, which is
- * enough to get the protocol started.
+ * If any tests fail, the packet is discarded leaving only the
+ * timestamps, which are enough to get the protocol started. The
+ * originate timestamp is copied from the packet transmit
+ * timestamp and the receive timestamp is copied from the
+ * packet receive timestamp. If okay so far, we save the leap,
+ * stratum and refid for billboards.
*/
+ peer->org = p_xmt;
+ peer->rec = *recv_ts;
if (peer->flash) {
#ifdef DEBUG
if (debug)
- printf("packet: bad data %03x\n",
- peer->flash);
+ printf("packet: bad data %03x from address: %s\n",
+ peer->flash, stoa(&peer->srcadr));
#endif
return;
}
-
- /*
- * A kiss-of-death (kod) packet is returned by a server in case
- * the client is denied access. It consists of the client
- * request packet with the leap bits indicating never
- * synchronized, stratum zero and reference ID field the ASCII
- * string "DENY". If the packet originate timestamp matches the
- * association transmit timestamp the kod is legitimate. If the
- * peer leap bits indicate never synchronized, this must be
- * access deny and the association is disabled; otherwise this
- * must be a limit reject. In either case a naughty message is
- * forced to the system log.
- */
- if (pleap == LEAP_NOTINSYNC && pstratum >= STRATUM_UNSPEC &&
- memcmp(&pkt->refid, "DENY", 4) == 0) {
- if (peer->leap == LEAP_NOTINSYNC) {
- peer->stratum = STRATUM_UNSPEC;
- peer->flash |= TEST4;
- memcpy(&peer->refid, &pkt->refid, 4);
- msyslog(LOG_INFO, "access denied");
- } else {
- msyslog(LOG_INFO, "limit reject");
- }
- return;
- }
+ peer->leap = pleap;
+ peer->stratum = pstratum;
+ peer->refid = pkt->refid;
/*
* Test for valid peer data (tests 6-8)
@@ -927,18 +1162,20 @@ process_packet(
ci = p_xmt;
L_SUB(&ci, &p_reftime);
LFPTOD(&ci, dtemp);
- if (pleap == LEAP_NOTINSYNC || /* 6 */
+ if (pleap == LEAP_NOTINSYNC || /* test 6 */
pstratum >= STRATUM_UNSPEC || dtemp < 0)
peer->flash |= TEST6; /* bad synch */
- if (!(peer->flags & FLAG_CONFIG) && sys_peer != NULL) { /* 7 */
- if (pstratum > sys_stratum && pmode != MODE_ACTIVE) {
+ if (!(peer->flags & FLAG_CONFIG) && sys_peer != NULL) { /* test 7 */
+ if (pstratum > sys_stratum && pmode != MODE_ACTIVE)
peer->flash |= TEST7; /* bad stratum */
- sys_badstratum++;
- }
}
- if (p_del < 0 || p_disp < 0 || p_del / /* 8 */
+ if (p_del < 0 || p_disp < 0 || p_del / /* test 8 */
2 + p_disp >= MAXDISPERSE)
- peer->flash |= TEST8; /* bad peer distance */
+ peer->flash |= TEST8; /* bad peer values */
+
+ /*
+ * If any tests fail at this point, the packet is discarded.
+ */
if (peer->flash) {
#ifdef DEBUG
if (debug)
@@ -954,14 +1191,11 @@ process_packet(
*/
record_raw_stats(&peer->srcadr, &peer->dstadr->sin, &p_org,
&p_rec, &p_xmt, &peer->rec);
- peer->leap = pleap;
peer->pmode = pmode;
- peer->stratum = pstratum;
peer->ppoll = pkt->ppoll;
peer->precision = pkt->precision;
peer->rootdelay = p_del;
peer->rootdispersion = p_disp;
- peer->refid = pkt->refid;
peer->reftime = p_reftime;
if (!(peer->reach)) {
report_event(EVNT_REACH, peer);
@@ -969,7 +1203,7 @@ process_packet(
}
peer->reach |= 1;
peer->unreach = 0;
- poll_update(peer, peer->hpoll);
+ poll_update(peer, 0);
/*
* If running in a client/server association, calculate the
@@ -980,16 +1214,16 @@ process_packet(
* the system precision plus that due to the frequency error
* since the originate time.
*
- * c = ((t2 - t3) + (t1 - t0)) / 2
- * d = (t2 - t3) - (t1 - t0)
- * e = (org - rec) (seconds only)
+ * Let t1 = p_org, t2 = p_rec, t3 = p_xmt, t4 = peer->rec:
*/
- t10 = p_xmt; /* compute t1 - t0 */
- L_SUB(&t10, &peer->rec);
- t23 = p_rec; /* compute t2 - t3 */
- L_SUB(&t23, &p_org);
- ci = t10;
- p_disp = clock_phi * (peer->rec.l_ui - p_org.l_ui);
+ t34 = p_xmt; /* t3 - t4 */
+ L_SUB(&t34, &peer->rec);
+ t21 = p_rec; /* t2 - t1 */
+ L_SUB(&t21, &p_org);
+ ci = peer->rec; /* t4 - t1 */
+ L_SUB(&ci, &p_org);
+ LFPTOD(&ci, p_disp);
+ p_disp = clock_phi * max(p_disp, LOGTOD(sys_precision));
/*
* If running in a broadcast association, the clock offset is
@@ -1000,6 +1234,7 @@ process_packet(
* MODE_BCLIENT mode. The next broadcast message after that
* computes the broadcast offset and clears FLAG_MCAST.
*/
+ ci = t34;
if (pmode == MODE_BROADCAST) {
if (peer->flags & FLAG_MCAST) {
LFPTOD(&ci, p_offset);
@@ -1009,20 +1244,20 @@ process_packet(
peer->flags &= ~FLAG_MCAST;
}
- DTOLFP(peer->estbdelay, &t10);
- L_ADD(&ci, &t10);
+ DTOLFP(peer->estbdelay, &t34);
+ L_ADD(&ci, &t34);
p_del = peer->delay;
} else {
- L_ADD(&ci, &t23);
+ L_ADD(&ci, &t21); /* (t2 - t1) + (t3 - t4) */
L_RSHIFT(&ci);
- L_SUB(&t23, &t10);
- LFPTOD(&t23, p_del);
+ L_SUB(&t21, &t34); /* (t2 - t1) - (t3 - t4) */
+ LFPTOD(&t21, p_del);
}
p_del = max(p_del, LOGTOD(sys_precision));
LFPTOD(&ci, p_offset);
if ((peer->rootdelay + p_del) / 2. + peer->rootdispersion +
- p_disp >= MAXDISPERSE) /* 9 */
- peer->flash |= TEST9; /* bad peer distance */
+ p_disp >= MAXDISPERSE) /* test 9 */
+ peer->flash |= TEST9; /* bad root distance */
/*
* If any flasher bits remain set at this point, abandon ship.
@@ -1055,14 +1290,13 @@ clock_update(void)
/*
* Reset/adjust the system clock. Do this only if there is a
- * system peer and we haven't seen that peer lately. Watch for
- * timewarps here.
+ * system peer and the peer epoch is not older than the last
+ * update.
*/
if (sys_peer == NULL)
return;
- if (sys_peer->pollsw == FALSE || sys_peer->burst > 0)
+ if (sys_peer->epoch <= last_time)
return;
- sys_peer->pollsw = FALSE;
#ifdef DEBUG
if (debug)
printf("clock_update: at %ld assoc %d \n", current_time,
@@ -1076,8 +1310,8 @@ clock_update(void)
* Clock is too screwed up. Just exit for now.
*/
case -1:
- report_event(EVNT_SYSFAULT, (struct peer *)0);
- exit(1);
+ report_event(EVNT_SYSFAULT, NULL);
+ exit (-1);
/*NOTREACHED*/
/*
@@ -1087,10 +1321,13 @@ clock_update(void)
clear_all();
sys_peer = NULL;
sys_stratum = STRATUM_UNSPEC;
+ memcpy(&sys_refid, "STEP", 4);
sys_poll = NTP_MINPOLL;
- NLOG(NLOG_SYNCSTATUS)
- msyslog(LOG_INFO, "synchronisation lost");
- report_event(EVNT_CLOCKRESET, (struct peer *)0);
+ report_event(EVNT_CLOCKRESET, NULL);
+#ifdef OPENSSL
+ if (oleap != LEAP_NOTINSYNC)
+ expire_all();
+#endif /* OPENSSL */
break;
/*
@@ -1100,23 +1337,23 @@ clock_update(void)
* changes, we gotta reroll the keys.
*/
default:
- sys_stratum = sys_peer->stratum + 1;
- if (sys_stratum == 1)
+ sys_stratum = (u_char) (sys_peer->stratum + 1);
+ if (sys_stratum == 1 || sys_stratum == STRATUM_UNSPEC)
sys_refid = sys_peer->refid;
else
- sys_refid = sys_peer->srcadr.sin_addr.s_addr;
+ sys_refid = sys_peer_refid;
sys_reftime = sys_peer->rec;
sys_rootdelay = sys_peer->rootdelay + sys_peer->delay;
sys_leap = leap_consensus;
- }
- if (oleap == LEAP_NOTINSYNC) {
- report_event(EVNT_SYNCCHG, (struct peer *)0);
-#ifdef AUTOKEY
- expire_all();
-#endif /* AUTOKEY */
+ if (oleap == LEAP_NOTINSYNC) {
+ report_event(EVNT_SYNCCHG, NULL);
+#ifdef OPENSSL
+ expire_all();
+#endif /* OPENSSL */
+ }
}
if (ostratum != sys_stratum)
- report_event(EVNT_PEERSTCHG, (struct peer *)0);
+ report_event(EVNT_PEERSTCHG, NULL);
}
@@ -1126,12 +1363,12 @@ clock_update(void)
void
poll_update(
struct peer *peer,
- int hpoll
+ int hpoll
)
{
-#ifdef AUTOKEY
- int oldpoll;
-#endif /* AUTOKEY */
+#ifdef OPENSSL
+ int oldpoll;
+#endif /* OPENSSL */
/*
* A little foxtrot to determine what controls the poll
@@ -1141,56 +1378,65 @@ poll_update(
* association to ramp up the poll interval for useless sources
* and to clamp it to the minimum when first starting up.
*/
-#ifdef AUTOKEY
+#ifdef OPENSSL
oldpoll = peer->kpoll;
-#endif /* AUTOKEY */
- if (hpoll > peer->maxpoll)
- peer->hpoll = peer->maxpoll;
- else if (hpoll < peer->minpoll)
- peer->hpoll = peer->minpoll;
- else
- peer->hpoll = hpoll;
+#endif /* OPENSSL */
+ if (hpoll > 0) {
+ if (hpoll > peer->maxpoll)
+ peer->hpoll = peer->maxpoll;
+ else if (hpoll < peer->minpoll)
+ peer->hpoll = peer->minpoll;
+ else
+ peer->hpoll = (u_char)hpoll;
+ }
/*
- * Bit of adventure here. If during a burst and not timeout,
- * just slink away. If timeout, figure what the next timeout
- * should be. If IBURST or a reference clock, use one second. If
- * not and the dude was reachable during the previous poll
- * interval, randomize over 1-4 seconds; otherwise, randomize
- * over 15-18 seconds. This is to give time for a modem to
- * complete the call, for example. If not during a burst,
- * randomize over the poll interval -1 to +2 seconds.
+ * Bit of adventure here. If during a burst and not a poll, just
+ * slink away. If a poll, figure what the next poll should be.
+ * If a burst is pending and a reference clock or a pending
+ * crypto response, delay for one second. If the first sent in a
+ * burst, delay ten seconds for the modem to come up. For others
+ * in the burst, delay two seconds.
*
* In case of manycast server, make the poll interval, which is
* axtually the manycast beacon interval, eight times the system
* poll interval. Normally when the host poll interval settles
- * up to 17.1 s, the beacon interval settles up to 2.3 hours.
+ * up to 1024 s, the beacon interval settles up to 2.3 hours.
*/
+#ifdef OPENSSL
+ if (peer->cmmd != NULL && (sys_leap != LEAP_NOTINSYNC ||
+ peer->crypto)) {
+ peer->nextdate = current_time + RESP_DELAY;
+ } else if (peer->burst > 0) {
+#else /* OPENSSL */
if (peer->burst > 0) {
- if (peer->nextdate != current_time)
+#endif /* OPENSSL */
+ if (hpoll == 0 && peer->nextdate != current_time)
return;
#ifdef REFCLOCK
else if (peer->flags & FLAG_REFCLOCK)
- peer->nextdate++;
+ peer->nextdate += RESP_DELAY;
#endif
- else if (peer->reach & 0x1)
- peer->nextdate += RANDPOLL(BURST_INTERVAL2);
+ else if (peer->flags & (FLAG_IBURST | FLAG_BURST) &&
+ peer->burst == NTP_BURST)
+ peer->nextdate += sys_calldelay;
else
- peer->nextdate += RANDPOLL(BURST_INTERVAL1);
+ peer->nextdate += BURST_DELAY;
} else if (peer->cast_flags & MDF_ACAST) {
- if (sys_survivors < NTP_MINCLOCK)
- peer->kpoll = peer->hpoll;
+ if (sys_survivors >= sys_minclock || peer->ttl >=
+ sys_ttlmax)
+ peer->kpoll = (u_char) (peer->hpoll + 3);
else
- peer->kpoll = peer->hpoll + 3;
+ peer->kpoll = peer->hpoll;
peer->nextdate = peer->outdate + RANDPOLL(peer->kpoll);
} else {
- peer->kpoll = max(min(peer->ppoll, peer->hpoll),
- peer->minpoll);
+ peer->kpoll = (u_char) max(min(peer->ppoll,
+ peer->hpoll), peer->minpoll);
peer->nextdate = peer->outdate + RANDPOLL(peer->kpoll);
}
if (peer->nextdate < current_time)
peer->nextdate = current_time;
-#ifdef AUTOKEY
+#ifdef OPENSSL
/*
* Bit of crass arrogance at this point. If the poll interval
* has changed and we have a keylist, the lifetimes in the
@@ -1199,7 +1445,7 @@ poll_update(
*/
if (peer->kpoll != oldpoll)
key_expire(peer);
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
#ifdef DEBUG
if (debug > 1)
printf("poll_update: at %lu %s flags %04x poll %d burst %d last %lu next %lu\n",
@@ -1215,11 +1461,11 @@ poll_update(
*/
void
peer_clear(
- register struct peer *peer
+ struct peer *peer, /* peer structure */
+ char *ident /* tally lights */
)
{
- register int i;
- u_long u_rand;
+ u_char oreach, i;
/*
* If cryptographic credentials have been acquired, toss them to
@@ -1230,47 +1476,51 @@ peer_clear(
* purged, too. This makes it much harder to sneak in some
* unauthenticated data in the clock filter.
*/
-#ifdef DEBUG
- if (debug)
- printf("peer_clear: at %ld assoc ID %d\n", current_time,
- peer->associd);
-#endif
-#ifdef AUTOKEY
+ oreach = peer->reach;
+#ifdef OPENSSL
key_expire(peer);
-#ifdef PUBKEY
- if (peer->keystr != NULL)
- free(peer->keystr);
- if (peer->pubkey.ptr != NULL)
- free(peer->pubkey.ptr);
- if (peer->certif.ptr != NULL)
- free(peer->certif.ptr);
-#endif /* PUBKEY */
-#endif /* AUTOKEY */
- memset(CLEAR_TO_ZERO(peer), 0, LEN_CLEAR_TO_ZERO);
+ if (peer->pkey != NULL)
+ EVP_PKEY_free(peer->pkey);
+ if (peer->ident_pkey != NULL)
+ EVP_PKEY_free(peer->ident_pkey);
+ if (peer->subject != NULL)
+ free(peer->subject);
+ if (peer->issuer != NULL)
+ free(peer->issuer);
+ if (peer->iffval != NULL)
+ BN_free(peer->iffval);
+ if (peer->grpkey != NULL)
+ BN_free(peer->grpkey);
+ if (peer->cmmd != NULL)
+ free(peer->cmmd);
+ value_free(&peer->cookval);
+ value_free(&peer->recval);
+ value_free(&peer->tai_leap);
+ value_free(&peer->encrypt);
+ value_free(&peer->sndval);
+#endif /* OPENSSL */
/*
- * If he dies as a broadcast client, he comes back to life as
- * a broadcast client in client mode in order to recover the
- * initial autokey values. Note that there is no need to call
- * clock_select(), since the perp has already been voted off
- * the island at this point.
+ * Wipe the association clean and initialize the nonzero values.
*/
- if (peer->cast_flags & MDF_BCLNT) {
- peer->flags |= FLAG_MCAST;
- peer->hmode = MODE_CLIENT;
- }
- peer->flags &= ~(FLAG_AUTOKEY | FLAG_ASSOC);
+ memset(CLEAR_TO_ZERO(peer), 0, LEN_CLEAR_TO_ZERO);
+ if (peer == sys_peer)
+ sys_peer = NULL;
peer->estbdelay = sys_bdelay;
peer->hpoll = peer->kpoll = peer->minpoll;
peer->ppoll = peer->maxpoll;
- peer->pollsw = FALSE;
peer->jitter = MAXDISPERSE;
peer->epoch = current_time;
#ifdef REFCLOCK
if (!(peer->flags & FLAG_REFCLOCK)) {
peer->leap = LEAP_NOTINSYNC;
peer->stratum = STRATUM_UNSPEC;
+ memcpy(&peer->refid, ident, 4);
}
+#else
+ peer->leap = LEAP_NOTINSYNC;
+ peer->stratum = STRATUM_UNSPEC;
+ memcpy(&peer->refid, ident, 4);
#endif
for (i = 0; i < NTP_SHIFT; i++) {
peer->filter_order[i] = i;
@@ -1279,12 +1529,35 @@ peer_clear(
}
/*
- * Randomize the first poll over 1-16s to avoid bunching.
+ * If he dies as a broadcast client, he comes back to life as
+ * a broadcast client in client mode in order to recover the
+ * initial autokey values.
*/
- peer->update = peer->outdate = current_time;
- u_rand = RANDOM;
- peer->nextdate = current_time + (u_rand & ((1 <<
- BURST_INTERVAL1) - 1)) + 1;
+ if (peer->cast_flags & MDF_BCLNT) {
+ peer->flags |= FLAG_MCAST;
+ peer->hmode = MODE_CLIENT;
+ }
+
+ /*
+ * Randomize the first poll to avoid bunching, but only if the
+ * rascal has never been heard. During initialization use the
+ * association count to spread out the polls at one-second
+ * intervals.
+ */
+ peer->nextdate = peer->update = peer->outdate = current_time;
+ peer->burst = 0;
+ if (oreach)
+ poll_update(peer, 0);
+ else if (initializing)
+ peer->nextdate = current_time + peer_associations;
+ else
+ peer->nextdate = current_time + (u_int)RANDOM %
+ peer_associations;
+#ifdef DEBUG
+ if (debug)
+ printf("peer_clear: at %ld assoc ID %d refid %s\n",
+ current_time, peer->associd, ident);
+#endif
}
@@ -1294,16 +1567,16 @@ peer_clear(
*/
void
clock_filter(
- register struct peer *peer, /* peer structure pointer */
- double sample_offset, /* clock offset */
- double sample_delay, /* roundtrip delay */
- double sample_disp /* dispersion */
+ struct peer *peer, /* peer structure pointer */
+ double sample_offset, /* clock offset */
+ double sample_delay, /* roundtrip delay */
+ double sample_disp /* dispersion */
)
{
- double dst[NTP_SHIFT]; /* distance vector */
- int ord[NTP_SHIFT]; /* index vector */
- register int i, j, k, m;
- double dsp, jit, dtemp, etemp;
+ double dst[NTP_SHIFT]; /* distance vector */
+ int ord[NTP_SHIFT]; /* index vector */
+ int i, j, k, m;
+ double dsp, jit, dtemp, etemp;
/*
* Shift the new sample into the register and discard the oldest
@@ -1320,9 +1593,8 @@ clock_filter(
peer->filter_offset[j] = sample_offset;
peer->filter_delay[j] = max(0, sample_delay);
peer->filter_disp[j] = dsp;
- peer->filter_epoch[j] = current_time;
- j++; j %=NTP_SHIFT;
- peer->filter_nextpt = j;
+ j++; j %= NTP_SHIFT;
+ peer->filter_nextpt = (u_short) j;
/*
* Update dispersions since the last update and at the same
@@ -1334,21 +1606,21 @@ clock_filter(
dtemp = clock_phi * (current_time - peer->update);
peer->update = current_time;
for (i = NTP_SHIFT - 1; i >= 0; i--) {
- if (i != 0) {
+ if (i != 0)
peer->filter_disp[j] += dtemp;
- if (peer->filter_disp[j] > MAXDISPERSE)
- peer->filter_disp[j] = MAXDISPERSE;
- }
+ if (peer->filter_disp[j] >= MAXDISPERSE)
+ peer->filter_disp[j] = MAXDISPERSE;
if (peer->filter_disp[j] >= MAXDISPERSE)
dst[i] = MAXDISPERSE;
else if (peer->update - peer->filter_epoch[j] >
allan_xpt)
dst[i] = MAXDISTANCE + peer->filter_disp[j];
else
- dst[i] = peer->filter_delay[j];
+ dst[i] = peer->filter_delay[j];
ord[i] = j;
j++; j %= NTP_SHIFT;
}
+ peer->filter_epoch[j] = current_time;
/*
* Sort the samples in both lists by distance.
@@ -1374,7 +1646,7 @@ clock_filter(
*/
m = 0;
for (i = 0; i < NTP_SHIFT; i++) {
- peer->filter_order[i] = ord[i];
+ peer->filter_order[i] = (u_char) ord[i];
if (dst[i] >= MAXDISPERSE || (m >= 2 && dst[i] >=
MAXDISTANCE))
continue;
@@ -1387,8 +1659,7 @@ clock_filter(
* normalized close to 1.0. The jitter is the mean of the square
* differences relative to the lowest delay sample. If no
* acceptable samples remain in the shift register, quietly
- * tiptoe home leaving only the
- * dispersion.
+ * tiptoe home leaving only the dispersion.
*/
jit = 0;
peer->disp = 0;
@@ -1411,7 +1682,8 @@ clock_filter(
*/
if (m == 0)
return;
- etemp = peer->offset;
+ etemp = fabs(peer->offset - peer->filter_offset[k]);
+ dtemp = sqrt(peer->jitter);
peer->offset = peer->filter_offset[k];
peer->delay = peer->filter_delay[k];
if (m > 1)
@@ -1420,9 +1692,10 @@ clock_filter(
/*
* A new sample is useful only if it is younger than the last
- * one used.
+ * one used, but only if the sucker has been synchronized.
*/
- if (peer->filter_epoch[k] <= peer->epoch) {
+ if (peer->filter_epoch[k] <= peer->epoch && sys_leap !=
+ LEAP_NOTINSYNC) {
#ifdef DEBUG
if (debug)
printf("clock_filter: discard %lu\n",
@@ -1433,27 +1706,26 @@ clock_filter(
/*
* If the difference between the last offset and the current one
- * exceeds the jitter by CLOCK_SGATE (4) and the interval since
- * the last update is less than twice the system poll interval,
+ * exceeds the jitter by CLOCK_SGATE and the interval since the
+ * last update is less than twice the system poll interval,
* consider the update a popcorn spike and ignore it.
*/
- if (m > 1 && fabs(peer->offset - etemp) > SQRT(peer->jitter) *
- CLOCK_SGATE && peer->filter_epoch[k] - peer->epoch <
- (1 << (sys_poll + 1))) {
+ if (m > 1 && etemp > CLOCK_SGATE * dtemp &&
+ (long)(peer->filter_epoch[k] - peer->epoch) < (1 << (sys_poll +
+ 1))) {
#ifdef DEBUG
if (debug)
- printf("clock_filter: n %d popcorn spike %.6f jitter %.6f\n",
- m, peer->offset, SQRT(peer->jitter));
+ printf("clock_filter: popcorn %.6f %.6f\n",
+ etemp, dtemp);
#endif
return;
}
/*
* The mitigated sample statistics are saved for later
- * processing, but can be processed only once.
+ * processing.
*/
peer->epoch = peer->filter_epoch[k];
- peer->pollsw = TRUE;
#ifdef DEBUG
if (debug)
printf(
@@ -1466,17 +1738,23 @@ clock_filter(
/*
* clock_select - find the pick-of-the-litter clock
+ *
+ * LOCKCLOCK: If the local clock is the prefer peer, it will always be
+ * enabled, even if declared falseticker, (2) only the prefer peer can
+ * be selected as the system peer, (3) if the external source is down,
+ * the system leap bits are set to 11 and the stratum set to infinity.
*/
void
clock_select(void)
{
- register struct peer *peer;
- int i, j, k, n;
- int nreach, nlist, nl3;
- double d, e, f;
- int allow, found, sw;
- double high, low;
- double synch[NTP_MAXCLOCK], error[NTP_MAXCLOCK];
+ struct peer *peer;
+ int i, j, k, n;
+ int nlist, nl3;
+
+ double d, e, f;
+ int allow, sw, osurv;
+ double high, low;
+ double synch[NTP_MAXCLOCK], error[NTP_MAXCLOCK];
struct peer *osys_peer;
struct peer *typeacts = NULL;
struct peer *typelocal = NULL;
@@ -1497,10 +1775,15 @@ clock_select(void)
*/
osys_peer = sys_peer;
sys_peer = NULL;
+ osurv = sys_survivors;
+ sys_survivors = 0;
sys_prefer = NULL;
- nreach = nlist = 0;
- low = 1e9;
- high = -1e9;
+#ifdef LOCKCLOCK
+ sys_leap = LEAP_NOTINSYNC;
+ sys_stratum = STRATUM_UNSPEC;
+ memcpy(&sys_refid, "DOWN", 4);
+#endif /* LOCKCLOCK */
+ nlist = 0;
for (n = 0; n < HASH_SIZE; n++)
nlist += peer_hash_count[n];
if (nlist > list_alloc) {
@@ -1515,9 +1798,9 @@ clock_select(void)
indx_size += 5 * 3 * sizeof(*indx);
peer_list_size += 5 * sizeof(*peer_list);
}
- endpoint = (struct endpoint *)emalloc(endpoint_size);
- indx = (int *)emalloc(indx_size);
- peer_list = (struct peer **)emalloc(peer_list_size);
+ endpoint = emalloc(endpoint_size);
+ indx = emalloc(indx_size);
+ peer_list = emalloc(peer_list_size);
}
/*
@@ -1527,8 +1810,8 @@ clock_select(void)
* the falsetickers are culled and put to sea. The truechimers
* remaining are subject to repeated rounds where the most
* unpopular at each round is kicked off. When the population
- * has dwindled to NTP_MINCLOCK (3), the survivors split a
- * million bucks and collectively crank the chimes.
+ * has dwindled to sys_minclock, the survivors split a million
+ * bucks and collectively crank the chimes.
*/
nlist = nl3 = 0; /* none yet */
for (n = 0; n < HASH_SIZE; n++) {
@@ -1538,18 +1821,10 @@ clock_select(void)
peer->status = CTL_PST_SEL_REJECT;
/*
- * A peer leaves the island immediately if
- * unreachable, synchronized to us or suffers
- * excessive root distance. Careful with the
- * root distance, since the poll interval can
- * increase to a day and a half.
- */
- if (!peer->reach || (peer->stratum > 1 &&
- peer->refid ==
- peer->dstadr->sin.sin_addr.s_addr) ||
- peer->stratum >= STRATUM_UNSPEC ||
- (root_distance(peer) >= MAXDISTANCE + 2 *
- clock_phi * ULOGTOD(sys_poll)))
+ * Leave the island immediately if the peer is
+ * unfit to synchronize.
+ */
+ if (peer_unfit(peer))
continue;
/*
@@ -1561,13 +1836,18 @@ clock_select(void)
*/
if (peer->refclktype == REFCLK_LOCALCLOCK
#if defined(VMS) && defined(VMS_LOCALUNIT)
- /* wjm: local unit VMS_LOCALUNIT taken seriously */
- && REFCLOCKUNIT(&peer->srcadr) != VMS_LOCALUNIT
+ /* wjm: VMS_LOCALUNIT taken seriously */
+ && REFCLOCKUNIT(&peer->srcadr) !=
+ VMS_LOCALUNIT
#endif /* VMS && VMS_LOCALUNIT */
) {
typelocal = peer;
if (!(peer->flags & FLAG_PREFER))
continue; /* no local clock */
+#ifdef LOCKCLOCK
+ else
+ sys_prefer = peer;
+#endif /* LOCKCLOCK */
}
if (peer->sstclktype == CTL_SST_TS_TELEPHONE) {
typeacts = peer;
@@ -1580,7 +1860,6 @@ clock_select(void)
* island, but does not yet have the immunity
* idol.
*/
- nreach++;
peer->status = CTL_PST_SEL_SANE;
peer_list[nlist++] = peer;
@@ -1601,7 +1880,7 @@ clock_select(void)
endpoint[nl3++].val = e;
e = e - f; /* Center point */
- for ( ; i >= 0; i--) {
+ for (; i >= 0; i--) {
if (e >= endpoint[indx[i]].val)
break;
indx[i + 2] = indx[i];
@@ -1611,7 +1890,7 @@ clock_select(void)
endpoint[nl3++].val = e;
e = e - f; /* Lower end */
- for ( ; i >= 0; i--) {
+ for (; i >= 0; i--) {
if (e >= endpoint[indx[i]].val)
break;
indx[i + 1] = indx[i];
@@ -1628,39 +1907,81 @@ clock_select(void)
endpoint[indx[i]].type,
endpoint[indx[i]].val);
#endif
- i = 0;
- j = nl3 - 1;
- allow = nlist; /* falsetickers assumed */
- found = 0;
- while (allow > 0) {
- allow--;
- for (n = 0; i <= j; i++) {
- n += endpoint[indx[i]].type;
- if (n < 0)
+ /*
+ * This is the actual algorithm that cleaves the truechimers
+ * from the falsetickers. The original algorithm was described
+ * in Keith Marzullo's dissertation, but has been modified for
+ * better accuracy.
+ *
+ * Briefly put, we first assume there are no falsetickers, then
+ * scan the candidate list first from the low end upwards and
+ * then from the high end downwards. The scans stop when the
+ * number of intersections equals the number of candidates less
+ * the number of falsetickers. If this doesn't happen for a
+ * given number of falsetickers, we bump the number of
+ * falsetickers and try again. If the number of falsetickers
+ * becomes equal to or greater than half the number of
+ * candidates, the Albanians have won the Byzantine wars and
+ * correct synchronization is not possible.
+ *
+ * Here, nlist is the number of candidates and allow is the
+ * number of falsetickers.
+ */
+ low = 1e9;
+ high = -1e9;
+ for (allow = 0; 2 * allow < nlist; allow++) {
+ int found;
+
+ /*
+ * Bound the interval (low, high) as the largest
+ * interval containing points from presumed truechimers.
+ */
+ found = 0;
+ n = 0;
+ for (i = 0; i < nl3; i++) {
+ low = endpoint[indx[i]].val;
+ n -= endpoint[indx[i]].type;
+ if (n >= nlist - allow)
break;
if (endpoint[indx[i]].type == 0)
found++;
}
- for (n = 0; i <= j; j--) {
+ n = 0;
+ for (j = nl3 - 1; j >= 0; j--) {
+ high = endpoint[indx[j]].val;
n += endpoint[indx[j]].type;
- if (n > 0)
+ if (n >= nlist - allow)
break;
if (endpoint[indx[j]].type == 0)
found++;
}
+
+ /*
+ * If the number of candidates found outside the
+ * interval is greater than the number of falsetickers,
+ * then at least one truechimer is outside the interval,
+ * so go around again. This is what makes this algorithm
+ * different than Marzullo's.
+ */
if (found > allow)
+ continue;
+
+ /*
+ * If an interval containing truechimers is found, stop.
+ * If not, increase the number of falsetickers and go
+ * around again.
+ */
+ if (high > low)
break;
- low = endpoint[indx[i++]].val;
- high = endpoint[indx[j--]].val;
}
/*
* If no survivors remain at this point, check if the local
* clock or modem drivers have been found. If so, nominate one
- * of them as the only survivor. Otherwise, give up and declare
- * us unsynchronized.
+ * of them as the only survivor. Otherwise, give up and leave
+ * the island to the rats.
*/
- if ((allow << 1) >= nlist) {
+ if (high <= low) {
if (typeacts != 0) {
typeacts->status = CTL_PST_SEL_SANE;
peer_list[0] = typeacts;
@@ -1674,42 +1995,58 @@ clock_select(void)
sys_poll = NTP_MINPOLL;
NLOG(NLOG_SYNCSTATUS)
msyslog(LOG_INFO,
- "synchronisation lost");
- report_event(EVNT_PEERSTCHG,
- (struct peer *)0);
+ "no servers reachable");
+ report_event(EVNT_PEERSTCHG, NULL);
}
- sys_survivors = 0;
-#ifdef AUTOKEY
- resetmanycast();
-#endif /* AUTOKEY */
+ if (osurv > 0)
+ resetmanycast();
return;
}
}
-#ifdef DEBUG
- if (debug > 2)
- printf("select: low %.6f high %.6f\n", low, high);
-#endif
+
+ /*
+ * We can only trust the survivors if the number of candidates
+ * sys_minsane is at least the number required to detect and
+ * cast out one falsticker. For the Byzantine agreement
+ * algorithm used here, that number is 4; however, the default
+ * sys_minsane is 1 to speed initial synchronization. Careful
+ * operators will tinker the value to 4 and use at least that
+ * number of synchronization sources.
+ */
+ if (nlist < sys_minsane)
+ return;
/*
* Clustering algorithm. Construct candidate list in order first
- * by stratum then by root distance. If we have more than
- * MAXCLOCK peers, keep only the best MAXCLOCK of them. Scan the
- * list to find falsetickers, who leave the island immediately.
- * If a falseticker is not configured, his association raft is
- * drowned as well. We must leave at least one peer to collect
- * the million bucks.
+ * by stratum then by root distance, but keep only the best
+ * NTP_MAXCLOCK of them. Scan the list to find falsetickers, who
+ * leave the island immediately. If a falseticker is not
+ * configured, his association raft is drowned as well, but only
+ * if at at least eight poll intervals have gone. We must leave
+ * at least one peer to collect the million bucks.
+ *
+ * Note the hysteresis gimmick that increases the effective
+ * distance for those rascals that have not made the final cut.
+ * This is to discourage clockhopping. Note also the prejudice
+ * against lower stratum peers if the floor is elevated.
*/
j = 0;
for (i = 0; i < nlist; i++) {
peer = peer_list[i];
- if (nlist > 1 && (low >= peer->offset || peer->offset >=
+ if (nlist > 1 && (peer->offset <= low || peer->offset >=
high)) {
if (!(peer->flags & FLAG_CONFIG))
unpeer(peer);
continue;
}
peer->status = CTL_PST_SEL_DISTSYSPEER;
- d = root_distance(peer) + peer->stratum * MAXDISPERSE;
+ d = peer->stratum;
+ if (d < sys_floor)
+ d += sys_floor;
+ if (d > sys_ceiling)
+ d = STRATUM_UNSPEC;
+ d = root_distance(peer) + d * MAXDISTANCE;
+ d *= 1. - peer->hyst;
if (j >= NTP_MAXCLOCK) {
if (d >= synch[j - 1])
continue;
@@ -1729,20 +2066,28 @@ clock_select(void)
j++;
}
nlist = j;
+ if (nlist == 0) {
+#ifdef DEBUG
+ if (debug)
+ printf("clock_select: empty intersection interval\n");
+#endif
+ return;
+ }
for (i = 0; i < nlist; i++) {
peer_list[i]->status = CTL_PST_SEL_SELCAND;
#ifdef DEBUG
if (debug > 2)
- printf("select: %s distance %.6f\n",
- ntoa(&peer_list[i]->srcadr), synch[i]);
+ printf("select: %s distance %.6f jitter %.6f\n",
+ ntoa(&peer_list[i]->srcadr), synch[i],
+ SQRT(error[i]));
#endif
}
/*
* Now, vote outlyers off the island by select jitter weighted
* by root dispersion. Continue voting as long as there are more
- * than NTP_MINCLOCK survivors and the minimum select jitter
+ * than sys_minclock survivors and the minimum select jitter
* squared is greater than the maximum peer jitter squared. Stop
* if we are about to discard a prefer peer, who of course has
* the immunity idol.
@@ -1752,7 +2097,6 @@ clock_select(void)
e = -1e9;
k = 0;
for (i = 0; i < nlist; i++) {
-
if (error[i] < d)
d = error[i];
f = 0;
@@ -1762,24 +2106,25 @@ clock_select(void)
peer_list[i]->offset);
f /= nlist - 1;
}
- f = max(f, SQUARE(LOGTOD(sys_precision)));
if (f * synch[i] > e) {
sys_selerr = f;
e = f * synch[i];
k = i;
}
}
-
+ f = max(sys_selerr, SQUARE(LOGTOD(sys_precision)));
+ if (nlist <= sys_minclock || f <= d ||
+ peer_list[k]->flags & FLAG_PREFER)
+ break;
#ifdef DEBUG
if (debug > 2)
printf(
- "select: survivors %d select %.6f peer %.6f\n",
- k, SQRT(sys_selerr), SQRT(d));
+ "select: drop %s select %.6f jitter %.6f\n",
+ ntoa(&peer_list[k]->srcadr),
+ SQRT(sys_selerr), SQRT(d));
#endif
- if (nlist <= NTP_MINCLOCK || sys_selerr <= d ||
- peer_list[k]->flags & FLAG_PREFER)
- break;
- if (!(peer_list[k]->flags & FLAG_CONFIG))
+ if (!(peer_list[k]->flags & FLAG_CONFIG) &&
+ peer_list[k]->hmode == MODE_CLIENT)
unpeer(peer_list[k]);
for (j = k + 1; j < nlist; j++) {
peer_list[j - 1] = peer_list[j];
@@ -1788,75 +2133,62 @@ clock_select(void)
nlist--;
}
-#ifdef AUTOKEY
/*
- * In manycast client mode we may have spooked a sizeable number
- * of servers that we don't need. If there are at least
- * NTP_MINCLOCK of them, the manycast message will be turned
- * off. By the time we get here we nay be ready to prune some of
- * them back, but we want to make sure all the candicates have
- * had a chance. If they didn't pass the sanity and intersection
- * tests, they have already been voted off the island.
- */
- if (sys_survivors >= NTP_MINCLOCK && nlist < NTP_MINCLOCK)
- resetmanycast();
-#endif /* AUTOKEY */
- sys_survivors = nlist;
-
-#ifdef DEBUG
- if (debug > 2) {
- for (i = 0; i < nlist; i++)
- printf(
- "select: %s offset %.6f, distance %.6f poll %d\n",
- ntoa(&peer_list[i]->srcadr),
- peer_list[i]->offset, synch[i],
- peer_list[i]->pollsw);
- }
-#endif
-
- /*
- * What remains is a list of not greater than NTP_MINCLOCK
+ * What remains is a list usually not greater than sys_minclock
* peers. We want only a peer at the lowest stratum to become
* the system peer, although all survivors are eligible for the
* combining algorithm. First record their order, diddle the
- * flags and clamp the poll intervals. Then, consider the peers
- * at the lowest stratum. Of these, OR the leap bits on the
- * assumption that, if some of them honk nonzero bits, they must
- * know what they are doing. Also, check for prefer and pps
- * peers. If a prefer peer is found within clock_max, update the
- * pps switch. Of the other peers not at the lowest stratum,
- * check if the system peer is among them and, if found, zap
- * him. We note that the head of the list is at the lowest
+ * flags and clamp the poll intervals. Then, consider each peer
+ * in turn and OR the leap bits on the assumption that, if some
+ * of them honk nonzero bits, they must know what they are
+ * doing. Check for prefer and pps peers at any stratum. Check
+ * if the old system peer is among the peers at the lowest
+ * stratum. Note that the head of the list is at the lowest
* stratum and that unsynchronized peers cannot survive this
* far.
*
- * Note that we go no further, unless the number of survivors is
- * a majority of the suckers that have been found reachable and
- * no prior source is available. This avoids the transient when
- * one of a flock of sources is out to lunch and just happens
- * to be the first survivor.
+ * Fiddle for hysteresis. Pump it up for a peer only if the peer
+ * stratum is at least the floor and there are enough survivors.
+ * This minimizes the pain when tossing out rascals beneath the
+ * floorboard. Don't count peers with stratum above the ceiling.
+ * Manycast is sooo complicated.
*/
- if (osys_peer == NULL && 2 * nlist < min(nreach, NTP_MINCLOCK))
- return;
leap_consensus = 0;
for (i = nlist - 1; i >= 0; i--) {
peer = peer_list[i];
+ leap_consensus |= peer->leap;
peer->status = CTL_PST_SEL_SYNCCAND;
+ peer->rank++;
peer->flags |= FLAG_SYSPEER;
- poll_update(peer, peer->hpoll);
- if (peer->stratum == peer_list[0]->stratum) {
- leap_consensus |= peer->leap;
- if (peer->refclktype == REFCLK_ATOM_PPS &&
- peer->stratum < STRATUM_UNSPEC)
- typepps = peer;
- if (peer == osys_peer)
- typesystem = peer;
- if (peer->flags & FLAG_PREFER)
- sys_prefer = peer;
- }
+ if (peer->stratum >= sys_floor && osurv >= sys_minclock)
+ peer->hyst = HYST;
+ else
+ peer->hyst = 0;
+ if (peer->stratum <= sys_ceiling)
+ sys_survivors++;
+ if (peer->flags & FLAG_PREFER)
+ sys_prefer = peer;
+ if (peer->refclktype == REFCLK_ATOM_PPS &&
+ peer->stratum < STRATUM_UNSPEC)
+ typepps = peer;
+ if (peer->stratum == peer_list[0]->stratum && peer ==
+ osys_peer)
+ typesystem = peer;
}
/*
+ * In manycast client mode we may have spooked a sizeable number
+ * of peers that we don't need. If there are at least
+ * sys_minclock of them, the manycast message will be turned
+ * off. By the time we get here we nay be ready to prune some of
+ * them back, but we want to make sure all the candicates have
+ * had a chance. If they didn't pass the sanity and intersection
+ * tests, they have already been voted off the island.
+ */
+ if (sys_survivors < sys_minclock && osurv >= sys_minclock)
+ resetmanycast();
+
+ /*
* Mitigation rules of the game. There are several types of
* peers that make a difference here: (1) prefer local peers
* (type REFCLK_LOCALCLOCK with FLAG_PREFER) or prefer modem
@@ -1884,15 +2216,16 @@ clock_select(void)
printf("select: prefer offset %.6f\n",
sys_offset);
#endif
- } else if (typepps) {
+ }
+#ifndef LOCKCLOCK
+ else if (typepps) {
sys_peer = typepps;
sys_peer->status = CTL_PST_SEL_PPS;
sys_offset = sys_peer->offset;
sys_syserr = sys_peer->jitter;
if (!pps_control)
NLOG(NLOG_SYSEVENT)
- msyslog(LOG_INFO,
- "pps sync enabled");
+ msyslog(LOG_INFO, "pps sync enabled");
pps_control = current_time;
#ifdef DEBUG
if (debug > 1)
@@ -1905,6 +2238,7 @@ clock_select(void)
else
sys_peer = peer_list[0];
sys_peer->status = CTL_PST_SEL_SYSPEER;
+ sys_peer->rank++;
sys_offset = clock_combine(peer_list, nlist);
sys_syserr = sys_peer->jitter + sys_selerr;
#ifdef DEBUG
@@ -1913,8 +2247,26 @@ clock_select(void)
sys_offset);
#endif
}
- if (osys_peer != sys_peer)
- report_event(EVNT_PEERSTCHG, (struct peer *)0);
+#endif /* LOCKCLOCK */
+ if (osys_peer != sys_peer) {
+ char *src;
+
+ if (sys_peer == NULL)
+ sys_peer_refid = 0;
+ else
+ sys_peer_refid = addr2refid(&sys_peer->srcadr);
+ report_event(EVNT_PEERSTCHG, NULL);
+
+#ifdef REFCLOCK
+ if (ISREFCLOCKADR(&sys_peer->srcadr))
+ src = refnumtoa(&sys_peer->srcadr);
+ else
+#endif
+ src = ntoa(&sys_peer->srcadr);
+ NLOG(NLOG_SYNCSTATUS)
+ msyslog(LOG_INFO, "synchronized to %s, stratum=%d", src,
+ sys_peer->stratum);
+ }
clock_update();
}
@@ -1924,11 +2276,12 @@ clock_select(void)
static double
clock_combine(
struct peer **peers,
- int npeers
+ int npeers
)
{
- int i;
- double x, y, z;
+ int i;
+ double x, y, z;
+
y = z = 0;
for (i = 0; i < npeers; i++) {
x = root_distance(peers[i]);
@@ -1965,9 +2318,9 @@ peer_xmit(
)
{
struct pkt xpkt; /* transmit packet */
- int sendlen, authlen;
- keyid_t xkeyid; /* transmit key ID */
- l_fp xmt_tx;
+ int sendlen, authlen;
+ keyid_t xkeyid = 0; /* transmit key ID */
+ l_fp xmt_tx;
/*
* Initialize transmit packet header fields.
@@ -1998,14 +2351,14 @@ peer_xmit(
if (!(peer->flags & FLAG_AUTHENABLE)) {
get_systime(&peer->xmt);
HTONL_FP(&peer->xmt, &xpkt.xmt);
- sendpkt(&peer->srcadr, peer->dstadr, peer->ttl, &xpkt,
- sendlen);
+ sendpkt(&peer->srcadr, peer->dstadr, sys_ttl[peer->ttl],
+ &xpkt, sendlen);
peer->sent++;
#ifdef DEBUG
if (debug)
printf("transmit: at %ld %s->%s mode %d\n",
- current_time, ntoa(&peer->dstadr->sin),
- ntoa(&peer->srcadr), peer->hmode);
+ current_time, stoa(&peer->dstadr->sin),
+ stoa(&peer->srcadr), peer->hmode);
#endif
return;
}
@@ -2015,9 +2368,10 @@ peer_xmit(
* must be authenticated. If autokey is enabled, fuss with the
* various modes; otherwise, private key cryptography is used.
*/
-#ifdef AUTOKEY
- if ((peer->flags & FLAG_SKEY)) {
- u_int cmmd;
+#ifdef OPENSSL
+ if (crypto_flags && (peer->flags & FLAG_SKEY)) {
+ struct exten *exten; /* extension field */
+ u_int opcode;
/*
* The Public Key Dance (PKD): Cryptographic credentials
@@ -2077,191 +2431,214 @@ peer_xmit(
switch (peer->hmode) {
/*
- * In broadcast mode the autokey values are required.
- * Send them when a new keylist is generated; otherwise,
- * send the association ID so the client can request
- * them at other times.
+ * In broadcast server mode the autokey values are
+ * required by the broadcast clients. Push them when a
+ * new keylist is generated; otherwise, push the
+ * association message so the client can request them at
+ * other times.
*/
case MODE_BROADCAST:
if (peer->flags & FLAG_ASSOC)
- cmmd = CRYPTO_AUTO | CRYPTO_RESP;
+ exten = crypto_args(peer, CRYPTO_AUTO |
+ CRYPTO_RESP, NULL);
else
- cmmd = CRYPTO_ASSOC | CRYPTO_RESP;
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, cmmd, 0, peer->associd);
+ exten = crypto_args(peer, CRYPTO_ASSOC |
+ CRYPTO_RESP, NULL);
+ sendlen += crypto_xmit(&xpkt, &peer->srcadr,
+ sendlen, exten, 0);
+ free(exten);
break;
/*
- * In symmetric modes the public key, leapsecond table,
- * agreement parameters and autokey values are required.
- *
- * 1. If a response is pending, always send it first.
- *
- * 2. Don't send anything except a public-key request
- * until the public key has been stored.
- *
- * 3. Once the public key has been stored, don't send
- * anything except an agreement parameter request
- * until the agreement parameters have been stored.
- *
- * 4. Once the argeement parameters have been stored,
- * don't send anything except a public value request
- * until the agreed key has been stored.
- *
- * 5. When the agreed key has been stored and the key
- * list is regenerated, send the autokey values
- * gratis unless they have already been sent.
+ * In symmetric modes the digest, certificate, agreement
+ * parameters, cookie and autokey values are required.
+ * The leapsecond table is optional. But, a passive peer
+ * will not believe the active peer until the latter has
+ * synchronized, so the agreement must be postponed
+ * until then. In any case, if a new keylist is
+ * generated, the autokey values are pushed.
*/
case MODE_ACTIVE:
case MODE_PASSIVE:
-#ifdef PUBKEY
- if (peer->cmmd != 0)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, (peer->cmmd >> 16) |
- CRYPTO_RESP, peer->hcookie,
- peer->associd);
+ if (peer->cmmd != NULL) {
+ peer->cmmd->associd =
+ htonl(peer->associd);
+ sendlen += crypto_xmit(&xpkt,
+ &peer->srcadr, sendlen, peer->cmmd,
+ 0);
+ free(peer->cmmd);
+ peer->cmmd = NULL;
+ }
+ exten = NULL;
if (!peer->crypto)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_ASSOC,
- peer->hcookie, peer->assoc);
- else if (!crypto_flags &&
- peer->pcookie.tstamp == 0 && sys_leap !=
- LEAP_NOTINSYNC)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_PRIV, peer->hcookie,
- peer->assoc);
- else if (crypto_flags && peer->pubkey.ptr ==
- NULL)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_NAME, peer->hcookie,
- peer->assoc);
- else if (peer->crypto & CRYPTO_FLAG_CERT)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_CERT, peer->hcookie,
- peer->assoc);
- else if (crypto_flags && peer->crypto &
- CRYPTO_FLAG_DH && sys_leap !=
- LEAP_NOTINSYNC)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_DHPAR,
- peer->hcookie, peer->assoc);
- else if (crypto_flags && peer->pcookie.tstamp ==
- 0 && sys_leap != LEAP_NOTINSYNC)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_DH, peer->hcookie,
- peer->assoc);
-#else
- if (peer->cmmd != 0)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, (peer->cmmd >> 16) |
- CRYPTO_RESP, peer->hcookie,
- peer->associd);
- if (peer->pcookie.tstamp == 0 && sys_leap !=
- LEAP_NOTINSYNC)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_PRIV, peer->hcookie,
- peer->assoc);
-#endif /* PUBKEY */
- else if (!(peer->flags & FLAG_AUTOKEY))
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_AUTO, peer->hcookie,
- peer->assoc);
- else if ((peer->flags & FLAG_ASSOC) &&
- (peer->cmmd >> 16) != CRYPTO_AUTO)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_AUTO | CRYPTO_RESP,
- peer->hcookie, peer->associd);
-#ifdef PUBKEY
- else if (peer->crypto & CRYPTO_FLAG_TAI)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_TAI, peer->hcookie,
- peer->assoc);
-#endif /* PUBKEY */
- peer->cmmd = 0;
+ exten = crypto_args(peer, CRYPTO_ASSOC,
+ sys_hostname);
+ else if (!(peer->crypto & CRYPTO_FLAG_VALID))
+ exten = crypto_args(peer, CRYPTO_CERT,
+ peer->issuer);
+
+ /*
+ * Identity. Note we have to sign the
+ * certificate before the cookie to avoid a
+ * deadlock when the passive peer is walking the
+ * certificate trail. Awesome.
+ */
+ else if ((opcode = crypto_ident(peer)) != 0)
+ exten = crypto_args(peer, opcode, NULL);
+ else if (sys_leap != LEAP_NOTINSYNC &&
+ !(peer->crypto & CRYPTO_FLAG_SIGN))
+ exten = crypto_args(peer, CRYPTO_SIGN,
+ sys_hostname);
+
+ /*
+ * Autokey. We request the cookie only when the
+ * server and client are synchronized and
+ * signatures work both ways. On the other hand,
+ * the active peer needs the autokey values
+ * before then and when the passive peer is
+ * waiting for the active peer to synchronize.
+ * Any time we regenerate the key list, we offer
+ * the autokey values without being asked.
+ */
+ else if (sys_leap != LEAP_NOTINSYNC &&
+ peer->leap != LEAP_NOTINSYNC &&
+ !(peer->crypto & CRYPTO_FLAG_AGREE))
+ exten = crypto_args(peer, CRYPTO_COOK,
+ NULL);
+ else if (peer->flags & FLAG_ASSOC)
+ exten = crypto_args(peer, CRYPTO_AUTO |
+ CRYPTO_RESP, NULL);
+ else if (!(peer->crypto & CRYPTO_FLAG_AUTO))
+ exten = crypto_args(peer, CRYPTO_AUTO,
+ NULL);
+
+ /*
+ * Postamble. We trade leapseconds only when the
+ * server and client are synchronized.
+ */
+ else if (sys_leap != LEAP_NOTINSYNC &&
+ peer->leap != LEAP_NOTINSYNC &&
+ peer->crypto & CRYPTO_FLAG_TAI &&
+ !(peer->crypto & CRYPTO_FLAG_LEAP))
+ exten = crypto_args(peer, CRYPTO_TAI,
+ NULL);
+ if (exten != NULL) {
+ sendlen += crypto_xmit(&xpkt,
+ &peer->srcadr, sendlen, exten, 0);
+ free(exten);
+ }
break;
/*
- * In client mode, the public key, host cookie and
- * autokey values are required. In broadcast client
- * mode, these values must be acquired during the
+ * In client mode the digest, certificate, agreement
+ * parameters and cookie are required. The leapsecond
+ * table is optional. If broadcast client mode, the
+ * autokey values are required as well. In broadcast
+ * client mode, these values must be acquired during the
* client/server exchange to avoid having to wait until
* the next key list regeneration. Otherwise, the poor
* dude may die a lingering death until becoming
- * unreachable and attempting rebirth. Note that we ask
- * for the cookie at each key list regeneration anyway.
+ * unreachable and attempting rebirth.
+ *
+ * If neither the server or client have the agreement
+ * parameters, the protocol transmits the cookie in the
+ * clear. If the server has the parameters, the client
+ * requests them and the protocol blinds it using the
+ * agreed key. It is a protocol error if the client has
+ * the parameters but the server does not.
*/
case MODE_CLIENT:
- if (peer->cmmd != 0)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, (peer->cmmd >> 16) |
- CRYPTO_RESP, peer->hcookie,
- peer->associd);
+ if (peer->cmmd != NULL) {
+ peer->cmmd->associd =
+ htonl(peer->associd);
+ sendlen += crypto_xmit(&xpkt,
+ &peer->srcadr, sendlen, peer->cmmd,
+ 0);
+ free(peer->cmmd);
+ peer->cmmd = NULL;
+ }
+ exten = NULL;
if (!peer->crypto)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_ASSOC,
- peer->hcookie, peer->assoc);
-#ifdef PUBKEY
- else if (crypto_flags && peer->pubkey.ptr ==
- NULL)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_NAME, peer->hcookie,
- peer->assoc);
- else if (peer->crypto & CRYPTO_FLAG_CERT)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_CERT, peer->hcookie,
- peer->assoc);
-#endif /* PUBKEY */
- else if (peer->pcookie.tstamp == 0)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_PRIV, peer->hcookie,
- peer->assoc);
- else if (!(peer->flags & FLAG_AUTOKEY) &&
+ exten = crypto_args(peer, CRYPTO_ASSOC,
+ sys_hostname);
+ else if (!(peer->crypto & CRYPTO_FLAG_VALID))
+ exten = crypto_args(peer, CRYPTO_CERT,
+ peer->issuer);
+
+ /*
+ * Identity.
+ */
+ else if ((opcode = crypto_ident(peer)) != 0)
+ exten = crypto_args(peer, opcode, NULL);
+
+ /*
+ * Autokey
+ */
+ else if (!(peer->crypto & CRYPTO_FLAG_AGREE))
+ exten = crypto_args(peer, CRYPTO_COOK,
+ NULL);
+ else if (!(peer->crypto & CRYPTO_FLAG_AUTO) &&
(peer->cast_flags & MDF_BCLNT))
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_AUTO, peer->hcookie,
- peer->assoc);
-#ifdef PUBKEY
- else if (peer->crypto & CRYPTO_FLAG_TAI)
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, CRYPTO_TAI, peer->hcookie,
- peer->assoc);
-#endif /* PUBKEY */
- peer->cmmd = 0;
+ exten = crypto_args(peer, CRYPTO_AUTO,
+ NULL);
+
+ /*
+ * Postamble. We can sign the certificate here,
+ * since there is no chance of deadlock.
+ */
+ else if (sys_leap != LEAP_NOTINSYNC &&
+ !(peer->crypto & CRYPTO_FLAG_SIGN))
+ exten = crypto_args(peer, CRYPTO_SIGN,
+ sys_hostname);
+ else if (sys_leap != LEAP_NOTINSYNC &&
+ peer->crypto & CRYPTO_FLAG_TAI &&
+ !(peer->crypto & CRYPTO_FLAG_LEAP))
+ exten = crypto_args(peer, CRYPTO_TAI,
+ NULL);
+ if (exten != NULL) {
+ sendlen += crypto_xmit(&xpkt,
+ &peer->srcadr, sendlen, exten, 0);
+ free(exten);
+ }
break;
}
/*
* If extension fields are present, we must use a
- * private value of zero and force min poll interval.
+ * private value of zero and force min poll interval.
* Most intricate.
*/
if (sendlen > LEN_PKT_NOMAC)
session_key(&peer->dstadr->sin, &peer->srcadr,
xkeyid, 0, 2);
}
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
xkeyid = peer->keyid;
get_systime(&peer->xmt);
L_ADD(&peer->xmt, &sys_authdelay);
HTONL_FP(&peer->xmt, &xpkt.xmt);
authlen = authencrypt(xkeyid, (u_int32 *)&xpkt, sendlen);
if (authlen == 0) {
- msyslog(LOG_NOTICE,
- "transmit: no encryption key found");
- peer->flash |= TEST4 | TEST5;
+ msyslog(LOG_INFO,
+ "transmit: encryption key %d not found", xkeyid);
+ if (peer->flags & FLAG_CONFIG)
+ peer_clear(peer, "NKEY");
+ else
+ unpeer(peer);
return;
}
sendlen += authlen;
-#ifdef AUTOKEY
+#ifdef OPENSSL
if (xkeyid > NTP_MAXKEY)
authtrust(xkeyid, 0);
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
get_systime(&xmt_tx);
if (sendlen > sizeof(xpkt)) {
msyslog(LOG_ERR, "buffer overflow %u", sendlen);
- exit(-1);
+ exit (-1);
}
- sendpkt(&peer->srcadr, peer->dstadr, peer->ttl, &xpkt, sendlen);
+ sendpkt(&peer->srcadr, peer->dstadr, sys_ttl[peer->ttl], &xpkt,
+ sendlen);
/*
* Calculate the encryption delay. Keep the minimum over
@@ -2276,14 +2653,14 @@ peer_xmit(
else
sys_authdelay.l_uf = sys_authdly[1];
peer->sent++;
-#ifdef AUTOKEY
+#ifdef OPENSSL
#ifdef DEBUG
if (debug)
printf(
"transmit: at %ld %s->%s mode %d keyid %08x len %d mac %d index %d\n",
current_time, ntoa(&peer->dstadr->sin),
- ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen,
- authlen, peer->keynumber);
+ ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen -
+ authlen, authlen, peer->keynumber);
#endif
#else
#ifdef DEBUG
@@ -2291,10 +2668,10 @@ peer_xmit(
printf(
"transmit: at %ld %s->%s mode %d keyid %08x len %d mac %d\n",
current_time, ntoa(&peer->dstadr->sin),
- ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen,
- authlen);
+ ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen -
+ authlen, authlen);
#endif
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
}
@@ -2305,16 +2682,19 @@ peer_xmit(
static void
fast_xmit(
struct recvbuf *rbufp, /* receive packet pointer */
- int xmode, /* transmit mode */
- keyid_t xkeyid, /* transmit key ID */
- int mask /* restrict mask */
+ int xmode, /* transmit mode */
+ keyid_t xkeyid, /* transmit key ID */
+ int mask /* restrict mask */
)
{
- struct pkt xpkt; /* transmit packet structure */
- struct pkt *rpkt; /* receive packet structure */
- l_fp xmt_ts; /* transmit timestamp */
- l_fp xmt_tx; /* transmit timestamp after authent */
- int sendlen, authlen;
+ struct pkt xpkt; /* transmit packet structure */
+ struct pkt *rpkt; /* receive packet structure */
+ l_fp xmt_ts; /* timestamp */
+ l_fp xmt_tx; /* timestamp after authent */
+ int sendlen, authlen;
+#ifdef OPENSSL
+ u_int32 temp32;
+#endif
/*
* Initialize transmit packet header fields from the receive
@@ -2327,19 +2707,35 @@ fast_xmit(
rbufp->dstadr = findinterface(&rbufp->recv_srcadr);
/*
- * If the caller is restricted, return a kiss-of-death packet;
- * otherwise, smooch politely.
+ * If the packet has picked up a restriction due to either
+ * access denied or rate exceeded, decide what to do with it.
*/
- if (mask & (RES_DONTSERVE | RES_LIMITED)) {
- if (!(mask & RES_DEMOBILIZE)) {
- return;
- } else {
- xpkt.li_vn_mode =
- PKT_LI_VN_MODE(LEAP_NOTINSYNC,
- PKT_VERSION(rpkt->li_vn_mode), xmode);
- xpkt.stratum = STRATUM_UNSPEC;
- memcpy(&xpkt.refid, "DENY", 4);
+ if (mask & (RES_DONTTRUST | RES_LIMITED)) {
+ char *code = "????";
+
+ if (mask & RES_LIMITED) {
+ sys_limitrejected++;
+ code = "RATE";
+ } else if (mask & RES_DONTTRUST) {
+ sys_restricted++;
+ code = "DENY";
}
+
+ /*
+ * Here we light up a kiss-of-death packet. Note the
+ * rate limit on these packets. Once a second initialize
+ * a bucket counter. Every packet sent decrements the
+ * counter until reaching zero. If the counter is zero,
+ * drop the kod.
+ */
+ if (sys_kod == 0 || !(mask & RES_DEMOBILIZE))
+ return;
+
+ sys_kod--;
+ memcpy(&xpkt.refid, code, 4);
+ xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC,
+ PKT_VERSION(rpkt->li_vn_mode), xmode);
+ xpkt.stratum = STRATUM_UNSPEC;
} else {
xpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap,
PKT_VERSION(rpkt->li_vn_mode), xmode);
@@ -2369,8 +2765,8 @@ fast_xmit(
#ifdef DEBUG
if (debug)
printf("transmit: at %ld %s->%s mode %d\n",
- current_time, ntoa(&rbufp->dstadr->sin),
- ntoa(&rbufp->recv_srcadr), xmode);
+ current_time, stoa(&rbufp->dstadr->sin),
+ stoa(&rbufp->recv_srcadr), xmode);
#endif
return;
}
@@ -2383,10 +2779,9 @@ fast_xmit(
* generate the cookie, which is unique for every source-
* destination-key ID combination.
*/
-#ifdef AUTOKEY
+#ifdef OPENSSL
if (xkeyid > NTP_MAXKEY) {
keyid_t cookie;
- u_int code, associd;
/*
* The only way to get here is a reply to a legitimate
@@ -2397,35 +2792,36 @@ fast_xmit(
* jerk can decode it. If no extension field is present,
* use the cookie to generate the session key.
*/
- code = (htonl(rpkt->exten[0]) >> 16) | CRYPTO_RESP;
cookie = session_key(&rbufp->recv_srcadr,
&rbufp->dstadr->sin, 0, sys_private, 0);
- associd = htonl(rpkt->exten[1]);
- if (rbufp->recv_length >= sendlen + MAX_MAC_LEN + 2 *
- sizeof(u_int32)) {
+ if (rbufp->recv_length >= (int)(sendlen + MAX_MAC_LEN + 2 *
+ sizeof(u_int32))) {
session_key(&rbufp->dstadr->sin,
&rbufp->recv_srcadr, xkeyid, 0, 2);
- sendlen += crypto_xmit((u_int32 *)&xpkt,
- sendlen, code, cookie, associd);
+ temp32 = CRYPTO_RESP;
+ rpkt->exten[0] |= htonl(temp32);
+ sendlen += crypto_xmit(&xpkt,
+ &rbufp->recv_srcadr, sendlen,
+ (struct exten *)rpkt->exten, cookie);
} else {
session_key(&rbufp->dstadr->sin,
&rbufp->recv_srcadr, xkeyid, cookie, 2);
}
}
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
get_systime(&xmt_ts);
L_ADD(&xmt_ts, &sys_authdelay);
HTONL_FP(&xmt_ts, &xpkt.xmt);
authlen = authencrypt(xkeyid, (u_int32 *)&xpkt, sendlen);
sendlen += authlen;
-#ifdef AUTOKEY
+#ifdef OPENSSL
if (xkeyid > NTP_MAXKEY)
authtrust(xkeyid, 0);
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
get_systime(&xmt_tx);
if (sendlen > sizeof(xpkt)) {
msyslog(LOG_ERR, "buffer overflow %u", sendlen);
- exit(-1);
+ exit (-1);
}
sendpkt(&rbufp->recv_srcadr, rbufp->dstadr, 0, &xpkt, sendlen);
@@ -2446,13 +2842,13 @@ fast_xmit(
printf(
"transmit: at %ld %s->%s mode %d keyid %08x len %d mac %d\n",
current_time, ntoa(&rbufp->dstadr->sin),
- ntoa(&rbufp->recv_srcadr), xmode, xkeyid, sendlen,
- authlen);
+ ntoa(&rbufp->recv_srcadr), xmode, xkeyid, sendlen -
+ authlen, authlen);
#endif
}
-#ifdef AUTOKEY
+#ifdef OPENSSL
/*
* key_expire - purge the key list
*/
@@ -2463,131 +2859,128 @@ key_expire(
{
int i;
- if (peer->keylist != NULL) {
+ if (peer->keylist != NULL) {
for (i = 0; i <= peer->keynumber; i++)
authtrust(peer->keylist[i], 0);
free(peer->keylist);
peer->keylist = NULL;
}
- peer->keynumber = peer->sndauto.seq = 0;
+ value_free(&peer->sndval);
+ peer->keynumber = 0;
#ifdef DEBUG
if (debug)
printf("key_expire: at %lu\n", current_time);
#endif
}
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
+
+
+/*
+ * Determine if the peer is unfit for synchronization
+ *
+ * A peer is unfit for synchronization if
+ * > not reachable
+ * > a synchronization loop would form
+ * > never been synchronized
+ * > stratum undefined or too high
+ * > too long without synchronization
+ * > designated noselect
+ */
+static int /* 0 if no, 1 if yes */
+peer_unfit(
+ struct peer *peer /* peer structure pointer */
+ )
+{
+ return (!peer->reach || (peer->stratum > 1 && peer->refid ==
+ peer->dstadr->addr_refid) || peer->leap == LEAP_NOTINSYNC ||
+ peer->stratum >= STRATUM_UNSPEC || root_distance(peer) >=
+ MAXDISTANCE + 2. * clock_phi * ULOGTOD(sys_poll) ||
+ peer->flags & FLAG_NOSELECT );
+}
+
/*
* Find the precision of this particular machine
*/
-#define DUSECS 1000000 /* us in a s */
-#define HUSECS (1 << 20) /* approx DUSECS for shifting etc */
-#define MINSTEP 5 /* minimum clock increment (us) */
-#define MAXSTEP 20000 /* maximum clock increment (us) */
-#define MINLOOPS 5 /* minimum number of step samples */
+#define MINSTEP 100e-9 /* minimum clock increment (s) */
+#define MAXSTEP 20e-3 /* maximum clock increment (s) */
+#define MINLOOPS 5 /* minimum number of step samples */
/*
- * This routine calculates the differences between successive calls to
- * gettimeofday(). If a difference is less than zero, the us field
- * has rolled over to the next second, so we add a second in us. If
- * the difference is greater than zero and less than MINSTEP, the
- * clock has been advanced by a small amount to avoid standing still.
- * If the clock has advanced by a greater amount, then a timer interrupt
- * has occurred and this amount represents the precision of the clock.
- * In order to guard against spurious values, which could occur if we
- * happen to hit a fat interrupt, we do this for MINLOOPS times and
- * keep the minimum value obtained.
+ * This routine calculates the system precision, defined as the minimum
+ * of a sequency of differences between successive readings of the
+ * system clock. However, if the system clock can be read more than once
+ * during a tick interval, the difference can be zero or one LSB unit,
+ * where the LSB corresponds to one nanosecond or one microsecond.
+ * Conceivably, if some other process preempts this one and reads the
+ * clock, the difference can be more than one LSB unit.
+ *
+ * For hardware clock frequencies of 10 MHz or less, we assume the
+ * logical clock advances only at the hardware clock tick. For higher
+ * frequencies, we assume the logical clock can advance no more than 100
+ * nanoseconds between ticks.
*/
int
default_get_precision(void)
{
- struct timeval tp;
-#if !defined(SYS_WINNT) && !defined(VMS) && !defined(_SEQUENT_) && \
- !defined(MPE)
- struct timezone tzp;
-#elif defined(VMS) || defined(_SEQUENT_)
- struct timezone {
- int tz_minuteswest;
- int tz_dsttime;
- } tzp;
-#endif /* defined(VMS) || defined(_SEQUENT_) */
- long last;
- int i;
- long diff;
- long val;
- long usec;
-#ifdef HAVE_GETCLOCK
- struct timespec ts;
-#endif
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- u_long freq;
- size_t j;
-
- /* Try to see if we can find the frequency of of the counter
- * which drives our timekeeping
- */
- j = sizeof freq;
- i = sysctlbyname("kern.timecounter.frequency", &freq, &j , 0,
- 0);
- if (i)
- i = sysctlbyname("machdep.tsc_freq", &freq, &j , 0, 0);
- if (i)
- i = sysctlbyname("machdep.i586_freq", &freq, &j , 0, 0);
- if (i)
- i = sysctlbyname("machdep.i8254_freq", &freq, &j , 0,
- 0);
- if (!i) {
- for (i = 1; freq ; i--)
- freq >>= 1;
- return (i);
- }
-#endif
- usec = 0;
- val = MAXSTEP;
-#ifdef HAVE_GETCLOCK
- (void) getclock(TIMEOFDAY, &ts);
- tp.tv_sec = ts.tv_sec;
- tp.tv_usec = ts.tv_nsec / 1000;
-#else /* not HAVE_GETCLOCK */
- GETTIMEOFDAY(&tp, &tzp);
-#endif /* not HAVE_GETCLOCK */
- last = tp.tv_usec;
- for (i = 0; i < MINLOOPS && usec < HUSECS;) {
-#ifdef HAVE_GETCLOCK
- (void) getclock(TIMEOFDAY, &ts);
- tp.tv_sec = ts.tv_sec;
- tp.tv_usec = ts.tv_nsec / 1000;
-#else /* not HAVE_GETCLOCK */
- GETTIMEOFDAY(&tp, &tzp);
-#endif /* not HAVE_GETCLOCK */
- diff = tp.tv_usec - last;
- last = tp.tv_usec;
- if (diff < 0)
- diff += DUSECS;
- usec += diff;
- if (diff > MINSTEP) {
- i++;
- if (diff < val)
- val = diff;
- }
+ l_fp val; /* current seconds fraction */
+ l_fp last; /* last seconds fraction */
+ l_fp diff; /* difference */
+ double tick; /* computed tick value */
+ double dtemp; /* scratch */
+ int i; /* log2 precision */
+
+ /*
+ * Loop to find tick value in nanoseconds. Toss out outlyer
+ * values less than the minimun tick value. In wacky cases, use
+ * the default maximum value.
+ */
+ get_systime(&last);
+ tick = MAXSTEP;
+ for (i = 0; i < MINLOOPS;) {
+ get_systime(&val);
+ diff = val;
+ L_SUB(&diff, &last);
+ last = val;
+ LFPTOD(&diff, dtemp);
+ if (dtemp < MINSTEP)
+ continue;
+ i++;
+ if (dtemp < tick)
+ tick = dtemp;
}
- NLOG(NLOG_SYSINFO)
- msyslog(LOG_INFO, "precision = %ld usec", val);
- if (usec >= HUSECS)
- val = MINSTEP; /* val <= MINSTEP; fast machine */
- diff = HUSECS;
- for (i = 0; diff > val; i--)
- diff >>= 1;
- return (i);
+
+ /*
+ * Find the nearest power of two.
+ */
+ NLOG(NLOG_SYSEVENT)
+ msyslog(LOG_INFO, "precision = %.3f usec", tick * 1e6);
+ for (i = 0; tick <= 1; i++)
+ tick *= 2;
+ if (tick - 1. > 1. - tick / 2)
+ i--;
+ return (-i);
}
+
+/*
+ * kod_proto - called once per second to limit kiss-of-death packets
+ */
+void
+kod_proto(void)
+{
+ sys_kod = sys_kod_rate;
+}
+
+
/*
* init_proto - initialize the protocol module's data
*/
void
init_proto(void)
{
- l_fp dummy;
+ l_fp dummy;
+ int i;
/*
* Fill in the sys_* stuff. Default is don't listen to
@@ -2595,32 +2988,31 @@ init_proto(void)
*/
sys_leap = LEAP_NOTINSYNC;
sys_stratum = STRATUM_UNSPEC;
+ memcpy(&sys_refid, "INIT", 4);
sys_precision = (s_char)default_get_precision();
sys_jitter = LOGTOD(sys_precision);
sys_rootdelay = 0;
sys_rootdispersion = 0;
- sys_refid = 0;
L_CLR(&sys_reftime);
sys_peer = NULL;
sys_survivors = 0;
get_systime(&dummy);
+ sys_manycastserver = 0;
sys_bclient = 0;
sys_bdelay = DEFBROADDELAY;
+ sys_calldelay = BURST_DELAY;
sys_authenticate = 1;
L_CLR(&sys_authdelay);
sys_authdly[0] = sys_authdly[1] = 0;
sys_stattime = 0;
- sys_badstratum = 0;
- sys_oldversionpkt = 0;
- sys_newversionpkt = 0;
- sys_badlength = 0;
- sys_unknownversion = 0;
- sys_processed = 0;
- sys_badauth = 0;
- sys_manycastserver = 0;
-#ifdef AUTOKEY
+ proto_clr_stats();
+ for (i = 0; i < MAX_TTL; i++) {
+ sys_ttl[i] = (u_char)((i * 256) / MAX_TTL);
+ sys_ttlmax = i;
+ }
+#ifdef OPENSSL
sys_automax = 1 << NTP_AUTOMAX;
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
/*
* Default these to enable
@@ -2631,19 +3023,6 @@ init_proto(void)
#endif
pps_enable = 0;
stats_control = 1;
-
- /*
- * Some system clocks should only be adjusted in 10ms
- * increments.
- */
-#if defined RELIANTUNIX_CLOCK
- systime_10ms_ticks = 1; /* Reliant UNIX */
-#elif defined SCO5_CLOCK
- if (sys_precision >= (s_char)-10) /* pre-SCO OpenServer 5.0.6 */
- systime_10ms_ticks = 1;
-#endif
- if (systime_10ms_ticks)
- msyslog(LOG_INFO, "using 10ms tick adjustments");
}
@@ -2652,55 +3031,52 @@ init_proto(void)
*/
void
proto_config(
- int item,
- u_long value,
- double dvalue
+ int item,
+ u_long value,
+ double dvalue,
+ struct sockaddr_storage* svalue
)
{
/*
* Figure out what he wants to change, then do it
*/
switch (item) {
- case PROTO_KERNEL:
- /*
- * Turn on/off kernel discipline
- */
+ /*
+ * Turn on/off kernel discipline.
+ */
+ case PROTO_KERNEL:
kern_enable = (int)value;
break;
+ /*
+ * Turn on/off clock discipline.
+ */
case PROTO_NTP:
-
- /*
- * Turn on/off clock discipline
- */
ntp_enable = (int)value;
break;
+ /*
+ * Turn on/off monitoring.
+ */
case PROTO_MONITOR:
-
- /*
- * Turn on/off monitoring
- */
if (value)
mon_start(MON_ON);
else
mon_stop(MON_ON);
break;
+ /*
+ * Turn on/off statistics.
+ */
case PROTO_FILEGEN:
-
- /*
- * Turn on/off statistics
- */
stats_control = (int)value;
break;
+ /*
+ * Turn on/off facility to listen to broadcasts.
+ */
case PROTO_BROADCLIENT:
-
- /*
- * Turn on/off facility to listen to broadcasts
- */
sys_bclient = (int)value;
if (value)
io_setbclient();
@@ -2708,65 +3084,107 @@ proto_config(
io_unsetbclient();
break;
+ /*
+ * Add muliticast group address.
+ */
case PROTO_MULTICAST_ADD:
-
- /*
- * Add muliticast group address
- */
- io_multicast_add(value);
+ if (svalue)
+ io_multicast_add(*svalue);
break;
+ /*
+ * Delete multicast group address.
+ */
case PROTO_MULTICAST_DEL:
-
- /*
- * Delete multicast group address
- */
- io_multicast_del(value);
+ if (svalue)
+ io_multicast_del(*svalue);
break;
+ /*
+ * Set default broadcast delay.
+ */
case PROTO_BROADDELAY:
-
- /*
- * Set default broadcast delay
- */
sys_bdelay = dvalue;
break;
- case PROTO_AUTHENTICATE:
+ /*
+ * Set modem call delay.
+ */
+ case PROTO_CALLDELAY:
+ sys_calldelay = (int)value;
+ break;
- /*
- * Specify the use of authenticated data
- */
+ /*
+ * Require authentication to mobilize ephemeral associations.
+ */
+ case PROTO_AUTHENTICATE:
sys_authenticate = (int)value;
break;
+ /*
+ * Turn on/off PPS discipline.
+ */
case PROTO_PPS:
-
- /*
- * Turn on/off PPS discipline
- */
pps_enable = (int)value;
break;
+ /*
+ * Set the minimum number of survivors.
+ */
+ case PROTO_MINCLOCK:
+ sys_minclock = (int)dvalue;
+ break;
+
+ /*
+ * Set the minimum number of candidates.
+ */
+ case PROTO_MINSANE:
+ sys_minsane = (int)dvalue;
+ break;
+
+ /*
+ * Set the stratum floor.
+ */
+ case PROTO_FLOOR:
+ sys_floor = (int)dvalue;
+ break;
+
+ /*
+ * Set the stratum ceiling.
+ */
+ case PROTO_CEILING:
+ sys_ceiling = (int)dvalue;
+ break;
+
+ /*
+ * Set the cohort switch.
+ */
+ case PROTO_COHORT:
+ sys_cohort= (int)dvalue;
+ break;
+ /*
+ * Set the adjtime() resolution (s).
+ */
+ case PROTO_ADJ:
+ sys_tick = dvalue;
+ break;
+
#ifdef REFCLOCK
+ /*
+ * Turn on/off refclock calibrate
+ */
case PROTO_CAL:
-
- /*
- * Turn on/off refclock calibrate
- */
cal_enable = (int)value;
break;
#endif
-
default:
/*
- * Log this error
+ * Log this error.
*/
- msyslog(LOG_ERR,
- "proto_config: illegal item %d, value %ld",
+ msyslog(LOG_INFO,
+ "proto_config: illegal item %d, value %ld",
item, value);
- break;
}
}
@@ -2777,13 +3195,14 @@ proto_config(
void
proto_clr_stats(void)
{
- sys_badstratum = 0;
- sys_oldversionpkt = 0;
+ sys_stattime = current_time;
+ sys_received = 0;
+ sys_processed = 0;
sys_newversionpkt = 0;
+ sys_oldversionpkt = 0;
sys_unknownversion = 0;
+ sys_restricted = 0;
sys_badlength = 0;
- sys_processed = 0;
sys_badauth = 0;
- sys_stattime = current_time;
sys_limitrejected = 0;
}
diff --git a/contrib/ntp/ntpd/ntp_refclock.c b/contrib/ntp/ntpd/ntp_refclock.c
index 2205b6ca2ddc..172fbda2d240 100644
--- a/contrib/ntp/ntpd/ntp_refclock.c
+++ b/contrib/ntp/ntpd/ntp_refclock.c
@@ -63,8 +63,9 @@
* which is used for all peer-specific processing and contains a pointer
* to the refclockproc structure, which in turn containes a pointer to
* the unit structure, if used. The peer structure is identified by an
- * interface address in the dotted quad form 127.127.t.u, where t is the
- * clock type and u the unit. Some legacy drivers derive the
+ * interface address in the dotted quad form 127.127.t.u (for now only IPv4
+ * addresses are used, so we need to be sure the address is it), where t is
+ * the clock type and u the unit. Some legacy drivers derive the
* refclockproc structure pointer from the table typeunit[type][unit].
* This interface is strongly discouraged and may be abandoned in
* future.
@@ -107,7 +108,8 @@ refclock_report(
{
struct refclockproc *pp;
- if (!(pp = peer->procptr))
+ pp = peer->procptr;
+ if (pp == NULL)
return;
if (code == CEVNT_BADREPLY)
pp->badformat++;
@@ -116,25 +118,25 @@ refclock_report(
if (code == CEVNT_TIMEOUT)
pp->noreply++;
if (pp->currentstatus != code) {
- pp->currentstatus = code;
- pp->lastevent = code;
+ pp->currentstatus = (u_char)code;
+ pp->lastevent = (u_char)code;
if (code == CEVNT_FAULT)
msyslog(LOG_ERR,
"clock %s event '%s' (0x%02x)",
- refnumtoa(peer->srcadr.sin_addr.s_addr),
+ refnumtoa(&peer->srcadr),
ceventstr(code), code);
else {
NLOG(NLOG_CLOCKEVENT)
msyslog(LOG_INFO,
"clock %s event '%s' (0x%02x)",
- refnumtoa(peer->srcadr.sin_addr.s_addr),
+ refnumtoa(&peer->srcadr),
ceventstr(code), code);
}
}
#ifdef DEBUG
if (debug)
printf("clock %s event '%s' (0x%02x)\n",
- refnumtoa(peer->srcadr.sin_addr.s_addr),
+ refnumtoa(&peer->srcadr),
ceventstr(code), code);
#endif
}
@@ -186,10 +188,16 @@ refclock_newpeer(
* Check for valid clock address. If already running, shut it
* down first.
*/
+ if (peer->srcadr.ss_family != AF_INET) {
+ msyslog(LOG_ERR,
+ "refclock_newpeer: clock address %s invalid, address family not implemented for refclock",
+ stoa(&peer->srcadr));
+ return (0);
+ }
if (!ISREFCLOCKADR(&peer->srcadr)) {
msyslog(LOG_ERR,
"refclock_newpeer: clock address %s invalid",
- ntoa(&peer->srcadr));
+ stoa(&peer->srcadr));
return (0);
}
clktype = (u_char)REFCLOCKTYPE(&peer->srcadr);
@@ -205,7 +213,8 @@ refclock_newpeer(
/*
* Allocate and initialize interface structure
*/
- if (!(pp = (struct refclockproc *)emalloc(sizeof(struct refclockproc))))
+ pp = (struct refclockproc *)emalloc(sizeof(struct refclockproc));
+ if (pp == NULL)
return (0);
memset((char *)pp, 0, sizeof(struct refclockproc));
typeunit[clktype][unit] = peer;
@@ -215,12 +224,10 @@ refclock_newpeer(
* Initialize structures
*/
peer->refclktype = clktype;
- peer->refclkunit = unit;
+ peer->refclkunit = (u_char)unit;
peer->flags |= FLAG_REFCLOCK;
- peer->stratum = STRATUM_REFCLOCK;
- peer->refid = peer->srcadr.sin_addr.s_addr;
peer->maxpoll = peer->minpoll;
-
+ peer->stratum = STRATUM_REFCLOCK;
pp->type = clktype;
pp->timestarted = current_time;
@@ -228,12 +235,11 @@ refclock_newpeer(
* Set peer.pmode based on the hmode. For appearances only.
*/
switch (peer->hmode) {
-
- case MODE_ACTIVE:
+ case MODE_ACTIVE:
peer->pmode = MODE_PASSIVE;
break;
- default:
+ default:
peer->pmode = MODE_SERVER;
break;
}
@@ -248,10 +254,7 @@ refclock_newpeer(
}
peer->hpoll = peer->minpoll;
peer->ppoll = peer->maxpoll;
- if (peer->stratum <= 1)
- peer->refid = pp->refid;
- else
- peer->refid = peer->srcadr.sin_addr.s_addr;
+ peer->refid = pp->refid;
return (1);
}
@@ -297,7 +300,6 @@ refclock_transmit(
{
u_char clktype;
int unit;
- int hpoll;
u_long next;
clktype = peer->refclktype;
@@ -309,14 +311,13 @@ refclock_transmit(
* specialized for reference clocks. We do a little less
* protocol here and call the driver-specific transmit routine.
*/
- hpoll = peer->hpoll;
next = peer->outdate;
if (peer->burst == 0) {
u_char oreach;
#ifdef DEBUG
if (debug)
printf("refclock_transmit: at %ld %s\n",
- current_time, ntoa(&(peer->srcadr)));
+ current_time, stoa(&(peer->srcadr)));
#endif
/*
@@ -329,17 +330,13 @@ refclock_transmit(
if (oreach) {
report_event(EVNT_UNREACH, peer);
peer->timereachable = current_time;
- peer_clear(peer);
+ peer_clear(peer, "NONE");
}
} else {
if (!(oreach & 0x03)) {
clock_filter(peer, 0., 0., MAXDISPERSE);
clock_select();
}
- if (!(oreach & 0x0f)) {
- hpoll--;
- } else if ((oreach & 0x0f) == 0x0f)
- hpoll++;
if (peer->flags & FLAG_BURST)
peer->burst = NSTAGE;
}
@@ -351,7 +348,7 @@ refclock_transmit(
peer->outdate = next;
if (peer->burst > 0)
peer->burst--;
- poll_update(peer, hpoll);
+ poll_update(peer, 0);
}
@@ -399,18 +396,19 @@ refclock_cmpl_fp(
*/
void
refclock_process_offset(
- struct refclockproc *pp,
- l_fp offset,
- l_fp lastrec,
+ struct refclockproc *pp, /* refclock structure pointer */
+ l_fp lasttim, /* last timecode timestamp */
+ l_fp lastrec, /* last receive timestamp */
double fudge
)
{
+ l_fp lftemp;
double doffset;
- pp->lastref = offset;
pp->lastrec = lastrec;
- L_SUB(&offset, &lastrec);
- LFPTOD(&offset, doffset);
+ lftemp = lasttim;
+ L_SUB(&lftemp, &lastrec);
+ LFPTOD(&lftemp, doffset);
SAMPLE(doffset + fudge);
}
@@ -425,10 +423,10 @@ refclock_process_offset(
*/
int
refclock_process(
- struct refclockproc *pp
+ struct refclockproc *pp /* refclock structure pointer */
)
{
- l_fp offset;
+ l_fp offset, ltemp;
/*
* Compute the timecode timestamp from the days, hours, minutes,
@@ -441,11 +439,9 @@ refclock_process(
if (!clocktime(pp->day, pp->hour, pp->minute, pp->second, GMT,
pp->lastrec.l_ui, &pp->yearstart, &offset.l_ui))
return (0);
- if (pp->usec) {
- TVUTOTSF(pp->usec, offset.l_uf);
- } else {
- MSUTOTSF(pp->msec, offset.l_uf);
- }
+ offset.l_uf = 0;
+ DTOLFP(pp->nsec / 1e9, &ltemp);
+ L_ADD(&offset, &ltemp);
refclock_process_offset(pp, offset, pp->lastrec,
pp->fudgetime1);
return (1);
@@ -463,7 +459,7 @@ refclock_process(
*/
static int
refclock_sample(
- struct refclockproc *pp
+ struct refclockproc *pp /* refclock structure pointer */
)
{
int i, j, k, m, n;
@@ -474,11 +470,14 @@ refclock_sample(
* Copy the raw offsets and sort into ascending order. Don't do
* anything if the buffer is empty.
*/
- if (pp->codeproc == pp->coderecv)
- return (0);
n = 0;
- while (pp->codeproc != pp->coderecv)
- off[n++] = pp->filter[pp->codeproc++ % MAXSTAGE];
+ while (pp->codeproc != pp->coderecv) {
+ pp->codeproc = (pp->codeproc + 1) % MAXSTAGE;
+ off[n] = pp->filter[pp->codeproc];
+ n++;
+ }
+ if (n == 0)
+ return (0);
if (n > 1)
qsort((char *)off, (size_t)n, sizeof(double), refclock_cmpl_fp);
@@ -536,7 +535,7 @@ refclock_receive(
#ifdef DEBUG
if (debug)
printf("refclock_receive: at %lu %s\n",
- current_time, ntoa(&peer->srcadr));
+ current_time, stoa(&peer->srcadr));
#endif
/*
@@ -556,8 +555,9 @@ refclock_receive(
if (!peer->reach)
report_event(EVNT_REACH, peer);
peer->reach |= 1;
- peer->reftime = peer->org = pp->lastrec;
- peer->rootdispersion = pp->disp + SQRT(pp->jitter);
+ peer->reftime = pp->lastref;
+ peer->org = pp->lastrec;
+ peer->rootdispersion = pp->disp;
get_systime(&peer->rec);
if (!refclock_sample(pp))
return;
@@ -608,7 +608,7 @@ refclock_gtlin(
* timestamp by noting its value is earlier than the buffer
* timestamp, but not more than one second earlier.
*/
- dpt = (char *)&rbufp->recv_space;
+ dpt = (char *)rbufp->recv_buffer;
dpend = dpt + rbufp->recv_length;
trtmp = rbufp->recv_time;
@@ -641,7 +641,7 @@ refclock_gtlin(
if (dpend - dpt > bmax - 1)
dpend = dpt + bmax - 1;
for (dp = lineptr; dpt < dpend; dpt++) {
- c = *dpt & 0x7f;
+ c = (char) (*dpt & 0x7f);
if (c >= ' ')
*dp++ = c;
}
@@ -649,9 +649,14 @@ refclock_gtlin(
if (i > 0)
*dp = '\0';
#ifdef DEBUG
- if (debug > 1 && i > 0)
- printf("refclock_gtlin: fd %d time %s timecode %d %s\n",
- rbufp->fd, ulfptoa(&trtmp, 6), i, lineptr);
+ if (debug > 1) {
+ if (i > 0)
+ printf("refclock_gtlin: fd %d time %s timecode %d %s\n",
+ rbufp->fd, ulfptoa(&trtmp, 6), i, lineptr);
+ else
+ printf("refclock_gtlin: fd %d time %s\n",
+ rbufp->fd, ulfptoa(&trtmp, 6));
+ }
#endif
*tsptr = trtmp;
return (i);
@@ -961,7 +966,7 @@ refclock_ioctl(
*/
void
refclock_control(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct refclockstat *in,
struct refclockstat *out
)
@@ -974,13 +979,16 @@ refclock_control(
/*
* Check for valid address and running peer
*/
+ if (srcadr->ss_family != AF_INET)
+ return;
if (!ISREFCLOCKADR(srcadr))
return;
clktype = (u_char)REFCLOCKTYPE(srcadr);
unit = REFCLOCKUNIT(srcadr);
if (clktype >= num_refclock_conf || unit >= MAXUNIT)
return;
- if (!(peer = typeunit[clktype][unit]))
+ peer = typeunit[clktype][unit];
+ if (peer == NULL)
return;
if (peer->procptr == NULL)
return;
@@ -995,13 +1003,16 @@ refclock_control(
if (in->haveflags & CLK_HAVETIME2)
pp->fudgetime2 = in->fudgetime2;
if (in->haveflags & CLK_HAVEVAL1)
- peer->stratum = (u_char) in->fudgeval1;
+ pp->stratum = (u_char) in->fudgeval1;
if (in->haveflags & CLK_HAVEVAL2)
pp->refid = in->fudgeval2;
- if (peer->stratum <= 1)
+ peer->stratum = pp->stratum;
+ if (peer->stratum == STRATUM_REFCLOCK || peer->stratum ==
+ STRATUM_UNSPEC)
peer->refid = pp->refid;
else
- peer->refid = peer->srcadr.sin_addr.s_addr;
+ peer->refid = ((struct
+ sockaddr_in*)&peer->srcadr)->sin_addr.s_addr;
if (in->haveflags & CLK_HAVEFLAG1) {
pp->sloppyclockflag &= ~CLK_FLAG1;
pp->sloppyclockflag |= in->flags & CLK_FLAG1;
@@ -1028,7 +1039,7 @@ refclock_control(
CLK_HAVEVAL2 | CLK_HAVEFLAG4;
out->fudgetime1 = pp->fudgetime1;
out->fudgetime2 = pp->fudgetime2;
- out->fudgeval1 = peer->stratum;
+ out->fudgeval1 = pp->stratum;
out->fudgeval2 = pp->refid;
out->flags = (u_char) pp->sloppyclockflag;
@@ -1063,7 +1074,7 @@ refclock_control(
*/
void
refclock_buginfo(
- struct sockaddr_in *srcadr, /* clock address */
+ struct sockaddr_storage *srcadr, /* clock address */
struct refclockbug *bug /* output structure */
)
{
@@ -1076,13 +1087,16 @@ refclock_buginfo(
/*
* Check for valid address and peer structure
*/
+ if (srcadr->ss_family != AF_INET)
+ return;
if (!ISREFCLOCKADR(srcadr))
return;
clktype = (u_char) REFCLOCKTYPE(srcadr);
unit = REFCLOCKUNIT(srcadr);
if (clktype >= num_refclock_conf || unit >= MAXUNIT)
return;
- if (!(peer = typeunit[clktype][unit]))
+ peer = typeunit[clktype][unit];
+ if (peer == NULL)
return;
pp = peer->procptr;
@@ -1096,7 +1110,7 @@ refclock_buginfo(
bug->values[2] = pp->hour;
bug->values[3] = pp->minute;
bug->values[4] = pp->second;
- bug->values[5] = pp->msec;
+ bug->values[5] = pp->nsec;
bug->values[6] = pp->yearstart;
bug->values[7] = pp->coderecv;
bug->stimes = 0xfffffffc;
diff --git a/contrib/ntp/ntpd/ntp_request.c b/contrib/ntp/ntpd/ntp_request.c
index 260b48b1e7fe..eacba283f492 100644
--- a/contrib/ntp/ntpd/ntp_request.c
+++ b/contrib/ntp/ntpd/ntp_request.c
@@ -1,6 +1,7 @@
/*
* ntp_request.c - respond to information requests
*/
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -14,6 +15,7 @@
#include "ntp_stdlib.h"
#include <stdio.h>
+#include <stddef.h>
#include <signal.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -31,12 +33,21 @@
#define AUTH 1
#define NO_REQUEST (-1)
+/*
+ * Because we now have v6 addresses in the messages, we need to compensate
+ * for the larger size. Therefore, we introduce the alternate size to
+ * keep us friendly with older implementations. A little ugly.
+ */
+static int client_v6_capable = 0; /* the client can handle longer messages */
+
+#define v6sizeof(type) (client_v6_capable ? sizeof(type) : v4sizeof(type))
struct req_proc {
short request_code; /* defined request code */
short needs_auth; /* true when authentication needed */
- short sizeofitem; /* size of request data item */
- void (*handler) P((struct sockaddr_in *, struct interface *,
+ short sizeofitem; /* size of request data item (older size)*/
+ short v6_sizeofitem; /* size of request data item (new size)*/
+ void (*handler) P((struct sockaddr_storage *, struct interface *,
struct req_pkt *)); /* routine to handle request */
};
@@ -47,105 +58,120 @@ static struct req_proc univ_codes[] = {
{ NO_REQUEST, NOAUTH, 0, 0 }
};
-static void req_ack P((struct sockaddr_in *, struct interface *, struct req_pkt *, int));
-static char * prepare_pkt P((struct sockaddr_in *, struct interface *, struct req_pkt *, u_int));
+static void req_ack P((struct sockaddr_storage *, struct interface *, struct req_pkt *, int));
+static char * prepare_pkt P((struct sockaddr_storage *, struct interface *, struct req_pkt *, u_int));
static char * more_pkt P((void));
static void flush_pkt P((void));
-static void peer_list P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void peer_list_sum P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void peer_info P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void peer_stats P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void sys_info P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void sys_stats P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void mem_stats P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void io_stats P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void timer_stats P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void loop_info P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void dns_a P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void do_conf P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void do_unconf P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void set_sys_flag P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void clr_sys_flag P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void setclr_flags P((struct sockaddr_in *, struct interface *, struct req_pkt *, u_long));
-static void list_restrict P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void do_resaddflags P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void do_ressubflags P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void do_unrestrict P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void do_restrict P((struct sockaddr_in *, struct interface *, struct req_pkt *, int));
-static void mon_getlist_0 P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void mon_getlist_1 P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void reset_stats P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void reset_peer P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void do_key_reread P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void trust_key P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void untrust_key P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void do_trustkey P((struct sockaddr_in *, struct interface *, struct req_pkt *, u_long));
-static void get_auth_info P((struct sockaddr_in *, struct interface *, struct req_pkt *));
+static void peer_list P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void peer_list_sum P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void peer_info P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void peer_stats P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void sys_info P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void sys_stats P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void mem_stats P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void io_stats P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void timer_stats P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void loop_info P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void do_conf P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void do_unconf P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void set_sys_flag P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void clr_sys_flag P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void setclr_flags P((struct sockaddr_storage *, struct interface *, struct req_pkt *, u_long));
+static void list_restrict P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void do_resaddflags P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void do_ressubflags P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void do_unrestrict P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void do_restrict P((struct sockaddr_storage *, struct interface *, struct req_pkt *, int));
+static void mon_getlist_0 P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void mon_getlist_1 P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void reset_stats P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void reset_peer P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void do_key_reread P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void trust_key P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void untrust_key P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void do_trustkey P((struct sockaddr_storage *, struct interface *, struct req_pkt *, u_long));
+static void get_auth_info P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
static void reset_auth_stats P((void));
-static void req_get_traps P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void req_set_trap P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void req_clr_trap P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void do_setclr_trap P((struct sockaddr_in *, struct interface *, struct req_pkt *, int));
-static void set_request_keyid P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void set_control_keyid P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void get_ctl_stats P((struct sockaddr_in *, struct interface *, struct req_pkt *));
+static void req_get_traps P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void req_set_trap P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void req_clr_trap P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void do_setclr_trap P((struct sockaddr_storage *, struct interface *, struct req_pkt *, int));
+static void set_request_keyid P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void set_control_keyid P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void get_ctl_stats P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
#ifdef KERNEL_PLL
-static void get_kernel_info P((struct sockaddr_in *, struct interface *, struct req_pkt *));
+static void get_kernel_info P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
#endif /* KERNEL_PLL */
#ifdef REFCLOCK
-static void get_clock_info P((struct sockaddr_in *, struct interface *, struct req_pkt *));
-static void set_clock_fudge P((struct sockaddr_in *, struct interface *, struct req_pkt *));
+static void get_clock_info P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
+static void set_clock_fudge P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
#endif /* REFCLOCK */
#ifdef REFCLOCK
-static void get_clkbug_info P((struct sockaddr_in *, struct interface *, struct req_pkt *));
+static void get_clkbug_info P((struct sockaddr_storage *, struct interface *, struct req_pkt *));
#endif /* REFCLOCK */
/*
* ntpd request codes
*/
static struct req_proc ntp_codes[] = {
- { REQ_PEER_LIST, NOAUTH, 0, peer_list },
- { REQ_PEER_LIST_SUM, NOAUTH, 0, peer_list_sum },
- { REQ_PEER_INFO, NOAUTH, sizeof(struct info_peer_list), peer_info },
- { REQ_PEER_STATS, NOAUTH, sizeof(struct info_peer_list), peer_stats },
- { REQ_SYS_INFO, NOAUTH, 0, sys_info },
- { REQ_SYS_STATS, NOAUTH, 0, sys_stats },
- { REQ_IO_STATS, NOAUTH, 0, io_stats },
- { REQ_MEM_STATS, NOAUTH, 0, mem_stats },
- { REQ_LOOP_INFO, NOAUTH, 0, loop_info },
- { REQ_TIMER_STATS, NOAUTH, 0, timer_stats },
- { REQ_HOSTNAME_ASSOCID, AUTH, sizeof(struct info_dns_assoc), dns_a },
- { REQ_CONFIG, AUTH, sizeof(struct conf_peer), do_conf },
- { REQ_UNCONFIG, AUTH, sizeof(struct conf_unpeer), do_unconf },
- { REQ_SET_SYS_FLAG, AUTH, sizeof(struct conf_sys_flags), set_sys_flag },
- { REQ_CLR_SYS_FLAG, AUTH, sizeof(struct conf_sys_flags), clr_sys_flag },
- { REQ_GET_RESTRICT, NOAUTH, 0, list_restrict },
- { REQ_RESADDFLAGS, AUTH, sizeof(struct conf_restrict), do_resaddflags },
- { REQ_RESSUBFLAGS, AUTH, sizeof(struct conf_restrict), do_ressubflags },
- { REQ_UNRESTRICT, AUTH, sizeof(struct conf_restrict), do_unrestrict },
- { REQ_MON_GETLIST, NOAUTH, 0, mon_getlist_0 },
- { REQ_MON_GETLIST_1, NOAUTH, 0, mon_getlist_1 },
- { REQ_RESET_STATS, AUTH, sizeof(struct reset_flags), reset_stats },
- { REQ_RESET_PEER, AUTH, sizeof(struct conf_unpeer), reset_peer },
- { REQ_REREAD_KEYS, AUTH, 0, do_key_reread },
- { REQ_TRUSTKEY, AUTH, sizeof(u_long), trust_key },
- { REQ_UNTRUSTKEY, AUTH, sizeof(u_long), untrust_key },
- { REQ_AUTHINFO, NOAUTH, 0, get_auth_info },
- { REQ_TRAPS, NOAUTH, 0, req_get_traps },
- { REQ_ADD_TRAP, AUTH, sizeof(struct conf_trap), req_set_trap },
- { REQ_CLR_TRAP, AUTH, sizeof(struct conf_trap), req_clr_trap },
- { REQ_REQUEST_KEY, AUTH, sizeof(u_long), set_request_keyid },
- { REQ_CONTROL_KEY, AUTH, sizeof(u_long), set_control_keyid },
- { REQ_GET_CTLSTATS, NOAUTH, 0, get_ctl_stats },
+ { REQ_PEER_LIST, NOAUTH, 0, 0, peer_list },
+ { REQ_PEER_LIST_SUM, NOAUTH, 0, 0, peer_list_sum },
+ { REQ_PEER_INFO, NOAUTH, v4sizeof(struct info_peer_list),
+ sizeof(struct info_peer_list), peer_info},
+ { REQ_PEER_STATS, NOAUTH, v4sizeof(struct info_peer_list),
+ sizeof(struct info_peer_list), peer_stats},
+ { REQ_SYS_INFO, NOAUTH, 0, 0, sys_info },
+ { REQ_SYS_STATS, NOAUTH, 0, 0, sys_stats },
+ { REQ_IO_STATS, NOAUTH, 0, 0, io_stats },
+ { REQ_MEM_STATS, NOAUTH, 0, 0, mem_stats },
+ { REQ_LOOP_INFO, NOAUTH, 0, 0, loop_info },
+ { REQ_TIMER_STATS, NOAUTH, 0, 0, timer_stats },
+ { REQ_CONFIG, AUTH, v4sizeof(struct conf_peer),
+ sizeof(struct conf_peer), do_conf },
+ { REQ_UNCONFIG, AUTH, v4sizeof(struct conf_unpeer),
+ sizeof(struct conf_unpeer), do_unconf },
+ { REQ_SET_SYS_FLAG, AUTH, sizeof(struct conf_sys_flags),
+ sizeof(struct conf_sys_flags), set_sys_flag },
+ { REQ_CLR_SYS_FLAG, AUTH, sizeof(struct conf_sys_flags),
+ sizeof(struct conf_sys_flags), clr_sys_flag },
+ { REQ_GET_RESTRICT, NOAUTH, 0, 0, list_restrict },
+ { REQ_RESADDFLAGS, AUTH, v4sizeof(struct conf_restrict),
+ sizeof(struct conf_restrict), do_resaddflags },
+ { REQ_RESSUBFLAGS, AUTH, v4sizeof(struct conf_restrict),
+ sizeof(struct conf_restrict), do_ressubflags },
+ { REQ_UNRESTRICT, AUTH, v4sizeof(struct conf_restrict),
+ sizeof(struct conf_restrict), do_unrestrict },
+ { REQ_MON_GETLIST, NOAUTH, 0, 0, mon_getlist_0 },
+ { REQ_MON_GETLIST_1, NOAUTH, 0, 0, mon_getlist_1 },
+ { REQ_RESET_STATS, AUTH, sizeof(struct reset_flags), 0, reset_stats },
+ { REQ_RESET_PEER, AUTH, v4sizeof(struct conf_unpeer),
+ sizeof(struct conf_unpeer), reset_peer },
+ { REQ_REREAD_KEYS, AUTH, 0, 0, do_key_reread },
+ { REQ_TRUSTKEY, AUTH, sizeof(u_long), sizeof(u_long), trust_key },
+ { REQ_UNTRUSTKEY, AUTH, sizeof(u_long), sizeof(u_long), untrust_key },
+ { REQ_AUTHINFO, NOAUTH, 0, 0, get_auth_info },
+ { REQ_TRAPS, NOAUTH, 0, 0, req_get_traps },
+ { REQ_ADD_TRAP, AUTH, v4sizeof(struct conf_trap),
+ sizeof(struct conf_trap), req_set_trap },
+ { REQ_CLR_TRAP, AUTH, v4sizeof(struct conf_trap),
+ sizeof(struct conf_trap), req_clr_trap },
+ { REQ_REQUEST_KEY, AUTH, sizeof(u_long), sizeof(u_long),
+ set_request_keyid },
+ { REQ_CONTROL_KEY, AUTH, sizeof(u_long), sizeof(u_long),
+ set_control_keyid },
+ { REQ_GET_CTLSTATS, NOAUTH, 0, 0, get_ctl_stats },
#ifdef KERNEL_PLL
- { REQ_GET_KERNEL, NOAUTH, 0, get_kernel_info },
+ { REQ_GET_KERNEL, NOAUTH, 0, 0, get_kernel_info },
#endif
#ifdef REFCLOCK
- { REQ_GET_CLOCKINFO, NOAUTH, sizeof(u_int32), get_clock_info },
- { REQ_SET_CLKFUDGE, AUTH, sizeof(struct conf_fudge), set_clock_fudge },
- { REQ_GET_CLKBUGINFO, NOAUTH, sizeof(u_int32), get_clkbug_info },
+ { REQ_GET_CLOCKINFO, NOAUTH, sizeof(u_int32), sizeof(u_int32),
+ get_clock_info },
+ { REQ_SET_CLKFUDGE, AUTH, sizeof(struct conf_fudge),
+ sizeof(struct conf_fudge), set_clock_fudge },
+ { REQ_GET_CLKBUGINFO, NOAUTH, sizeof(u_int32), sizeof(u_int32),
+ get_clkbug_info },
#endif
- { NO_REQUEST, NOAUTH, 0, 0 }
+ { NO_REQUEST, NOAUTH, 0, 0, 0 }
};
@@ -185,7 +211,7 @@ static int itemsize;
static int databytes;
static char exbuf[RESP_DATA_SIZE];
static int usingexbuf;
-static struct sockaddr_in *toaddr;
+static struct sockaddr_storage *toaddr;
static struct interface *frominter;
/*
@@ -211,7 +237,7 @@ init_request (void)
*/
static void
req_ack(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt,
int errcode
@@ -241,7 +267,7 @@ req_ack(
*/
static char *
prepare_pkt(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *pkt,
u_int structsize
@@ -253,7 +279,7 @@ prepare_pkt(
#endif
/*
- * Fill in the implementation, reqest and itemsize fields
+ * Fill in the implementation, request and itemsize fields
* since these won't change.
*/
rpkt.implementation = pkt->implementation;
@@ -380,10 +406,11 @@ process_private(
{
struct req_pkt *inpkt;
struct req_pkt_tail *tailinpkt;
- struct sockaddr_in *srcadr;
+ struct sockaddr_storage *srcadr;
struct interface *inter;
struct req_proc *proc;
int ec;
+ short temp_size;
/*
* Initialize pointers, for convenience
@@ -410,10 +437,9 @@ process_private(
|| (++ec, INFO_SEQ(inpkt->auth_seq) != 0)
|| (++ec, INFO_ERR(inpkt->err_nitems) != 0)
|| (++ec, INFO_MBZ(inpkt->mbz_itemsize) != 0)
- || (++ec, rbufp->recv_length > REQ_LEN_MAC)
|| (++ec, rbufp->recv_length < REQ_LEN_HDR)
) {
- msyslog(LOG_ERR, "process_private: INFO_ERR_FMT: test %d failed", ec);
+ msyslog(LOG_ERR, "process_private: INFO_ERR_FMT: test %d failed, pkt from %s", ec, stoa(srcadr));
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
return;
}
@@ -425,7 +451,8 @@ process_private(
*/
if (inpkt->implementation == IMPL_UNIV)
proc = univ_codes;
- else if (inpkt->implementation == IMPL_XNTPD)
+ else if ((inpkt->implementation == IMPL_XNTPD) ||
+ (inpkt->implementation == IMPL_XNTPD_OLD))
proc = ntp_codes;
else {
req_ack(srcadr, inter, inpkt, INFO_ERR_IMPL);
@@ -452,6 +479,50 @@ process_private(
#endif
/*
+ * If we need data, check to see if we have some. If we
+ * don't, check to see that there is none (picky, picky).
+ */
+
+ /* This part is a bit tricky, we want to be sure that the size
+ * returned is either the old or the new size. We also can find
+ * out if the client can accept both types of messages this way.
+ *
+ * Handle the exception of REQ_CONFIG. It can have two data sizes.
+ */
+ temp_size = INFO_ITEMSIZE(inpkt->mbz_itemsize);
+ if ((temp_size != proc->sizeofitem &&
+ temp_size != proc->v6_sizeofitem) &&
+ !(inpkt->implementation == IMPL_XNTPD &&
+ inpkt->request == REQ_CONFIG &&
+ temp_size == sizeof(struct old_conf_peer))) {
+ if (debug > 2)
+ printf("process_private: wrong item size, received %d, should be %d or %d\n",
+ temp_size, proc->sizeofitem, proc->v6_sizeofitem);
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ return;
+ }
+ if ((proc->sizeofitem != 0) &&
+ ((temp_size * INFO_NITEMS(inpkt->err_nitems)) >
+ (rbufp->recv_length - REQ_LEN_HDR))) {
+ if (debug > 2)
+ printf("process_private: not enough data\n");
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ return;
+ }
+
+ switch (inpkt->implementation) {
+ case IMPL_XNTPD:
+ client_v6_capable = 1;
+ break;
+ case IMPL_XNTPD_OLD:
+ client_v6_capable = 0;
+ break;
+ default:
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ return;
+ }
+
+ /*
* If we need to authenticate, do so. Note that an
* authenticatable packet must include a mac field, must
* have used key info_auth_keyid and must have included
@@ -463,10 +534,10 @@ process_private(
l_fp ftmp;
double dtemp;
- if (rbufp->recv_length < (REQ_LEN_HDR +
+ if (rbufp->recv_length < (int)((REQ_LEN_HDR +
(INFO_ITEMSIZE(inpkt->mbz_itemsize) *
INFO_NITEMS(inpkt->err_nitems))
- + sizeof(struct req_pkt_tail))) {
+ + sizeof(struct req_pkt_tail)))) {
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
}
tailinpkt = (struct req_pkt_tail *)((char *)&rbufp->recv_pkt +
@@ -481,9 +552,14 @@ process_private(
#ifdef DEBUG
if (debug > 4)
printf("failed auth %d info_auth_keyid %lu pkt keyid %lu\n",
- INFO_IS_AUTH(inpkt->auth_seq),
- (u_long)info_auth_keyid,
- (u_long)ntohl(tailinpkt->keyid));
+ INFO_IS_AUTH(inpkt->auth_seq),
+ (u_long)info_auth_keyid,
+ (u_long)ntohl(tailinpkt->keyid));
+ msyslog(LOG_DEBUG,
+ "process_private: failed auth %d info_auth_keyid %lu pkt keyid %lu\n",
+ INFO_IS_AUTH(inpkt->auth_seq),
+ (u_long)info_auth_keyid,
+ (u_long)ntohl(tailinpkt->keyid));
#endif
req_ack(srcadr, inter, inpkt, INFO_ERR_AUTH);
return;
@@ -494,8 +570,8 @@ process_private(
printf("bad pkt length %d\n",
rbufp->recv_length);
#endif
- msyslog(LOG_ERR, "process_private: bad pkt length %d",
- rbufp->recv_length);
+ msyslog(LOG_ERR, "process_private: bad pkt length %d",
+ rbufp->recv_length);
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
return;
}
@@ -503,6 +579,9 @@ process_private(
#ifdef DEBUG
if (debug > 4)
printf("failed auth mod_okay %d\n", mod_okay);
+ msyslog(LOG_DEBUG,
+ "process_private: failed auth mod_okay %d\n",
+ mod_okay);
#endif
req_ack(srcadr, inter, inpkt, INFO_ERR_AUTH);
return;
@@ -519,6 +598,10 @@ process_private(
/*
* He's a loser. Tell him.
*/
+#ifdef DEBUG
+ if (debug > 4)
+ printf("xmit/rcv timestamp delta > INFO_TS_MAXSKEW\n");
+#endif
req_ack(srcadr, inter, inpkt, INFO_ERR_AUTH);
return;
}
@@ -529,36 +612,15 @@ process_private(
if (!authdecrypt(info_auth_keyid, (u_int32 *)inpkt,
rbufp->recv_length - sizeof(struct req_pkt_tail) +
REQ_LEN_HDR, sizeof(struct req_pkt_tail) - REQ_LEN_HDR)) {
+#ifdef DEBUG
+ if (debug > 4)
+ printf("authdecrypt failed\n");
+#endif
req_ack(srcadr, inter, inpkt, INFO_ERR_AUTH);
return;
}
}
- /*
- * If we need data, check to see if we have some. If we
- * don't, check to see that there is none (picky, picky).
- *
- * Handle the exception of REQ_CONFIG. It can have two data sizes.
- */
- if (INFO_ITEMSIZE(inpkt->mbz_itemsize) != proc->sizeofitem &&
- !(inpkt->implementation == IMPL_XNTPD &&
- inpkt->request == REQ_CONFIG &&
- INFO_ITEMSIZE(inpkt->mbz_itemsize) == sizeof(struct old_conf_peer))) {
- msyslog(LOG_ERR, "INFO_ITEMSIZE(inpkt->mbz_itemsize) != proc->sizeofitem: %d != %d",
- INFO_ITEMSIZE(inpkt->mbz_itemsize), proc->sizeofitem);
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
- if (proc->sizeofitem != 0)
- if (proc->sizeofitem*INFO_NITEMS(inpkt->err_nitems)
- > sizeof(inpkt->data)) {
- msyslog(LOG_ERR, "sizeofitem(%d)*NITEMS(%d) > data: %d > %ld",
- proc->sizeofitem, INFO_NITEMS(inpkt->err_nitems),
- proc->sizeofitem*INFO_NITEMS(inpkt->err_nitems),
- (long)sizeof(inpkt->data));
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
#ifdef DEBUG
if (debug > 3)
printf("process_private: all okay, into handler\n");
@@ -576,7 +638,7 @@ process_private(
*/
static void
peer_list(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -584,26 +646,44 @@ peer_list(
register struct info_peer_list *ip;
register struct peer *pp;
register int i;
+ register int skip = 0;
ip = (struct info_peer_list *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_peer_list));
+ v6sizeof(struct info_peer_list));
for (i = 0; i < HASH_SIZE && ip != 0; i++) {
pp = peer_hash[i];
while (pp != 0 && ip != 0) {
- ip->address = pp->srcadr.sin_addr.s_addr;
- ip->port = pp->srcadr.sin_port;
- ip->hmode = pp->hmode;
- ip->flags = 0;
- if (pp->flags & FLAG_CONFIG)
- ip->flags |= INFO_FLAG_CONFIG;
- if (pp == sys_peer)
- ip->flags |= INFO_FLAG_SYSPEER;
- if (pp->status == CTL_PST_SEL_SYNCCAND)
- ip->flags |= INFO_FLAG_SEL_CANDIDATE;
- if (pp->status >= CTL_PST_SEL_SYSPEER)
- ip->flags |= INFO_FLAG_SHORTLIST;
- ip = (struct info_peer_list *)more_pkt();
- pp = pp->next;
+ if (pp->srcadr.ss_family == AF_INET6) {
+ if (client_v6_capable) {
+ ip->addr6 = GET_INADDR6(pp->srcadr);
+ ip->v6_flag = 1;
+ skip = 0;
+ } else {
+ skip = 1;
+ break;
+ }
+ } else {
+ ip->addr = GET_INADDR(pp->srcadr);
+ if (client_v6_capable)
+ ip->v6_flag = 0;
+ skip = 0;
+ }
+
+ if(!skip) {
+ ip->port = NSRCPORT(&pp->srcadr);
+ ip->hmode = pp->hmode;
+ ip->flags = 0;
+ if (pp->flags & FLAG_CONFIG)
+ ip->flags |= INFO_FLAG_CONFIG;
+ if (pp == sys_peer)
+ ip->flags |= INFO_FLAG_SYSPEER;
+ if (pp->status == CTL_PST_SEL_SYNCCAND)
+ ip->flags |= INFO_FLAG_SEL_CANDIDATE;
+ if (pp->status >= CTL_PST_SEL_SYSPEER)
+ ip->flags |= INFO_FLAG_SHORTLIST;
+ ip = (struct info_peer_list *)more_pkt();
+ }
+ pp = pp->next;
}
}
flush_pkt();
@@ -615,7 +695,7 @@ peer_list(
*/
static void
peer_list_sum(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -624,14 +704,14 @@ peer_list_sum(
register struct peer *pp;
register int i;
l_fp ltmp;
+ register int skip;
#ifdef DEBUG
if (debug > 2)
printf("wants peer list summary\n");
#endif
-
ips = (struct info_peer_summary *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_peer_summary));
+ v6sizeof(struct info_peer_summary));
for (i = 0; i < HASH_SIZE && ips != 0; i++) {
pp = peer_hash[i];
while (pp != 0 && ips != 0) {
@@ -639,46 +719,66 @@ peer_list_sum(
if (debug > 3)
printf("sum: got one\n");
#endif
- ips->dstadr =
- (pp->processed)
- ? pp->cast_flags == MDF_BCAST
- ? pp->dstadr->bcast.sin_addr.s_addr
- : pp->cast_flags
- ? pp->dstadr->sin.sin_addr.s_addr
- ? pp->dstadr->sin.sin_addr.s_addr
- : pp->dstadr->bcast.sin_addr.s_addr
- : 1
- : 5;
- ips->srcadr = pp->srcadr.sin_addr.s_addr;
- ips->srcport = pp->srcadr.sin_port;
- ips->stratum = pp->stratum;
- ips->hpoll = pp->hpoll;
- ips->ppoll = pp->ppoll;
- ips->reach = pp->reach;
- ips->flags = 0;
- if (pp == sys_peer)
- ips->flags |= INFO_FLAG_SYSPEER;
- if (pp->flags & FLAG_CONFIG)
- ips->flags |= INFO_FLAG_CONFIG;
- if (pp->flags & FLAG_REFCLOCK)
- ips->flags |= INFO_FLAG_REFCLOCK;
- if (pp->flags & FLAG_AUTHENABLE)
- ips->flags |= INFO_FLAG_AUTHENABLE;
- if (pp->flags & FLAG_PREFER)
- ips->flags |= INFO_FLAG_PREFER;
- if (pp->flags & FLAG_BURST)
- ips->flags |= INFO_FLAG_BURST;
- if (pp->status == CTL_PST_SEL_SYNCCAND)
- ips->flags |= INFO_FLAG_SEL_CANDIDATE;
- if (pp->status >= CTL_PST_SEL_SYSPEER)
- ips->flags |= INFO_FLAG_SHORTLIST;
- ips->hmode = pp->hmode;
- ips->delay = HTONS_FP(DTOFP(pp->delay));
- DTOLFP(pp->offset, &ltmp);
- HTONL_FP(&ltmp, &ips->offset);
- ips->dispersion = HTONS_FP(DTOUFP(pp->disp));
-
- pp = pp->next;
+ /*
+ * Be careful here not to return v6 peers when we
+ * want only v4.
+ */
+ if (pp->srcadr.ss_family == AF_INET6) {
+ if (client_v6_capable) {
+ ips->srcadr6 = GET_INADDR6(pp->srcadr);
+ ips->v6_flag = 1;
+ ips->dstadr6 = GET_INADDR6(pp->dstadr->sin);
+ skip = 0;
+ } else {
+ skip = 1;
+ break;
+ }
+ } else {
+ ips->srcadr = GET_INADDR(pp->srcadr);
+ if (client_v6_capable)
+ ips->v6_flag = 0;
+/* XXX PDM This code is buggy. Need to replace with a straightforward assignment */
+ ips->dstadr = (pp->processed) ?
+ pp->cast_flags == MDF_BCAST ?
+ GET_INADDR(pp->dstadr->bcast):
+ pp->cast_flags ?
+ GET_INADDR(pp->dstadr->sin) ?
+ GET_INADDR(pp->dstadr->sin):
+ GET_INADDR(pp->dstadr->bcast):
+ 1 : GET_INADDR(pp->dstadr->sin);
+
+ skip = 0;
+ }
+ if (!skip){
+ ips->srcport = NSRCPORT(&pp->srcadr);
+ ips->stratum = pp->stratum;
+ ips->hpoll = pp->hpoll;
+ ips->ppoll = pp->ppoll;
+ ips->reach = pp->reach;
+ ips->flags = 0;
+ if (pp == sys_peer)
+ ips->flags |= INFO_FLAG_SYSPEER;
+ if (pp->flags & FLAG_CONFIG)
+ ips->flags |= INFO_FLAG_CONFIG;
+ if (pp->flags & FLAG_REFCLOCK)
+ ips->flags |= INFO_FLAG_REFCLOCK;
+ if (pp->flags & FLAG_AUTHENABLE)
+ ips->flags |= INFO_FLAG_AUTHENABLE;
+ if (pp->flags & FLAG_PREFER)
+ ips->flags |= INFO_FLAG_PREFER;
+ if (pp->flags & FLAG_BURST)
+ ips->flags |= INFO_FLAG_BURST;
+ if (pp->status == CTL_PST_SEL_SYNCCAND)
+ ips->flags |= INFO_FLAG_SEL_CANDIDATE;
+ if (pp->status >= CTL_PST_SEL_SYSPEER)
+ ips->flags |= INFO_FLAG_SHORTLIST;
+ ips->hmode = pp->hmode;
+ ips->delay = HTONS_FP(DTOFP(pp->delay));
+ DTOLFP(pp->offset, &ltmp);
+ HTONL_FP(&ltmp, &ips->offset);
+ ips->dispersion = HTONS_FP(DTOUFP(pp->disp));
+ }
+ pp = pp->next;
ips = (struct info_peer_summary *)more_pkt();
}
}
@@ -691,7 +791,7 @@ peer_list_sum(
*/
static void
peer_info (
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -701,33 +801,53 @@ peer_info (
register struct info_peer *ip;
register int items;
register int i, j;
- struct sockaddr_in addr;
+ struct sockaddr_storage addr;
extern struct peer *sys_peer;
l_fp ltmp;
memset((char *)&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
items = INFO_NITEMS(inpkt->err_nitems);
ipl = (struct info_peer_list *) inpkt->data;
+
ip = (struct info_peer *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_peer));
+ v6sizeof(struct info_peer));
while (items-- > 0 && ip != 0) {
- addr.sin_port = ipl->port;
- addr.sin_addr.s_addr = ipl->address;
+ memset((char *)&addr, 0, sizeof(addr));
+ NSRCPORT(&addr) = ipl->port;
+ if (client_v6_capable && ipl->v6_flag != 0) {
+ addr.ss_family = AF_INET6;
+ GET_INADDR6(addr) = ipl->addr6;
+ } else {
+ addr.ss_family = AF_INET;
+ GET_INADDR(addr) = ipl->addr;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ addr.ss_len = SOCKLEN(&addr);
+#endif
ipl++;
if ((pp = findexistingpeer(&addr, (struct peer *)0, -1)) == 0)
continue;
- ip->dstadr =
- (pp->processed)
- ? pp->cast_flags == MDF_BCAST
- ? pp->dstadr->bcast.sin_addr.s_addr
- : pp->cast_flags
- ? pp->dstadr->sin.sin_addr.s_addr
- ? pp->dstadr->sin.sin_addr.s_addr
- : pp->dstadr->bcast.sin_addr.s_addr
- : 2
- : 6;
- ip->srcadr = NSRCADR(&pp->srcadr);
+ if (pp->srcadr.ss_family == AF_INET6) {
+ ip->dstadr6 = pp->cast_flags == MDF_BCAST ?
+ GET_INADDR6(pp->dstadr->bcast) :
+ GET_INADDR6(pp->dstadr->sin);
+ ip->srcadr6 = GET_INADDR6(pp->srcadr);
+ ip->v6_flag = 1;
+ } else {
+/* XXX PDM This code is buggy. Need to replace with a straightforward assignment */
+ ip->dstadr = (pp->processed) ?
+ pp->cast_flags == MDF_BCAST ?
+ GET_INADDR(pp->dstadr->bcast):
+ pp->cast_flags ?
+ GET_INADDR(pp->dstadr->sin) ?
+ GET_INADDR(pp->dstadr->sin):
+ GET_INADDR(pp->dstadr->bcast):
+ 2 : GET_INADDR(pp->dstadr->sin);
+
+ ip->srcadr = GET_INADDR(pp->srcadr);
+ if (client_v6_capable)
+ ip->v6_flag = 0;
+ }
ip->srcport = NSRCPORT(&pp->srcadr);
ip->flags = 0;
if (pp == sys_peer)
@@ -755,9 +875,9 @@ peer_info (
ip->precision = pp->precision;
ip->version = pp->version;
ip->reach = pp->reach;
- ip->unreach = pp->unreach;
+ ip->unreach = (u_char) pp->unreach;
ip->flash = (u_char)pp->flash;
- ip->flash2 = pp->flash;
+ ip->flash2 = (u_short) pp->flash;
ip->estbdelay = HTONS_FP(DTOFP(pp->estbdelay));
ip->ttl = pp->ttl;
ip->associd = htons(pp->associd);
@@ -775,8 +895,8 @@ peer_info (
ip->filtdelay[i] = HTONS_FP(DTOFP(pp->filter_delay[j]));
DTOLFP(pp->filter_offset[j], &ltmp);
HTONL_FP(&ltmp, &ip->filtoffset[i]);
- ip->order[i] = (pp->filter_nextpt+NTP_SHIFT-1)
- - pp->filter_order[i];
+ ip->order[i] = (u_char)((pp->filter_nextpt+NTP_SHIFT-1)
+ - pp->filter_order[i]);
if (ip->order[i] >= NTP_SHIFT)
ip->order[i] -= NTP_SHIFT;
}
@@ -796,7 +916,7 @@ peer_info (
*/
static void
peer_stats (
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -805,32 +925,54 @@ peer_stats (
register struct peer *pp;
register struct info_peer_stats *ip;
register int items;
- struct sockaddr_in addr;
+ struct sockaddr_storage addr;
extern struct peer *sys_peer;
- memset((char *)&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
+ printf("peer_stats: called\n");
items = INFO_NITEMS(inpkt->err_nitems);
ipl = (struct info_peer_list *) inpkt->data;
ip = (struct info_peer_stats *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_peer_stats));
+ v6sizeof(struct info_peer_stats));
while (items-- > 0 && ip != 0) {
- addr.sin_port = ipl->port;
- addr.sin_addr.s_addr = ipl->address;
- ipl++;
+ memset((char *)&addr, 0, sizeof(addr));
+ NSRCPORT(&addr) = ipl->port;
+ if (client_v6_capable && ipl->v6_flag) {
+ addr.ss_family = AF_INET6;
+ GET_INADDR6(addr) = ipl->addr6;
+ } else {
+ addr.ss_family = AF_INET;
+ GET_INADDR(addr) = ipl->addr;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ addr.ss_len = SOCKLEN(&addr);
+#endif
+ printf("peer_stats: looking for %s, %d, %d\n", stoa(&addr),
+ ipl->port, ((struct sockaddr_in6 *)&addr)->sin6_port);
+ ipl = (struct info_peer_list *)((char *)ipl +
+ INFO_ITEMSIZE(inpkt->mbz_itemsize));
+
if ((pp = findexistingpeer(&addr, (struct peer *)0, -1)) == 0)
continue;
- ip->dstadr =
- (pp->processed)
- ? pp->cast_flags == MDF_BCAST
- ? pp->dstadr->bcast.sin_addr.s_addr
- : pp->cast_flags
- ? pp->dstadr->sin.sin_addr.s_addr
- ? pp->dstadr->sin.sin_addr.s_addr
- : pp->dstadr->bcast.sin_addr.s_addr
- : 3
- : 7;
- ip->srcadr = NSRCADR(&pp->srcadr);
+ printf("peer_stats: found %s\n", stoa(&addr));
+ if (pp->srcadr.ss_family == AF_INET) {
+ ip->dstadr = (pp->processed) ?
+ pp->cast_flags == MDF_BCAST ?
+ GET_INADDR(pp->dstadr->bcast):
+ pp->cast_flags ?
+ GET_INADDR(pp->dstadr->sin) ?
+ GET_INADDR(pp->dstadr->sin):
+ GET_INADDR(pp->dstadr->bcast):
+ 3 : 7;
+ ip->srcadr = GET_INADDR(pp->srcadr);
+ if (client_v6_capable)
+ ip->v6_flag = 0;
+ } else {
+ ip->dstadr6 = pp->cast_flags == MDF_BCAST ?
+ GET_INADDR6(pp->dstadr->bcast):
+ GET_INADDR6(pp->dstadr->sin);
+ ip->srcadr6 = GET_INADDR6(pp->srcadr);
+ ip->v6_flag = 1;
+ }
ip->srcport = NSRCPORT(&pp->srcadr);
ip->flags = 0;
if (pp == sys_peer)
@@ -871,7 +1013,7 @@ peer_stats (
*/
static void
sys_info(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -897,15 +1039,26 @@ sys_info(
extern double sys_jitter;
is = (struct info_sys *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_sys));
+ v6sizeof(struct info_sys));
if (sys_peer != 0) {
- is->peer = NSRCADR(&sys_peer->srcadr);
+ if (sys_peer->srcadr.ss_family == AF_INET) {
+ is->peer = GET_INADDR(sys_peer->srcadr);
+ if (client_v6_capable)
+ is->v6_flag = 0;
+ } else if (client_v6_capable) {
+ is->peer6 = GET_INADDR6(sys_peer->srcadr);
+ is->v6_flag = 1;
+ }
is->peer_mode = sys_peer->hmode;
} else {
is->peer = 0;
+ if (client_v6_capable) {
+ is->v6_flag = 0;
+ }
is->peer_mode = 0;
}
+
is->leap = sys_leap;
is->stratum = sys_stratum;
is->precision = sys_precision;
@@ -950,7 +1103,7 @@ sys_info(
*/
static void
sys_stats(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -960,22 +1113,11 @@ sys_stats(
/*
* Importations from the protocol module
*/
- extern u_long sys_stattime;
- extern u_long sys_badstratum;
- extern u_long sys_oldversionpkt;
- extern u_long sys_newversionpkt;
- extern u_long sys_unknownversion;
- extern u_long sys_badlength;
- extern u_long sys_processed;
- extern u_long sys_badauth;
- extern u_long sys_limitrejected;
-
ss = (struct info_sys_stats *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_sys_stats));
-
+ sizeof(struct info_sys_stats));
ss->timeup = htonl((u_int32)current_time);
ss->timereset = htonl((u_int32)(current_time - sys_stattime));
- ss->badstratum = htonl((u_int32)sys_badstratum);
+ ss->denied = htonl((u_int32)sys_restricted);
ss->oldversionpkt = htonl((u_int32)sys_oldversionpkt);
ss->newversionpkt = htonl((u_int32)sys_newversionpkt);
ss->unknownversion = htonl((u_int32)sys_unknownversion);
@@ -983,6 +1125,7 @@ sys_stats(
ss->processed = htonl((u_int32)sys_processed);
ss->badauth = htonl((u_int32)sys_badauth);
ss->limitrejected = htonl((u_int32)sys_limitrejected);
+ ss->received = htonl((u_int32)sys_received);
(void) more_pkt();
flush_pkt();
}
@@ -993,7 +1136,7 @@ sys_stats(
*/
static void
mem_stats(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1039,7 +1182,7 @@ mem_stats(
*/
static void
io_stats(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1077,7 +1220,7 @@ io_stats(
*/
static void
timer_stats(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1109,7 +1252,7 @@ timer_stats(
*/
static void
loop_info(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1145,50 +1288,44 @@ loop_info(
*/
static void
do_conf(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
{
- u_int fl;
- struct conf_peer *cp;
- struct old_conf_peer *ocp;
int items;
- struct sockaddr_in peeraddr;
+ u_int fl;
+ struct conf_peer *cp;
+ struct conf_peer temp_cp;
+ struct sockaddr_storage peeraddr;
+ struct sockaddr_in tmp_clock;
/*
* Do a check of everything to see that it looks
* okay. If not, complain about it. Note we are
* very picky here.
*/
- ocp = NULL;
- if (INFO_ITEMSIZE(inpkt->mbz_itemsize) == sizeof(struct old_conf_peer))
- ocp = (struct old_conf_peer *)inpkt->data;
items = INFO_NITEMS(inpkt->err_nitems);
cp = (struct conf_peer *)inpkt->data;
-
+ memset(&temp_cp, 0, sizeof(struct conf_peer));
+ memcpy(&temp_cp, (char *)cp, INFO_ITEMSIZE(inpkt->mbz_itemsize));
fl = 0;
while (items-- > 0 && !fl) {
- if (((cp->version) > NTP_VERSION)
- || ((cp->version) < NTP_OLDVERSION))
+ if (((temp_cp.version) > NTP_VERSION)
+ || ((temp_cp.version) < NTP_OLDVERSION))
fl = 1;
- if (cp->hmode != MODE_ACTIVE
- && cp->hmode != MODE_CLIENT
- && cp->hmode != MODE_BROADCAST)
+ if (temp_cp.hmode != MODE_ACTIVE
+ && temp_cp.hmode != MODE_CLIENT
+ && temp_cp.hmode != MODE_BROADCAST)
fl = 1;
- if (cp->flags & ~(CONF_FLAG_AUTHENABLE | CONF_FLAG_PREFER |
- CONF_FLAG_NOSELECT | CONF_FLAG_BURST | CONF_FLAG_IBURST |
- CONF_FLAG_SKEY))
+ if (temp_cp.flags & ~(CONF_FLAG_AUTHENABLE | CONF_FLAG_PREFER
+ | CONF_FLAG_BURST | CONF_FLAG_SKEY))
fl = 1;
- if (ocp) {
- ocp++;
- cp = (struct conf_peer *)ocp;
- } else
- cp++;
+ cp = (struct conf_peer *)
+ ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
}
if (fl) {
- msyslog(LOG_ERR, "do_conf: fl is nonzero!");
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
return;
}
@@ -1197,69 +1334,70 @@ do_conf(
* Looks okay, try it out
*/
items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_peer *)inpkt->data;
- if (ocp)
- ocp = (struct old_conf_peer *)inpkt->data;
- memset((char *)&peeraddr, 0, sizeof(struct sockaddr_in));
- peeraddr.sin_family = AF_INET;
- peeraddr.sin_port = htons(NTP_PORT);
+ cp = (struct conf_peer *)inpkt->data;
- /*
- * Make sure the address is valid
- */
- if (
+ while (items-- > 0) {
+ memset(&temp_cp, 0, sizeof(struct conf_peer));
+ memcpy(&temp_cp, (char *)cp, INFO_ITEMSIZE(inpkt->mbz_itemsize));
+ memset((char *)&peeraddr, 0, sizeof(struct sockaddr_storage));
+
+ fl = 0;
+ if (temp_cp.flags & CONF_FLAG_AUTHENABLE)
+ fl |= FLAG_AUTHENABLE;
+ if (temp_cp.flags & CONF_FLAG_PREFER)
+ fl |= FLAG_PREFER;
+ if (temp_cp.flags & CONF_FLAG_BURST)
+ fl |= FLAG_BURST;
+ if (temp_cp.flags & CONF_FLAG_SKEY)
+ fl |= FLAG_SKEY;
+ if (client_v6_capable && temp_cp.v6_flag != 0) {
+ peeraddr.ss_family = AF_INET6;
+ GET_INADDR6(peeraddr) = temp_cp.peeraddr6;
+ } else {
+ peeraddr.ss_family = AF_INET;
+ GET_INADDR(peeraddr) = temp_cp.peeraddr;
+ /*
+ * Make sure the address is valid
+ */
+ tmp_clock = *CAST_V4(peeraddr);
+ if (
#ifdef REFCLOCK
- !ISREFCLOCKADR(&peeraddr) &&
+ !ISREFCLOCKADR(&tmp_clock) &&
#endif
- ISBADADR(&peeraddr)) {
-#ifdef REFCLOCK
- msyslog(LOG_ERR, "do_conf: !ISREFCLOCK && ISBADADR");
-#else
- msyslog(LOG_ERR, "do_conf: ISBADADR");
+ ISBADADR(&tmp_clock)) {
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ return;
+ }
+
+ }
+ NSRCPORT(&peeraddr) = htons(NTP_PORT);
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ peeraddr.ss_len = SOCKLEN(&peeraddr);
#endif
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
- while (items-- > 0) {
- fl = 0;
- if (cp->flags & CONF_FLAG_AUTHENABLE)
- fl |= FLAG_AUTHENABLE;
- if (cp->flags & CONF_FLAG_PREFER)
- fl |= FLAG_PREFER;
- if (cp->flags & CONF_FLAG_NOSELECT)
- fl |= FLAG_NOSELECT;
- if (cp->flags & CONF_FLAG_BURST)
- fl |= FLAG_BURST;
- if (cp->flags & CONF_FLAG_IBURST)
- fl |= FLAG_IBURST;
- if (cp->flags & CONF_FLAG_SKEY)
- fl |= FLAG_SKEY;
- peeraddr.sin_addr.s_addr = cp->peeraddr;
/* XXX W2DO? minpoll/maxpoll arguments ??? */
- if (peer_config(&peeraddr, any_interface, cp->hmode,
- cp->version, cp->minpoll, cp->maxpoll, fl, cp->ttl,
- cp->keyid, NULL) == 0) {
+ if (peer_config(&peeraddr, (struct interface *)0,
+ temp_cp.hmode, temp_cp.version, temp_cp.minpoll,
+ temp_cp.maxpoll, fl, temp_cp.ttl, temp_cp.keyid,
+ NULL) == 0) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
}
- if (ocp) {
- ocp++;
- cp = (struct conf_peer *)ocp;
- } else
- cp++;
+ cp = (struct conf_peer *)
+ ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
}
req_ack(srcadr, inter, inpkt, INFO_OKAY);
}
-
+#if 0
+/* XXX */
/*
* dns_a - Snarf DNS info for an association ID
*/
static void
dns_a(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1326,9 +1464,10 @@ dns_a(
}
msyslog(LOG_INFO, "dns_a: <%s> for %s, AssocID %d, bogon %d",
- dp->hostname, inet_ntoa(peeraddr.sin_addr), associd,
+ dp->hostname,
+ stoa((struct sockaddr_storage *)&peeraddr), associd,
bogon);
-
+
if (bogon) {
/* If it didn't work */
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
@@ -1340,28 +1479,29 @@ dns_a(
#endif /* PUBKEY */
#endif
}
-
+
dp++;
}
req_ack(srcadr, inter, inpkt, INFO_OKAY);
}
-
+#endif /* 0 */
/*
* do_unconf - remove a peer from the configuration list
*/
static void
do_unconf(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
{
register struct conf_unpeer *cp;
+ struct conf_unpeer temp_cp;
register int items;
register struct peer *peer;
- struct sockaddr_in peeraddr;
+ struct sockaddr_storage peeraddr;
int bad, found;
/*
@@ -1370,17 +1510,28 @@ do_unconf(
* configured. If so, we remove them. If not, we return
* an error.
*/
- peeraddr.sin_family = AF_INET;
- peeraddr.sin_port = htons(NTP_PORT);
-
items = INFO_NITEMS(inpkt->err_nitems);
cp = (struct conf_unpeer *)inpkt->data;
bad = 0;
while (items-- > 0 && !bad) {
- peeraddr.sin_addr.s_addr = cp->peeraddr;
+ memset(&temp_cp, 0, sizeof(temp_cp));
+ memset(&peeraddr, 0, sizeof(peeraddr));
+ memcpy(&temp_cp, cp, INFO_ITEMSIZE(inpkt->mbz_itemsize));
+ if (client_v6_capable && temp_cp.v6_flag != 0) {
+ peeraddr.ss_family = AF_INET6;
+ GET_INADDR6(peeraddr) = temp_cp.peeraddr6;
+ } else {
+ peeraddr.ss_family = AF_INET;
+ GET_INADDR(peeraddr) = temp_cp.peeraddr;
+ }
+ NSRCPORT(&peeraddr) = htons(NTP_PORT);
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ peeraddr.ss_len = SOCKLEN(&peeraddr);
+#endif
found = 0;
peer = (struct peer *)0;
+ printf("searching for %s\n", stoa(&peeraddr));
while (!found) {
peer = findexistingpeer(&peeraddr, peer, -1);
if (peer == (struct peer *)0)
@@ -1390,7 +1541,8 @@ do_unconf(
}
if (!found)
bad = 1;
- cp++;
+ cp = (struct conf_unpeer *)
+ ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
}
if (bad) {
@@ -1405,9 +1557,23 @@ do_unconf(
items = INFO_NITEMS(inpkt->err_nitems);
cp = (struct conf_unpeer *)inpkt->data;
while (items-- > 0) {
- peeraddr.sin_addr.s_addr = cp->peeraddr;
+ memset(&temp_cp, 0, sizeof(temp_cp));
+ memset(&peeraddr, 0, sizeof(peeraddr));
+ memcpy(&temp_cp, cp, INFO_ITEMSIZE(inpkt->mbz_itemsize));
+ if (client_v6_capable && temp_cp.v6_flag != 0) {
+ peeraddr.ss_family = AF_INET6;
+ GET_INADDR6(peeraddr) = temp_cp.peeraddr6;
+ } else {
+ peeraddr.ss_family = AF_INET;
+ GET_INADDR(peeraddr) = temp_cp.peeraddr;
+ }
+ NSRCPORT(&peeraddr) = htons(NTP_PORT);
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ peeraddr.ss_len = SOCKLEN(&peeraddr);
+#endif
peer_unconfig(&peeraddr, (struct interface *)0, -1);
- cp++;
+ cp = (struct conf_unpeer *)
+ ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
}
req_ack(srcadr, inter, inpkt, INFO_OKAY);
@@ -1419,7 +1585,7 @@ do_unconf(
*/
static void
set_sys_flag(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1433,7 +1599,7 @@ set_sys_flag(
*/
static void
clr_sys_flag(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1447,7 +1613,7 @@ clr_sys_flag(
*/
static void
setclr_flags(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt,
u_long set
@@ -1467,7 +1633,7 @@ setclr_flags(
SYS_FLAG_NTP | SYS_FLAG_KERNEL | SYS_FLAG_MONITOR |
SYS_FLAG_FILEGEN | SYS_FLAG_AUTH | SYS_FLAG_CAL)) {
msyslog(LOG_ERR, "setclr_flags: extra flags: %#x",
- flags & ~(SYS_FLAG_BCLIENT | SYS_FLAG_PPS |
+ flags & ~(SYS_FLAG_BCLIENT | SYS_FLAG_PPS |
SYS_FLAG_NTP | SYS_FLAG_KERNEL |
SYS_FLAG_MONITOR | SYS_FLAG_FILEGEN |
SYS_FLAG_AUTH | SYS_FLAG_CAL));
@@ -1476,21 +1642,21 @@ setclr_flags(
}
if (flags & SYS_FLAG_BCLIENT)
- proto_config(PROTO_BROADCLIENT, set, 0.);
+ proto_config(PROTO_BROADCLIENT, set, 0., NULL);
if (flags & SYS_FLAG_PPS)
- proto_config(PROTO_PPS, set, 0.);
+ proto_config(PROTO_PPS, set, 0., NULL);
if (flags & SYS_FLAG_NTP)
- proto_config(PROTO_NTP, set, 0.);
+ proto_config(PROTO_NTP, set, 0., NULL);
if (flags & SYS_FLAG_KERNEL)
- proto_config(PROTO_KERNEL, set, 0.);
+ proto_config(PROTO_KERNEL, set, 0., NULL);
if (flags & SYS_FLAG_MONITOR)
- proto_config(PROTO_MONITOR, set, 0.);
+ proto_config(PROTO_MONITOR, set, 0., NULL);
if (flags & SYS_FLAG_FILEGEN)
- proto_config(PROTO_FILEGEN, set, 0.);
+ proto_config(PROTO_FILEGEN, set, 0., NULL);
if (flags & SYS_FLAG_AUTH)
- proto_config(PROTO_AUTHENTICATE, set, 0.);
+ proto_config(PROTO_AUTHENTICATE, set, 0., NULL);
if (flags & SYS_FLAG_CAL)
- proto_config(PROTO_CAL, set, 0.);
+ proto_config(PROTO_CAL, set, 0., NULL);
req_ack(srcadr, inter, inpkt, INFO_OKAY);
}
@@ -1500,30 +1666,43 @@ setclr_flags(
*/
static void
list_restrict(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
{
register struct info_restrict *ir;
register struct restrictlist *rl;
- extern struct restrictlist *restrictlist;
+ register struct restrictlist6 *rl6;
#ifdef DEBUG
if (debug > 2)
- printf("wants peer list summary\n");
+ printf("wants restrict list summary\n");
#endif
ir = (struct info_restrict *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_restrict));
+ v6sizeof(struct info_restrict));
+
for (rl = restrictlist; rl != 0 && ir != 0; rl = rl->next) {
ir->addr = htonl(rl->addr);
+ if (client_v6_capable)
+ ir->v6_flag = 0;
ir->mask = htonl(rl->mask);
ir->count = htonl((u_int32)rl->count);
ir->flags = htons(rl->flags);
ir->mflags = htons(rl->mflags);
ir = (struct info_restrict *)more_pkt();
}
+ if (client_v6_capable)
+ for (rl6 = restrictlist6; rl6 != 0 && ir != 0; rl6 = rl6->next) {
+ ir->addr6 = rl6->addr6;
+ ir->mask6 = rl6->mask6;
+ ir->v6_flag = 1;
+ ir->count = htonl((u_int32)rl6->count);
+ ir->flags = htons(rl6->flags);
+ ir->mflags = htons(rl6->mflags);
+ ir = (struct info_restrict *)more_pkt();
+ }
flush_pkt();
}
@@ -1534,7 +1713,7 @@ list_restrict(
*/
static void
do_resaddflags(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1549,7 +1728,7 @@ do_resaddflags(
*/
static void
do_ressubflags(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1563,7 +1742,7 @@ do_ressubflags(
*/
static void
do_unrestrict(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1580,7 +1759,7 @@ do_unrestrict(
*/
static void
do_restrict(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt,
int op
@@ -1588,8 +1767,8 @@ do_restrict(
{
register struct conf_restrict *cr;
register int items;
- struct sockaddr_in matchaddr;
- struct sockaddr_in matchmask;
+ struct sockaddr_storage matchaddr;
+ struct sockaddr_storage matchmask;
int bad;
/*
@@ -1606,9 +1785,16 @@ do_restrict(
bad |= 1;
if (cr->flags & ~(RES_ALLFLAGS))
bad |= 2;
- if (cr->addr == htonl(INADDR_ANY) && cr->mask != htonl(INADDR_ANY))
- bad |= 4;
- cr++;
+ if (cr->mask != htonl(INADDR_ANY)) {
+ if (client_v6_capable && cr->v6_flag != 0) {
+ if (IN6_IS_ADDR_UNSPECIFIED(&cr->addr6))
+ bad |= 4;
+ } else
+ if (cr->addr == htonl(INADDR_ANY))
+ bad |= 8;
+ }
+ cr = (struct conf_restrict *)((char *)cr +
+ INFO_ITEMSIZE(inpkt->mbz_itemsize));
}
if (bad) {
@@ -1622,14 +1808,21 @@ do_restrict(
*/
items = INFO_NITEMS(inpkt->err_nitems);
cr = (struct conf_restrict *)inpkt->data;
- memset((char *)&matchaddr, 0, sizeof(struct sockaddr_in));
- memset((char *)&matchmask, 0, sizeof(struct sockaddr_in));
- matchaddr.sin_family = AF_INET;
- matchmask.sin_family = AF_INET;
+ memset((char *)&matchaddr, 0, sizeof(struct sockaddr_storage));
+ memset((char *)&matchmask, 0, sizeof(struct sockaddr_storage));
while (items-- > 0) {
- matchaddr.sin_addr.s_addr = cr->addr;
- matchmask.sin_addr.s_addr = cr->mask;
+ if (client_v6_capable && cr->v6_flag != 0) {
+ GET_INADDR6(matchaddr) = cr->addr6;
+ GET_INADDR6(matchmask) = cr->mask6;
+ matchaddr.ss_family = AF_INET6;
+ matchmask.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(matchaddr) = cr->addr;
+ GET_INADDR(matchmask) = cr->mask;
+ matchaddr.ss_family = AF_INET;
+ matchmask.ss_family = AF_INET;
+ }
hack_restrict(op, &matchaddr, &matchmask, cr->mflags,
cr->flags);
cr++;
@@ -1644,7 +1837,7 @@ do_restrict(
*/
static void
mon_getlist_0(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1662,19 +1855,24 @@ mon_getlist_0(
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
}
-
im = (struct info_monitor *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_monitor));
+ v6sizeof(struct info_monitor));
for (md = mon_mru_list.mru_next; md != &mon_mru_list && im != 0;
md = md->mru_next) {
- im->lasttime = htonl((u_int32)(current_time - md->lasttime));
- im->firsttime = htonl((u_int32)(current_time - md->firsttime));
- if (md->lastdrop)
- im->lastdrop = htonl((u_int32)(current_time - md->lastdrop));
- else
- im->lastdrop = 0;
+ im->lasttime = htonl((u_int32)md->avg_interval);
+ im->firsttime = htonl((u_int32)(current_time - md->lasttime));
+ im->lastdrop = htonl((u_int32)md->drop_count);
im->count = htonl((u_int32)(md->count));
- im->addr = md->rmtadr;
+ if (md->rmtadr.ss_family == AF_INET6) {
+ if (!client_v6_capable)
+ continue;
+ im->addr6 = GET_INADDR6(md->rmtadr);
+ im->v6_flag = 1;
+ } else {
+ im->addr = GET_INADDR(md->rmtadr);
+ if (client_v6_capable)
+ im->v6_flag = 0;
+ }
im->port = md->rmtport;
im->mode = md->mode;
im->version = md->version;
@@ -1688,7 +1886,7 @@ mon_getlist_0(
*/
static void
mon_getlist_1(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1698,36 +1896,36 @@ mon_getlist_1(
extern struct mon_data mon_mru_list;
extern int mon_enabled;
-#ifdef DEBUG
- if (debug > 2)
- printf("wants monitor 1 list\n");
-#endif
if (!mon_enabled) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
}
-
im = (struct info_monitor_1 *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_monitor_1));
+ v6sizeof(struct info_monitor_1));
for (md = mon_mru_list.mru_next; md != &mon_mru_list && im != 0;
md = md->mru_next) {
- im->lasttime = htonl((u_int32)(current_time - md->lasttime));
- im->firsttime = htonl((u_int32)(current_time - md->firsttime));
- if (md->lastdrop)
- im->lastdrop = htonl((u_int32)(current_time - md->lastdrop));
- else
- im->lastdrop = 0;
+ im->lasttime = htonl((u_int32)md->avg_interval);
+ im->firsttime = htonl((u_int32)(current_time - md->lasttime));
+ im->lastdrop = htonl((u_int32)md->drop_count);
im->count = htonl((u_int32)md->count);
- im->addr = md->rmtadr;
- im->daddr =
- (md->cast_flags == MDF_BCAST)
- ? md->interface->bcast.sin_addr.s_addr
- : (md->cast_flags
- ? (md->interface->sin.sin_addr.s_addr
- ? md->interface->sin.sin_addr.s_addr
- : md->interface->bcast.sin_addr.s_addr
- )
- : 4);
+ if (md->rmtadr.ss_family == AF_INET6) {
+ if (!client_v6_capable)
+ continue;
+ im->addr6 = GET_INADDR6(md->rmtadr);
+ im->v6_flag = 1;
+ im->daddr6 = GET_INADDR6(md->interface->sin);
+ } else {
+ im->addr = GET_INADDR(md->rmtadr);
+ if (client_v6_capable)
+ im->v6_flag = 0;
+ im->daddr = (md->cast_flags == MDF_BCAST)
+ ? GET_INADDR(md->interface->bcast)
+ : (md->cast_flags
+ ? (GET_INADDR(md->interface->sin)
+ ? GET_INADDR(md->interface->sin)
+ : GET_INADDR(md->interface->bcast))
+ : 4);
+ }
im->flags = md->cast_flags;
im->port = md->rmtport;
im->mode = md->mode;
@@ -1761,7 +1959,7 @@ struct reset_entry reset_entries[] = {
*/
static void
reset_stats(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1797,7 +1995,7 @@ reset_stats(
*/
static void
reset_peer(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1805,26 +2003,36 @@ reset_peer(
register struct conf_unpeer *cp;
register int items;
register struct peer *peer;
- struct sockaddr_in peeraddr;
+ struct sockaddr_storage peeraddr;
int bad;
/*
* We check first to see that every peer exists. If not,
* we return an error.
*/
- peeraddr.sin_family = AF_INET;
- peeraddr.sin_port = htons(NTP_PORT);
items = INFO_NITEMS(inpkt->err_nitems);
cp = (struct conf_unpeer *)inpkt->data;
bad = 0;
while (items-- > 0 && !bad) {
- peeraddr.sin_addr.s_addr = cp->peeraddr;
+ memset((char *)&peeraddr, 0, sizeof(peeraddr));
+ if (client_v6_capable && cp->v6_flag != 0) {
+ GET_INADDR6(peeraddr) = cp->peeraddr6;
+ peeraddr.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(peeraddr) = cp->peeraddr;
+ peeraddr.ss_family = AF_INET;
+ }
+ NSRCPORT(&peeraddr) = htons(NTP_PORT);
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ peeraddr.ss_len = SOCKLEN(&peeraddr);
+#endif
peer = findexistingpeer(&peeraddr, (struct peer *)0, -1);
if (peer == (struct peer *)0)
bad++;
- cp++;
+ cp = (struct conf_unpeer *)((char *)cp +
+ INFO_ITEMSIZE(inpkt->mbz_itemsize));
}
if (bad) {
@@ -1839,13 +2047,24 @@ reset_peer(
items = INFO_NITEMS(inpkt->err_nitems);
cp = (struct conf_unpeer *)inpkt->data;
while (items-- > 0) {
- peeraddr.sin_addr.s_addr = cp->peeraddr;
+ memset((char *)&peeraddr, 0, sizeof(peeraddr));
+ if (client_v6_capable && cp->v6_flag != 0) {
+ GET_INADDR6(peeraddr) = cp->peeraddr6;
+ peeraddr.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(peeraddr) = cp->peeraddr;
+ peeraddr.ss_family = AF_INET;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ peeraddr.ss_len = SOCKLEN(&peeraddr);
+#endif
peer = findexistingpeer(&peeraddr, (struct peer *)0, -1);
while (peer != 0) {
peer_reset(peer);
peer = findexistingpeer(&peeraddr, (struct peer *)peer, -1);
}
- cp++;
+ cp = (struct conf_unpeer *)((char *)cp +
+ INFO_ITEMSIZE(inpkt->mbz_itemsize));
}
req_ack(srcadr, inter, inpkt, INFO_OKAY);
@@ -1857,7 +2076,7 @@ reset_peer(
*/
static void
do_key_reread(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1872,7 +2091,7 @@ do_key_reread(
*/
static void
trust_key(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1886,7 +2105,7 @@ trust_key(
*/
static void
untrust_key(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1900,7 +2119,7 @@ untrust_key(
*/
static void
do_trustkey(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt,
u_long trust
@@ -1925,7 +2144,7 @@ do_trustkey(
*/
static void
get_auth_info(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -1993,7 +2212,7 @@ reset_auth_stats(void)
*/
static void
req_get_traps(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -2014,16 +2233,27 @@ req_get_traps(
}
it = (struct info_trap *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_trap));
+ v6sizeof(struct info_trap));
for (i = 0, tr = ctl_trap; i < CTL_MAXTRAPS; i++, tr++) {
if (tr->tr_flags & TRAP_INUSE) {
- if (tr->tr_localaddr == any_interface)
- it->local_address = 0;
- else
- it->local_address
- = NSRCADR(&tr->tr_localaddr->sin);
- it->trap_address = NSRCADR(&tr->tr_addr);
+ if (tr->tr_addr.ss_family == AF_INET) {
+ if (tr->tr_localaddr == any_interface)
+ it->local_address = 0;
+ else
+ it->local_address
+ = GET_INADDR(tr->tr_localaddr->sin);
+ it->trap_address = GET_INADDR(tr->tr_addr);
+ if (client_v6_capable)
+ it->v6_flag = 0;
+ } else {
+ if (!client_v6_capable)
+ continue;
+ it->local_address6
+ = GET_INADDR6(tr->tr_localaddr->sin);
+ it->trap_address6 = GET_INADDR6(tr->tr_addr);
+ it->v6_flag = 1;
+ }
it->trap_port = NSRCPORT(&tr->tr_addr);
it->sequence = htons(tr->tr_sequence);
it->settime = htonl((u_int32)(current_time - tr->tr_settime));
@@ -2042,7 +2272,7 @@ req_get_traps(
*/
static void
req_set_trap(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -2057,7 +2287,7 @@ req_set_trap(
*/
static void
req_clr_trap(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -2072,7 +2302,7 @@ req_clr_trap(
*/
static void
do_setclr_trap(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt,
int set
@@ -2081,14 +2311,14 @@ do_setclr_trap(
register struct conf_trap *ct;
register struct interface *linter;
int res;
- struct sockaddr_in laddr;
+ struct sockaddr_storage laddr;
/*
- * Prepare sockaddr_in structure
+ * Prepare sockaddr_storage structure
*/
memset((char *)&laddr, 0, sizeof laddr);
- laddr.sin_family = AF_INET;
- laddr.sin_port = ntohs(NTP_PORT);
+ laddr.ss_family = srcadr->ss_family;
+ NSRCPORT(&laddr) = ntohs(NTP_PORT);
/*
* Restrict ourselves to one item only. This eliminates
@@ -2107,7 +2337,10 @@ do_setclr_trap(
if (ct->local_address == 0) {
linter = any_interface;
} else {
- laddr.sin_addr.s_addr = ct->local_address;
+ if (laddr.ss_family == AF_INET)
+ GET_INADDR(laddr) = ct->local_address;
+ else
+ GET_INADDR6(laddr) = ct->local_address6;
linter = findinterface(&laddr);
if (linter == NULL) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
@@ -2115,11 +2348,14 @@ do_setclr_trap(
}
}
- laddr.sin_addr.s_addr = ct->trap_address;
+ if (laddr.ss_family == AF_INET)
+ GET_INADDR(laddr) = ct->trap_address;
+ else
+ GET_INADDR6(laddr) = ct->trap_address6;
if (ct->trap_port != 0)
- laddr.sin_port = ct->trap_port;
+ NSRCPORT(&laddr) = ct->trap_port;
else
- laddr.sin_port = htons(TRAPPORT);
+ NSRCPORT(&laddr) = htons(TRAPPORT);
if (set) {
res = ctlsettrap(&laddr, linter, 0,
@@ -2143,7 +2379,7 @@ do_setclr_trap(
*/
static void
set_request_keyid(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -2171,7 +2407,7 @@ set_request_keyid(
*/
static void
set_control_keyid(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -2200,7 +2436,7 @@ set_control_keyid(
*/
static void
get_ctl_stats(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -2256,7 +2492,7 @@ get_ctl_stats(
*/
static void
get_kernel_info(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -2311,7 +2547,7 @@ get_kernel_info(
*/
static void
get_clock_info(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -2320,12 +2556,16 @@ get_clock_info(
register u_int32 *clkaddr;
register int items;
struct refclockstat clock_stat;
- struct sockaddr_in addr;
+ struct sockaddr_storage addr;
+ struct sockaddr_in tmp_clock;
l_fp ltmp;
memset((char *)&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
+ addr.ss_family = AF_INET;
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ addr.ss_len = SOCKLEN(&addr);
+#endif
+ NSRCPORT(&addr) = htons(NTP_PORT);
items = INFO_NITEMS(inpkt->err_nitems);
clkaddr = (u_int32 *) inpkt->data;
@@ -2333,8 +2573,9 @@ get_clock_info(
sizeof(struct info_clock));
while (items-- > 0) {
- addr.sin_addr.s_addr = *clkaddr++;
- if (!ISREFCLOCKADR(&addr) ||
+ tmp_clock.sin_addr.s_addr = *clkaddr++;
+ CAST_V4(addr)->sin_addr = tmp_clock.sin_addr;
+ if (!ISREFCLOCKADR(&tmp_clock) ||
findexistingpeer(&addr, (struct peer *)0, -1) == 0) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
@@ -2344,7 +2585,7 @@ get_clock_info(
refclock_control(&addr, (struct refclockstat *)0, &clock_stat);
- ic->clockadr = addr.sin_addr.s_addr;
+ ic->clockadr = tmp_clock.sin_addr.s_addr;
ic->type = clock_stat.type;
ic->flags = clock_stat.flags;
ic->lastevent = clock_stat.lastevent;
@@ -2356,7 +2597,7 @@ get_clock_info(
ic->timestarted = htonl((u_int32)clock_stat.timereset);
DTOLFP(clock_stat.fudgetime1, &ltmp);
HTONL_FP(&ltmp, &ic->fudgetime1);
- DTOLFP(clock_stat.fudgetime1, &ltmp);
+ DTOLFP(clock_stat.fudgetime2, &ltmp);
HTONL_FP(&ltmp, &ic->fudgetime2);
ic->fudgeval1 = htonl((u_int32)clock_stat.fudgeval1);
ic->fudgeval2 = htonl((u_int32)clock_stat.fudgeval2);
@@ -2375,7 +2616,7 @@ get_clock_info(
*/
static void
set_clock_fudge(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -2383,19 +2624,24 @@ set_clock_fudge(
register struct conf_fudge *cf;
register int items;
struct refclockstat clock_stat;
- struct sockaddr_in addr;
+ struct sockaddr_storage addr;
+ struct sockaddr_in tmp_clock;
l_fp ltmp;
memset((char *)&addr, 0, sizeof addr);
memset((char *)&clock_stat, 0, sizeof clock_stat);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
items = INFO_NITEMS(inpkt->err_nitems);
cf = (struct conf_fudge *) inpkt->data;
while (items-- > 0) {
- addr.sin_addr.s_addr = cf->clockadr;
- if (!ISREFCLOCKADR(&addr) ||
+ tmp_clock.sin_addr.s_addr = cf->clockadr;
+ *CAST_V4(addr) = tmp_clock;
+ addr.ss_family = AF_INET;
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ addr.ss_len = SOCKLEN(&addr);
+#endif
+ NSRCPORT(&addr) = htons(NTP_PORT);
+ if (!ISREFCLOCKADR(&tmp_clock) ||
findexistingpeer(&addr, (struct peer *)0, -1) == 0) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
@@ -2421,7 +2667,7 @@ set_clock_fudge(
clock_stat.haveflags = CLK_HAVEVAL2;
break;
case FUDGE_FLAGS:
- clock_stat.flags = (u_char) ntohl(cf->fudgeval_flags) & 0xf;
+ clock_stat.flags = (u_char) (ntohl(cf->fudgeval_flags) & 0xf);
clock_stat.haveflags =
(CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3|CLK_HAVEFLAG4);
break;
@@ -2444,7 +2690,7 @@ set_clock_fudge(
*/
static void
get_clkbug_info(
- struct sockaddr_in *srcadr,
+ struct sockaddr_storage *srcadr,
struct interface *inter,
struct req_pkt *inpkt
)
@@ -2454,11 +2700,15 @@ get_clkbug_info(
register u_int32 *clkaddr;
register int items;
struct refclockbug bug;
- struct sockaddr_in addr;
+ struct sockaddr_storage addr;
+ struct sockaddr_in tmp_clock;
memset((char *)&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
+ addr.ss_family = AF_INET;
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ addr.ss_len = SOCKLEN(&addr);
+#endif
+ NSRCPORT(&addr) = htons(NTP_PORT);
items = INFO_NITEMS(inpkt->err_nitems);
clkaddr = (u_int32 *) inpkt->data;
@@ -2466,8 +2716,9 @@ get_clkbug_info(
sizeof(struct info_clkbug));
while (items-- > 0) {
- addr.sin_addr.s_addr = *clkaddr++;
- if (!ISREFCLOCKADR(&addr) ||
+ tmp_clock.sin_addr.s_addr = *clkaddr++;
+ GET_INADDR(addr) = tmp_clock.sin_addr.s_addr;
+ if (!ISREFCLOCKADR(&tmp_clock) ||
findexistingpeer(&addr, (struct peer *)0, -1) == 0) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
@@ -2480,7 +2731,7 @@ get_clkbug_info(
return;
}
- ic->clockadr = addr.sin_addr.s_addr;
+ ic->clockadr = tmp_clock.sin_addr.s_addr;
i = bug.nvalues;
if (i > NUMCBUGVALUES)
i = NUMCBUGVALUES;
diff --git a/contrib/ntp/ntpd/ntp_restrict.c b/contrib/ntp/ntpd/ntp_restrict.c
index 0e5b9dc264ac..ede42257d236 100644
--- a/contrib/ntp/ntpd/ntp_restrict.c
+++ b/contrib/ntp/ntpd/ntp_restrict.c
@@ -1,5 +1,5 @@
/*
- * ntp_restrict.c - find out what restrictions this host is running under
+ * ntp_restrict.c - determine host restrictions
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -14,28 +14,41 @@
/*
* This code keeps a simple address-and-mask list of hosts we want
- * to place restrictions on (or remove them from). The restrictions
+ * to place restrictions on (or remove them from). The restrictions
* are implemented as a set of flags which tell you what the host
- * can't do. There is a subroutine entry to return the flags. The
+ * can't do. There is a subroutine entry to return the flags. The
* list is kept sorted to reduce the average number of comparisons
* and make sure you get the set of restrictions most specific to
* the address.
*
* The algorithm is that, when looking up a host, it is first assumed
- * that the default set of restrictions will apply. It then searches
- * down through the list. Whenever it finds a match it adopts the match's
- * flags instead. When you hit the point where the sorted address is
- * greater than the target, you return with the last set of flags you
- * found. Because of the ordering of the list, the most specific match
- * will provide the final set of flags.
+ * that the default set of restrictions will apply. It then searches
+ * down through the list. Whenever it finds a match it adopts the
+ * match's flags instead. When you hit the point where the sorted
+ * address is greater than the target, you return with the last set of
+ * flags you found. Because of the ordering of the list, the most
+ * specific match will provide the final set of flags.
*
* This was originally intended to restrict you from sync'ing to your
- * own broadcasts when you are doing that, by restricting yourself
- * from your own interfaces. It was also thought it would sometimes
- * be useful to keep a misbehaving host or two from abusing your primary
- * clock. It has been expanded, however, to suit the needs of those
- * with more restrictive access policies.
+ * own broadcasts when you are doing that, by restricting yourself from
+ * your own interfaces. It was also thought it would sometimes be useful
+ * to keep a misbehaving host or two from abusing your primary clock. It
+ * has been expanded, however, to suit the needs of those with more
+ * restrictive access policies.
*/
+/*
+ * We will use two lists, one for IPv4 addresses and one for IPv6
+ * addresses. This is not protocol-independant but for now I can't
+ * find a way to respect this. We'll check this later... JFB 07/2001
+ */
+#define SET_IPV6_ADDR_MASK(dst, src, msk) \
+ do { \
+ int idx; \
+ for (idx = 0; idx < 16; idx++) { \
+ (dst)->s6_addr[idx] = \
+ (u_char) ((src)->s6_addr[idx] & (msk)->s6_addr[idx]); \
+ } \
+ } while (0)
/*
* Memory allocation parameters. We allocate INITRESLIST entries
@@ -45,43 +58,48 @@
#define INITRESLIST 10
#define INCRESLIST 5
+#define RES_AVG 8. /* interpacket averaging factor */
+
/*
* The restriction list
*/
struct restrictlist *restrictlist;
-static int restrictcount; /* count of entries in the restriction list */
+struct restrictlist6 *restrictlist6;
+static int restrictcount; /* count of entries in the res list */
+static int restrictcount6; /* count of entries in the res list 2*/
/*
* The free list and associated counters. Also some uninteresting
* stat counters.
*/
static struct restrictlist *resfree;
+static struct restrictlist6 *resfree6;
static int numresfree; /* number of structures on free list */
+static int numresfree6; /* number of structures on free list 2 */
static u_long res_calls;
static u_long res_found;
static u_long res_not_found;
-/* static u_long res_timereset; */
/*
* Parameters of the RES_LIMITED restriction option.
- * client_limit is the number of hosts allowed per source net
- * client_limit_period is the number of seconds after which an entry
- * is no longer considered for client limit determination
*/
-u_long client_limit;
-u_long client_limit_period;
+u_long res_avg_interval = 5; /* min average interpacket interval */
+u_long res_min_interval = 1; /* min interpacket interval */
+
/*
- * count number of restriction entries referring to RES_LIMITED
- * controls activation/deactivation of monitoring
- * (with respect to RES_LIMITED control)
+ * Count number of restriction entries referring to RES_LIMITED controls
+ * activation/deactivation of monitoring (with respect to RES_LIMITED
+ * control)
*/
static u_long res_limited_refcnt;
+static u_long res_limited_refcnt6;
/*
- * Our initial allocation of list entries.
+ * Our initial allocation of lists entries.
*/
static struct restrictlist resinit[INITRESLIST];
+static struct restrictlist6 resinit6[INITRESLIST];
/*
* init_restrict - initialize the restriction data structures
@@ -90,31 +108,35 @@ void
init_restrict(void)
{
register int i;
- char bp[80];
/*
* Zero the list and put all but one on the free list
*/
resfree = 0;
memset((char *)resinit, 0, sizeof resinit);
-
+ resfree6 = 0;
+ memset((char *)resinit6, 0, sizeof resinit6);
for (i = 1; i < INITRESLIST; i++) {
resinit[i].next = resfree;
+ resinit6[i].next = resfree6;
resfree = &resinit[i];
+ resfree6 = &resinit6[i];
}
-
numresfree = INITRESLIST-1;
+ numresfree6 = INITRESLIST-1;
/*
- * Put the remaining item at the head of the
- * list as our default entry. Everything in here
- * should be zero for now.
+ * Put the remaining item at the head of the list as our default
+ * entry. Everything in here should be zero for now.
*/
resinit[0].addr = htonl(INADDR_ANY);
resinit[0].mask = 0;
+ memset(&resinit6[0].addr6, 0, sizeof(struct in6_addr));
+ memset(&resinit6[0].mask6, 0, sizeof(struct in6_addr));
restrictlist = &resinit[0];
+ restrictlist6 = &resinit6[0];
restrictcount = 1;
-
+ restrictcount = 2;
/*
* fix up stat counters
@@ -122,19 +144,12 @@ init_restrict(void)
res_calls = 0;
res_found = 0;
res_not_found = 0;
- /* res_timereset = 0; */
/*
* set default values for RES_LIMIT functionality
*/
- client_limit = 3;
- client_limit_period = 3600;
res_limited_refcnt = 0;
-
- sprintf(bp, "client_limit=%ld", client_limit);
- set_sys_var(bp, strlen(bp)+1, RO);
- sprintf(bp, "client_limit_period=%ld", client_limit_period);
- set_sys_var(bp, strlen(bp)+1, RO);
+ res_limited_refcnt6 = 0;
}
@@ -143,161 +158,131 @@ init_restrict(void)
*/
int
restrictions(
- struct sockaddr_in *srcadr
+ struct sockaddr_storage *srcadr
)
{
- register struct restrictlist *rl;
- register struct restrictlist *match;
- register u_int32 hostaddr;
- register int isntpport;
+ struct restrictlist *rl;
+ struct restrictlist *match = NULL;
+ struct restrictlist6 *rl6;
+ struct restrictlist6 *match6 = NULL;
+ struct in6_addr hostaddr6;
+ struct in6_addr hostservaddr6;
+ u_int32 hostaddr;
+ int flags = 0;
+ int isntpport;
res_calls++;
- /*
- * We need the host address in host order. Also need to know
- * whether this is from the ntp port or not.
- */
- hostaddr = SRCADR(srcadr);
- isntpport = (SRCPORT(srcadr) == NTP_PORT);
-
- /*
- * Ignore any packets with a multicast source address
- * (this should be done early in the receive process, later!)
- */
- if (IN_CLASSD(ntohl(srcadr->sin_addr.s_addr)))
- return (int)RES_IGNORE;
+ if (srcadr->ss_family == AF_INET) {
+ /*
+ * We need the host address in host order. Also need to
+ * know whether this is from the ntp port or not.
+ */
+ hostaddr = SRCADR(srcadr);
+ isntpport = (SRCPORT(srcadr) == NTP_PORT);
- /*
- * Set match to first entry, which is default entry. Work our
- * way down from there.
- */
- match = restrictlist;
-
- for (rl = match->next; rl != 0 && rl->addr <= hostaddr; rl = rl->next)
- if ((hostaddr & rl->mask) == rl->addr) {
- if ((rl->mflags & RESM_NTPONLY) && !isntpport)
- continue;
- match = rl;
- }
-
- match->count++;
- if (match == restrictlist)
- res_not_found++;
- else
- res_found++;
-
- /*
- * The following implements limiting the number of clients
- * accepted from a given network. The notion of "same network"
- * is determined by the mask and addr fields of the restrict
- * list entry. The monitor mechanism has to be enabled for
- * collecting info on current clients.
- *
- * The policy is as follows:
- * - take the list of clients recorded
- * from the given "network" seen within the last
- * client_limit_period seconds
- * - if there are at most client_limit entries:
- * --> access allowed
- * - otherwise sort by time first seen
- * - current client among the first client_limit seen
- * hosts?
- * if yes: access allowed
- * else: eccess denied
- */
- if (match->flags & RES_LIMITED) {
- int lcnt;
- struct mon_data *md, *this_client;
-
-#ifdef DEBUG
- if (debug > 2)
- printf("limited clients check: %ld clients, period %ld seconds, net is 0x%lX\n",
- client_limit, client_limit_period,
- (u_long)netof(hostaddr));
-#endif /*DEBUG*/
- if (mon_enabled == MON_OFF) {
-#ifdef DEBUG
- if (debug > 4)
- printf("no limit - monitoring is off\n");
-#endif
- return (int)(match->flags & ~RES_LIMITED);
- }
+ /*
+ * Ignore any packets with a multicast source address
+ * (this should be done early in the receive process,
+ * later!)
+ */
+ if (IN_CLASSD(SRCADR(srcadr)))
+ return (int)RES_IGNORE;
/*
- * How nice, MRU list provides our current client as the
- * first entry in the list.
- * Monitoring was verified to be active above, thus we
- * know an entry for our client must exist, or some
- * brain dead set the memory limit for mon entries to ZERO!!!
+ * Set match to first entry, which is default entry.
+ * Work our way down from there.
*/
- this_client = mon_mru_list.mru_next;
-
- for (md = mon_fifo_list.fifo_next,lcnt = 0;
- md != &mon_fifo_list;
- md = md->fifo_next) {
- if ((current_time - md->lasttime)
- > client_limit_period) {
-#ifdef DEBUG
- if (debug > 5)
- printf("checking: %s: ignore: too old: %ld\n",
- numtoa(md->rmtadr),
- current_time - md->lasttime);
-#endif
- continue;
- }
- if (md->mode == MODE_BROADCAST ||
- md->mode == MODE_CONTROL ||
- md->mode == MODE_PRIVATE) {
-#ifdef DEBUG
- if (debug > 5)
- printf("checking: %s: ignore mode %d\n",
- numtoa(md->rmtadr),
- md->mode);
-#endif
- continue;
+ match = restrictlist;
+ for (rl = match->next; rl != 0 && rl->addr <= hostaddr;
+ rl = rl->next)
+ if ((hostaddr & rl->mask) == rl->addr) {
+ if ((rl->mflags & RESM_NTPONLY) &&
+ !isntpport)
+ continue;
+ match = rl;
}
- if (netof(md->rmtadr) !=
- netof(hostaddr)) {
-#ifdef DEBUG
- if (debug > 5)
- printf("checking: %s: different net 0x%lX\n",
- numtoa(md->rmtadr),
- (u_long)netof(md->rmtadr));
-#endif
- continue;
- }
- lcnt++;
- if (lcnt > (int) client_limit ||
- md->rmtadr == hostaddr) {
-#ifdef DEBUG
- if (debug > 5)
- printf("considering %s: found host\n",
- numtoa(md->rmtadr));
-#endif
- break;
- }
-#ifdef DEBUG
- else {
- if (debug > 5)
- printf("considering %s: same net\n",
- numtoa(md->rmtadr));
- }
-#endif
+ match->count++;
+ if (match == restrictlist)
+ res_not_found++;
+ else
+ res_found++;
+ flags = match->flags;
+ }
+ /* IPv6 source address */
+ if (srcadr->ss_family == AF_INET6) {
+ /*
+ * Need to know whether this is from the ntp port or
+ * not.
+ */
+ hostaddr6 = GET_INADDR6(*srcadr);
+ isntpport = (ntohs((
+ (struct sockaddr_in6 *)srcadr)->sin6_port) ==
+ NTP_PORT);
+
+ /*
+ * Ignore any packets with a multicast source address
+ * (this should be done early in the receive process,
+ * later!)
+ */
+ if (IN6_IS_ADDR_MULTICAST(&hostaddr6))
+ return (int)RES_IGNORE;
+
+ /*
+ * Set match to first entry, which is default entry.
+ * Work our way down from there.
+ */
+ match6 = restrictlist6;
+ for (rl6 = match6->next; rl6 != 0 &&
+ (memcmp(&(rl6->addr6), &hostaddr6,
+ sizeof(hostaddr6)) <= 0); rl6 = rl6->next) {
+ SET_IPV6_ADDR_MASK(&hostservaddr6, &hostaddr6,
+ &rl6->mask6);
+ if (memcmp(&hostservaddr6, &(rl6->addr6),
+ sizeof(hostservaddr6)) == 0) {
+ if ((rl6->mflags & RESM_NTPONLY) &&
+ !isntpport)
+ continue;
+ match6 = rl6;
+ }
}
-#ifdef DEBUG
- if (debug > 4)
- printf("this one is rank %d in list, limit is %lu: %s\n",
- lcnt, client_limit,
- (lcnt <= (int) client_limit) ? "ALLOW" : "REJECT");
-#endif
- if (lcnt <= (int) client_limit) {
- this_client->lastdrop = 0;
- return (int)(match->flags & ~RES_LIMITED);
- } else {
- this_client->lastdrop = current_time;
- }
+ match6->count++;
+ if (match6 == restrictlist6)
+ res_not_found++;
+ else
+ res_found++;
+ flags = match6->flags;
+ }
+
+ /*
+ * The following implements a generalized call gap facility.
+ * Douse the RES_LIMITED bit only if the interval since the last
+ * packet is greater than res_min_interval and the average is
+ * greater thatn res_avg_interval.
+ */
+ if (mon_enabled == MON_OFF) {
+ flags &= ~RES_LIMITED;
+ } else {
+ struct mon_data *md;
+
+ /*
+ * At this poin the most recent arrival is first in the
+ * MRU list. Let the first 10 packets in for free until
+ * the average stabilizes.
+ */
+ md = mon_mru_list.mru_next;
+ if (md->avg_interval == 0)
+ md->avg_interval = md->drop_count;
+ else
+ md->avg_interval += (md->drop_count -
+ md->avg_interval) / RES_AVG;
+ if (md->count < 10 || (md->drop_count >
+ res_min_interval && md->avg_interval >
+ res_avg_interval))
+ flags &= ~RES_LIMITED;
+ md->drop_count = flags;
}
- return (int)match->flags;
+ return (flags);
}
@@ -307,61 +292,112 @@ restrictions(
void
hack_restrict(
int op,
- struct sockaddr_in *resaddr,
- struct sockaddr_in *resmask,
+ struct sockaddr_storage *resaddr,
+ struct sockaddr_storage *resmask,
int mflags,
int flags
)
{
- register u_int32 addr;
- register u_int32 mask;
- register struct restrictlist *rl;
- register struct restrictlist *rlprev;
- int i;
-
- /*
- * Get address and mask in host byte order
- */
- addr = SRCADR(resaddr);
- mask = SRCADR(resmask);
- addr &= mask; /* make sure low bits are zero */
+ register u_int32 addr = 0;
+ register u_int32 mask = 0;
+ struct in6_addr addr6;
+ struct in6_addr mask6;
+ register struct restrictlist *rl = NULL;
+ register struct restrictlist *rlprev = NULL;
+ register struct restrictlist6 *rl6 = NULL;
+ register struct restrictlist6 *rlprev6 = NULL;
+ int i, addr_cmp, mask_cmp;
+ memset(&addr6, 0, sizeof(struct in6_addr));
+ memset(&mask6, 0, sizeof(struct in6_addr));
+
+ if (resaddr->ss_family == AF_INET) {
+ /*
+ * Get address and mask in host byte order
+ */
+ addr = SRCADR(resaddr);
+ mask = SRCADR(resmask);
+ addr &= mask; /* make sure low bits zero */
- /*
- * If this is the default address, point at first on list. Else
- * go searching for it.
- */
- if (addr == htonl(INADDR_ANY)) {
- rlprev = 0;
- rl = restrictlist;
- } else {
- rlprev = restrictlist;
- rl = rlprev->next;
- while (rl != 0) {
- if (rl->addr > addr) {
- rl = 0;
- break;
- } else if (rl->addr == addr) {
- if (rl->mask == mask) {
- if ((mflags & RESM_NTPONLY)
- == (rl->mflags & RESM_NTPONLY))
- break; /* exact match */
- if (!(mflags & RESM_NTPONLY)) {
- /*
- * No flag fits before flag
- */
+ /*
+ * If this is the default address, point at first on
+ * list. Else go searching for it.
+ */
+ if (addr == 0) {
+ rlprev = 0;
+ rl = restrictlist;
+ } else {
+ rlprev = restrictlist;
+ rl = rlprev->next;
+ while (rl != 0) {
+ if (rl->addr > addr) {
+ rl = 0;
+ break;
+ } else if (rl->addr == addr) {
+ if (rl->mask == mask) {
+ if ((mflags &
+ RESM_NTPONLY) ==
+ (rl->mflags &
+ RESM_NTPONLY))
+ break;
+
+ if (!(mflags &
+ RESM_NTPONLY)) {
+ rl = 0;
+ break;
+ }
+ } else if (rl->mask > mask) {
rl = 0;
break;
}
- /* continue on */
- } else if (rl->mask > mask) {
- rl = 0;
+ }
+ rlprev = rl;
+ rl = rl->next;
+ }
+ }
+ }
+
+ if (resaddr->ss_family == AF_INET6) {
+ mask6 = GET_INADDR6(*resmask);
+ SET_IPV6_ADDR_MASK(&addr6,
+ &GET_INADDR6(*resaddr), &mask6);
+ if (IN6_IS_ADDR_UNSPECIFIED(&addr6)) {
+ rlprev6 = 0;
+ rl6 = restrictlist6;
+ } else {
+ rlprev6 = restrictlist6;
+ rl6 = rlprev6->next;
+ while (rl6 != 0) {
+ addr_cmp = memcmp(&rl6->addr6, &addr6,
+ sizeof(addr6));
+ if (addr_cmp > 0) {
+ rl6 = 0;
break;
+ } else if (addr_cmp == 0) {
+ mask_cmp = memcmp(&rl6->mask6,
+ &mask6, sizeof(mask6));
+ if (mask_cmp == 0) {
+ if ((mflags &
+ RESM_NTPONLY) ==
+ (rl6->mflags &
+ RESM_NTPONLY))
+ break;
+
+ if (!(mflags &
+ RESM_NTPONLY)) {
+ rl6 = 0;
+ break;
+ }
+ } else if (mask_cmp > 0) {
+ rl6 = 0;
+ break;
+ }
}
+ rlprev6 = rl6;
+ rl6 = rl6->next;
}
- rlprev = rl;
- rl = rl->next;
}
}
+
/*
* In case the above wasn't clear :-), either rl now points
* at the entry this call refers to, or rl is zero and rlprev
@@ -372,89 +408,179 @@ hack_restrict(
/*
* Switch based on operation
*/
- switch (op) {
- case RESTRICT_FLAGS:
- /*
- * Here we add bits to the flags. If this is a new
- * restriction add it.
- */
- if (rl == 0) {
- if (numresfree == 0) {
- rl = (struct restrictlist *) emalloc(
- INCRESLIST*sizeof(struct restrictlist));
- memset((char *)rl, 0,
- INCRESLIST*sizeof(struct restrictlist));
-
- for (i = 0; i < INCRESLIST; i++) {
- rl->next = resfree;
- resfree = rl;
- rl++;
+ if (resaddr->ss_family == AF_INET) {
+ switch (op) {
+ case RESTRICT_FLAGS:
+ /*
+ * Here we add bits to the flags. If this is a
+ * new restriction add it.
+ */
+ if (rl == 0) {
+ if (numresfree == 0) {
+ rl = (struct restrictlist *)
+ emalloc(INCRESLIST *
+ sizeof(struct
+ restrictlist));
+ memset((char *)rl, 0,
+ INCRESLIST * sizeof(struct
+ restrictlist));
+ for (i = 0; i < INCRESLIST; i++) {
+ rl->next = resfree;
+ resfree = rl;
+ rl++;
+ }
+ numresfree = INCRESLIST;
}
- numresfree = INCRESLIST;
- }
- rl = resfree;
- resfree = rl->next;
- numresfree--;
+ rl = resfree;
+ resfree = rl->next;
+ numresfree--;
- rl->addr = addr;
- rl->mask = mask;
- rl->mflags = (u_short)mflags;
+ rl->addr = addr;
+ rl->mask = mask;
+ rl->mflags = (u_short)mflags;
- rl->next = rlprev->next;
- rlprev->next = rl;
- restrictcount++;
- }
- if ((rl->flags ^ (u_short)flags) & RES_LIMITED) {
- res_limited_refcnt++;
- mon_start(MON_RES); /* ensure data gets collected */
- }
- rl->flags |= (u_short)flags;
- break;
-
- case RESTRICT_UNFLAG:
- /*
- * Remove some bits from the flags. If we didn't
- * find this one, just return.
- */
- if (rl != 0) {
- if ((rl->flags ^ (u_short)flags) & RES_LIMITED) {
- res_limited_refcnt--;
- if (res_limited_refcnt == 0)
- mon_stop(MON_RES);
+ rl->next = rlprev->next;
+ rlprev->next = rl;
+ restrictcount++;
}
- rl->flags &= (u_short)~flags;
- }
- break;
+ if ((rl->flags ^ (u_short)flags) &
+ RES_LIMITED) {
+ res_limited_refcnt++;
+ mon_start(MON_RES);
+ }
+ rl->flags |= (u_short)flags;
+ break;
+
+ case RESTRICT_UNFLAG:
+ /*
+ * Remove some bits from the flags. If we didn't
+ * find this one, just return.
+ */
+ if (rl != 0) {
+ if ((rl->flags ^ (u_short)flags) &
+ RES_LIMITED) {
+ res_limited_refcnt--;
+ if (res_limited_refcnt == 0)
+ mon_stop(MON_RES);
+ }
+ rl->flags &= (u_short)~flags;
+ }
+ break;
- case RESTRICT_REMOVE:
- /*
- * Remove an entry from the table entirely if we found one.
- * Don't remove the default entry and don't remove an
- * interface entry.
- */
- if (rl != 0
- && rl->addr != htonl(INADDR_ANY)
- && !(rl->mflags & RESM_INTERFACE)) {
- rlprev->next = rl->next;
- restrictcount--;
- if (rl->flags & RES_LIMITED) {
- res_limited_refcnt--;
- if (res_limited_refcnt == 0)
- mon_stop(MON_RES);
+ case RESTRICT_REMOVE:
+ /*
+ * Remove an entry from the table entirely if we
+ * found one. Don't remove the default entry and
+ * don't remove an interface entry.
+ */
+ if (rl != 0
+ && rl->addr != htonl(INADDR_ANY)
+ && !(rl->mflags & RESM_INTERFACE)) {
+ rlprev->next = rl->next;
+ restrictcount--;
+ if (rl->flags & RES_LIMITED) {
+ res_limited_refcnt--;
+ if (res_limited_refcnt == 0)
+ mon_stop(MON_RES);
+ }
+ memset((char *)rl, 0,
+ sizeof(struct restrictlist));
+
+ rl->next = resfree;
+ resfree = rl;
+ numresfree++;
}
- memset((char *)rl, 0, sizeof(struct restrictlist));
+ break;
- rl->next = resfree;
- resfree = rl;
- numresfree++;
+ default:
+ break;
}
- break;
+ } else if (resaddr->ss_family == AF_INET6) {
+ switch (op) {
+ case RESTRICT_FLAGS:
+ /*
+ * Here we add bits to the flags. If this is a
+ * new restriction add it.
+ */
+ if (rl6 == 0) {
+ if (numresfree6 == 0) {
+ rl6 = (struct
+ restrictlist6 *)emalloc(
+ INCRESLIST * sizeof(struct
+ restrictlist6));
+ memset((char *)rl6, 0,
+ INCRESLIST * sizeof(struct
+ restrictlist6));
+
+ for (i = 0; i < INCRESLIST;
+ i++) {
+ rl6->next = resfree6;
+ resfree6 = rl6;
+ rl6++;
+ }
+ numresfree6 = INCRESLIST;
+ }
+ rl6 = resfree6;
+ resfree6 = rl6->next;
+ numresfree6--;
+ rl6->addr6 = addr6;
+ rl6->mask6 = mask6;
+ rl6->mflags = (u_short)mflags;
+ rl6->next = rlprev6->next;
+ rlprev6->next = rl6;
+ restrictcount6++;
+ }
+ if ((rl6->flags ^ (u_short)flags) &
+ RES_LIMITED) {
+ res_limited_refcnt6++;
+ mon_start(MON_RES);
+ }
+ rl6->flags |= (u_short)flags;
+ break;
+
+ case RESTRICT_UNFLAG:
+ /*
+ * Remove some bits from the flags. If we didn't
+ * find this one, just return.
+ */
+ if (rl6 != 0) {
+ if ((rl6->flags ^ (u_short)flags) &
+ RES_LIMITED) {
+ res_limited_refcnt6--;
+ if (res_limited_refcnt6 == 0)
+ mon_stop(MON_RES);
+ }
+ rl6->flags &= (u_short)~flags;
+ }
+ break;
+
+ case RESTRICT_REMOVE:
+ /*
+ * Remove an entry from the table entirely if we
+ * found one. Don't remove the default entry and
+ * don't remove an interface entry.
+ */
+ if (rl6 != 0 &&
+ !IN6_IS_ADDR_UNSPECIFIED(&rl6->addr6)
+ && !(rl6->mflags & RESM_INTERFACE)) {
+ rlprev6->next = rl6->next;
+ restrictcount6--;
+ if (rl6->flags & RES_LIMITED) {
+ res_limited_refcnt6--;
+ if (res_limited_refcnt6 == 0)
+ mon_stop(MON_RES);
+ }
+ memset((char *)rl6, 0,
+ sizeof(struct restrictlist6));
+ rl6->next = resfree6;
+ resfree6 = rl6;
+ numresfree6++;
+ }
+ break;
- default:
- /* Oh, well */
- break;
+ default:
+ break;
+ }
}
-
- /* done! */
}
diff --git a/contrib/ntp/ntpd/ntp_timer.c b/contrib/ntp/ntpd/ntp_timer.c
index c2b1d724383d..6f0f18bea096 100644
--- a/contrib/ntp/ntpd/ntp_timer.c
+++ b/contrib/ntp/ntpd/ntp_timer.c
@@ -23,10 +23,6 @@
# include "ntp_timer.h"
#endif
-#ifdef PUBKEY
-#include "ntp_crypto.h"
-#endif /* PUBKEY */
-
/*
* These routines provide support for the event timer. The timer is
* implemented by an interrupt routine which sets a flag once every
@@ -50,10 +46,10 @@ static u_long adjust_timer; /* second timer */
static u_long keys_timer; /* minute timer */
static u_long hourly_timer; /* hour timer */
static u_long huffpuff_timer; /* huff-n'-puff timer */
-#ifdef AUTOKEY
+#ifdef OPENSSL
static u_long revoke_timer; /* keys revoke timer */
-u_long sys_revoke = 1 << KEY_REVOKE; /* keys revoke timeout */
-#endif /* AUTOKEY */
+u_char sys_revoke = KEY_REVOKE; /* keys revoke timeout (log2 s) */
+#endif /* OPENSSL */
/*
* Statistics counter for the interested.
@@ -83,6 +79,57 @@ static HANDLE WaitableTimerHandle = NULL;
static RETSIGTYPE alarming P((int));
#endif /* SYS_WINNT */
+#if !defined(VMS)
+# if !defined SYS_WINNT || defined(SYS_CYGWIN32)
+# ifndef HAVE_TIMER_SETTIME
+ struct itimerval itimer;
+# else
+ static timer_t ntpd_timerid;
+ struct itimerspec itimer;
+# endif /* HAVE_TIMER_SETTIME */
+# endif /* SYS_WINNT */
+#endif /* VMS */
+
+/*
+ * reinit_timer - reinitialize interval timer.
+ */
+void
+reinit_timer(void)
+{
+#if !defined(SYS_WINNT) && !defined(VMS)
+# if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME)
+ timer_gettime(ntpd_timerid, &itimer);
+ if (itimer.it_value.tv_sec < 0 || itimer.it_value.tv_sec > (1<<EVENT_TIMEOUT)) {
+ itimer.it_value.tv_sec = (1<<EVENT_TIMEOUT);
+ }
+ if (itimer.it_value.tv_nsec < 0 ) {
+ itimer.it_value.tv_nsec = 0;
+ }
+ if (itimer.it_value.tv_sec == 0 && itimer.it_value.tv_nsec == 0) {
+ itimer.it_value.tv_sec = (1<<EVENT_TIMEOUT);
+ itimer.it_value.tv_nsec = 0;
+ }
+ itimer.it_interval.tv_sec = (1<<EVENT_TIMEOUT);
+ itimer.it_interval.tv_nsec = 0;
+ timer_settime(ntpd_timerid, 0 /*!TIMER_ABSTIME*/, &itimer, NULL);
+# else
+ getitimer(ITIMER_REAL, &itimer);
+ if (itimer.it_value.tv_sec < 0 || itimer.it_value.tv_sec > (1<<EVENT_TIMEOUT)) {
+ itimer.it_value.tv_sec = (1<<EVENT_TIMEOUT);
+ }
+ if (itimer.it_value.tv_usec < 0 ) {
+ itimer.it_value.tv_usec = 0;
+ }
+ if (itimer.it_value.tv_sec == 0 && itimer.it_value.tv_usec == 0) {
+ itimer.it_value.tv_sec = (1<<EVENT_TIMEOUT);
+ itimer.it_value.tv_usec = 0;
+ }
+ itimer.it_interval.tv_sec = (1<<EVENT_TIMEOUT);
+ itimer.it_interval.tv_usec = 0;
+ setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0);
+# endif
+# endif /* VMS */
+}
/*
* init_timer - initialize the timer data structures
@@ -90,20 +137,10 @@ static RETSIGTYPE alarming P((int));
void
init_timer(void)
{
-#if !defined(VMS)
-# if !defined SYS_WINNT || defined(SYS_CYGWIN32)
-# ifndef HAVE_TIMER_SETTIME
- struct itimerval itimer;
-# else
- static timer_t ntpd_timerid; /* should be global if we ever want */
- /* to kill timer without rebooting ... */
- struct itimerspec itimer;
-# endif /* HAVE_TIMER_SETTIME */
-# else /* SYS_WINNT */
+# if defined SYS_WINNT & !defined(SYS_CYGWIN32)
HANDLE hToken;
TOKEN_PRIVILEGES tkp;
# endif /* SYS_WINNT */
-#endif /* !VMS */
/*
* Initialize...
@@ -218,6 +255,9 @@ void
timer(void)
{
register struct peer *peer, *next_peer;
+#ifdef OPENSSL
+ char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
+#endif /* OPENSSL */
u_int n;
current_time += (1<<EVENT_TIMEOUT);
@@ -228,6 +268,7 @@ timer(void)
if (adjust_timer <= current_time) {
adjust_timer += 1;
adj_host_clock();
+ kod_proto();
}
/*
@@ -269,20 +310,21 @@ timer(void)
huffpuff();
}
-#ifdef AUTOKEY
+#ifdef OPENSSL
/*
* Garbage collect old keys and generate new private value
*/
if (revoke_timer <= current_time) {
- revoke_timer += sys_revoke;
+ revoke_timer += RANDPOLL(sys_revoke);
expire_all();
+ sprintf(statstr, "refresh ts %u", ntohl(hostval.tstamp));
+ record_crypto_stats(NULL, statstr);
#ifdef DEBUG
if (debug)
- printf("key expire: at %lu next %lu\n",
- current_time, revoke_timer);
+ printf("timer: %s\n", statstr);
#endif
}
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
/*
* Finally, call the hourly routine.
diff --git a/contrib/ntp/ntpd/ntp_util.c b/contrib/ntp/ntpd/ntp_util.c
index f86e9303768c..135f9b3642f9 100644
--- a/contrib/ntp/ntpd/ntp_util.c
+++ b/contrib/ntp/ntpd/ntp_util.c
@@ -39,11 +39,10 @@
/*
* This contains odds and ends. Right now the only thing you'll find
- * in here is the hourly stats printer and some code to support rereading
- * the keys file, but I may eventually put other things in here such as
- * code to do something with the leap bits.
+ * in here is the hourly stats printer and some code to support
+ * rereading the keys file, but I may eventually put other things in
+ * here such as code to do something with the leap bits.
*/
-
/*
* Name of the keys file
*/
@@ -76,6 +75,10 @@ static FILEGEN peerstats;
static FILEGEN loopstats;
static FILEGEN clockstats;
static FILEGEN rawstats;
+static FILEGEN sysstats;
+#ifdef OPENSSL
+static FILEGEN cryptostats;
+#endif /* OPENSSL */
/*
* This controls whether stats are written to the fileset. Provided
@@ -97,6 +100,11 @@ init_util(void)
#define LOOPNAME "loopstats"
#define CLOCKNAME "clockstats"
#define RAWNAME "rawstats"
+#define STANAME "systats"
+#ifdef OPENSSL
+#define CRYPTONAME "cryptostats"
+#endif /* OPENSSL */
+
peerstats.fp = NULL;
peerstats.prefix = &statsdir[0];
peerstats.basename = (char*)emalloc(strlen(PEERNAME)+1);
@@ -133,11 +141,34 @@ init_util(void)
rawstats.flag = FGEN_FLAG_LINK; /* not yet enabled !!*/
filegen_register("rawstats", &rawstats);
+ sysstats.fp = NULL;
+ sysstats.prefix = &statsdir[0];
+ sysstats.basename = (char*)emalloc(strlen(STANAME)+1);
+ strcpy(sysstats.basename, STANAME);
+ sysstats.id = 0;
+ sysstats.type = FILEGEN_DAY;
+ sysstats.flag = FGEN_FLAG_LINK; /* not yet enabled !!*/
+ filegen_register("sysstats", &sysstats);
+
+#ifdef OPENSSL
+ cryptostats.fp = NULL;
+ cryptostats.prefix = &statsdir[0];
+ cryptostats.basename = (char*)emalloc(strlen(CRYPTONAME)+1);
+ strcpy(cryptostats.basename, CRYPTONAME);
+ cryptostats.id = 0;
+ cryptostats.type = FILEGEN_DAY;
+ cryptostats.flag = FGEN_FLAG_LINK; /* not yet enabled !!*/
+ filegen_register("cryptostats", &cryptostats);
+#endif /* OPENSSL */
+
#undef PEERNAME
#undef LOOPNAME
#undef CLOCKNAME
#undef RAWNAME
-
+#undef STANAME
+#ifdef OPENSSL
+#undef CRYPTONAME
+#endif /* OPENSSL */
}
@@ -183,27 +214,27 @@ hourly_stats(void)
#if !defined(VMS)
/* (prr) getpriority returns -1 on error, but -1 is also a valid
- * return value (!), so instead we have to zero errno before the call
- * and check it for non-zero afterwards.
+ * return value (!), so instead we have to zero errno before the
+ * call and check it for non-zero afterwards.
*/
-
errno = 0;
prio_set = 0;
o_prio = getpriority(PRIO_PROCESS,0); /* Save setting */
- /* (prr) if getpriority succeeded, call setpriority to raise
+ /*
+ * (prr) if getpriority succeeded, call setpriority to raise
* scheduling priority as high as possible. If that succeeds
* as well, set the prio_set flag so we remember to reset
- * priority to its previous value below. Note that on Solaris 2.6
- * (and beyond?), both getpriority and setpriority will fail with
- * ESRCH, because sched_setscheduler (called from main) put us in
- * the real-time scheduling class which setpriority doesn't know about.
- * Being in the real-time class is better than anything setpriority
- * can do, anyhow, so this error is silently ignored.
+ * priority to its previous value below. Note that on Solaris
+ * 2.6 (and beyond?), both getpriority and setpriority will fail
+ * with ESRCH, because sched_setscheduler (called from main) put
+ * us in the real-time scheduling class which setpriority
+ * doesn't know about. Being in the real-time class is better
+ * than anything setpriority can do, anyhow, so this error is
+ * silently ignored.
*/
-
if ((errno == 0) && (setpriority(PRIO_PROCESS,0,-20) == 0))
- prio_set = 1; /* overdrive */
+ prio_set = 1; /* overdrive */
#endif /* VMS */
#ifdef HAVE_GETCLOCK
(void) getclock(TIMEOFDAY, &ts);
@@ -212,22 +243,23 @@ hourly_stats(void)
#else /* not HAVE_GETCLOCK */
GETTIMEOFDAY(&tv,(struct timezone *)NULL);
#endif /* not HAVE_GETCLOCK */
- if (ntp_set_tod(&tv,(struct timezone *)NULL) != 0)
- {
+ if (ntp_set_tod(&tv,(struct timezone *)NULL) != 0) {
msyslog(LOG_ERR, "can't sync battery time: %m");
}
#if !defined(VMS)
if (prio_set)
- setpriority(PRIO_PROCESS, 0, o_prio); /* downshift */
+ setpriority(PRIO_PROCESS, 0, o_prio); /* downshift */
#endif /* VMS */
#endif /* DOSYNCTODR */
NLOG(NLOG_SYSSTATIST)
msyslog(LOG_INFO,
"offset %.6f sec freq %.3f ppm error %.6f poll %d",
- last_offset, drift_comp * 1e6, sys_jitter, sys_poll);
+ last_offset, drift_comp * 1e6, sys_jitter,
+ sys_poll);
+ record_sys_stats();
if (stats_drift_file != 0) {
if ((fp = fopen(stats_temp_file, "w")) == NULL) {
msyslog(LOG_ERR, "can't open %s: %m",
@@ -238,7 +270,7 @@ hourly_stats(void)
(void)fclose(fp);
/* atomic */
#ifdef SYS_WINNT
- (void) unlink(stats_drift_file); /* rename semantics differ under NT */
+ (void) _unlink(stats_drift_file); /* rename semantics differ under NT */
#endif /* SYS_WINNT */
#ifndef NO_RENAME
@@ -281,14 +313,14 @@ stats_config(
double old_drift;
int len;
- /* Expand environment strings under Windows NT, since the command
- * interpreter doesn't do this, the program must.
+ /*
+ * Expand environment strings under Windows NT, since the
+ * command interpreter doesn't do this, the program must.
*/
#ifdef SYS_WINNT
char newvalue[MAX_PATH], parameter[MAX_PATH];
- if (!ExpandEnvironmentStrings(invalue, newvalue, MAX_PATH))
- {
+ if (!ExpandEnvironmentStrings(invalue, newvalue, MAX_PATH)) {
switch(item) {
case STATS_FREQ_FILE:
strcpy(parameter,"STATS_FREQ_FILE");
@@ -307,15 +339,13 @@ stats_config(
msyslog(LOG_ERR,
"ExpandEnvironmentStrings(%s) failed: %m\n", parameter);
- }
- else
+ } else {
value = newvalue;
+ }
#else
value = invalue;
#endif /* SYS_WINNT */
-
-
switch(item) {
case STATS_FREQ_FILE:
if (stats_drift_file != 0) {
@@ -330,48 +360,41 @@ stats_config(
stats_drift_file = (char*)emalloc((u_int)(len + 1));
#if !defined(VMS)
- stats_temp_file = (char*)emalloc((u_int)(len + sizeof(".TEMP")));
+ stats_temp_file = (char*)emalloc((u_int)(len +
+ sizeof(".TEMP")));
#else
- stats_temp_file = (char*)emalloc((u_int)(len + sizeof("-TEMP")));
+ stats_temp_file = (char*)emalloc((u_int)(len +
+ sizeof("-TEMP")));
#endif /* VMS */
memmove(stats_drift_file, value, (unsigned)(len+1));
memmove(stats_temp_file, value, (unsigned)len);
#if !defined(VMS)
- memmove(stats_temp_file + len, ".TEMP", sizeof(".TEMP"));
+ memmove(stats_temp_file + len, ".TEMP",
+ sizeof(".TEMP"));
#else
- memmove(stats_temp_file + len, "-TEMP", sizeof("-TEMP"));
+ memmove(stats_temp_file + len, "-TEMP",
+ sizeof("-TEMP"));
#endif /* VMS */
/*
- * Open drift file and read frequency
+ * Open drift file and read frequency. If the file is
+ * missing or contains errors, tell the loop to reset.
*/
if ((fp = fopen(stats_drift_file, "r")) == NULL) {
+ loop_config(LOOP_DRIFTCOMP, 1e9);
break;
}
if (fscanf(fp, "%lf", &old_drift) != 1) {
- msyslog(LOG_ERR, "Un-parsable frequency in %s",
+ msyslog(LOG_ERR, "Frequency format error in %s",
stats_drift_file);
- (void) fclose(fp);
+ loop_config(LOOP_DRIFTCOMP, 1e9);
+ fclose(fp);
break;
}
- (void) fclose(fp);
- if (
-#ifdef HAVE_FINITE
- !finite(old_drift)
-#else /* not HAVE_FINITE */
-# ifdef HAVE_ISFINITE
- !isfinite(old_drift)
-# else /* not HAVE_ISFINITE */
- 0
-# endif /* not HAVE_ISFINITE */
-#endif /* not HAVE_FINITE */
- || (fabs(old_drift) > (NTP_MAXFREQ * 1e6))) {
- msyslog(LOG_ERR, "invalid frequency (%f) in %s",
- old_drift, stats_drift_file);
- old_drift = 0.0;
- }
- msyslog(LOG_INFO, "frequency initialized %.3f from %s",
- old_drift, stats_drift_file);
+ fclose(fp);
+ msyslog(LOG_INFO,
+ "frequency initialized %.3f PPM from %s",
+ old_drift, stats_drift_file);
loop_config(LOOP_DRIFTCOMP, old_drift / 1e6);
break;
@@ -409,6 +432,20 @@ stats_config(
rawstats.fp = NULL;
filegen_setup(&rawstats, now.l_ui);
}
+ if(sysstats.prefix == &statsdir[0] &&
+ sysstats.fp != NULL) {
+ fclose(sysstats.fp);
+ sysstats.fp = NULL;
+ filegen_setup(&sysstats, now.l_ui);
+ }
+#ifdef OPENSSL
+ if(cryptostats.prefix == &statsdir[0] &&
+ cryptostats.fp != NULL) {
+ fclose(cryptostats.fp);
+ cryptostats.fp = NULL;
+ filegen_setup(&cryptostats, now.l_ui);
+ }
+#endif /* OPENSSL */
}
break;
@@ -442,38 +479,28 @@ stats_config(
*/
void
record_peer_stats(
- struct sockaddr_in *addr,
- int status,
- double offset,
- double delay,
- double dispersion,
- double skew
+ struct sockaddr_storage *addr,
+ int status,
+ double offset,
+ double delay,
+ double dispersion,
+ double skew
)
{
- struct timeval tv;
-#ifdef HAVE_GETCLOCK
- struct timespec ts;
-#endif
- u_long day, sec, msec;
+ l_fp now;
+ u_long day;
if (!stats_control)
return;
-#ifdef HAVE_GETCLOCK
- (void) getclock(TIMEOFDAY, &ts);
- tv.tv_sec = ts.tv_sec;
- tv.tv_usec = ts.tv_nsec / 1000;
-#else /* not HAVE_GETCLOCK */
- GETTIMEOFDAY(&tv, (struct timezone *)NULL);
-#endif /* not HAVE_GETCLOCK */
- day = tv.tv_sec / 86400 + MJD_1970;
- sec = tv.tv_sec % 86400;
- msec = tv.tv_usec / 1000;
- filegen_setup(&peerstats, (u_long)(tv.tv_sec + JAN_1970));
+ get_systime(&now);
+ filegen_setup(&peerstats, now.l_ui);
+ day = now.l_ui / 86400 + MJD_1900;
+ now.l_ui %= 86400;
if (peerstats.fp != NULL) {
fprintf(peerstats.fp,
- "%lu %lu.%03lu %s %x %.9f %.9f %.9f %.9f\n",
- day, sec, msec, ntoa(addr), status, offset,
+ "%lu %s %s %x %.9f %.9f %.9f %.9f\n",
+ day, ulfptoa(&now, 3), stoa(addr), status, offset,
delay, dispersion, skew);
fflush(peerstats.fp);
}
@@ -490,37 +517,27 @@ record_peer_stats(
*/
void
record_loop_stats(
- double offset,
- double freq,
- double jitter,
- double stability,
- int poll
+ double offset,
+ double freq,
+ double jitter,
+ double stability,
+ int spoll
)
{
- struct timeval tv;
-#ifdef HAVE_GETCLOCK
- struct timespec ts;
-#endif
- u_long day, sec, msec;
+ l_fp now;
+ u_long day;
if (!stats_control)
return;
-#ifdef HAVE_GETCLOCK
- (void) getclock(TIMEOFDAY, &ts);
- tv.tv_sec = ts.tv_sec;
- tv.tv_usec = ts.tv_nsec / 1000;
-#else /* not HAVE_GETCLOCK */
- GETTIMEOFDAY(&tv, (struct timezone *)NULL);
-#endif /* not HAVE_GETCLOCK */
- day = tv.tv_sec / 86400 + MJD_1970;
- sec = tv.tv_sec % 86400;
- msec = tv.tv_usec / 1000;
- filegen_setup(&loopstats, (u_long)(tv.tv_sec + JAN_1970));
+ get_systime(&now);
+ filegen_setup(&loopstats, now.l_ui);
+ day = now.l_ui / 86400 + MJD_1900;
+ now.l_ui %= 86400;
if (loopstats.fp != NULL) {
- fprintf(loopstats.fp, "%lu %lu.%03lu %.9f %.6f %.9f %.6f %d\n",
- day, sec, msec, offset, freq * 1e6, jitter,
- stability * 1e6, poll);
+ fprintf(loopstats.fp, "%lu %s %.9f %.6f %.9f %.6f %d\n",
+ day, ulfptoa(&now, 3), offset, freq * 1e6, jitter,
+ stability * 1e6, spoll);
fflush(loopstats.fp);
}
}
@@ -536,33 +553,23 @@ record_loop_stats(
*/
void
record_clock_stats(
- struct sockaddr_in *addr,
+ struct sockaddr_storage *addr,
const char *text
)
{
- struct timeval tv;
-#ifdef HAVE_GETCLOCK
- struct timespec ts;
-#endif
- u_long day, sec, msec;
+ l_fp now;
+ u_long day;
if (!stats_control)
return;
-#ifdef HAVE_GETCLOCK
- (void) getclock(TIMEOFDAY, &ts);
- tv.tv_sec = ts.tv_sec;
- tv.tv_usec = ts.tv_nsec / 1000;
-#else /* not HAVE_GETCLOCK */
- GETTIMEOFDAY(&tv, (struct timezone *)NULL);
-#endif /* not HAVE_GETCLOCK */
- day = tv.tv_sec / 86400 + MJD_1970;
- sec = tv.tv_sec % 86400;
- msec = tv.tv_usec / 1000;
- filegen_setup(&clockstats, (u_long)(tv.tv_sec + JAN_1970));
+ get_systime(&now);
+ filegen_setup(&clockstats, now.l_ui);
+ day = now.l_ui / 86400 + MJD_1900;
+ now.l_ui %= 86400;
if (clockstats.fp != NULL) {
- fprintf(clockstats.fp, "%lu %lu.%03lu %s %s\n",
- day, sec, msec, ntoa(addr), text);
+ fprintf(clockstats.fp, "%lu %s %s %s\n",
+ day, ulfptoa(&now, 3), stoa(addr), text);
fflush(clockstats.fp);
}
}
@@ -579,43 +586,116 @@ record_clock_stats(
*/
void
record_raw_stats(
- struct sockaddr_in *srcadr,
- struct sockaddr_in *dstadr,
- l_fp *t1,
- l_fp *t2,
- l_fp *t3,
- l_fp *t4
+ struct sockaddr_storage *srcadr,
+ struct sockaddr_storage *dstadr,
+ l_fp *t1,
+ l_fp *t2,
+ l_fp *t3,
+ l_fp *t4
)
{
- struct timeval tv;
-#ifdef HAVE_GETCLOCK
- struct timespec ts;
-#endif
- u_long day, sec, msec;
+ l_fp now;
+ u_long day;
if (!stats_control)
return;
-#ifdef HAVE_GETCLOCK
- (void) getclock(TIMEOFDAY, &ts);
- tv.tv_sec = ts.tv_sec;
- tv.tv_usec = ts.tv_nsec / 1000;
-#else /* not HAVE_GETCLOCK */
- GETTIMEOFDAY(&tv, (struct timezone *)NULL);
-#endif /* not HAVE_GETCLOCK */
- day = tv.tv_sec / 86400 + MJD_1970;
- sec = tv.tv_sec % 86400;
- msec = tv.tv_usec / 1000;
- filegen_setup(&rawstats, (u_long)(tv.tv_sec + JAN_1970));
+ get_systime(&now);
+ filegen_setup(&rawstats, now.l_ui);
+ day = now.l_ui / 86400 + MJD_1900;
+ now.l_ui %= 86400;
if (rawstats.fp != NULL) {
- fprintf(rawstats.fp, "%lu %lu.%03lu %s %s %s %s %s %s\n",
- day, sec, msec, ntoa(srcadr), ntoa(dstadr),
+ fprintf(rawstats.fp, "%lu %s %s %s %s %s %s %s\n",
+ day, ulfptoa(&now, 3), stoa(srcadr), stoa(dstadr),
ulfptoa(t1, 9), ulfptoa(t2, 9), ulfptoa(t3, 9),
ulfptoa(t4, 9));
fflush(rawstats.fp);
}
}
+
+/*
+ * record_sys_stats - write system statistics to file
+ *
+ * file format
+ * time (s past midnight)
+ * time since startup (hr)
+ * packets recieved
+ * packets processed
+ * current version
+ * previous version
+ * bad version
+ * access denied
+ * bad length or format
+ * bad authentication
+ * rate exceeded
+ */
+void
+record_sys_stats(void)
+{
+ l_fp now;
+ u_long day;
+
+ if (!stats_control)
+ return;
+
+ get_systime(&now);
+ filegen_setup(&sysstats, now.l_ui);
+ day = now.l_ui / 86400 + MJD_1900;
+ now.l_ui %= 86400;
+ if (sysstats.fp != NULL) {
+ fprintf(sysstats.fp,
+ "%lu %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n",
+ day, ulfptoa(&now, 3), sys_stattime / 3600,
+ sys_received, sys_processed, sys_newversionpkt,
+ sys_oldversionpkt, sys_unknownversion,
+ sys_restricted, sys_badlength, sys_badauth,
+ sys_limitrejected);
+ fflush(sysstats.fp);
+ proto_clr_stats();
+ }
+}
+
+
+#ifdef OPENSSL
+/*
+ * record_crypto_stats - write crypto statistics to file
+ *
+ * file format:
+ * day (mjd)
+ * time (s past midnight)
+ * peer (ip address)
+ * text message
+ */
+void
+record_crypto_stats(
+ struct sockaddr_storage *addr,
+ const char *text
+ )
+{
+ l_fp now;
+ u_long day;
+
+ if (!stats_control)
+ return;
+
+ get_systime(&now);
+ filegen_setup(&cryptostats, now.l_ui);
+ day = now.l_ui / 86400 + MJD_1900;
+ now.l_ui %= 86400;
+ if (cryptostats.fp != NULL) {
+ if (addr == NULL)
+ fprintf(cryptostats.fp, "%lu %s %s\n",
+ day, ulfptoa(&now, 3), text);
+ else
+ fprintf(cryptostats.fp, "%lu %s %s %s\n",
+ day, ulfptoa(&now, 3), stoa(addr), text);
+ fflush(cryptostats.fp);
+ }
+}
+#endif /* OPENSSL */
+
+
/*
* getauthkeys - read the authentication keys from the specified file
*/
@@ -667,3 +747,51 @@ rereadkeys(void)
if (key_file_name != 0)
authreadkeys(key_file_name);
}
+
+/*
+ * sock_hash - hash an sockaddr_storage structure
+ */
+int
+sock_hash(
+ struct sockaddr_storage *addr
+ )
+{
+ int hashVal;
+ int i;
+ int len;
+ char *ch;
+
+ hashVal = 0;
+ len = 0;
+ /*
+ * We can't just hash the whole thing because there are hidden
+ * fields in sockaddr_in6 that might be filled in by recvfrom(),
+ * so just use the family, port and address.
+ */
+ ch = (char *)&addr->ss_family;
+ hashVal = 37 * hashVal + (int)*ch;
+ if (sizeof(addr->ss_family) > 1) {
+ ch++;
+ hashVal = 37 * hashVal + (int)*ch;
+ }
+ switch(addr->ss_family) {
+ case AF_INET:
+ ch = (char *)&((struct sockaddr_in *)addr)->sin_addr;
+ len = sizeof(struct in_addr);
+ break;
+ case AF_INET6:
+ ch = (char *)&((struct sockaddr_in6 *)addr)->sin6_addr;
+ len = sizeof(struct in6_addr);
+ break;
+ }
+
+ for (i = 0; i < len ; i++)
+ hashVal = 37 * hashVal + (int)*(ch + i);
+
+ hashVal = hashVal % 128; /* % MON_HASH_SIZE hardcoded */
+
+ if (hashVal < 0)
+ hashVal += 128;
+
+ return hashVal;
+}
diff --git a/contrib/ntp/ntpd/ntpd.c b/contrib/ntp/ntpd/ntpd.c
index 1b80560c625d..0b052535e777 100644
--- a/contrib/ntp/ntpd/ntpd.c
+++ b/contrib/ntp/ntpd/ntpd.c
@@ -11,6 +11,10 @@
#include "ntp_io.h"
#include "ntp_stdlib.h"
+#ifdef SIM
+#include "ntpsim.h"
+#endif
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -40,6 +44,7 @@
# include <process.h>
# include <io.h>
# include "../libntp/log.h"
+# include <clockstuff.h>
# include <crtdbg.h>
#endif /* SYS_WINNT */
#if defined(HAVE_RTPRIO)
@@ -99,9 +104,11 @@
# include <sys/ci/ciioctl.h>
#endif
-#ifdef PUBKEY
-#include "ntp_crypto.h"
-#endif /* PUBKEY */
+#ifdef HAVE_CLOCKCTL
+# include <ctype.h>
+# include <grp.h>
+# include <pwd.h>
+#endif
/*
* Signals we catch for debugging. If not debugging we ignore them.
@@ -123,11 +130,13 @@
/* handles for various threads, process, and objects */
HANDLE ResolverThreadHandle = NULL;
/* variables used to inform the Service Control Manager of our current state */
+BOOL NoWinService = FALSE;
SERVICE_STATUS ssStatus;
SERVICE_STATUS_HANDLE sshStatusHandle;
HANDLE WaitHandles[3] = { NULL, NULL, NULL };
char szMsgPath[255];
static BOOL WINAPI OnConsoleEvent(DWORD dwCtrlType);
+BOOL init_randfile();
#endif /* SYS_WINNT */
/*
@@ -146,10 +155,26 @@ int priority_done = 2; /* 0 - Set priority */
volatile int debug;
/*
+ * Set the processing not to be in the forground
+ */
+int forground_process = FALSE;
+
+/*
* No-fork flag. If set, we do not become a background daemon.
*/
int nofork;
+#ifdef HAVE_CLOCKCTL
+char *user = NULL; /* User to switch to */
+char *group = NULL; /* group to switch to */
+char *chrootdir = NULL; /* directory to chroot to */
+int sw_uid;
+int sw_gid;
+char *endp;
+struct group *gr;
+struct passwd *pw;
+#endif /* HAVE_CLOCKCTL */
+
/*
* Initializing flag. All async routines watch this and only do their
* thing when it is clear.
@@ -176,8 +201,10 @@ static RETSIGTYPE finish P((int));
#endif /* SIGDIE2 */
#ifdef DEBUG
+#ifndef SYS_WINNT
static RETSIGTYPE moredebug P((int));
static RETSIGTYPE lessdebug P((int));
+#endif
#else /* not DEBUG */
static RETSIGTYPE no_debug P((int));
#endif /* not DEBUG */
@@ -185,7 +212,16 @@ static RETSIGTYPE no_debug P((int));
int ntpdmain P((int, char **));
static void set_process_priority P((void));
-
+#ifdef SIM
+int
+main(
+ int argc,
+ char *argv[]
+ )
+{
+ return ntpsim(argc, argv);
+}
+#else /* SIM */
#ifdef NO_MAIN_ALLOWED
CALL(ntpd,"ntpd",ntpdmain);
#else
@@ -198,6 +234,7 @@ main(
return ntpdmain(argc, argv);
}
#endif
+#endif /* SIM */
#ifdef _AIX
/*
@@ -335,10 +372,6 @@ ntpdmain(
{
l_fp now;
char *cp;
-#ifdef AUTOKEY
- u_int n;
- char hostname[MAXFILENAME];
-#endif /* AUTOKEY */
struct recvbuf *rbuflist;
struct recvbuf *rbuf;
#ifdef _AIX /* HMS: ifdef SIGDANGER? */
@@ -384,9 +417,17 @@ ntpdmain(
#endif
getstartup(argc, argv); /* startup configuration, may set debug */
+ if (debug)
+ printf("%s\n", Version);
+
/*
* Initialize random generator and public key pair
*/
+#ifdef SYS_WINNT
+ /* Initialize random file before OpenSSL checks */
+ if(!init_randfile())
+ msyslog(LOG_ERR, "Unable to initialize .rnd file\n");
+#endif
get_systime(&now);
SRANDOM((int)(now.l_i * now.l_uf));
@@ -414,12 +455,12 @@ ntpdmain(
int max_fd;
#endif /* not F_CLOSEM */
+#if defined(F_CLOSEM)
/*
* From 'Writing Reliable AIX Daemons,' SG24-4946-00,
* by Eric Agar (saves us from doing 32767 system
* calls)
*/
-#if defined(F_CLOSEM)
if (fcntl(0, F_CLOSEM, 0) == -1)
msyslog(LOG_ERR, "ntpd: failed to close open files(): %m");
#else /* not F_CLOSEM */
@@ -484,16 +525,22 @@ ntpdmain(
# else /* SYS_WINNT */
{
- SERVICE_TABLE_ENTRY dispatchTable[] = {
+ if (NoWinService == FALSE) {
+ SERVICE_TABLE_ENTRY dispatchTable[] = {
{ TEXT("NetworkTimeProtocol"), (LPSERVICE_MAIN_FUNCTION)service_main },
{ NULL, NULL }
- };
+ };
- /* daemonize */
- if (!StartServiceCtrlDispatcher(dispatchTable))
- {
- msyslog(LOG_ERR, "StartServiceCtrlDispatcher: %m");
- ExitProcess(2);
+ /* daemonize */
+ if (!StartServiceCtrlDispatcher(dispatchTable))
+ {
+ msyslog(LOG_ERR, "StartServiceCtrlDispatcher: %m");
+ ExitProcess(2);
+ }
+ }
+ else {
+ service_main(argc, argv);
+ return 0;
}
}
# endif /* SYS_WINNT */
@@ -520,15 +567,13 @@ service_main(
char *cp;
struct recvbuf *rbuflist;
struct recvbuf *rbuf;
-#ifdef AUTOKEY
- u_int n;
- char hostname[MAXFILENAME];
-#endif /* AUTOKEY */
- if(!debug)
+
+ if(!debug && NoWinService == FALSE)
{
/* register our service control handler */
- if (!(sshStatusHandle = RegisterServiceCtrlHandler( TEXT("NetworkTimeProtocol"),
- (LPHANDLER_FUNCTION)service_ctrl)))
+ sshStatusHandle = RegisterServiceCtrlHandler( TEXT("NetworkTimeProtocol"),
+ (LPHANDLER_FUNCTION)service_ctrl);
+ if(sshStatusHandle == 0)
{
msyslog(LOG_ERR, "RegisterServiceCtrlHandler failed: %m");
return;
@@ -567,7 +612,7 @@ service_main(
debug = 0; /* will be immediately re-initialized 8-( */
getstartup(argc, argv); /* startup configuration, catch logfile this time */
-#if !defined(SYS_WINNT) && !defined(VMS)
+#if !defined(VMS)
# ifndef LOG_DAEMON
openlog(cp, LOG_PID);
@@ -624,6 +669,25 @@ service_main(
#endif
#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && defined(MCL_FUTURE)
+# ifdef HAVE_SETRLIMIT
+ /*
+ * Set the stack limit to something smaller, so that we don't lock a lot
+ * of unused stack memory.
+ */
+ {
+ struct rlimit rl;
+
+ if (getrlimit(RLIMIT_STACK, &rl) != -1
+ && (rl.rlim_cur = 20 * 4096) < rl.rlim_max)
+ {
+ if (setrlimit(RLIMIT_STACK, &rl) == -1)
+ {
+ msyslog(LOG_ERR,
+ "Cannot adjust stack limit for mlockall: %m");
+ }
+ }
+ }
+# endif /* HAVE_SETRLIMIT */
/*
* lock the process into memory
*/
@@ -741,15 +805,9 @@ service_main(
debug = 0;
#endif
getconfig(argc, argv);
-#ifdef AUTOKEY
- gethostname(hostname, MAXFILENAME);
- n = strlen(hostname) + 1;
- sys_hostname = emalloc(n);
- memcpy(sys_hostname, hostname, n);
-#ifdef PUBKEY
+#ifdef OPENSSL
crypto_setup();
-#endif /* PUBKEY */
-#endif /* AUTOKEY */
+#endif /* OPENSSL */
initializing = 0;
#if defined(SYS_WINNT) && !defined(NODETACH)
@@ -757,23 +815,83 @@ service_main(
if(!debug)
{
# endif
+ if (NoWinService == FALSE) {
/* report to the service control manager that the service is running */
- ssStatus.dwCurrentState = SERVICE_RUNNING;
- ssStatus.dwWin32ExitCode = NO_ERROR;
- if (!SetServiceStatus(sshStatusHandle, &ssStatus))
- {
- msyslog(LOG_ERR, "SetServiceStatus: %m");
- if (ResolverThreadHandle != NULL)
- CloseHandle(ResolverThreadHandle);
- ssStatus.dwCurrentState = SERVICE_STOPPED;
- SetServiceStatus(sshStatusHandle, &ssStatus);
- return;
+ ssStatus.dwCurrentState = SERVICE_RUNNING;
+ ssStatus.dwWin32ExitCode = NO_ERROR;
+ if (!SetServiceStatus(sshStatusHandle, &ssStatus))
+ {
+ msyslog(LOG_ERR, "SetServiceStatus: %m");
+ if (ResolverThreadHandle != NULL)
+ CloseHandle(ResolverThreadHandle);
+ ssStatus.dwCurrentState = SERVICE_STOPPED;
+ SetServiceStatus(sshStatusHandle, &ssStatus);
+ return;
+ }
}
# if defined(DEBUG)
}
# endif
#endif
+#ifdef HAVE_CLOCKCTL
+ /*
+ * Drop super-user privileges and chroot now if the OS supports
+ * non root clock control (only NetBSD for now).
+ */
+ if (user != NULL) {
+ if (isdigit((unsigned char)*user)) {
+ sw_uid = (uid_t)strtoul(user, &endp, 0);
+ if (*endp != '\0')
+ goto getuser;
+ } else {
+getuser:
+ if ((pw = getpwnam(user)) != NULL) {
+ sw_uid = pw->pw_uid;
+ } else {
+ errno = 0;
+ msyslog(LOG_ERR, "Cannot find user `%s'", user);
+ exit (-1);
+ }
+ }
+ }
+ if (group != NULL) {
+ if (isdigit((unsigned char)*group)) {
+ sw_gid = (gid_t)strtoul(group, &endp, 0);
+ if (*endp != '\0')
+ goto getgroup;
+ } else {
+getgroup:
+ if ((gr = getgrnam(group)) != NULL) {
+ sw_gid = pw->pw_gid;
+ } else {
+ errno = 0;
+ msyslog(LOG_ERR, "Cannot find group `%s'", group);
+ exit (-1);
+ }
+ }
+ }
+ if (chrootdir && chroot(chrootdir)) {
+ msyslog(LOG_ERR, "Cannot chroot to `%s': %m", chrootdir);
+ exit (-1);
+ }
+ if (group && setgid(sw_gid)) {
+ msyslog(LOG_ERR, "Cannot setgid() to group `%s': %m", group);
+ exit (-1);
+ }
+ if (group && setegid(sw_gid)) {
+ msyslog(LOG_ERR, "Cannot setegid() to group `%s': %m", group);
+ exit (-1);
+ }
+ if (user && setuid(sw_uid)) {
+ msyslog(LOG_ERR, "Cannot setuid() to user `%s': %m", user);
+ exit (-1);
+ }
+ if (user && seteuid(sw_uid)) {
+ msyslog(LOG_ERR, "Cannot seteuid() to user `%s': %m", user);
+ exit (-1);
+ }
+#endif
/*
* Report that we're up to any trappers
*/
@@ -797,10 +915,10 @@ service_main(
#if defined(HAVE_IO_COMPLETION_PORT)
WaitHandles[0] = CreateEvent(NULL, FALSE, FALSE, NULL); /* exit reques */
WaitHandles[1] = get_timer_handle();
- WaitHandles[2] = get_io_event();
+ WaitHandles[2] = get_io_event();
for (;;) {
- DWORD Index = WaitForMultipleObjectsEx(sizeof(WaitHandles)/sizeof(WaitHandles[0]), WaitHandles, FALSE, 1000, MWMO_ALERTABLE);
+ DWORD Index = WaitForMultipleObjectsEx(sizeof(WaitHandles)/sizeof(WaitHandles[0]), WaitHandles, FALSE, 1000, TRUE);
switch (Index) {
case WAIT_OBJECT_0 + 0 : /* exit request */
exit(0);
@@ -819,30 +937,16 @@ service_main(
# endif
break;
-# if 1
- /*
- * FIXME: According to the documentation for WaitForMultipleObjectsEx
- * this is not possible. This may be a vestigial from when this was
- * MsgWaitForMultipleObjects, maybe it should be removed?
- */
- case WAIT_OBJECT_0 + 3 : /* windows message */
- {
- MSG msg;
- while ( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
- {
- if ( msg.message == WM_QUIT )
- {
- exit( 0 );
- }
- DispatchMessage( &msg );
- }
- }
- break;
-# endif
-
case WAIT_IO_COMPLETION : /* loop */
case WAIT_TIMEOUT :
break;
+ case WAIT_FAILED:
+ msyslog(LOG_ERR, "ntpdc: WaitForMultipleObjectsEx Failed: Error: %m");
+ break;
+
+ /* For now do nothing if not expected */
+ default:
+ break;
} /* switch */
rbuflist = getrecvbufs(); /* get received buffers */
@@ -900,9 +1004,10 @@ service_main(
}
else if (nfound == -1 && errno != EINTR)
msyslog(LOG_ERR, "select() error: %m");
- else if (debug > 2) {
+# ifdef DEBUG
+ else if (debug > 2)
msyslog(LOG_DEBUG, "select(): nfound=%d, error: %m", nfound);
- }
+# endif /* DEBUG */
# else /* HAVE_SIGNALED_IO */
wait_for_signal();
@@ -950,8 +1055,12 @@ service_main(
* Go around again
*/
}
+#ifndef SYS_WINNT
exit(1); /* unreachable */
+#endif
+#ifndef SYS_WINNT
return 1; /* DEC OSF cc braindamage */
+#endif
}
@@ -984,6 +1093,7 @@ finish(
#ifdef DEBUG
+#ifndef SYS_WINNT
/*
* moredebug - increase debugging verbosity
*/
@@ -1019,8 +1129,9 @@ lessdebug(
}
errno = saved_errno;
}
+#endif
#else /* not DEBUG */
-/*
+#ifndef SYS_WINNT/*
* no_debug - We don't do the debug here.
*/
static RETSIGTYPE
@@ -1033,6 +1144,7 @@ no_debug(
msyslog(LOG_DEBUG, "ntpd not compiled for debugging (signal %d)", sig);
errno = saved_errno;
}
+#endif /* not SYS_WINNT */
#endif /* not DEBUG */
#ifdef SYS_WINNT
diff --git a/contrib/ntp/ntpd/ntpsim.c b/contrib/ntp/ntpd/ntpsim.c
new file mode 100644
index 000000000000..3fbae17c7c0d
--- /dev/null
+++ b/contrib/ntp/ntpd/ntpsim.c
@@ -0,0 +1,368 @@
+/*
+ * NTP simulator engine - Harish Nair
+ * University of Delaware, 2001
+ */
+#include "ntpd.h"
+#include "ntpsim.h"
+
+/*
+ * Defines...
+ */
+#define SIM_TIME 86400 /* end simulation time */
+#define NET_DLY .001 /* network delay */
+#define PROC_DLY .001 /* processing delay */
+#define BEEP_DLY 3600 /* beep interval (s) */
+#define SLEW 500e-6 /* correction rate (PPM) */
+
+/*
+ * Function pointers
+ */
+void (*funcPtr[]) (Node *, Event) = {
+ &ndbeep, &ndeclk, &ntptmr, &netpkt
+};
+
+
+/*
+ * ntpsim - initialize global variables and event queue and start
+ */
+int
+ntpsim(
+ int argc,
+ char *argv[]
+ )
+{
+ Event e;
+ double maxtime;
+ struct timeval seed;
+
+ /*
+ * Initialize the global node
+ */
+ ntp_node.time = 0; /* simulation time */
+ ntp_node.sim_time = SIM_TIME; /* end simulation time (-S) */
+ ntp_node.ntp_time = 0; /* client disciplined time */
+ ntp_node.adj = 0; /* remaining time correction */
+ ntp_node.slew = SLEW; /* correction rate (-H) */
+
+ ntp_node.clk_time = 0; /* server time (-O) */
+ ntp_node.ferr = 0; /* frequency error (-T) */
+ ntp_node.fnse = 0; /* random walk noise (-W) */
+ ntp_node.ndly = NET_DLY; /* network delay (-Y) */
+ ntp_node.snse = 0; /* phase noise (-C) */
+ ntp_node.pdly = PROC_DLY; /* processing delay (-Z) */
+ ntp_node.bdly = BEEP_DLY; /* beep interval (-B) */
+
+ ntp_node.events = NULL;
+ ntp_node.rbuflist = NULL;
+
+ /*
+ * Initialize ntp variables
+ */
+ initializing = 1;
+ init_auth();
+ init_util();
+ init_restrict();
+ init_mon();
+ init_timer();
+ init_lib();
+ init_random();
+ init_request();
+ init_control();
+ init_peer();
+ init_proto();
+ init_io();
+ init_loopfilter();
+ mon_start(MON_OFF);
+ getconfig(argc, argv);
+ initializing = 0;
+
+ /*
+ * Watch out here, we want the real time, not the silly stuff.
+ */
+ gettimeofday(&seed, NULL);
+ srand48(seed.tv_usec);
+
+ /*
+ * Push a beep and timer interrupt on the queue
+ */
+ push(event(0, BEEP), &ntp_node.events);
+ push(event(ntp_node.time + 1.0, TIMER), &ntp_node.events);
+
+ /*
+ * Pop the queue until nothing is left or time is exceeded
+ */
+ maxtime = ntp_node.time + ntp_node.sim_time;
+ while (ntp_node.time <= maxtime && ntp_node.events != NULL ) {
+ e = pop(&ntp_node.events);
+ ndeclk(&ntp_node, e);
+ funcPtr[e.function](&ntp_node, e);
+ }
+ return (0);
+}
+
+
+/*
+ * Return an event
+ */
+Event
+event(
+ double t,
+ funcTkn f
+ )
+{
+ Event e;
+
+ e.time = t;
+ e.function = f;
+ return (e);
+}
+
+/*
+ * Create an event queue
+ */
+Queue
+queue(
+ Event e,
+ Queue q
+ )
+{
+ Queue ret;
+
+ if ((ret = (Queue)malloc(sizeof(struct List))) == NULL)
+ abortsim("queue-malloc");
+ ret->event = e;
+ ret->next = q;
+ return (ret);
+}
+
+
+/*
+ * Push an event into the event queue
+ */
+void push(
+ Event e,
+ Queue *qp
+ )
+{
+ Queue *tmp = qp;
+
+ while (*tmp != NULL && ((*tmp)->event.time < e.time))
+ tmp = &((*tmp)->next);
+ *tmp = queue(e, (*tmp));
+}
+
+
+/*
+ * Pop the first event from the event queue
+ */
+Event
+pop(
+ Queue *qp
+ )
+{
+ Event ret;
+ Queue tmp;
+
+ tmp = *qp;
+ if (tmp == NULL)
+ abortsim("pop - empty queue");
+ ret = tmp->event;
+ *qp = tmp->next;
+ free(tmp);
+ return (ret);
+}
+
+
+/*
+ * Update clocks
+ */
+void
+ndeclk(
+ Node *n,
+ Event e
+ )
+{
+ node_clock(n, e.time);
+}
+
+
+/*
+ * Timer interrupt. Eventually, this results in calling the
+ * srvr_rplyi() routine below.
+ */
+void
+ntptmr(
+ Node *n,
+ Event e
+ )
+{
+ struct recvbuf *rbuf;
+
+ timer();
+
+ /*
+ * Process buffers received. They had better be in order by
+ * receive timestamp.
+ */
+ while (n->rbuflist != NULL) {
+ rbuf = n->rbuflist;
+ n->rbuflist = rbuf->next;
+ (rbuf->receiver)(rbuf);
+ free(rbuf);
+ }
+
+ /*
+ * Arm the next timer interrupt.
+ */
+ push(event(e.time + (1 << EVENT_TIMEOUT), TIMER), &n->events);
+}
+
+
+/*
+ * srvr_rply() - send packet
+ */
+int srvr_rply(
+ Node *n,
+ struct sockaddr_storage *dest,
+ struct interface *inter, struct pkt *rpkt
+ )
+{
+ struct pkt xpkt;
+ struct recvbuf rbuf;
+ Event xvnt;
+ double dtemp, etemp;
+
+ /*
+ * Insert packet header values. We make this look like a
+ * stratum-1 server with a GPS clock, but nobody will ever
+ * notice that.
+ */
+ xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, NTP_VERSION,
+ MODE_SERVER);
+ xpkt.stratum = STRATUM_TO_PKT(((u_char)1));
+ memcpy(&xpkt.refid, "GPS", 4);
+ xpkt.ppoll = rpkt->ppoll;
+ xpkt.precision = rpkt->precision;
+ xpkt.rootdelay = 0;
+ xpkt.rootdispersion = 0;
+
+ /*
+ * Insert the timestamps.
+ */
+ xpkt.org = rpkt->xmt;
+ dtemp = poisson(n->ndly, n->snse); /* client->server delay */
+ DTOLFP(dtemp + n->clk_time, &xpkt.rec);
+ dtemp += poisson(n->pdly, 0); /* server delay */
+ DTOLFP(dtemp + n->clk_time, &xpkt.xmt);
+ xpkt.reftime = xpkt.xmt;
+ dtemp += poisson(n->ndly, n->snse); /* server->client delay */
+
+ /*
+ * Insert the I/O stuff.
+ */
+ rbuf.receiver = receive;
+ get_systime(&rbuf.recv_time);
+ rbuf.recv_length = LEN_PKT_NOMAC;
+ rbuf.recv_pkt = xpkt;
+ memcpy(&rbuf.srcadr, dest, sizeof(struct sockaddr_storage));
+ memcpy(&rbuf.recv_srcadr, dest,
+ sizeof(struct sockaddr_storage));
+ if ((rbuf.dstadr = malloc(sizeof(struct interface))) == NULL)
+ abortsim("server-malloc");
+ memcpy(rbuf.dstadr, inter, sizeof(struct interface));
+ rbuf.next = NULL;
+
+ /*
+ * Very carefully predict the time of arrival for the received
+ * packet.
+ */
+ LFPTOD(&xpkt.org, etemp);
+ etemp += dtemp;
+ xvnt = event(etemp, PACKET);
+ xvnt.rcv_buf = rbuf;
+ push(xvnt, &n->events);
+ return (0);
+}
+
+
+/*
+ * netpkt() - receive packet
+ */
+void
+netpkt(
+ Node *n,
+ Event e
+ )
+{
+ struct recvbuf *rbuf;
+ struct recvbuf *obuf;
+
+ /*
+ * Insert the packet on the receive queue and record the arrival
+ * time.
+ */
+ if ((rbuf = malloc(sizeof(struct recvbuf))) == NULL)
+ abortsim("ntprcv-malloc");
+ memcpy(rbuf, &e.rcv_buf, sizeof(struct recvbuf));
+ rbuf->receiver = receive;
+ DTOLFP(n->ntp_time, &rbuf->recv_time);
+ rbuf->next = NULL;
+ obuf = n->rbuflist;
+
+ /*
+ * In the present incarnation, no more than one buffer can be on
+ * the queue; however, we sniff the queue anyway as a hint for
+ * further development.
+ */
+ if (obuf == NULL) {
+ n->rbuflist = rbuf;
+ } else {
+ while (obuf->next != NULL)
+ obuf = obuf->next;
+ obuf->next = rbuf;
+ }
+}
+
+
+/*
+ * ndbeep() - progress indicator
+ */
+void
+ndbeep(
+ Node *n,
+ Event e
+ )
+{
+ static int first_time = 1;
+ char *dash = "-----------------";
+
+ if(n->bdly > 0) {
+ if (first_time) {
+ printf(
+ "\t%4c T %4c\t%4c T+ERR %3c\t%5cT+ERR+NTP\n", ' ', ' ', ' ', ' ',' ');
+ printf("\t%s\t%s\t%s\n", dash, dash, dash);
+ first_time = 0;
+ push(event(n->bdly, BEEP), &n->events);
+ push(event(n->sim_time, BEEP), &n->events);
+ printf("\t%16.6f\t%16.6f\t%16.6f\n",
+ n->time, n->clk_time, n->ntp_time);
+ return;
+ }
+ printf("\t%16.6f\t%16.6f\t%16.6f\n",
+ n->time, n->clk_time, n->ntp_time);
+ push(event(e.time + n->bdly, BEEP), &n->events);
+ }
+}
+
+
+/*
+ * Abort simulation
+ */
+void
+abortsim(
+ char *errmsg
+ )
+{
+ perror(errmsg);
+ exit(1);
+}
diff --git a/contrib/ntp/ntpd/refclock_acts.c b/contrib/ntp/ntpd/refclock_acts.c
index efdf536fe8dd..d26ceed9a521 100644
--- a/contrib/ntp/ntpd/refclock_acts.c
+++ b/contrib/ntp/ntpd/refclock_acts.c
@@ -733,8 +733,9 @@ acts_receive (
* waiting for carrier loss or long-space disconnect, but we do
* these clumsy things anyway.
*/
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
pp->sloppyclockflag &= ~CLK_FLAG1;
up->pollcnt = 0;
(void)write(pp->io.fd, &hangup, 1);
@@ -800,7 +801,7 @@ acts_timeout (
acts_disc(peer);
return;
}
- switch (peer->ttlmax) {
+ switch (peer->ttl) {
/*
* In manual mode the ACTS calling program is activated
diff --git a/contrib/ntp/ntpd/refclock_arbiter.c b/contrib/ntp/ntpd/refclock_arbiter.c
index cdbe2ee38627..cf5f92f1f5be 100644
--- a/contrib/ntp/ntpd/refclock_arbiter.c
+++ b/contrib/ntp/ntpd/refclock_arbiter.c
@@ -419,8 +419,9 @@ arb_poll(
refclock_report(peer, CEVNT_TIMEOUT);
return;
}
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
}
#else
diff --git a/contrib/ntp/ntpd/refclock_arc.c b/contrib/ntp/ntpd/refclock_arc.c
index c771f478f677..f556da6c54d4 100644
--- a/contrib/ntp/ntpd/refclock_arc.c
+++ b/contrib/ntp/ntpd/refclock_arc.c
@@ -1,5 +1,5 @@
/*
- * refclock_arc - clock driver for ARCRON MSF receivers
+ * refclock_arc - clock driver for ARCRON MSF/DCF/WWVB receivers
*/
#ifdef HAVE_CONFIG_H
@@ -7,9 +7,11 @@
#endif
#if defined(REFCLOCK) && defined(CLOCK_ARCRON_MSF)
-static const char arc_version[] = { "V1.1 1997/06/23" };
+static const char arc_version[] = { "V1.3 2003/02/21" };
-#undef ARCRON_DEBUG /* Define only while in development... */
+/* define PRE_NTP420 for compatibility to previous versions of NTP (at least
+ to 4.1.0 */
+#undef PRE_NTP420
#ifndef ARCRON_NOT_KEEN
#define ARCRON_KEEN 1 /* Be keen, and trusting of the clock, if defined. */
@@ -28,6 +30,9 @@ static const char arc_version[] = { "V1.1 1997/06/23" };
/*
Code by Derek Mulcahy, <derek@toybox.demon.co.uk>, 1997.
Modifications by Damon Hart-Davis, <d@hd.org>, 1997.
+Modifications by Paul Alfille, <palfille@partners.org>, 2003.
+Modifications by Christopher Price, <cprice@cs-home.com>, 2003.
+
THIS CODE IS SUPPLIED AS IS, WITH NO WARRANTY OF ANY KIND. USE AT
YOUR OWN RISK.
@@ -42,6 +47,33 @@ reproduced.
-------------------------------------------------------------------------------
+Christopher's notes:
+
+MAJOR CHANGES SINCE V1.2
+========================
+ 1) Applied patch by Andrey Bray <abuse@madhouse.demon.co.uk>
+ 2001-02-17 comp.protocols.time.ntp
+
+ 2) Added WWVB support via clock mode command, localtime/UTC time configured
+ via flag1=(0=UTC, 1=localtime)
+
+ 3) Added ignore resync request via flag2=(0=resync, 1=ignore resync)
+
+ 4) Added simplified conversion from localtime to UTC with dst/bst translation
+
+ 5) Added average signal quality poll
+
+ 6) Fixed a badformat error when no code is available due to stripping
+ \n & \r's
+
+ 7) Fixed a badformat error when clearing lencode & memset a_lastcode in poll
+ routine
+
+ 8) Lots of code cleanup, including standardized DEBUG macros and removal
+ of unused code
+
+-------------------------------------------------------------------------------
+
Author's original note:
I enclose my ntp driver for the Galleon Systems Arc MSF receiver.
@@ -306,6 +338,7 @@ Also note h<cr> command which starts a resync to MSF signal.
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
+#include "ntp_calendar.h"
#include "ntp_stdlib.h"
#include <stdio.h>
@@ -324,7 +357,7 @@ Also note h<cr> command which starts a resync to MSF signal.
#endif
/*
- * This driver supports the ARCRON MSF Radio Controlled Clock
+ * This driver supports the ARCRON MSF/DCF/WWVB Radio Controlled Clock
*/
/*
@@ -335,9 +368,16 @@ Also note h<cr> command which starts a resync to MSF signal.
#define PRECISION (-4) /* Precision (~63 ms). */
#define HIGHPRECISION (-5) /* If things are going well... */
#define REFID "MSFa" /* Reference ID. */
-#define DESCRIPTION "ARCRON MSF Receiver"
+#define REFID_MSF "MSF" /* Reference ID. */
+#define REFID_DCF77 "DCF" /* Reference ID. */
+#define REFID_WWVB "WWVB" /* Reference ID. */
+#define DESCRIPTION "ARCRON MSF/DCF/WWVB Receiver"
-#define NSAMPLESLONG 8 /* Stages of long filter. */
+#ifdef PRE_NTP420
+#define MODE ttlmax
+#else
+#define MODE ttl
+#endif
#define LENARC 16 /* Format `o' timecode length. */
@@ -405,22 +445,6 @@ Also note h<cr> command which starts a resync to MSF signal.
#endif
};
-/* Chose filter length dependent on fudge flag 4. */
-#define CHOSENSAMPLES(pp) \
-(((pp)->sloppyclockflag & CLK_FLAG4) ? NSAMPLESLONG : NSAMPLES)
- /*
-Chose how many filter samples to keep. Several factors are in play.
-
- 1) Discard at least one sample to allow a spike value to be
- discarded.
-
- 2) Discard about 1-in-8 to 1-in-30 samples to handle spikes.
-
- 3) Keep an odd number of samples to avoid median value being biased
- high or low.
-*/
-#define NKEEP(pp) ((CHOSENSAMPLES(pp) - 1 - (CHOSENSAMPLES(pp)>>3)) | 1)
-
#define DEFAULT_RESYNC_TIME (57*60) /* Gap between resync attempts (s). */
#define RETRY_RESYNC_TIME (27*60) /* Gap to emergency resync attempt. */
#ifdef ARCRON_KEEN
@@ -454,6 +478,7 @@ struct arcunit {
int quality; /* Quality of reception 0--5 for unit. */
/* We may also use the values -1 or 6 internally. */
+ u_long quality_stamp; /* Next time to reset quality average. */
u_long next_resync; /* Next resync time (s) compared to current_time. */
int resyncing; /* Resync in progress if true. */
@@ -463,6 +488,7 @@ struct arcunit {
u_long saved_flags; /* Saved fudge flags. */
};
+
#ifdef ARCRON_LEAPSECOND_KEEN
/* The flag `possible_leap' is set non-zero when any MSF unit
thinks a leap-second may have happened.
@@ -522,18 +548,16 @@ struct refclock refclock_arc = {
/* Queue us up for the next tick. */
#define ENQUEUE(up) \
do { \
- if((up)->ev.next != 0) { break; } /* WHOOPS! */ \
- peer->nextdate = current_time + QUEUETICK; \
+ peer->nextaction = current_time + QUEUETICK; \
} while(0)
-#if 0
-/* Placeholder event handler---does nothing safely---soaks up lose tick. */
+/* Placeholder event handler---does nothing safely---soaks up loose tick. */
static void
dummy_event_handler(
struct peer *peer
)
{
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug) { printf("arc: dummy_event_handler() called.\n"); }
#endif
}
@@ -558,7 +582,7 @@ arc_event_handler(
register struct arcunit *up = (struct arcunit *)pp->unitptr;
int i;
char c;
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug > 2) { printf("arc: arc_event_handler() called.\n"); }
#endif
@@ -572,12 +596,13 @@ arc_event_handler(
if(write(pp->io.fd, &c, 1) != 1) {
msyslog(LOG_NOTICE, "ARCRON: write to fd %d failed", pp->io.fd);
}
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
else if(debug) { printf("arc: sent `%2.2x', fd %d.\n", c, pp->io.fd); }
#endif
}
+
+ ENQUEUE(up);
}
-#endif /* 0 */
/*
* arc_start - open the devices and initialize data for processing
@@ -597,7 +622,7 @@ arc_start(
#endif
msyslog(LOG_NOTICE, "ARCRON: %s: opening unit %d", arc_version, unit);
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug) {
printf("arc: %s: attempt to open unit %d.\n", arc_version, unit);
}
@@ -612,7 +637,7 @@ arc_start(
(void)sprintf(device, DEVICE, unit);
if (!(fd = refclock_open(device, SPEED, LDISC_CLK)))
return(0);
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug) { printf("arc: unit %d using open().\n", unit); }
#endif
fd = open(device, OPEN_FLAGS);
@@ -624,9 +649,9 @@ arc_start(
}
fcntl(fd, F_SETFL, 0); /* clear the descriptor flags */
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug)
- { printf("Opened RS232 port with file descriptor %d.\n", fd); }
+ { printf("arc: opened RS232 port with file descriptor %d.\n", fd); }
#endif
#ifdef HAVE_TERMIOS
@@ -667,7 +692,27 @@ arc_start(
peer->precision = PRECISION;
peer->stratum = 2; /* Default to stratum 2 not 0. */
pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
+ if (peer->MODE > 3) {
+ msyslog(LOG_NOTICE, "ARCRON: Invalid mode %d", peer->MODE);
+ return 0;
+ }
+#ifdef DEBUG
+ if(debug) { printf("arc: mode = %d.\n", peer->MODE); }
+#endif
+ switch (peer->MODE) {
+ case 1:
+ memcpy((char *)&pp->refid, REFID_MSF, 4);
+ break;
+ case 2:
+ memcpy((char *)&pp->refid, REFID_DCF77, 4);
+ break;
+ case 3:
+ memcpy((char *)&pp->refid, REFID_WWVB, 4);
+ break;
+ default:
+ memcpy((char *)&pp->refid, REFID, 4);
+ break;
+ }
/* Spread out resyncs so that they should remain separated. */
up->next_resync = current_time + INITIAL_RESYNC_DELAY + (67*unit)%1009;
@@ -686,6 +731,11 @@ arc_start(
#else
up->quality = MIN_CLOCK_QUALITY;/* Don't trust the clock yet. */
#endif
+
+ peer->action = arc_event_handler;
+
+ ENQUEUE(up);
+
return(1);
}
@@ -702,6 +752,8 @@ arc_shutdown(
register struct arcunit *up;
struct refclockproc *pp;
+ peer->action = dummy_event_handler;
+
pp = peer->procptr;
up = (struct arcunit *)pp->unitptr;
io_closeclock(&pp->io);
@@ -740,11 +792,11 @@ send_slow(
int sl = strlen(s);
int spaceleft = space_left(up);
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug > 1) { printf("arc: spaceleft = %d.\n", spaceleft); }
#endif
if(spaceleft < sl) { /* Should not normally happen... */
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
msyslog(LOG_NOTICE, "ARCRON: send-buffer overrun (%d/%d)",
sl, spaceleft);
#endif
@@ -776,8 +828,11 @@ arc_receive(
struct refclockproc *pp;
struct peer *peer;
char c;
- int i, n, wday, month, bst, status;
+ int i, n, wday, month, flags, status;
int arc_last_offset;
+ static int quality_average = 0;
+ static int quality_sum = 0;
+ static int quality_polls = 0;
/*
* Initialize pointers and read the timecode and timestamp
@@ -857,7 +912,7 @@ arc_receive(
handle for tty_clk or somesuch kernel timestamper.
*/
if(arc_last_offset > LENARC) {
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug) {
printf("arc: input code too long (%d cf %d); rejected.\n",
arc_last_offset, LENARC);
@@ -869,7 +924,7 @@ arc_receive(
}
L_SUBUF(&timestamp, charoffsets[arc_last_offset]);
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug > 1) {
printf(
"arc: %s%d char(s) rcvd, the last for lastcode[%d]; -%sms offset applied.\n",
@@ -898,7 +953,7 @@ arc_receive(
L_ISGEQ(&(up->lastrec), &timestamp))
#endif
{
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug > 1) {
printf("arc: system timestamp captured.\n");
#ifdef ARCRON_MULTIPLE_SAMPLES
@@ -922,7 +977,7 @@ arc_receive(
/* eg on receipt of the \r coming in on its own after the */
/* timecode. */
if(pp->lencode >= LENARC) {
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug && (rbufp->recv_buffer[0] != '\r'))
{ printf("arc: rubbish in pp->a_lastcode[].\n"); }
#endif
@@ -947,11 +1002,12 @@ arc_receive(
*/
if((c == 'o') && (pp->lencode == 1)) {
L_CLR(&(up->lastrec));
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug > 1) { printf("arc: clearing timestamp.\n"); }
#endif
}
}
+ if (pp->lencode == 0) return;
/* Handle a quality message. */
if(pp->a_lastcode[0] == 'g') {
@@ -963,17 +1019,31 @@ arc_receive(
if(((q & 0x70) != 0x30) || ((q & 0xf) > MAX_CLOCK_QUALITY) ||
((r & 0x70) != 0x30)) {
/* Badly formatted response. */
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug) { printf("arc: bad `g' response %2x %2x.\n", r, q); }
#endif
return;
}
if(r == '3') { /* Only use quality value whilst sync in progress. */
- up->quality = (q & 0xf);
+ if (up->quality_stamp < current_time) {
+ struct calendar cal;
+ l_fp new_stamp;
+
+ get_systime (&new_stamp);
+ caljulian (new_stamp.l_ui, &cal);
+ up->quality_stamp =
+ current_time + 60 - cal.second + 5;
+ quality_sum = 0;
+ quality_polls = 0;
+ }
+ quality_sum += (q & 0xf);
+ quality_polls++;
+ quality_average = (quality_sum / quality_polls);
#ifdef DEBUG
- if(debug) { printf("arc: signal quality %d.\n", up->quality); }
+ if(debug) { printf("arc: signal quality %d (%d).\n", quality_average, (q & 0xf)); }
#endif
} else if( /* (r == '2') && */ up->resyncing) {
+ up->quality = quality_average;
#ifdef DEBUG
if(debug)
{
@@ -987,6 +1057,9 @@ arc_receive(
up->quality,
quality_action(up->quality));
up->resyncing = 0; /* Resync is over. */
+ quality_average = 0;
+ quality_sum = 0;
+ quality_polls = 0;
#ifdef ARCRON_KEEN
/* Clock quality dubious; resync earlier than usual. */
@@ -1011,13 +1084,13 @@ arc_receive(
/* WE HAVE NOW COLLECTED ONE TIMESTAMP (phew)... */
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug > 1) { printf("arc: NOW HAVE TIMESTAMP...\n"); }
#endif
/* But check that we actually captured a system timestamp on it. */
if(L_ISZERO(&(up->lastrec))) {
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
if(debug) { printf("arc: FAILED TO GET SYSTEM TIMESTAMP\n"); }
#endif
pp->lencode = 0;
@@ -1033,22 +1106,26 @@ arc_receive(
pp->a_lastcode[pp->lencode] = ((up->quality == QUALITY_UNKNOWN) ?
'6' : ('0' + up->quality));
pp->a_lastcode[pp->lencode + 1] = '\0'; /* Terminate for printf(). */
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
+#ifdef PRE_NTP420
/* We don't use the micro-/milli- second part... */
pp->usec = 0;
pp->msec = 0;
-
+#else
+ /* We don't use the nano-second part... */
+ pp->nsec = 0;
+#endif
n = sscanf(pp->a_lastcode, "o%2d%2d%2d%1d%2d%2d%2d%1d%1d",
&pp->hour, &pp->minute, &pp->second,
- &wday, &pp->day, &month, &pp->year, &bst, &status);
+ &wday, &pp->day, &month, &pp->year, &flags, &status);
/* Validate format and numbers. */
if(n != 9) {
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
/* Would expect to have caught major problems already... */
if(debug) { printf("arc: badly formatted data.\n"); }
#endif
+ pp->lencode = 0;
refclock_report(peer, CEVNT_BADREPLY);
return;
}
@@ -1064,15 +1141,21 @@ arc_receive(
(month < 1) || (month > 12) ||
(pp->year < 0) || (pp->year > 99)) {
/* Data out of range. */
+ pp->lencode = 0;
refclock_report(peer, CEVNT_BADREPLY);
return;
}
- /* Check that BST/UTC bits are the complement of one another. */
- if(!(bst & 2) == !(bst & 4)) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
+
+ if(peer->MODE == 0) { /* compatiblity to original version */
+ int bst = flags;
+ /* Check that BST/UTC bits are the complement of one another. */
+ if(!(bst & 2) == !(bst & 4)) {
+ pp->lencode = 0;
+ refclock_report(peer, CEVNT_BADREPLY);
+ return;
+ }
+ }
if(status & 0x8) { msyslog(LOG_NOTICE, "ARCRON: battery low"); }
/* Year-2000 alert! */
@@ -1094,7 +1177,7 @@ arc_receive(
printf("arc: n=%d %02d:%02d:%02d %02d/%02d/%04d %1d %1d\n",
n,
pp->hour, pp->minute, pp->second,
- pp->day, month, pp->year, bst, status);
+ pp->day, month, pp->year, flags, status);
}
#endif
@@ -1114,41 +1197,159 @@ arc_receive(
msyslog(LOG_NOTICE, "ARCRON: signal lost");
pp->leap = LEAP_NOTINSYNC; /* MSF clock is free-running. */
up->status = status;
+ pp->lencode = 0;
refclock_report(peer, CEVNT_FAULT);
return;
}
}
up->status = status;
- pp->day += moff[month - 1];
-
- if(isleap_4(pp->year) && month > 2) { pp->day++; } /* Y2KFixes */
+ if (peer->MODE == 0) { /* compatiblity to original version */
+ int bst = flags;
+
+ pp->day += moff[month - 1];
+
+ if(isleap_4(pp->year) && month > 2) { pp->day++; }/* Y2KFixes */
+
+ /* Convert to UTC if required */
+ if(bst & 2) {
+ pp->hour--;
+ if (pp->hour < 0) {
+ pp->hour = 23;
+ pp->day--;
+ /* If we try to wrap round the year
+ * (BST on 1st Jan), reject.*/
+ if(pp->day < 0) {
+ pp->lencode = 0;
+ refclock_report(peer, CEVNT_BADTIME);
+ return;
+ }
+ }
+ }
+ }
- /* Convert to UTC if required */
- if(bst & 2) {
- pp->hour--;
- if (pp->hour < 0) {
- pp->hour = 23;
- pp->day--;
- /* If we try to wrap round the year (BST on 1st Jan), reject.*/
- if(pp->day < 0) {
- refclock_report(peer, CEVNT_BADTIME);
+ if(peer->MODE > 0) {
+ if(pp->sloppyclockflag & CLK_FLAG1) {
+ struct tm local;
+ struct tm *gmtp;
+ time_t unixtime;
+
+ /*
+ * Convert to GMT for sites that distribute localtime.
+ * This means we have to do Y2K conversion on the
+ * 2-digit year; otherwise, we get the time wrong.
+ */
+
+ local.tm_year = pp->year-1900;
+ local.tm_mon = month-1;
+ local.tm_mday = pp->day;
+ local.tm_hour = pp->hour;
+ local.tm_min = pp->minute;
+ local.tm_sec = pp->second;
+ switch (peer->MODE) {
+ case 1:
+ local.tm_isdst = (flags & 2);
+ break;
+ case 2:
+ local.tm_isdst = (flags & 2);
+ break;
+ case 3:
+ switch (flags & 3) {
+ case 0: /* It is unclear exactly when the
+ Arcron changes from DST->ST and
+ ST->DST. Testing has shown this
+ to be irregular. For the time
+ being, let the OS decide. */
+ local.tm_isdst = 0;
+#ifdef DEBUG
+ if (debug)
+ printf ("arc: DST = 00 (0)\n");
+#endif
+ break;
+ case 1: /* dst->st time */
+ local.tm_isdst = -1;
+#ifdef DEBUG
+ if (debug)
+ printf ("arc: DST = 01 (1)\n");
+#endif
+ break;
+ case 2: /* st->dst time */
+ local.tm_isdst = -1;
+#ifdef DEBUG
+ if (debug)
+ printf ("arc: DST = 10 (2)\n");
+#endif
+ break;
+ case 3: /* dst time */
+ local.tm_isdst = 1;
+#ifdef DEBUG
+ if (debug)
+ printf ("arc: DST = 11 (3)\n");
+#endif
+ break;
+ }
+ break;
+ default:
+ msyslog(LOG_NOTICE, "ARCRON: Invalid mode %d",
+ peer->MODE);
return;
+ break;
+ }
+ unixtime = mktime (&local);
+ if ((gmtp = gmtime (&unixtime)) == NULL)
+ {
+ pp->lencode = 0;
+ refclock_report (peer, CEVNT_FAULT);
+ return;
+ }
+ pp->year = gmtp->tm_year+1900;
+ month = gmtp->tm_mon+1;
+ pp->day = ymd2yd(pp->year,month,gmtp->tm_mday);
+ /* pp->day = gmtp->tm_yday; */
+ pp->hour = gmtp->tm_hour;
+ pp->minute = gmtp->tm_min;
+ pp->second = gmtp->tm_sec;
+#ifdef DEBUG
+ if (debug)
+ {
+ printf ("arc: time is %04d/%02d/%02d %02d:%02d:%02d UTC\n",
+ pp->year,month,gmtp->tm_mday,pp->hour,pp->minute,
+ pp->second);
}
+#endif
+ } else
+ {
+ /*
+ * For more rational sites distributing UTC
+ */
+ pp->day = ymd2yd(pp->year,month,pp->day);
}
}
- /* If clock signal quality is unknown, revert to default PRECISION...*/
- if(up->quality == QUALITY_UNKNOWN) { peer->precision = PRECISION; }
- /* ...else improve precision if flag3 is set... */
- else {
- peer->precision = ((pp->sloppyclockflag & CLK_FLAG3) ?
- HIGHPRECISION : PRECISION);
+ if (peer->MODE == 0) { /* compatiblity to original version */
+ /* If clock signal quality is
+ * unknown, revert to default PRECISION...*/
+ if(up->quality == QUALITY_UNKNOWN) {
+ peer->precision = PRECISION;
+ } else { /* ...else improve precision if flag3 is set... */
+ peer->precision = ((pp->sloppyclockflag & CLK_FLAG3) ?
+ HIGHPRECISION : PRECISION);
+ }
+ } else {
+ if ((status == 0x3) && (pp->sloppyclockflag & CLK_FLAG2)) {
+ peer->precision = ((pp->sloppyclockflag & CLK_FLAG3) ?
+ HIGHPRECISION : PRECISION);
+ } else if (up->quality == QUALITY_UNKNOWN) {
+ peer->precision = PRECISION;
+ } else {
+ peer->precision = ((pp->sloppyclockflag & CLK_FLAG3) ?
+ HIGHPRECISION : PRECISION);
+ }
}
/* Notice and log any change (eg from initial defaults) for flags. */
if(up->saved_flags != pp->sloppyclockflag) {
-#ifdef ARCRON_DEBUG
+#ifdef DEBUG
msyslog(LOG_NOTICE, "ARCRON: flags enabled: %s%s%s%s",
((pp->sloppyclockflag & CLK_FLAG1) ? "1" : "."),
((pp->sloppyclockflag & CLK_FLAG2) ? "2" : "."),
@@ -1156,8 +1357,6 @@ arc_receive(
((pp->sloppyclockflag & CLK_FLAG4) ? "4" : "."));
/* Note effects of flags changing... */
if(debug) {
- printf("arc: CHOSENSAMPLES(pp) = %d.\n", CHOSENSAMPLES(pp));
- printf("arc: NKEEP(pp) = %d.\n", NKEEP(pp));
printf("arc: PRECISION = %d.\n", peer->precision);
}
#endif
@@ -1185,9 +1384,11 @@ arc_receive(
#endif
if (!refclock_process(pp)) {
+ pp->lencode = 0;
refclock_report(peer, CEVNT_BADTIME);
return;
}
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
refclock_receive(peer);
}
@@ -1208,9 +1409,12 @@ request_time(
if(debug) { printf("arc: unit %d: requesting time.\n", unit); }
#endif
if (!send_slow(up, pp->io.fd, "o\r")) {
-#ifdef ARCRON_DEBUG
- msyslog(LOG_NOTICE, "ARCRON: unit %d: problem sending", unit);
+#ifdef DEBUG
+ if (debug) {
+ printf("arc: unit %d: problem sending", unit);
+ }
#endif
+ pp->lencode = 0;
refclock_report(peer, CEVNT_FAULT);
return;
}
@@ -1232,8 +1436,10 @@ arc_poll(
pp = peer->procptr;
up = (struct arcunit *)pp->unitptr;
+#if 0
pp->lencode = 0;
memset(pp->a_lastcode, 0, sizeof(pp->a_lastcode));
+#endif
#if 0
/* Flush input. */
@@ -1241,7 +1447,8 @@ arc_poll(
#endif
/* Resync if our next scheduled resync time is here or has passed. */
- resync_needed = (up->next_resync <= current_time);
+ resync_needed = ( !(pp->sloppyclockflag & CLK_FLAG2) &&
+ (up->next_resync <= current_time) );
#ifdef ARCRON_LEAPSECOND_KEEN
/*
@@ -1309,6 +1516,7 @@ arc_poll(
printf("arc: clock quality %d too poor.\n", up->quality);
}
#endif
+ pp->lencode = 0;
refclock_report(peer, CEVNT_FAULT);
return;
}
diff --git a/contrib/ntp/ntpd/refclock_as2201.c b/contrib/ntp/ntpd/refclock_as2201.c
index 516f7adc54d4..f04d417bea83 100644
--- a/contrib/ntp/ntpd/refclock_as2201.c
+++ b/contrib/ntp/ntpd/refclock_as2201.c
@@ -299,12 +299,13 @@ as2201_receive(
/*
* Timecode format: "yy:ddd:hh:mm:ss.mmm"
*/
- if (sscanf(pp->a_lastcode, "%2d:%3d:%2d:%2d:%2d.%3d", &pp->year,
- &pp->day, &pp->hour, &pp->minute, &pp->second, &pp->msec)
+ if (sscanf(pp->a_lastcode, "%2d:%3d:%2d:%2d:%2d.%3ld", &pp->year,
+ &pp->day, &pp->hour, &pp->minute, &pp->second, &pp->nsec)
!= 6) {
refclock_report(peer, CEVNT_BADREPLY);
return;
}
+ pp->nsec *= 1000000;
/*
* Test for synchronization (this is a temporary crock).
diff --git a/contrib/ntp/ntpd/refclock_atom.c b/contrib/ntp/ntpd/refclock_atom.c
index 56f86b35ec6f..51153aeb5f1a 100644
--- a/contrib/ntp/ntpd/refclock_atom.c
+++ b/contrib/ntp/ntpd/refclock_atom.c
@@ -1,3 +1,4 @@
+
/*
* refclock_atom - clock driver for 1-pps signals
*/
@@ -75,8 +76,6 @@
* Interface definitions
*/
#ifdef HAVE_PPSAPI
-extern int pps_assert; /* selects rising or falling edge */
-extern int pps_hardpps; /* enables the kernel PPS interface */
#define DEVICE "/dev/pps%d" /* device name and unit */
#endif /* HAVE_PPSAPI */
@@ -159,9 +158,9 @@ atom_start(
pp = peer->procptr;
peer->precision = PRECISION;
pp->clockdesc = DESCRIPTION;
+ pp->stratum = STRATUM_UNSPEC;
memcpy((char *)&pp->refid, REFID, 4);
peer->burst = ASTAGE;
- peer->stratum = STRATUM_UNSPEC;
#ifdef HAVE_PPSAPI
up = emalloc(sizeof(struct ppsunit));
memset(up, 0, sizeof(struct ppsunit));
@@ -194,7 +193,7 @@ atom_start(
"refclock_atom: time_pps_create failed: %m");
return (0);
}
- return (atom_ppsapi(peer, pps_assert, pps_hardpps));
+ return (atom_ppsapi(peer, 0, 0));
#else /* HAVE_PPSAPI */
return (1);
#endif /* HAVE_PPSAPI */
@@ -250,7 +249,7 @@ atom_ppsapi(
if (!up->pps_params.mode) {
msyslog(LOG_ERR,
"refclock_atom: invalid capture edge %d",
- pps_assert);
+ enb_clear);
return (0);
}
up->pps_params.mode |= PPS_TSFMT_TSPEC;
@@ -459,17 +458,17 @@ atom_poll(
* +-0.5 s of the local time and the seconds numbering is
* unambiguous. Note that the leap bits are set no-warning on
* the first valid update and the stratum is set at the prefer
- * peer.
+ * peer, unless overriden by a fudge command.
*/
if (peer->burst > 0)
return;
- peer->stratum = STRATUM_UNSPEC;
+ peer->leap = LEAP_NOTINSYNC;
if (pp->codeproc == pp->coderecv) {
refclock_report(peer, CEVNT_TIMEOUT);
peer->burst = ASTAGE;
return;
- } else if (!sys_prefer) {
+ } else if (sys_prefer == NULL) {
pp->codeproc = pp->coderecv;
peer->burst = ASTAGE;
return;
@@ -479,12 +478,17 @@ atom_poll(
peer->burst = ASTAGE;
return;
}
- peer->stratum = sys_prefer->stratum;
- if (peer->stratum <= 1)
+ pp->leap = LEAP_NOWARNING;
+ if (pp->stratum >= STRATUM_UNSPEC)
+ peer->stratum = sys_prefer->stratum;
+ else
+ peer->stratum = pp->stratum;
+ if (peer->stratum == STRATUM_REFCLOCK || peer->stratum ==
+ STRATUM_UNSPEC)
peer->refid = pp->refid;
else
- peer->refid = peer->srcadr.sin_addr.s_addr;
- pp->leap = LEAP_NOWARNING;
+ peer->refid = addr2refid(&sys_prefer->srcadr);
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
peer->burst = ASTAGE;
}
diff --git a/contrib/ntp/ntpd/refclock_bancomm.c b/contrib/ntp/ntpd/refclock_bancomm.c
index a3debcb6795b..a63be44582f4 100644
--- a/contrib/ntp/ntpd/refclock_bancomm.c
+++ b/contrib/ntp/ntpd/refclock_bancomm.c
@@ -317,8 +317,9 @@ vme_poll(
refclock_report(peer, CEVNT_BADTIME);
return;
}
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
}
struct vmedate *
diff --git a/contrib/ntp/ntpd/refclock_chronolog.c b/contrib/ntp/ntpd/refclock_chronolog.c
index 9273a84fdfa8..a1d131ec0304 100644
--- a/contrib/ntp/ntpd/refclock_chronolog.c
+++ b/contrib/ntp/ntpd/refclock_chronolog.c
@@ -215,7 +215,6 @@ chronolog_receive(
* calls since it is transmitted a few seconds ahead of the
* timestamp.
*/
- pp->msec = 0;
got_good=0;
if (sscanf(pp->a_lastcode, "Y %d/%d/%d", &up->year,&up->month,&up->day))
{
@@ -293,8 +292,9 @@ chronolog_receive(
refclock_report(peer, CEVNT_BADTIME);
return;
}
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
up->lasthour = pp->hour;
}
diff --git a/contrib/ntp/ntpd/refclock_chu.c b/contrib/ntp/ntpd/refclock_chu.c
index b239ad64a31e..e0c79e23aba9 100644
--- a/contrib/ntp/ntpd/refclock_chu.c
+++ b/contrib/ntp/ntpd/refclock_chu.c
@@ -40,10 +40,10 @@
* change throughout the day and night.
*
* The driver receives, demodulates and decodes the radio signals when
- * connected to the audio codec of a Sun workstation running SunOS or
- * Solaris, and with a little help, other workstations with similar
- * codecs or sound cards. In this implementation, only one audio driver
- * and codec can be supported on a single machine.
+ * connected to the audio codec of a suported workstation hardware and
+ * operating system. These include Solaris, SunOS, FreeBSD, NetBSD and
+ * Linux. In this implementation, only one audio driver and codec can be
+ * supported on a single machine.
*
* The driver can be compiled to use a Bell 103 compatible modem or
* modem chip to receive the radio signal and demodulate the data.
@@ -105,8 +105,8 @@
*
* The timecode format used for debugging and data recording includes
* data helpful in diagnosing problems with the radio signal and serial
- * connections. With debugging enabled (-d -d -d on the ntpd command
- * line), the driver produces one line for each burst in two formats
+ * connections. With debugging enabled (-d on the ntpd command line),
+ * the driver produces one line for each burst in two formats
* corresponding to format A and B. Following is format A:
*
* n b f s m code
@@ -161,22 +161,22 @@
*
* For accuracies better than the low millisceconds, fudge time1 can be
* set to the radio propagation delay from CHU to the receiver. This can
- * be done conviently using the minimuf program. When the modem driver
- * is compiled, fudge flag3 enables the ppsclock line discipline. Fudge
- * flag4 causes the dubugging output described above to be recorded in
- * the clockstats file.
+ * be done conviently using the minimuf program.
*
- * When the audio driver is compiled, fudge flag2 selects the audio
- * input port, where 0 is the mike port (default) and 1 is the line-in
- * port. It does not seem useful to select the compact disc player port.
- * Fudge flag3 enables audio monitoring of the input signal. For this
- * purpose, the speaker volume must be set before the driver is started.
+ * Fudge flag4 causes the dubugging output described above to be
+ * recorded in the clockstats file. When the audio driver is compiled,
+ * fudge flag2 selects the audio input port, where 0 is the mike port
+ * (default) and 1 is the line-in port. It does not seem useful to
+ * select the compact disc player port. Fudge flag3 enables audio
+ * monitoring of the input signal. For this purpose, the monitor gain is
+ * set to a default value.
*
* The audio codec code is normally compiled in the driver if the
- * architecture supports it (HAVE_AUDIO defined), but is used only if the
- * link /dev/chu_audio is defined and valid. The serial port
- * code is alwasy compiled in the driver, but is used only if the autdio
- * codec is not available and the link /dev/chu%d is defined and valid.
+ * architecture supports it (HAVE_AUDIO defined), but is used only if
+ * the link /dev/chu_audio is defined and valid. The serial port code is
+ * always compiled in the driver, but is used only if the autdio codec
+ * is not available and the link /dev/chu%d is defined and valid.
+ *
* The ICOM code is normally compiled in the driver if selected (ICOM
* defined), but is used only if the link /dev/icom%d is defined and
* valid and the mode keyword on the server configuration command
@@ -194,11 +194,13 @@
#define DEVICE "/dev/chu%d" /* device name and unit */
#define SPEED232 B300 /* UART speed (300 baud) */
#ifdef ICOM
-#define DWELL 5 /* minutes before qsy */
+#define TUNE .001 /* offset for narrow filter (kHz) */
+#define DWELL 5 /* minutes in a probe cycle */
#define NCHAN 3 /* number of channels */
+#define ISTAGE 3 /* number of integrator stages */
#endif /* ICOM */
-#ifdef HAVE_AUDIO
+#ifdef HAVE_AUDIO
/*
* Audio demodulator definitions
*/
@@ -207,11 +209,13 @@
#define OFFSET 128 /* companded sample offset */
#define SIZE 256 /* decompanding table size */
#define MAXSIG 6000. /* maximum signal level */
+#define MAXCLP 100 /* max clips above reference per s */
#define LIMIT 1000. /* soft limiter threshold */
#define AGAIN 6. /* baseband gain */
#define LAG 10 /* discriminator lag */
#define DEVICE_AUDIO "/dev/chu_audio" /* device name */
#define DESCRIPTION "CHU Audio/Modem Receiver" /* WRU */
+#define AUDIO_BUFSIZ 240 /* audio buffer size (30 ms) */
#else
#define DESCRIPTION "CHU Modem Receiver" /* WRU */
#endif /* HAVE_AUDIO */
@@ -224,16 +228,19 @@
#define BURST 11 /* max characters per burst */
#define MINCHAR 9 /* min characters per burst */
#define MINDIST 28 /* min burst distance (of 40) */
+#define MINBURST 4 /* min bursts in minute */
#define MINSYNC 8 /* min sync distance (of 16) */
#define MINSTAMP 20 /* min timestamps (of 60) */
-#define PANIC (4 * 1440) /* panic restart */
+#define METRIC 50. /* min channel metric */
+#define PANIC 1440 /* panic timeout (m) */
+#define HOLD 30 /* reach hold (m) */
/*
* Hex extension codes (>= 16)
*/
-#define HEX_MISS 16 /* miss */
-#define HEX_SOFT 17 /* soft error */
-#define HEX_HARD 18 /* hard error */
+#define HEX_MISS 16 /* miss _ */
+#define HEX_SOFT 17 /* soft error * */
+#define HEX_HARD 18 /* hard error = */
/*
* Status bits (status)
@@ -246,8 +253,9 @@
#define AFORMAT 0x0020 /* invalid format A data */
#define DECODE 0x0040 /* invalid data decode */
#define STAMP 0x0080 /* too few timestamps */
-#define INYEAR 0x0100 /* valid B frame */
-#define INSYNC 0x0200 /* clock synchronized */
+#define AVALID 0x0100 /* valid A frame */
+#define BVALID 0x0200 /* valid B frame */
+#define INSYNC 0x0400 /* clock synchronized */
/*
* Alarm status bits (alarm)
@@ -264,6 +272,10 @@
#define TSPERR 0x08 /* insufficient data */
#ifdef HAVE_AUDIO
+/*
+ * Maximum likelihood UART structure. There are eight of these
+ * corresponding to the number of phases.
+ */
struct surv {
double shift[12]; /* mark register */
double es_max, es_min; /* max/min envelope signals */
@@ -272,6 +284,19 @@ struct surv {
};
#endif /* HAVE_AUDIO */
+#ifdef ICOM
+/*
+ * CHU station structure. There are three of these corresponding to the
+ * three frequencies.
+ */
+struct xmtr {
+ double integ[ISTAGE]; /* circular integrator */
+ double metric; /* integrator sum */
+ int iptr; /* integrator pointer */
+ int probe; /* dwells since last probe */
+};
+#endif /* ICOM */
+
/*
* CHU unit control structure
*/
@@ -284,12 +309,13 @@ struct chuunit {
l_fp charstamp; /* character time as a l_fp */
int errflg; /* error flags */
int status; /* status bits */
- int bufptr; /* buffer index pointer */
- char ident[10]; /* transmitter frequency */
+ char ident[5]; /* station ID and channel */
#ifdef ICOM
int fd_icom; /* ICOM file descriptor */
- int chan; /* frequency identifier */
- int dwell; /* dwell minutes at current frequency */
+ int chan; /* data channel */
+ int achan; /* active channel */
+ int dwell; /* dwell cycle */
+ struct xmtr xmtr[NCHAN]; /* station metric */
#endif /* ICOM */
/*
@@ -300,7 +326,6 @@ struct chuunit {
int ndx; /* buffer start index */
int prevsec; /* previous burst second */
int burdist; /* burst distance */
- int mindist; /* minimum distance */
int syndist; /* sync distance */
int burstcnt; /* format A bursts this minute */
@@ -320,7 +345,7 @@ struct chuunit {
double comp[SIZE]; /* decompanding table */
int port; /* codec port */
int gain; /* codec gain */
- int bufcnt; /* samples in buffer */
+ int mongain; /* codec monitor gain */
int clipcnt; /* sample clip count */
int seccnt; /* second interval counter */
@@ -362,21 +387,30 @@ static void chu_clear P((struct peer *));
static void chu_a P((struct peer *, int));
static void chu_b P((struct peer *, int));
static int chu_dist P((int, int));
-static int chu_major P((struct peer *));
+static double chu_major P((struct peer *));
#ifdef HAVE_AUDIO
static void chu_uart P((struct surv *, double));
static void chu_rf P((struct peer *, double));
static void chu_gain P((struct peer *));
static void chu_audio_receive P((struct recvbuf *rbufp));
#endif /* HAVE_AUDIO */
+#ifdef ICOM
+static int chu_newchan P((struct peer *, double));
+#endif /* ICOM */
static void chu_serial_receive P((struct recvbuf *rbufp));
/*
* Global variables
*/
-static char hexchar[] = "0123456789abcdef_-=";
+static char hexchar[] = "0123456789abcdef_*=";
+
#ifdef ICOM
-static double qsy[NCHAN] = {3.33, 7.335, 14.67}; /* frequencies (MHz) */
+/*
+ * Note the tuned frequencies are 1 kHz higher than the carrier. CHU
+ * transmits on USB with carrier so we can use AM and the narrow SSB
+ * filter.
+ */
+static double qsy[NCHAN] = {3.330, 7.335, 14.670}; /* freq (MHz) */
#endif /* ICOM */
/*
@@ -407,7 +441,6 @@ chu_start(
char device[20]; /* device name */
int fd; /* file descriptor */
#ifdef ICOM
- char tbuf[80]; /* trace buffer */
int temp;
#endif /* ICOM */
#ifdef HAVE_AUDIO
@@ -418,7 +451,7 @@ chu_start(
/*
* Open audio device.
*/
- fd_audio = audio_init(DEVICE_AUDIO);
+ fd_audio = audio_init(DEVICE_AUDIO, AUDIO_BUFSIZ, unit);
#ifdef DEBUG
if (fd_audio > 0 && debug)
audio_show();
@@ -470,7 +503,8 @@ chu_start(
*/
peer->precision = PRECISION;
pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
+ strcpy(up->ident, "CHU");
+ memcpy(&peer->refid, up->ident, 4);
DTOLFP(CHAR, &up->charstamp);
#ifdef HAVE_AUDIO
@@ -493,15 +527,14 @@ chu_start(
}
DTOLFP(1. / SECOND, &up->tick);
#endif /* HAVE_AUDIO */
- strcpy(up->ident, "X");
#ifdef ICOM
temp = 0;
#ifdef DEBUG
if (debug > 1)
temp = P_TRACE;
#endif
- if (peer->ttlmax > 0) {
- if (peer->ttlmax & 0x80)
+ if (peer->ttl > 0) {
+ if (peer->ttl & 0x80)
up->fd_icom = icom_init("/dev/icom", B1200,
temp);
else
@@ -509,22 +542,17 @@ chu_start(
temp);
}
if (up->fd_icom > 0) {
- if (icom_freq(up->fd_icom, peer->ttlmax & 0x7f,
- qsy[up->chan]) < 0) {
+ if (chu_newchan(peer, 0) != 0) {
NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
- msyslog(LOG_ERR,
- "ICOM bus error; autotune disabled");
+ msyslog(LOG_NOTICE,
+ "icom: radio not found");
up->errflg = CEVNT_FAULT;
close(up->fd_icom);
up->fd_icom = 0;
} else {
- sprintf(up->ident, "%.1f", qsy[up->chan]);
- sprintf(tbuf, "chu: QSY to %s MHz", up->ident);
- record_clock_stats(&peer->srcadr, tbuf);
-#ifdef DEBUG
- if (debug)
- printf("%s\n", tbuf);
-#endif
+ NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
+ msyslog(LOG_NOTICE,
+ "icom: autotune enabled");
}
}
#endif /* ICOM */
@@ -548,12 +576,16 @@ chu_shutdown(
up = (struct chuunit *)pp->unitptr;
if (up == NULL)
return;
+
io_closeclock(&pp->io);
+#ifdef ICOM
if (up->fd_icom > 0)
close(up->fd_icom);
+#endif /* ICOM */
free(up);
}
+
/*
* chu_receive - receive data from the audio or serial device
*/
@@ -588,8 +620,8 @@ chu_receive(
#endif /* HAVE_AUDIO */
}
-#ifdef HAVE_AUDIO
+#ifdef HAVE_AUDIO
/*
* chu_audio_receive - receive data from the audio device
*/
@@ -604,10 +636,8 @@ chu_audio_receive(
double sample; /* codec sample */
u_char *dpt; /* buffer pointer */
+ int bufcnt; /* buffer counter */
l_fp ltemp; /* l_fp temp */
- int isneg; /* parity flag */
- double dtemp;
- int i, j;
peer = (struct peer *)rbufp->recv_srcclock;
pp = peer->procptr;
@@ -617,13 +647,12 @@ chu_audio_receive(
* Main loop - read until there ain't no more. Note codec
* samples are bit-inverted.
*/
+ DTOLFP((double)rbufp->recv_length / SECOND, &ltemp);
+ L_SUB(&rbufp->recv_time, &ltemp);
up->timestamp = rbufp->recv_time;
- up->bufcnt = rbufp->recv_length;
- DTOLFP(up->bufcnt * 1. / SECOND, &ltemp);
- L_SUB(&up->timestamp, &ltemp);
- dpt = (u_char *)&rbufp->recv_space;
- for (up->bufptr = 0; up->bufptr < up->bufcnt; up->bufptr++) {
- sample = up->comp[~*dpt & 0xff];
+ dpt = rbufp->recv_buffer;
+ for (bufcnt = 0; bufcnt < rbufp->recv_length; bufcnt++) {
+ sample = up->comp[~*dpt++ & 0xff];
/*
* Clip noise spikes greater than MAXSIG. If no clips,
@@ -637,56 +666,30 @@ chu_audio_receive(
sample = -MAXSIG;
up->clipcnt++;
}
- up->seccnt = (up->seccnt + 1) % SECOND;
- if (up->seccnt == 0) {
- if (pp->sloppyclockflag & CLK_FLAG2)
- up->port = 2;
- else
- up->port = 1;
- chu_gain(peer);
- }
chu_rf(peer, sample);
+ L_ADD(&up->timestamp, &up->tick);
/*
- * During development, it is handy to have an audio
- * monitor that can be switched to various signals. This
- * code converts the linear signal left in up->monitor
- * to codec format. If we can get the grass out of this
- * thing and improve modem performance, this expensive
- * code will be permanently nixed.
+ * Once each second ride gain.
*/
- isneg = 0;
- dtemp = up->monitor;
- if (sample < 0) {
- isneg = 1;
- dtemp-= dtemp;
- }
- i = 0;
- j = OFFSET >> 1;
- while (j != 0) {
- if (dtemp > up->comp[i])
- i += j;
- else if (dtemp < up->comp[i])
- i -= j;
- else
- break;
- j >>= 1;
+ up->seccnt = (up->seccnt + 1) % SECOND;
+ if (up->seccnt == 0) {
+ pp->second = (pp->second + 1) % 60;
+ chu_gain(peer);
}
- if (isneg)
- *dpt = ~(i + OFFSET);
- else
- *dpt = ~i;
- dpt++;
- L_ADD(&up->timestamp, &up->tick);
}
-
+
/*
- * Squawk to the monitor speaker if enabled.
+ * Set the input port and monitor gain for the next buffer.
*/
+ if (pp->sloppyclockflag & CLK_FLAG2)
+ up->port = 2;
+ else
+ up->port = 1;
if (pp->sloppyclockflag & CLK_FLAG3)
- if (write(pp->io.fd, (u_char *)&rbufp->recv_space,
- (u_int)up->bufcnt) < 0)
- perror("chu:");
+ up->mongain = MONGAIN;
+ else
+ up->mongain = 0;
}
@@ -1068,13 +1071,13 @@ chu_b(
* In a format B burst, a character is considered valid only if
* the first occurrence matches the last occurrence. The burst
* is considered valid only if all characters are valid; that
- * is, only if the distance is 40.
+ * is, only if the distance is 40. Note that once a valid frame
+ * has been found errors are ignored.
*/
sprintf(tbuf, "chuB %04x %2d %2d ", up->status, nchar,
-up->burdist);
for (i = 0; i < nchar; i++)
- sprintf(&tbuf[strlen(tbuf)], "%02x",
- up->cbuf[i]);
+ sprintf(&tbuf[strlen(tbuf)], "%02x", up->cbuf[i]);
if (pp->sloppyclockflag & CLK_FLAG4)
record_clock_stats(&peer->srcadr, tbuf);
#ifdef DEBUG
@@ -1085,7 +1088,7 @@ chu_b(
up->status |= BFRAME;
return;
}
- up->status |= INYEAR;
+ up->status |= BVALID;
/*
* Convert the burst data to internal format. If this succeeds,
@@ -1201,6 +1204,7 @@ chu_a(
* the previous burst to the current one.
*/
if (temp != 0) {
+ pp->second = 30 + temp;
offset.l_ui = 30 + temp;
offset.l_f = 0;
i = 0;
@@ -1236,6 +1240,7 @@ chu_a(
up->decode[i][(up->cbuf[j] >> 4) & 0xf]++;
i++;
}
+ up->status |= AVALID;
up->burstcnt++;
}
@@ -1251,54 +1256,48 @@ chu_poll(
{
struct refclockproc *pp;
struct chuunit *up;
+ l_fp offset;
char synchar, qual, leapchar;
- int minset;
- int temp;
-#ifdef ICOM
- char tbuf[80]; /* trace buffer */
-#endif /* ICOM */
+ int minset, i;
+ double dtemp;
+
pp = peer->procptr;
up = (struct chuunit *)pp->unitptr;
if (pp->coderecv == pp->codeproc)
up->errflg = CEVNT_TIMEOUT;
else
pp->polls++;
+
+ /*
+ * If once in sync and the radio has not been heard for awhile
+ * (30 m), it is no longer reachable. If not heard in a long
+ * while (one day), turn out the lights and start from scratch.
+ */
minset = ((current_time - peer->update) + 30) / 60;
if (up->status & INSYNC) {
if (minset > PANIC)
up->status = 0;
- else
+ else if (minset <= HOLD)
peer->reach |= 1;
}
/*
* Process the last burst, if still in the burst buffer.
- * Don't mess with anything if nothing has been heard.
+ * Don't mess with anything if nothing has been heard. If the
+ * minute contains a valid A frame and valid B frame, assume
+ * synchronized; however, believe the time only if within metric
+ * threshold. Note the quality indicator is only for
+ * diagnostics; the data are used only if in sync and above
+ * metric threshold.
*/
chu_burst(peer);
+ if (up->burstcnt == 0) {
#ifdef ICOM
- if (up->burstcnt > 2) {
- up->dwell = 0;
- } else if (up->dwell < DWELL) {
- up->dwell++;
- } else if (up->fd_icom > 0) {
- up->dwell = 0;
- up->chan = (up->chan + 1) % NCHAN;
- icom_freq(up->fd_icom, peer->ttlmax & 0x7f, qsy[up->chan]);
- sprintf(up->ident, "%.3f", qsy[up->chan]);
- sprintf(tbuf, "chu: QSY to %s MHz", up->ident);
- record_clock_stats(&peer->srcadr, tbuf);
-#ifdef DEBUG
- if (debug)
- printf("%s\n", tbuf);
-#endif
- }
+ chu_newchan(peer, 0);
#endif /* ICOM */
- if (up->burstcnt == 0)
return;
- temp = chu_major(peer);
- if (up->status & INYEAR)
- up->status |= INSYNC;
+ }
+ dtemp = chu_major(peer);
qual = 0;
if (up->status & (BFRAME | AFRAME))
qual |= SYNERR;
@@ -1308,6 +1307,8 @@ chu_poll(
qual |= DECERR;
if (up->status & STAMP)
qual |= TSPERR;
+ if (up->status & AVALID && up->status & BVALID)
+ up->status |= INSYNC;
synchar = leapchar = ' ';
if (!(up->status & INSYNC)) {
pp->leap = LEAP_NOTINSYNC;
@@ -1324,34 +1325,45 @@ chu_poll(
#ifdef HAVE_AUDIO
if (up->fd_audio)
sprintf(pp->a_lastcode,
- "%c%1X %4d %3d %02d:%02d:%02d.000 %c%x %+d %d %d %s %d %d %d %d",
+ "%c%1X %04d %3d %02d:%02d:%02d %c%x %+d %d %d %s %.0f %d",
synchar, qual, pp->year, pp->day, pp->hour,
pp->minute, pp->second, leapchar, up->dst, up->dut,
- minset, up->gain, up->ident, up->tai, up->burstcnt,
- up->mindist, up->ntstamp);
+ minset, up->gain, up->ident, dtemp, up->ntstamp);
else
sprintf(pp->a_lastcode,
- "%c%1X %4d %3d %02d:%02d:%02d.000 %c%x %+d %d %s %d %d %d %d",
+ "%c%1X %04d %3d %02d:%02d:%02d %c%x %+d %d %s %.0f %d",
synchar, qual, pp->year, pp->day, pp->hour,
pp->minute, pp->second, leapchar, up->dst, up->dut,
- minset, up->ident, up->tai, up->burstcnt,
- up->mindist, up->ntstamp);
+ minset, up->ident, dtemp, up->ntstamp);
#else
sprintf(pp->a_lastcode,
- "%c%1X %4d %3d %02d:%02d:%02d.000 %c%x %+d %d %s %d %d %d %d",
+ "%c%1X %04d %3d %02d:%02d:%02d %c%x %+d %d %s %.0f %d",
synchar, qual, pp->year, pp->day, pp->hour, pp->minute,
- pp->second, leapchar, up->dst, up->dut, minset,
- up->ident, up->tai, up->burstcnt, up->mindist, up->ntstamp);
+ pp->second, leapchar, up->dst, up->dut, minset, up->ident,
+ dtemp, up->ntstamp);
#endif /* HAVE_AUDIO */
pp->lencode = strlen(pp->a_lastcode);
/*
- * If timestamps have been stuffed, the timecode is ipso fatso
- * correct and can be selected to discipline the clock.
+ * If in sync and the signal metric is above threshold, the
+ * timecode is ipso fatso valid and can be selected to
+ * discipline the clock. Be sure not to leave stray timestamps
+ * around if signals are too weak or the clock time is invalid.
*/
- if (temp > 0) {
+ if (up->status & INSYNC && dtemp > METRIC) {
+ if (!clocktime(pp->day, pp->hour, pp->minute, 0, GMT,
+ up->tstamp[0].l_ui, &pp->yearstart, &offset.l_ui)) {
+ up->errflg = CEVNT_BADTIME;
+ } else {
+ offset.l_uf = 0;
+ for (i = 0; i < up->ntstamp; i++)
+ refclock_process_offset(pp, offset,
+ up->tstamp[i], FUDGE +
+ pp->fudgetime1);
+ pp->lastref = up->timestamp;
+ refclock_receive(peer);
+ }
record_clock_stats(&peer->srcadr, pp->a_lastcode);
- refclock_receive(peer);
} else if (pp->sloppyclockflag & CLK_FLAG4) {
record_clock_stats(&peer->srcadr, pp->a_lastcode);
}
@@ -1360,6 +1372,9 @@ chu_poll(
printf("chu: timecode %d %s\n", pp->lencode,
pp->a_lastcode);
#endif
+#ifdef ICOM
+ chu_newchan(peer, dtemp);
+#endif /* ICOM */
chu_clear(peer);
if (up->errflg)
refclock_report(peer, up->errflg);
@@ -1370,7 +1385,7 @@ chu_poll(
/*
* chu_major - majority decoder
*/
-static int
+static double
chu_major(
struct peer *peer /* peer structure pointer */
)
@@ -1379,10 +1394,9 @@ chu_major(
struct chuunit *up;
u_char code[11]; /* decoded timecode */
- l_fp toffset, offset; /* l_fp temps */
+ int mindist; /* minimum distance */
int val1, val2; /* maximum distance */
int synchar; /* stray cat */
- double dtemp;
int temp;
int i, j, k;
@@ -1392,20 +1406,20 @@ chu_major(
/*
* Majority decoder. Each burst encodes two replications at each
* digit position in the timecode. Each row of the decoding
- * matrix encodes the number of occurences of each digit found
+ * matrix encodes the number of occurrences of each digit found
* at the corresponding position. The maximum over all
- * occurences at each position is the distance for this position
- * and the corresponding digit is the maximumn likelihood
- * candidate. If the distance is zero, assume a miss '_'; if the
- * distance is not more than half the total number of
- * occurences, assume a soft error '-'; if two different digits
- * with the same distance are found, assume a hard error '='.
- * These will later cause a format error when the timecode is
- * interpreted. The decoding distance is defined as the minimum
- * distance over the first nine digits. The tenth digit varies
- * over the seconds, so we don't count it.
+ * occurrences at each position is the distance for this
+ * position and the corresponding digit is the maximum
+ * likelihood candidate. If the distance is zero, assume a miss
+ * '_'; if the distance is not more than half the total number
+ * of occurrences, assume a soft error '*'; if two different
+ * digits with the same distance are found, assume a hard error
+ * '='. These will later cause a format error when the timecode
+ * is interpreted. The decoding distance is defined as the
+ * minimum distance over the first nine digits. The tenth digit
+ * varies over the seconds, so we don't count it.
*/
- up->mindist = 16;
+ mindist = 16;
for (i = 0; i < 9; i++) {
val1 = val2 = 0;
k = 0;
@@ -1425,19 +1439,18 @@ chu_major(
code[i] = HEX_SOFT;
else
code[i] = k;
- if (val1 < up->mindist)
- up->mindist = val1;
+ if (val1 < mindist)
+ mindist = val1;
code[i] = hexchar[code[i]];
}
code[i] = 0;
/*
- * A valid timecode requires at least three bursts and a
- * decoding distance greater than half the total number of
- * occurences. A valid timecode also requires at least 20 valid
- * timestamps.
+ * A valid timecode requires a minimum distance at least half
+ * the total number of occurrences. A valid timecode also
+ * requires at least 20 valid timestamps.
*/
- if (up->burstcnt < 3 || up->mindist <= up->burstcnt)
+ if (up->burstcnt < MINBURST || mindist < up->burstcnt)
up->status |= DECODE;
if (up->ntstamp < MINSTAMP)
up->status |= STAMP;
@@ -1458,20 +1471,7 @@ chu_major(
up->errflg = CEVNT_BADREPLY;
return (0);
}
- L_CLR(&offset);
- if (!clocktime(pp->day, pp->hour, pp->minute, 0, GMT,
- up->tstamp[0].l_ui, &pp->yearstart, &offset.l_ui)) {
- up->errflg = CEVNT_BADTIME;
- return (0);
- }
- pp->lastref = offset;
- for (i = 0; i < up->ntstamp; i++) {
- toffset = offset;
- L_SUB(&toffset, &up->tstamp[i]);
- LFPTOD(&toffset, dtemp);
- SAMPLE(dtemp + FUDGE + pp->fudgetime1);
- }
- return (i);
+ return (mindist * 100. / (2. * up->burstcnt));
}
@@ -1494,15 +1494,120 @@ chu_clear(
* Clear stuff for the minute.
*/
up->ndx = up->prevsec = 0;
- up->burstcnt = up->mindist = up->ntstamp = 0;
- up->status &= INSYNC | INYEAR;
- up->burstcnt = 0;
+ up->burstcnt = up->ntstamp = 0;
+ up->status &= INSYNC;
for (i = 0; i < 20; i++) {
for (j = 0; j < 16; j++)
up->decode[i][j] = 0;
}
}
+#ifdef ICOM
+/*
+ * chu_newchan - called once per minute to find the best channel;
+ * returns zero on success, nonzero if ICOM error.
+ */
+static int
+chu_newchan(
+ struct peer *peer,
+ double met
+ )
+{
+ struct chuunit *up;
+ struct refclockproc *pp;
+ struct xmtr *sp;
+ char tbuf[80]; /* trace buffer */
+ int rval;
+ double metric;
+ int i, j;
+
+ pp = peer->procptr;
+ up = (struct chuunit *)pp->unitptr;
+
+ /*
+ * The radio can be tuned to three channels: 0 (3330 kHz), 1
+ * (7335 kHz) and 2 (14670 kHz). There are five one-minute
+ * dwells in each cycle. During the first dwell the radio is
+ * tuned to one of three probe channels; during the remaining
+ * four dwells the radio is tuned to the data channel. The probe
+ * channel is selects as the least recently used. At the end of
+ * each dwell the channel metrics are measured and the highest
+ * one is selected as the data channel.
+ */
+ if (up->fd_icom <= 0)
+ return (0);
+
+ sp = &up->xmtr[up->achan];
+ sp->metric -= sp->integ[sp->iptr];
+ sp->integ[sp->iptr] = met;
+ sp->metric += sp->integ[sp->iptr];
+ sp->iptr = (sp->iptr + 1) % ISTAGE;
+ metric = 0;
+ j = 0;
+ for (i = 0; i < NCHAN; i++) {
+ up->xmtr[i].probe++;
+ if (i == up->achan)
+ up->xmtr[i].probe = 0;
+ if (up->xmtr[i].metric < metric)
+ continue;
+ metric = up->xmtr[i].metric;
+ j = i;
+ }
+ if (j != up->chan && metric > 0) {
+ up->chan = j;
+ sprintf(tbuf, "chu: QSY to %.3f MHz metric %.0f",
+ qsy[up->chan], metric);
+ if (pp->sloppyclockflag & CLK_FLAG4)
+ record_clock_stats(&peer->srcadr, tbuf);
+#ifdef DEBUG
+ if (debug)
+ printf("%s\n", tbuf);
+#endif
+ }
+
+ /*
+ * Start the next dwell. We speed up the initial sync a little.
+ * If not in sync and no bursts were heard the previous dwell,
+ * restart the probe.
+ */
+ rval = 0;
+ if (up->burstcnt == 0 && !(up->status & INSYNC))
+ up->dwell = 0;
+#ifdef DEBUG
+ if (debug)
+ printf(
+ "chu: at %ld dwell %d achan %d metric %.0f chan %d\n",
+ current_time, up->dwell, up->achan, sp->metric,
+ up->chan);
+#endif
+ if (up->dwell == 0) {
+ rval = 0;
+ for (i = 0; i < NCHAN; i++) {
+ if (up->xmtr[i].probe < rval)
+ continue;
+ rval = up->xmtr[i].probe;
+ up->achan = i;
+ }
+ rval = icom_freq(up->fd_icom, peer->ttl & 0x7f,
+ qsy[up->achan] + TUNE);
+#ifdef DEBUG
+ if (debug)
+ printf("chu: at %ld probe channel %d\n",
+ current_time, up->achan);
+#endif
+ } else {
+ if (up->achan != up->chan) {
+ rval = icom_freq(up->fd_icom, peer->ttl & 0x7f,
+ qsy[up->chan] + TUNE);
+ up->achan = up->chan;
+ }
+ }
+ sprintf(up->ident, "CHU%d", up->achan);
+ memcpy(&peer->refid, up->ident, 4);
+ up->dwell = (up->dwell + 1) % DWELL;
+ return (rval);
+}
+#endif /* ICOM */
/*
* chu_dist - determine the distance of two octet arguments
@@ -1564,14 +1669,14 @@ chu_gain(
*/
if (up->clipcnt == 0) {
up->gain += 4;
- if (up->gain > 255)
- up->gain = 255;
- } else if (up->clipcnt > SECOND / 100) {
+ if (up->gain > MAXGAIN)
+ up->gain = MAXGAIN;
+ } else if (up->clipcnt > MAXCLP) {
up->gain -= 4;
if (up->gain < 0)
up->gain = 0;
}
- audio_gain(up->gain, up->port);
+ audio_gain(up->gain, up->mongain, up->port);
up->clipcnt = 0;
}
#endif /* HAVE_AUDIO */
diff --git a/contrib/ntp/ntpd/refclock_conf.c b/contrib/ntp/ntpd/refclock_conf.c
index 04166d9f67bf..8a424f05b491 100644
--- a/contrib/ntp/ntpd/refclock_conf.c
+++ b/contrib/ntp/ntpd/refclock_conf.c
@@ -192,7 +192,7 @@ extern struct refclock refclock_oncore;
#define refclock_oncore refclock_none
#endif
-#if defined(CLOCK_JUPITER) && defined(PPS)
+#if defined(CLOCK_JUPITER) && defined(HAVE_PPSAPI)
extern struct refclock refclock_jupiter;
#else
#define refclock_jupiter refclock_none
diff --git a/contrib/ntp/ntpd/refclock_datum.c b/contrib/ntp/ntpd/refclock_datum.c
index db03c95f2c64..82b73690f46d 100644
--- a/contrib/ntp/ntpd/refclock_datum.c
+++ b/contrib/ntp/ntpd/refclock_datum.c
@@ -712,6 +712,7 @@ datum_pts_receive(
&datum_pts->yearstart,
&datum_pts->lastref.l_ui) ) {
+ datum_pts->lastref.l_uf = 0;
error = datum_pts->lastref.l_ui - datum_pts->lastrec.l_ui;
#ifdef DEBUG_DATUM_PTC
@@ -813,6 +814,7 @@ datum_pts_receive(
** necessary to use fudge factors in the ntp.conf file. Maybe later we will.
*/
/*LFPTOD(&tstmp, doffset);*/
+ datum_pts->lastref = datum_pts->lastrec;
refclock_receive(datum_pts->peer);
/*
diff --git a/contrib/ntp/ntpd/refclock_dumbclock.c b/contrib/ntp/ntpd/refclock_dumbclock.c
index c439646f9130..2788649ac3a7 100644
--- a/contrib/ntp/ntpd/refclock_dumbclock.c
+++ b/contrib/ntp/ntpd/refclock_dumbclock.c
@@ -12,6 +12,11 @@
#include <config.h>
#endif
+#if defined(SYS_WINNT)
+#undef close
+#define close closesocket
+#endif
+
#if defined(REFCLOCK) && defined(CLOCK_DUMBCLOCK)
#include "ntpd.h"
@@ -114,14 +119,15 @@ dumbclock_start(
if (debug)
printf ("starting Dumbclock with device %s\n",device);
#endif
- if (!(fd = refclock_open(device, SPEED232, 0)))
+ fd = refclock_open(device, SPEED232, 0);
+ if (fd < 0)
return (0);
/*
* Allocate and initialize unit structure
*/
- if (!(up = (struct dumbclock_unit *)
- emalloc(sizeof(struct dumbclock_unit)))) {
+ up = (struct dumbclock_unit *)emalloc(sizeof(struct dumbclock_unit));
+ if (up == NULL) {
(void) close(fd);
return (0);
}
@@ -218,7 +224,7 @@ dumbclock_receive(
up->tcswitch = 0;
return;
}
- pp->lencode = temp;
+ pp->lencode = (u_short)temp;
pp->lastrec = up->laststamp;
up->laststamp = trtmp;
up->tcswitch = 1;
@@ -232,7 +238,6 @@ dumbclock_receive(
/*
* We get down to business. Check the timecode format...
*/
- pp->msec = 0;
got_good=0;
if (sscanf(pp->a_lastcode,"%02d:%02d:%02d",
&hours,&minutes,&seconds) == 3)
@@ -330,9 +335,10 @@ dumbclock_receive(
refclock_report(peer, CEVNT_BADTIME);
return;
}
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
- up->lasthour = pp->hour;
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ up->lasthour = (u_char)pp->hour;
}
#if 0
diff --git a/contrib/ntp/ntpd/refclock_fg.c b/contrib/ntp/ntpd/refclock_fg.c
index 655b6bcda131..ebcf1b5672d1 100644
--- a/contrib/ntp/ntpd/refclock_fg.c
+++ b/contrib/ntp/ntpd/refclock_fg.c
@@ -299,14 +299,14 @@ fg_receive(
{
pp->minute = BP1(7)*10 + BP2(7);
pp->second = BP1(8)*10 + BP2(8);
- pp->msec = BP1(9)*10 + BP2(9);
- pp->usec = BP1(10);
+ pp->nsec = (BP1(9)*10 + BP2(9)) * 1000000;
+ pp->nsec += BP1(10) * 1000;
} else {
pp->hour = BP1(5)*10 + BP2(5);
pp->minute = BP1(6)*10 + BP2(6);
pp->second = BP1(7)*10 + BP2(7);
- pp->msec = BP1(8)*10 + BP2(8);
- pp->usec = BP1(9);
+ pp->nsec = (BP1(8)*10 + BP2(8)) * 1000000;
+ pp->nsec += BP1(9) * 1000;
}
if((pp->hour == 10) && (pp->minute == 10))
@@ -327,7 +327,7 @@ fg_receive(
if (peer->stratum <= 1)
peer->refid = pp->refid;
pp->disp = (10e-6);
- pp->lastrec = rbufp->recv_time; /* Is it better then get_systime()? */
+ pp->lastrec = rbufp->recv_time; /* Is it better than get_systime()? */
/* pp->leap = LEAP_NOWARNING; */
/*
@@ -337,7 +337,7 @@ fg_receive(
if (!refclock_process(pp))
refclock_report(peer, CEVNT_BADTIME);
-
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
return;
}
diff --git a/contrib/ntp/ntpd/refclock_gpsvme.c b/contrib/ntp/ntpd/refclock_gpsvme.c
index 42eb2f981b2b..a7fcf5f62eb8 100644
--- a/contrib/ntp/ntpd/refclock_gpsvme.c
+++ b/contrib/ntp/ntpd/refclock_gpsvme.c
@@ -349,6 +349,7 @@ vme_poll(
l_fp tstmp;
time_t tloc;
struct tm *tadr;
+ long ltemp;
@@ -395,13 +396,13 @@ vme_poll(
vme->hour = tptr->hr;
vme->minute = tptr->mn;
vme->second = tptr->sec;
- vme->usec = tptr->frac;
+ vme->nsec = tptr->frac * 1000;
#ifdef DEBUG
if (debug)
printf("vme: %3d %02d:%02d:%02d.%06ld %1x\n",
vme->day, vme->hour, vme->minute, vme->second,
- vme->usec, tptr->status);
+ vme->nsec, tptr->status);
#endif
if (tptr->status ) { /* Status 0 is locked to ref., 1 is not */
vme_report_event(vme, CEVNT_BADREPLY);
@@ -424,14 +425,16 @@ vme_poll(
msyslog(LOG_ERR, "refclock_gpsvme: bad data!!");
return;
}
- TVUTOTSF(vme->usec, vme->lastref.l_uf);
+ vme->lastref.l_uf = 0;
+ DTOLFP(vme->nsec / 1e9, &ltemp);
+ L_ADD(&vme->lastrec, &ltemp);
tstmp = vme->lastref;
L_SUB(&tstmp, &vme->lastrec);
vme->coderecv++;
L_ADD(&tstmp, &(fudgefactor[vme->unit]));
-
+ vme->lastref = vme->lastrec;
refclock_receive(vme->peer);
}
@@ -548,7 +551,7 @@ vme_buginfo(
bug->values[4] = (u_long)vme->hour;
bug->values[5] = (u_long)vme->minute;
bug->values[6] = (u_long)vme->second;
- bug->values[7] = (u_long)vme->usec;
+ bug->values[7] = (u_long)vme->nsec;
bug->values[9] = vme->yearstart;
bug->stimes = 0x1c;
bug->times[0] = vme->lastref;
diff --git a/contrib/ntp/ntpd/refclock_heath.c b/contrib/ntp/ntpd/refclock_heath.c
index ef4db5a4d4f8..c16cef3b174b 100644
--- a/contrib/ntp/ntpd/refclock_heath.c
+++ b/contrib/ntp/ntpd/refclock_heath.c
@@ -177,14 +177,6 @@ static int day2tab[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
static int speed[] = {B1200, B2400, B4800, B9600};
/*
- * Unit control structure
- */
-struct heathunit {
- int pollcnt; /* poll message counter */
- l_fp tstamp; /* timestamp of last poll */
-};
-
-/*
* Function prototypes
*/
static int heath_start P((int, struct peer *));
@@ -215,7 +207,6 @@ heath_start(
struct peer *peer
)
{
- register struct heathunit *up;
struct refclockproc *pp;
int fd;
char device[20];
@@ -224,18 +215,8 @@ heath_start(
* Open serial port
*/
(void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, speed[peer->ttlmax & 0x3], 0)))
+ if (!(fd = refclock_open(device, speed[peer->ttl & 0x3], 0)))
return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct heathunit *)
- emalloc(sizeof(struct heathunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct heathunit));
pp = peer->procptr;
pp->io.clock_recv = heath_receive;
pp->io.srcclock = (caddr_t)peer;
@@ -243,10 +224,8 @@ heath_start(
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
(void) close(fd);
- free(up);
return (0);
}
- pp->unitptr = (caddr_t)up;
/*
* Initialize miscellaneous variables
@@ -255,7 +234,6 @@ heath_start(
peer->burst = NSTAGE;
pp->clockdesc = DESCRIPTION;
memcpy((char *)&pp->refid, REFID, 4);
- up->pollcnt = 2;
return (1);
}
@@ -269,13 +247,10 @@ heath_shutdown(
struct peer *peer
)
{
- register struct heathunit *up;
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct heathunit *)pp->unitptr;
io_closeclock(&pp->io);
- free(up);
}
@@ -287,7 +262,6 @@ heath_receive(
struct recvbuf *rbufp
)
{
- register struct heathunit *up;
struct refclockproc *pp;
struct peer *peer;
l_fp trtmp;
@@ -300,27 +274,10 @@ heath_receive(
*/
peer = (struct peer *)rbufp->recv_srcclock;
pp = peer->procptr;
- up = (struct heathunit *)pp->unitptr;
pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX,
&trtmp);
/*
- * We get a buffer and timestamp for each <cr>; however, we use
- * the timestamp captured at the RTS modem control line toggle
- * on the assumption that's what the radio bases the timecode
- * on. Apparently, the radio takes about a second to make up its
- * mind to send a timecode, so the receive timestamp is
- * worthless.
- */
- pp->lastrec = up->tstamp;
- up->pollcnt = 2;
-#ifdef DEBUG
- if (debug)
- printf("heath: timecode %d %s\n", pp->lencode,
- pp->a_lastcode);
-#endif
-
- /*
* We get down to business, check the timecode format and decode
* its contents. If the timecode has invalid length or is not in
* proper format, we declare bad format and exit.
@@ -396,7 +353,7 @@ heath_receive(
if (!isdigit((int)dsec))
pp->leap = LEAP_NOTINSYNC;
else {
- pp->msec = (dsec - '0') * 100;
+ pp->nsec = (dsec - '0') * 100000000;
pp->leap = LEAP_NOWARNING;
}
if (!refclock_process(pp))
@@ -413,7 +370,6 @@ heath_poll(
struct peer *peer
)
{
- register struct heathunit *up;
struct refclockproc *pp;
int bits = TIOCM_RTS;
@@ -421,10 +377,11 @@ heath_poll(
* At each poll we check for timeout and toggle the RTS modem
* control line, then take a timestamp. Presumably, this is the
* event the radio captures to generate the timecode.
+ * Apparently, the radio takes about a second to make up its
+ * mind to send a timecode, so the receive timestamp is
+ * worthless.
*/
pp = peer->procptr;
- up = (struct heathunit *)pp->unitptr;
- pp->polls++;
/*
* We toggle the RTS modem control lead (GC-1000) and sent a T
@@ -437,19 +394,26 @@ heath_poll(
*/
if (ioctl(pp->io.fd, TIOCMBIC, (char *)&bits) < 0)
refclock_report(peer, CEVNT_FAULT);
- get_systime(&up->tstamp);
- ioctl(pp->io.fd, TIOCMBIS, (char *)&bits);
+ get_systime(&pp->lastrec);
if (write(pp->io.fd, "T", 1) != 1)
refclock_report(peer, CEVNT_FAULT);
+ ioctl(pp->io.fd, TIOCMBIS, (char *)&bits);
if (peer->burst > 0)
return;
if (pp->coderecv == pp->codeproc) {
refclock_report(peer, CEVNT_TIMEOUT);
return;
}
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
- peer->burst = NSTAGE;
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
+#ifdef DEBUG
+ if (debug)
+ printf("heath: timecode %d %s\n", pp->lencode,
+ pp->a_lastcode);
+#endif
+ peer->burst = MAXSTAGE;
+ pp->polls++;
}
#else
diff --git a/contrib/ntp/ntpd/refclock_hopfpci.c b/contrib/ntp/ntpd/refclock_hopfpci.c
index a9deb21c17dc..1b023198d8db 100644
--- a/contrib/ntp/ntpd/refclock_hopfpci.c
+++ b/contrib/ntp/ntpd/refclock_hopfpci.c
@@ -48,6 +48,7 @@
#ifndef SYS_WINNT
# include <sys/ipc.h>
+# include <sys/ioctl.h>
# include <assert.h>
# include <unistd.h>
# include <stdio.h>
@@ -149,7 +150,7 @@ hopfpci_start(
pp->io.clock_recv = noentry;
pp->io.srcclock = (caddr_t)peer;
pp->io.datalen = 0;
- pp->io.fd = -1;
+ pp->io.fd = INVALID_SOCKET;
pp->unitptr = (caddr_t)up;
get_systime(&pp->lastrec);
@@ -190,7 +191,7 @@ hopfpci_shutdown(
close(fd);
#else
CloseHopfDevice();
-// UnmapViewOfFile (up);
+/* UnmapViewOfFile (up); */
#endif
}
@@ -212,7 +213,7 @@ hopfpci_poll(
up = (struct hopfpciTime *)pp->unitptr;
#ifndef SYS_WINNT
- ioctl(fd,HOPF_CLOCK_GET_UTC,&m_time);
+ ioctl(fd,HOPF_CLOCK_GET_UTC,&m_time);
#else
GetHopfSystemTime(&m_time);
#endif
@@ -222,17 +223,16 @@ hopfpci_poll(
pp->hour = m_time.wHour;
pp->minute = m_time.wMinute;
pp->second = m_time.wSecond;
- pp->msec=m_time.wMilliseconds;
- pp->usec=0;
+ pp->nsec = m_time.wMilliseconds * 1000000;
if (m_time.wStatus & LEWAPWAR)
pp->leap = LEAP_ADDSECOND;
else
pp->leap = LEAP_NOWARNING;
- sprintf(pp->a_lastcode,"ST: %02X T: %02d:%02d:%02d.%03d D: %02d.%02d.%04d",
- m_time.wStatus, pp->hour, pp->minute, pp->second, pp->msec,
- m_time.wDay, m_time.wMonth, m_time.wYear);
- pp->lencode = strlen(pp->a_lastcode);
+ sprintf(pp->a_lastcode,"ST: %02X T: %02d:%02d:%02d.%03ld D: %02d.%02d.%04d",
+ m_time.wStatus, pp->hour, pp->minute, pp->second,
+ pp->nsec / 1000000, m_time.wDay, m_time.wMonth, m_time.wYear);
+ pp->lencode = (u_short)strlen(pp->a_lastcode);
get_systime(&pp->lastrec);
@@ -262,10 +262,9 @@ hopfpci_poll(
refclock_report(peer, CEVNT_BADTIME);
return;
}
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
-
record_clock_stats(&peer->srcadr, pp->a_lastcode);
-
return;
}
diff --git a/contrib/ntp/ntpd/refclock_hopfser.c b/contrib/ntp/ntpd/refclock_hopfser.c
index a9d74dda1d75..1d273333465d 100644
--- a/contrib/ntp/ntpd/refclock_hopfser.c
+++ b/contrib/ntp/ntpd/refclock_hopfser.c
@@ -14,6 +14,11 @@
# include "config.h"
#endif
+#if defined(SYS_WINNT)
+#undef close
+#define close closesocket
+#endif
+
#if defined(REFCLOCK) && (defined(CLOCK_HOPF_SERIAL))
#include "ntpd.h"
@@ -216,7 +221,7 @@ hopfserial_receive (
struct refclockproc *pp;
struct peer *peer;
- int sync; /* synchronization indicator */
+ int synch; /* synchhronization indicator */
int DoW; /* Dow */
int day, month; /* ddd conversion */
@@ -234,7 +239,7 @@ hopfserial_receive (
up->rpt_next = 0; /* wait until next poll interval occur */
- pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &pp->lastrec);
+ pp->lencode = (u_short)refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &pp->lastrec);
if (pp->lencode == 0)
return;
@@ -245,7 +250,7 @@ hopfserial_receive (
#else
"%*c%1x%1x%2d%2d%2d%2d%2d%2d", /* stx...cr,lf,etx */
#endif
- &sync,
+ &synch,
&DoW,
&pp->hour,
&pp->minute,
@@ -286,7 +291,7 @@ hopfserial_receive (
#if 0
wsprintf(pp->a_lastcode,
"STATUS: %1X%1X, DATE: %02d.%02d.%04d TIME: %02d:%02d:%02d",
- sync,
+ synch,
DoW,
day,
month,
@@ -296,7 +301,7 @@ hopfserial_receive (
pp->second);
pp->lencode = strlen(pp->a_lastcode);
- if ((sync && 0xc) == 0 ){ /* time ok? */
+ if ((synch && 0xc) == 0 ){ /* time ok? */
refclock_report(peer, CEVNT_BADTIME);
pp->leap = LEAP_NOTINSYNC;
return;
@@ -305,7 +310,7 @@ hopfserial_receive (
/*
* If clock has no valid status then report error and exit
*/
- if ((sync & HOPF_OPMODE) == HOPF_INVALID ){ /* time ok? */
+ if ((synch & HOPF_OPMODE) == HOPF_INVALID ){ /* time ok? */
refclock_report(peer, CEVNT_BADTIME);
pp->leap = LEAP_NOTINSYNC;
return;
@@ -316,7 +321,7 @@ hopfserial_receive (
* if CLK_FLAG1 is set, sychronize even if no radio operation
*/
- if ((sync & HOPF_OPMODE) == HOPF_INTERNAL){
+ if ((synch & HOPF_OPMODE) == HOPF_INTERNAL){
if ((pp->sloppyclockflag & CLK_FLAG1) == 0) {
refclock_report(peer, CEVNT_BADTIME);
pp->leap = LEAP_NOTINSYNC;
@@ -329,10 +334,11 @@ hopfserial_receive (
refclock_report(peer, CEVNT_BADTIME);
return;
}
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
#if 0
- msyslog(LOG_ERR, " D:%x D:%d D:%d",sync,pp->minute,pp->second);
+ msyslog(LOG_ERR, " D:%x D:%d D:%d",synch,pp->minute,pp->second);
#endif
record_clock_stats(&peer->srcadr, pp->a_lastcode);
diff --git a/contrib/ntp/ntpd/refclock_hpgps.c b/contrib/ntp/ntpd/refclock_hpgps.c
index 7a506cfc7f95..7c801bb211db 100644
--- a/contrib/ntp/ntpd/refclock_hpgps.c
+++ b/contrib/ntp/ntpd/refclock_hpgps.c
@@ -554,6 +554,7 @@ hpgps_receive(
refclock_report(peer, CEVNT_BADTIME);
return;
}
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
/*
diff --git a/contrib/ntp/ntpd/refclock_irig.c b/contrib/ntp/ntpd/refclock_irig.c
index 7efd57edeb17..0b3536863d82 100644
--- a/contrib/ntp/ntpd/refclock_irig.c
+++ b/contrib/ntp/ntpd/refclock_irig.c
@@ -75,8 +75,8 @@
* o The modulation index is less than MODMIN (0.5). This usually means
* overdriven IRIG signal or wrong IRIG format.
*
- * o A frame synchronization error has occurred. This usually means wrong
- * IRIG signal format or the IRIG signal source has lost
+ * o A frame synchronization error has occurred. This usually means
+ * wrong IRIG signal format or the IRIG signal source has lost
* synchronization (signature control).
*
* o A data decoding error has occurred. This usually means wrong IRIG
@@ -97,11 +97,11 @@
*
* The timecode format used for debugging and data recording includes
* data helpful in diagnosing problems with the IRIG signal and codec
- * connections. With debugging enabled (-d -d -d on the ntpd command
- * line), the driver produces one line for each timecode in the
- * following format:
+ * connections. With debugging enabled (-d on the ntpd command line),
+ * the driver produces one line for each timecode in the following
+ * format:
*
- * 00 1 98 23 19:26:52 721 143 0.694 47 20 0.083 66.5 3094572411.00027
+ * 00 1 98 23 19:26:52 721 143 0.694 20 0.1 66.5 3094572411.00027
*
* The most recent line is also written to the clockstats file at 64-s
* intervals.
@@ -111,14 +111,18 @@
* indicator, year of century, day of year and time of day. The status
* indicator and year are not produced by some IRIG devices. Following
* these fields are the signal amplitude (0-8100), codec gain (0-255),
- * field phase (0-79), time constant (2-20), modulation index (0-1),
- * carrier phase error (0+-0.5) and carrier frequency error (PPM). The
- * last field is the on-time timestamp in NTP format.
+ * modulation index (0-1), time constant (2-20), carrier phase error
+ * (us) and carrier frequency error (PPM). The last field is the on-time
+ * timestamp in NTP format.
*
* The fraction part of the on-time timestamp is a good indicator of how
- * well the driver is doing. With an UltrSPARC 30, this thing can keep
- * the clock within a few tens of microseconds relative to the IRIG-B
- * signal. Accuracy with IRIG-E is about ten times worse.
+ * well the driver is doing. With an UltrSPARC 30 and Solaris 2.7, this
+ * thing can keep the clock within a few tens of microseconds relative
+ * to the IRIG-B signal. Accuracy with IRIG-E is about ten times worse.
+ * Unfortunately, Sun broke the 2.7 audio driver in 2.8, which has a
+ * 10-ms sawtooth modulation. The driver attempts to remove the
+ * modulation by some clever estimation techniques which mostly work.
+ * Your experience may vary.
*
* Unlike other drivers, which can have multiple instantiations, this
* one supports only one. It does not seem likely that more than one
@@ -127,16 +131,15 @@
*
* Fudge factors
*
- * Fudge flag2 selects the audio input port, where 0 is the mike port
+ * Fudge flag4 causes the dubugging output described above to be
+ * recorded in the clockstats file. When the audio driver is compiled,
+ * fudge flag2 selects the audio input port, where 0 is the mike port
* (default) and 1 is the line-in port. It does not seem useful to
* select the compact disc player port. Fudge flag3 enables audio
- * monitoring of the input signal. For this purpose, the speaker volume
- * must be set before the driver is started. Fudge flag4 causes the
- * debugging output described above to be recorded in the clockstats
- * file. Any of these flags can be changed during operation with the
- * ntpdc program.
+ * monitoring of the input signal. For this purpose, the monitor gain is
+ * set to a default value. Fudgetime2 is used as a frequency vernier for
+ * broken codec sample frequency.
*/
-
/*
* Interface definitions
*/
@@ -144,7 +147,7 @@
#define PRECISION (-17) /* precision assumed (about 10 us) */
#define REFID "IRIG" /* reference ID */
#define DESCRIPTION "Generic IRIG Audio Driver" /* WRU */
-
+#define AUDIO_BUFSIZ 320 /* audio buffer size (40 ms) */
#define SECOND 8000 /* nominal sample rate (Hz) */
#define BAUD 80 /* samples per baud interval */
#define OFFSET 128 /* companded sample offset */
@@ -155,16 +158,20 @@
#define MINTC 2 /* min PLL time constant */
#define MAXTC 20 /* max PLL time constant max */
#define MAXSIG 6000. /* maximum signal level */
+#define MAXCLP 100 /* max clips above reference per s */
#define DRPOUT 100. /* dropout signal level */
#define MODMIN 0.5 /* minimum modulation index */
#define MAXFREQ (250e-6 * SECOND) /* freq tolerance (.025%) */
#define PI 3.1415926535 /* the real thing */
+#ifdef IRIG_SUCKS
+#define WIGGLE 11 /* wiggle filter length */
+#endif /* IRIG_SUCKS */
/*
- * Experimentally determined fudge factors
+ * Experimentally determined filter delays
*/
-#define IRIG_B .0019 /* IRIG-B phase delay */
-#define IRIG_E .0019 /* IRIG-E phase delay */
+#define IRIG_B .0019 /* IRIG-B filter delay */
+#define IRIG_E .0019 /* IRIG-E filter delay */
/*
* Data bit definitions
@@ -183,6 +190,7 @@
#define IRIG_ERR_DECODE 0x10 /* frame decoding error */
#define IRIG_ERR_CHECK 0x20 /* second numbering discrepancy */
#define IRIG_ERR_ERROR 0x40 /* codec error (overrun) */
+#define IRIG_ERR_SIGERR 0x80 /* IRIG status error (Spectracom) */
/*
* IRIG unit control structure
@@ -191,23 +199,24 @@ struct irigunit {
u_char timecode[21]; /* timecode string */
l_fp timestamp; /* audio sample timestamp */
l_fp tick; /* audio sample increment */
- double comp[SIZE]; /* decompanding table */
double integ[BAUD]; /* baud integrator */
double phase, freq; /* logical clock phase and frequency */
double zxing; /* phase detector integrator */
- double yxing; /* phase detector display */
+ double yxing; /* cycle phase */
+ double exing; /* envelope phase */
double modndx; /* modulation index */
double irig_b; /* IRIG-B signal amplitude */
double irig_e; /* IRIG-E signal amplitude */
int errflg; /* error flags */
- int bufcnt; /* samples in buffer */
- int bufptr; /* buffer index pointer */
- int pollcnt; /* poll counter */
+ /*
+ * Audio codec variables
+ */
+ double comp[SIZE]; /* decompanding table */
int port; /* codec port */
int gain; /* codec gain */
+ int mongain; /* codec monitor gain */
int clipcnt; /* sample clipped count */
int seccnt; /* second interval counter */
- int decim; /* sample decimation factor */
/*
* RF variables
@@ -222,8 +231,8 @@ struct irigunit {
double lastenv[CYCLE]; /* last cycle amplitudes */
double lastint[CYCLE]; /* last integrated cycle amplitudes */
double lastsig; /* last carrier sample */
- double xxing; /* phase detector interpolated output */
double fdelay; /* filter delay */
+ int decim; /* sample decimation factor */
int envphase; /* envelope phase */
int envptr; /* envelope phase pointer */
int carphase; /* carrier phase */
@@ -236,8 +245,6 @@ struct irigunit {
/*
* Decoder variables
*/
- l_fp montime; /* reference timestamp for eyeball */
- int timecnt; /* timecode counter */
int pulse; /* cycle counter */
int cycles; /* carrier cycles */
int dcycles; /* data cycles */
@@ -247,6 +254,13 @@ struct irigunit {
int fieldcnt; /* subfield count in field */
int bits; /* demodulated bits */
int bitcnt; /* bit count in subfield */
+#ifdef IRIG_SUCKS
+ l_fp wigwag; /* wiggle accumulator */
+ int wp; /* wiggle filter pointer */
+ l_fp wiggle[WIGGLE]; /* wiggle filter */
+ l_fp wigbot[WIGGLE]; /* wiggle bottom fisher*/
+#endif /* IRIG_SUCKS */
+ l_fp wuggle;
};
/*
@@ -282,10 +296,10 @@ struct refclock refclock_irig = {
* Global variables
*/
static char hexchar[] = { /* really quick decoding table */
- '0', '8', '4', 'c', /* 0000 0001 0010 0011 */
- '2', 'a', '6', 'e', /* 0100 0101 0110 0111 */
- '1', '9', '5', 'd', /* 1000 1001 1010 1011 */
- '3', 'b', '7', 'f' /* 1100 1101 1110 1111 */
+ '0', '8', '4', 'c', /* 0000 0001 0010 0011 */
+ '2', 'a', '6', 'e', /* 0100 0101 0110 0111 */
+ '1', '9', '5', 'd', /* 1000 1001 1010 1011 */
+ '3', 'b', '7', 'f' /* 1100 1101 1110 1111 */
};
@@ -294,7 +308,7 @@ static char hexchar[] = { /* really quick decoding table */
*/
static int
irig_start(
- int unit, /* instance number (not used) */
+ int unit, /* instance number (used for PCM) */
struct peer *peer /* peer structure pointer */
)
{
@@ -311,7 +325,7 @@ irig_start(
/*
* Open audio device
*/
- fd = audio_init(DEVICE_AUDIO);
+ fd = audio_init(DEVICE_AUDIO, AUDIO_BUFSIZ, unit);
if (fd < 0)
return (0);
#ifdef DEBUG
@@ -350,7 +364,6 @@ irig_start(
up->decim = 1;
up->fdelay = IRIG_B;
up->gain = 127;
- up->pollcnt = 2;
/*
* The companded samples are encoded sign-magnitude. The table
@@ -364,7 +377,7 @@ irig_start(
up->comp[i] = up->comp[i - 1] + step;
up->comp[OFFSET + i] = -up->comp[i];
if (i % 16 == 0)
- step *= 2.;
+ step *= 2.;
}
DTOLFP(1. / SECOND, &up->tick);
return (1);
@@ -410,6 +423,7 @@ irig_receive(
*/
double sample; /* codec sample */
u_char *dpt; /* buffer pointer */
+ int bufcnt; /* buffer counter */
l_fp ltemp; /* l_fp temp */
peer = (struct peer *)rbufp->recv_srcclock;
@@ -420,20 +434,17 @@ irig_receive(
* Main loop - read until there ain't no more. Note codec
* samples are bit-inverted.
*/
+ DTOLFP((double)rbufp->recv_length / SECOND, &ltemp);
+ L_SUB(&rbufp->recv_time, &ltemp);
up->timestamp = rbufp->recv_time;
- up->bufcnt = rbufp->recv_length;
- DTOLFP((double)up->bufcnt / SECOND, &ltemp);
- L_SUB(&up->timestamp, &ltemp);
dpt = rbufp->recv_buffer;
- for (up->bufptr = 0; up->bufptr < up->bufcnt; up->bufptr++) {
+ for (bufcnt = 0; bufcnt < rbufp->recv_length; bufcnt++) {
sample = up->comp[~*dpt++ & 0xff];
/*
* Clip noise spikes greater than MAXSIG. If no clips,
* increase the gain a tad; if the clips are too high,
- * decrease a tad. Choose either IRIG-B or IRIG-E
- * according to the energy at the respective filter
- * output.
+ * decrease a tad.
*/
if (sample > MAXSIG) {
sample = MAXSIG;
@@ -444,11 +455,15 @@ irig_receive(
}
/*
- * Variable frequency oscillator. A phase change of one
- * unit produces a change of 360 degrees; a frequency
- * change of one unit produces a change of 1 Hz.
+ * Variable frequency oscillator. The codec oscillator
+ * runs at the nominal rate of 8000 samples per second,
+ * or 125 us per sample. A frequency change of one unit
+ * results in either duplicating or deleting one sample
+ * per second, which results in a frequency change of
+ * 125 PPM.
*/
up->phase += up->freq / SECOND;
+ up->phase += pp->fudgetime2 / 1e6;
if (up->phase >= .5) {
up->phase -= 1.;
} else if (up->phase < -.5) {
@@ -461,8 +476,7 @@ irig_receive(
L_ADD(&up->timestamp, &up->tick);
/*
- * Once each second, determine the IRIG format, codec
- * port and gain.
+ * Once each second, determine the IRIG format and gain.
*/
up->seccnt = (up->seccnt + 1) % SECOND;
if (up->seccnt == 0) {
@@ -473,22 +487,22 @@ irig_receive(
up->decim = 10;
up->fdelay = IRIG_E;
}
- if (pp->sloppyclockflag & CLK_FLAG2)
- up->port = 2;
- else
- up->port = 1;
irig_gain(peer);
up->irig_b = up->irig_e = 0;
}
}
/*
- * Squawk to the monitor speaker if enabled.
+ * Set the input port and monitor gain for the next buffer.
*/
+ if (pp->sloppyclockflag & CLK_FLAG2)
+ up->port = 2;
+ else
+ up->port = 1;
if (pp->sloppyclockflag & CLK_FLAG3)
- if (write(pp->io.fd, (u_char *)&rbufp->recv_space,
- (u_int)up->bufcnt) < 0)
- perror("irig:");
+ up->mongain = MONGAIN;
+ else
+ up->mongain = 0;
}
/*
@@ -521,7 +535,7 @@ irig_rf(
/*
* IRIG-B filter. 4th-order elliptic, 800-Hz highpass, 0.3 dB
- * passband ripple, -50 dB stopband ripple, phase delay -.0022
+ * passband ripple, -50 dB stopband ripple, phase delay .0022
* s)
*/
irig_b = (up->hpf[4] = up->hpf[3]) * 2.322484e-01;
@@ -558,9 +572,9 @@ irig_rf(
up->badcnt = (up->badcnt + 1) % up->decim;
if (up->badcnt == 0) {
if (up->decim == 1)
- irig_base(peer, irig_b);
+ irig_base(peer, irig_b);
else
- irig_base(peer, irig_e);
+ irig_base(peer, irig_e);
}
}
@@ -583,10 +597,10 @@ irig_base(
/*
* Local variables
*/
+ double xxing; /* phase detector interpolated output */
double lope; /* integrator output */
double env; /* envelope detector output */
double dtemp; /* double temp */
- int i; /* index temp */
pp = peer->procptr;
up = (struct irigunit *)pp->unitptr;
@@ -612,8 +626,8 @@ irig_base(
* change of 360 degrees produces an output change of one unit.
*/
if (up->lastsig > 0 && lope <= 0) {
- up->xxing = lope / (up->lastsig - lope);
- up->zxing += (up->carphase - 4 + up->xxing) / 8.;
+ xxing = lope / (up->lastsig - lope);
+ up->zxing += (up->carphase - 4 + xxing) / CYCLE;
}
up->lastsig = lope;
@@ -629,16 +643,17 @@ irig_base(
up->maxsignal = up->intmax;
up->noise = up->intmin;
if (up->maxsignal < DRPOUT)
- up->errflg |= IRIG_ERR_AMP;
- if (up->intmax > 0)
- up->modndx = (up->intmax - up->intmin) / up->intmax;
+ up->errflg |= IRIG_ERR_AMP;
+ if (up->maxsignal > 0)
+ up->modndx = (up->intmax - up->intmin) /
+ up->intmax;
else
- up->modndx = 0;
+ up->modndx = 0;
if (up->modndx < MODMIN)
- up->errflg |= IRIG_ERR_MOD;
+ up->errflg |= IRIG_ERR_MOD;
up->intmin = 1e6; up->intmax = 0;
if (up->errflg & (IRIG_ERR_AMP | IRIG_ERR_FREQ |
- IRIG_ERR_MOD | IRIG_ERR_SYNCH)) {
+ IRIG_ERR_MOD | IRIG_ERR_SYNCH)) {
up->tc = MINTC;
up->tcount = 0;
}
@@ -674,13 +689,13 @@ irig_base(
* the slice level and left-shifted in the decoding register.
*/
if (up->carphase != 7)
- return;
+ return;
env = (up->lastenv[2] - up->lastenv[6]) / 2.;
lope = (up->lastint[2] - up->lastint[6]) / 2.;
if (lope > up->intmax)
- up->intmax = lope;
+ up->intmax = lope;
if (lope < up->intmin)
- up->intmin = lope;
+ up->intmin = lope;
/*
* Pulse code demodulator and reference timestamp. The decoder
@@ -690,15 +705,15 @@ irig_base(
*/
up->pulse = (up->pulse + 1) % 10;
if (up->pulse == 1)
- up->envmax = env;
+ up->envmax = env;
else if (up->pulse == 9)
- up->envmin = env;
+ up->envmin = env;
up->dcycles <<= 1;
if (env >= (up->envmax + up->envmin) / 2.)
- up->dcycles |= 1;
+ up->dcycles |= 1;
up->cycles <<= 1;
if (lope >= (up->maxsignal + up->noise) / 2.)
- up->cycles |= 1;
+ up->cycles |= 1;
if ((up->cycles & 0x303c0f03) == 0x300c0300) {
l_fp ltemp;
int bitz;
@@ -711,22 +726,19 @@ irig_base(
* persist for lots of samples.
*/
if (up->pulse != 9)
- up->errflg |= IRIG_ERR_SYNCH;
+ up->errflg |= IRIG_ERR_SYNCH;
up->pulse = 9;
- dtemp = BAUD - up->zxing;
- i = up->envxing - up->envphase;
- if (i < 0)
- i -= i;
- if (i <= 1) {
+ up->exing = -up->yxing;
+ if (fabs(up->envxing - up->envphase) <= 1) {
up->tcount++;
if (up->tcount > 50 * up->tc) {
up->tc++;
if (up->tc > MAXTC)
- up->tc = MAXTC;
+ up->tc = MAXTC;
up->tcount = 0;
up->envxing = up->envphase;
} else {
- dtemp -= up->envxing - up->envphase;
+ up->exing -= up->envxing - up->envphase;
}
} else {
up->tcount = 0;
@@ -740,8 +752,9 @@ irig_base(
* this plus the delay since the last carrier positive
* zero crossing.
*/
- DTOLFP(up->decim * (dtemp / SECOND + 1.) + up->fdelay,
- &ltemp);
+ dtemp = up->decim * ((up->exing + BAUD) / SECOND + 1.) +
+ up->fdelay;
+ DTOLFP(dtemp, &ltemp);
pp->lastrec = up->timestamp;
L_SUB(&pp->lastrec, &ltemp);
@@ -756,23 +769,23 @@ irig_base(
bitz = up->dcycles & 0xfc;
switch(bitz) {
- case 0x00:
- case 0x80:
+ case 0x00:
+ case 0x80:
irig_decode(peer, BIT0);
break;
- case 0xc0:
- case 0xe0:
- case 0xf0:
+ case 0xc0:
+ case 0xe0:
+ case 0xf0:
irig_decode(peer, BIT1);
break;
- case 0xf8:
- case 0xfc:
+ case 0xf8:
+ case 0xfc:
irig_decode(peer, BITP);
break;
- default:
+ default:
irig_decode(peer, 0);
up->errflg |= IRIG_ERR_DECODE;
}
@@ -797,11 +810,14 @@ irig_decode(
{
struct refclockproc *pp;
struct irigunit *up;
+#ifdef IRIG_SUCKS
+ int i;
+#endif /* IRIG_SUCKS */
/*
* Local variables
*/
- char syncchar; /* sync character (Spectracom only) */
+ char syncchar; /* sync character (Spectracom) */
char sbs[6]; /* binary seconds since 0h */
char spare[2]; /* mulligan digits */
@@ -824,15 +840,63 @@ irig_decode(
up->bitcnt = 1;
up->fieldcnt = 0;
up->lastbit = 0;
- up->montime = pp->lastrec;
if (up->errflg == 0) {
- up->timecnt++;
+#ifdef IRIG_SUCKS
+ l_fp ltemp;
+
+ /*
+ * You really don't wanna know what comes down
+ * here. Leave it to say Solaris 2.8 broke the
+ * nice clean audio stream, apparently affected
+ * by a 5-ms sawtooth jitter. Sundown on
+ * Solaris. This leaves a little twilight.
+ *
+ * The scheme involves differentiation, forward
+ * learning and integration. The sawtooth has a
+ * period of 11 seconds. The timestamp
+ * differences are integrated and subtracted
+ * from the signal.
+ */
+ ltemp = pp->lastrec;
+ L_SUB(&ltemp, &pp->lastref);
+ if (ltemp.l_f < 0)
+ ltemp.l_i = -1;
+ else
+ ltemp.l_i = 0;
+ pp->lastref = pp->lastrec;
+ if (!L_ISNEG(&ltemp))
+ L_CLR(&up->wigwag);
+ else
+ L_ADD(&up->wigwag, &ltemp);
+ L_SUB(&pp->lastrec, &up->wigwag);
+ up->wiggle[up->wp] = ltemp;
+
+ /*
+ * Bottom fisher. To understand this, you have
+ * to know about velocity microphones and AM
+ * transmitters. No further explanation is
+ * offered, as this is truly a black art.
+ */
+ up->wigbot[up->wp] = pp->lastrec;
+ for (i = 0; i < WIGGLE; i++) {
+ if (i != up->wp)
+ up->wigbot[i].l_ui++;
+ L_SUB(&pp->lastrec, &up->wigbot[i]);
+ if (L_ISNEG(&pp->lastrec))
+ L_ADD(&pp->lastrec,
+ &up->wigbot[i]);
+ else
+ pp->lastrec = up->wigbot[i];
+ }
+ up->wp++;
+ up->wp %= WIGGLE;
+ up->wuggle = pp->lastrec;
refclock_process(pp);
- }
- if (up->timecnt >= MAXSTAGE) {
- refclock_receive(peer);
- up->timecnt = 0;
- up->pollcnt = 2;
+#else /* IRIG_SUCKS */
+ pp->lastref = pp->lastrec;
+ up->wuggle = pp->lastrec;
+ refclock_process(pp);
+#endif /* IRIG_SUCKS */
}
up->errflg = 0;
}
@@ -848,45 +912,58 @@ irig_decode(
if (up->xptr < 2)
up->xptr = 2 * FIELD;
up->timecode[--up->xptr] = hexchar[(up->bits >> 5) &
- 0xf];
+ 0xf];
up->timecode[--up->xptr] = hexchar[up->bits & 0xf];
up->fieldcnt = (up->fieldcnt + 1) % FIELD;
if (up->fieldcnt == 0) {
/*
- * End of field. Decode the timecode, adjust the
- * gain and set the input port. Set the port
- * here on the assumption somebody might even
- * change it on-wing.
+ * End of field. Decode the timecode and wind
+ * the clock. Not all IRIG generators have the
+ * year; if so, it is nonzero after year 2000.
+ * Not all have the hardware status bit; if so,
+ * it is lit when the source is okay and dim
+ * when bad. We watch this only if the year is
+ * nonzero. Not all are configured for signature
+ * control. If so, all BCD digits are set to
+ * zero if the source is bad. In this case the
+ * refclock_process() will reject the timecode
+ * as invalid.
*/
up->xptr = 2 * FIELD;
if (sscanf((char *)up->timecode,
- "%6s%2d%c%2s%3d%2d%2d%2d",
- sbs, &pp->year, &syncchar, spare, &pp->day,
- &pp->hour, &pp->minute, &pp->second) != 8)
- pp->leap = LEAP_NOTINSYNC;
+ "%6s%2d%c%2s%3d%2d%2d%2d", sbs, &pp->year,
+ &syncchar, spare, &pp->day, &pp->hour,
+ &pp->minute, &pp->second) != 8)
+ pp->leap = LEAP_NOTINSYNC;
else
- pp->leap = LEAP_NOWARNING;
+ pp->leap = LEAP_NOWARNING;
up->second = (up->second + up->decim) % 60;
+ if (pp->year > 0) {
+ pp->year += 2000;
+ if (syncchar == '0')
+ up->errflg |= IRIG_ERR_CHECK;
+ }
if (pp->second != up->second)
- up->errflg |= IRIG_ERR_CHECK;
+ up->errflg |= IRIG_ERR_CHECK;
up->second = pp->second;
sprintf(pp->a_lastcode,
- "%02x %c %2d %3d %02d:%02d:%02d %4.0f %3d %6.3f %2d %2d %6.3f %6.1f %s",
- up->errflg, syncchar, pp->year, pp->day,
- pp->hour, pp->minute, pp->second,
- up->maxsignal, up->gain, up->modndx,
- up->envxing, up->tc, up->yxing, up->freq *
- 1e6 / SECOND, ulfptoa(&up->montime, 6));
+ "%02x %c %2d %3d %02d:%02d:%02d %4.0f %3d %6.3f %2d %6.1f %6.1f %s",
+ up->errflg, syncchar, pp->year, pp->day,
+ pp->hour, pp->minute, pp->second,
+ up->maxsignal, up->gain, up->modndx,
+ up->tc, up->exing * 1e6 / SECOND, up->freq *
+ 1e6 / SECOND, ulfptoa(&up->wuggle, 6));
pp->lencode = strlen(pp->a_lastcode);
- if (up->timecnt == 0 || pp->sloppyclockflag &
- CLK_FLAG4)
- record_clock_stats(&peer->srcadr,
- pp->a_lastcode);
+ if (pp->sloppyclockflag & CLK_FLAG4) {
+ record_clock_stats(&peer->srcadr,
+ pp->a_lastcode);
#ifdef DEBUG
- if (debug > 2)
- printf("irig: %s\n", pp->a_lastcode);
+ if (debug)
+ printf("irig: %s\n",
+ pp->a_lastcode);
#endif /* DEBUG */
+ }
}
}
up->lastbit = bit;
@@ -896,9 +973,10 @@ irig_decode(
/*
* irig_poll - called by the transmit procedure
*
- * This routine keeps track of status. If nothing is heard for two
- * successive poll intervals, a timeout event is declared and any
- * orphaned timecode updates are sent to foster care.
+ * This routine sweeps up the timecode updates since the last poll. For
+ * IRIG-B there should be at least 60 updates; for IRIG-E there should
+ * be at least 6. If nothing is heard, a timeout event is declared and
+ * any orphaned timecode updates are sent to foster care.
*/
static void
irig_poll(
@@ -912,15 +990,17 @@ irig_poll(
pp = peer->procptr;
up = (struct irigunit *)pp->unitptr;
- /*
- * Keep book for tattletales
- */
- if (up->pollcnt == 0) {
+ if (pp->coderecv == pp->codeproc) {
refclock_report(peer, CEVNT_TIMEOUT);
- up->timecnt = 0;
return;
+ } else {
+ refclock_receive(peer);
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
+#ifdef DEBUG
+ if (debug)
+ printf("irig: %s\n", pp->a_lastcode);
+#endif /* DEBUG */
}
- up->pollcnt--;
pp->polls++;
}
@@ -953,18 +1033,17 @@ irig_gain(
*/
if (up->clipcnt == 0) {
up->gain += 4;
- if (up->gain > 255)
- up->gain = 255;
- } else if (up->clipcnt > SECOND / 100) {
+ if (up->gain > MAXGAIN)
+ up->gain = MAXGAIN;
+ } else if (up->clipcnt > MAXCLP) {
up->gain -= 4;
if (up->gain < 0)
up->gain = 0;
}
- audio_gain(up->gain, up->port);
+ audio_gain(up->gain, up->mongain, up->port);
up->clipcnt = 0;
}
-
#else
int refclock_irig_bs;
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_jjy.c b/contrib/ntp/ntpd/refclock_jjy.c
index dba6070ef40c..2aa9d6a7d8b9 100644
--- a/contrib/ntp/ntpd/refclock_jjy.c
+++ b/contrib/ntp/ntpd/refclock_jjy.c
@@ -188,7 +188,7 @@ jjy_start ( int unit, struct peer *peer )
#ifdef DEBUG
if ( debug ) {
- printf ( "jjy_start (refclock_jjy.c) : %s mode=%d ", ntoa(&peer->srcadr), peer->ttlmax ) ;
+ printf ( "jjy_start (refclock_jjy.c) : %s mode=%d ", ntoa(&peer->srcadr), peer->ttl ) ;
printf ( DEVICE, unit ) ;
printf ( "\n" ) ;
}
@@ -202,15 +202,15 @@ jjy_start ( int unit, struct peer *peer )
sprintf ( pDeviceName, DEVICE, unit ) ;
/*
- * peer->ttlmax is a mode number specified by "127.127.40.X mode N" in the ntp.conf
+ * peer->ttl is a mode number specified by "127.127.40.X mode N" in the ntp.conf
*/
- switch ( peer->ttlmax ) {
+ switch ( peer->ttl ) {
case 0 :
case 1 : iDiscipline = LDISC_CLK ; break ;
case 2 : iDiscipline = LDISC_RAW ; break ;
default :
msyslog ( LOG_ERR, "JJY receiver [ %s mode %d ] : Unsupported mode",
- ntoa(&peer->srcadr), peer->ttlmax ) ;
+ ntoa(&peer->srcadr), peer->ttl ) ;
free ( (void*) pDeviceName ) ;
return RC_START_ERROR ;
}
@@ -233,9 +233,9 @@ jjy_start ( int unit, struct peer *peer )
up->linediscipline = iDiscipline ;
/*
- * peer->ttlmax is a mode number specified by "127.127.40.X mode N" in the ntp.conf
+ * peer->ttl is a mode number specified by "127.127.40.X mode N" in the ntp.conf
*/
- switch ( peer->ttlmax ) {
+ switch ( peer->ttl ) {
case 0 :
/*
* The mode 0 is a default clock type at this time.
@@ -255,7 +255,7 @@ jjy_start ( int unit, struct peer *peer )
break ;
default :
msyslog ( LOG_ERR, "JJY receiver [ %s mode %d ] : Unsupported mode",
- ntoa(&peer->srcadr), peer->ttlmax ) ;
+ ntoa(&peer->srcadr), peer->ttl ) ;
close ( fd ) ;
free ( (void*) up ) ;
return RC_START_ERROR ;
@@ -422,8 +422,7 @@ jjy_receive ( struct recvbuf *rbufp )
pp->hour = up->hour ;
pp->minute = up->minute ;
pp->second = up->second ;
- pp->msec = up->msecond ;
- pp->usec = 0;
+ pp->nsec = up->msecond * 1000000;
/*
* JST to UTC
@@ -460,10 +459,9 @@ jjy_receive ( struct recvbuf *rbufp )
sprintf ( sLogText, "%04d/%02d/%02d %02d:%02d:%02d JST",
up->year, up->month, up->day, up->hour, up->minute, up->second ) ;
- record_clock_stats ( &peer->srcadr, sLogText ) ;
-
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
-
+ record_clock_stats ( &peer->srcadr, sLogText ) ;
}
/**************************************************************************************************/
diff --git a/contrib/ntp/ntpd/refclock_jupiter.c b/contrib/ntp/ntpd/refclock_jupiter.c
index 4d1d4c24dbd2..eff088b8507b 100644
--- a/contrib/ntp/ntpd/refclock_jupiter.c
+++ b/contrib/ntp/ntpd/refclock_jupiter.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 1998
+ * Copyright (c) 1997, 1998, 2003
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -35,21 +35,28 @@
# include <config.h>
#endif
-#if defined(REFCLOCK) && defined(CLOCK_JUPITER) && defined(PPS)
+#if defined(REFCLOCK) && defined(CLOCK_JUPITER) && defined(HAVE_PPSAPI)
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
#include <stdio.h>
#include <ctype.h>
#include "jupiter.h"
-#include <sys/ppsclock.h>
+#ifdef HAVE_PPSAPI
+# ifdef HAVE_TIMEPPS_H
+# include <timepps.h>
+# else
+# ifdef HAVE_SYS_TIMEPPS_H
+# include <sys/timepps.h>
+# endif
+# endif
+#endif
#ifdef XNTP_BIG_ENDIAN
#define getshort(s) ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff))
@@ -83,15 +90,6 @@ char *strerror(int);
#define SPEED232 B9600 /* baud */
/*
- * The number of raw samples which we acquire to derive a single estimate.
- * NSAMPLES ideally should not exceed the default poll interval 64.
- * NKEEP must be a power of 2 to simplify the averaging process.
- */
-#define NSAMPLES 64
-#define NKEEP 8
-#define REFCLOCKMAXDISPERSE .25 /* max sample dispersion */
-
-/*
* Radio interface parameters
*/
#define PRECISION (-18) /* precision assumed (about 4 us) */
@@ -114,24 +112,27 @@ char *strerror(int);
/*
* Jupiter unit control structure.
*/
-struct jupiterunit {
+struct instance {
+ struct peer *peer; /* peer */
u_int pollcnt; /* poll message counter */
u_int polled; /* Hand in a time sample? */
- u_int lastserial; /* last pps serial number */
- struct ppsclockev ppsev; /* PPS control structure */
+#ifdef HAVE_PPSAPI
+ pps_params_t pps_params; /* pps parameters */
+ pps_info_t pps_info; /* last pps data */
+ pps_handle_t pps_handle; /* pps handle */
+ u_int assert; /* pps edge to use */
+ struct timespec ts; /* last timestamp */
+#endif
+ l_fp limit;
+ u_int gpos_gweek; /* Current GPOS GPS week number */
+ u_int gpos_sweek; /* Current GPOS GPS seconds into week */
u_int gweek; /* current GPS week number */
u_int32 lastsweek; /* last seconds into GPS week */
- u_int32 timecode; /* current ntp timecode */
+ time_t timecode; /* current ntp timecode */
u_int32 stime; /* used to detect firmware bug */
int wantid; /* don't reconfig on channel id msg */
u_int moving; /* mobile platform? */
- u_long sloppyclockflag; /* fudge flags */
- u_int known; /* position known yet? */
- int coderecv; /* total received samples */
- int nkeep; /* number of samples to preserve */
- int rshift; /* number of rshifts for division */
- l_fp filter[NSAMPLES]; /* offset filter */
- l_fp lastref; /* last reference timestamp */
+ u_char sloppyclockflag; /* fudge flags */
u_short sbuf[512]; /* local input buffer */
int ssize; /* space used in sbuf */
};
@@ -139,30 +140,28 @@ struct jupiterunit {
/*
* Function prototypes
*/
-static void jupiter_canmsg P((struct peer *, u_int));
+static void jupiter_canmsg P((struct instance *, u_int));
static u_short jupiter_cksum P((u_short *, u_int));
-#ifdef QSORT_USES_VOID_P
- int jupiter_cmpl_fp P((const void *, const void *));
-#else
- int jupiter_cmpl_fp P((const l_fp *, const l_fp *));
-#endif /* not QSORT_USES_VOID_P */
-static void jupiter_config P((struct peer *));
-static void jupiter_debug P((struct peer *, char *, ...))
- __attribute__ ((format (printf, 2, 3)));
-static char * jupiter_offset P((struct peer *));
-static char * jupiter_parse_t P((struct peer *, u_short *));
-static void jupiter_platform P((struct peer *, u_int));
+static int jupiter_config P((struct instance *));
+static void jupiter_debug P((struct peer *, char *, char *, ...))
+ __attribute__ ((format (printf, 3, 4)));
+static char * jupiter_parse_t P((struct instance *, u_short *));
+static char * jupiter_parse_gpos P((struct instance *, u_short *));
+static void jupiter_platform P((struct instance *, u_int));
static void jupiter_poll P((int, struct peer *));
-static int jupiter_pps P((struct peer *));
-static char * jupiter_process P((struct peer *));
-static int jupiter_recv P((struct peer *));
-static void jupiter_receive P((register struct recvbuf *rbufp));
-static void jupiter_reqmsg P((struct peer *, u_int, u_int));
-static void jupiter_reqonemsg P((struct peer *, u_int));
-static char * jupiter_send P((struct peer *, struct jheader *));
+static void jupiter_control P((int, struct refclockstat *, struct
+ refclockstat *, struct peer *));
+#ifdef HAVE_PPSAPI
+static int jupiter_ppsapi P((struct instance *, int, int));
+static int jupiter_pps P((struct instance *));
+#endif /* HAVE_PPSAPI */
+static int jupiter_recv P((struct instance *));
+static void jupiter_receive P((struct recvbuf *rbufp));
+static void jupiter_reqmsg P((struct instance *, u_int, u_int));
+static void jupiter_reqonemsg P((struct instance *, u_int));
+static char * jupiter_send P((struct instance *, struct jheader *));
static void jupiter_shutdown P((int, struct peer *));
static int jupiter_start P((int, struct peer *));
-static int jupiter_ttyinit P((struct peer *, int));
/*
* Transfer vector
@@ -171,7 +170,7 @@ struct refclock refclock_jupiter = {
jupiter_start, /* start up driver */
jupiter_shutdown, /* shut down driver */
jupiter_poll, /* transmit poll message */
- noentry, /* (clock control) */
+ jupiter_control, /* (clock control) */
noentry, /* (clock init) */
noentry, /* (clock buginfo) */
NOFLAGS /* not used */
@@ -182,39 +181,34 @@ struct refclock refclock_jupiter = {
*/
static int
jupiter_start(
- register int unit,
- register struct peer *peer
+ int unit,
+ struct peer *peer
)
{
struct refclockproc *pp;
- register struct jupiterunit *up;
- register int fd;
+ struct instance *instance;
+ int fd = -1;
char gpsdev[20];
/*
* Open serial port
*/
(void)sprintf(gpsdev, DEVICE, unit);
- fd = open(gpsdev, O_RDWR
-#ifdef O_NONBLOCK
- | O_NONBLOCK
-#endif
- , 0);
- if (fd < 0) {
- jupiter_debug(peer, "jupiter_start: open %s: %s\n",
+ fd = refclock_open(gpsdev, SPEED232, LDISC_RAW);
+ if (fd == 0) {
+ jupiter_debug(peer, "jupiter_start", "open %s: %s",
gpsdev, strerror(errno));
return (0);
}
- if (!jupiter_ttyinit(peer, fd))
- return (0);
/* Allocate unit structure */
- if ((up = (struct jupiterunit *)
- emalloc(sizeof(struct jupiterunit))) == NULL) {
+ if ((instance = (struct instance *)
+ emalloc(sizeof(struct instance))) == NULL) {
(void) close(fd);
return (0);
}
- memset((char *)up, 0, sizeof(struct jupiterunit));
+ memset((char *)instance, 0, sizeof(struct instance));
+ instance->peer = peer;
pp = peer->procptr;
pp->io.clock_recv = jupiter_receive;
pp->io.srcclock = (caddr_t)peer;
@@ -222,10 +216,10 @@ jupiter_start(
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
(void) close(fd);
- free(up);
+ free(instance);
return (0);
}
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = (caddr_t)instance;
/*
* Initialize miscellaneous variables
@@ -234,145 +228,228 @@ jupiter_start(
pp->clockdesc = DESCRIPTION;
memcpy((char *)&pp->refid, REFID, 4);
+#ifdef HAVE_PPSAPI
+ /*
+ * Start the PPSAPI interface if it is there. Default to use
+ * the assert edge and do not enable the kernel hardpps.
+ */
+ if (time_pps_create(fd, &instance->pps_handle) < 0) {
+ instance->pps_handle = 0;
+ msyslog(LOG_ERR,
+ "refclock_jupiter: time_pps_create failed: %m");
+ }
+ else if (!jupiter_ppsapi(instance, 0, 0))
+ goto clean_up;
+#endif /* HAVE_PPSAPI */
/* Ensure the receiver is properly configured */
- jupiter_config(peer);
+ if (!jupiter_config(instance))
+ goto clean_up;
- /* Turn on pulse gathering by requesting the first sample */
- if (ioctl(fd, CIOGETEV, (caddr_t)&up->ppsev) < 0) {
- jupiter_debug(peer, "jupiter_ttyinit: CIOGETEV: %s\n",
- strerror(errno));
- (void) close(fd);
- free(up);
- return (0);
- }
- up->lastserial = up->ppsev.serial;
- memset(&up->ppsev, 0, sizeof(up->ppsev));
return (1);
+
+clean_up:
+ jupiter_shutdown(unit, peer);
+ pp->unitptr = 0;
+ return (0);
}
/*
* jupiter_shutdown - shut down the clock
*/
static void
-jupiter_shutdown(register int unit, register struct peer *peer)
+jupiter_shutdown(int unit, struct peer *peer)
{
- register struct jupiterunit *up;
+ struct instance *instance;
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct jupiterunit *)pp->unitptr;
+ instance = (struct instance *)pp->unitptr;
+ if(!instance)
+ return;
+
+#ifdef HAVE_PPSAPI
+ if (instance->pps_handle) {
+ time_pps_destroy(instance->pps_handle);
+ instance->pps_handle = 0;
+ }
+#endif /* HAVE_PPSAPI */
+
io_closeclock(&pp->io);
- free(up);
+ free(instance);
}
/*
* jupiter_config - Configure the receiver
*/
-static void
-jupiter_config(register struct peer *peer)
+static int
+jupiter_config(struct instance *instance)
{
- register int i;
- register struct jupiterunit *up;
- register struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct jupiterunit *)pp->unitptr;
+ jupiter_debug(instance->peer, "jupiter_config", "init receiver");
/*
* Initialize the unit variables
- *
- * STRANGE BEHAVIOUR WARNING: The fudge flags are not available
- * at the time jupiter_start is called. These are set later,
- * and so the code must be prepared to handle changing flags.
*/
- up->sloppyclockflag = pp->sloppyclockflag;
- if (pp->sloppyclockflag & CLK_FLAG2) {
- up->moving = 1; /* Receiver on mobile platform */
- msyslog(LOG_DEBUG, "jupiter_config: mobile platform");
- } else {
- up->moving = 0; /* Static Installation */
- }
-
- /* XXX fludge flags don't make the trip from the config to here... */
-#ifdef notdef
- /* Configure for trailing edge triggers */
-#ifdef CIOSETTET
- i = ((pp->sloppyclockflag & CLK_FLAG3) != 0);
- jupiter_debug(peer, "jupiter_configure: (sloppyclockflag 0x%lx)\n",
- pp->sloppyclockflag);
- if (ioctl(pp->io.fd, CIOSETTET, (char *)&i) < 0)
- msyslog(LOG_DEBUG, "jupiter_configure: CIOSETTET %d: %m", i);
-#else
- if (pp->sloppyclockflag & CLK_FLAG3)
- msyslog(LOG_DEBUG, "jupiter_configure: \
-No kernel support for trailing edge trigger");
-#endif
-#endif
-
- up->pollcnt = 2;
- up->polled = 0;
- up->known = 0;
- up->gweek = 0;
- up->lastsweek = 2 * WEEKSECS;
- up->timecode = 0;
- up->stime = 0;
- up->ssize = 0;
- up->coderecv = 0;
- up->nkeep = NKEEP;
- if (up->nkeep > NSAMPLES)
- up->nkeep = NSAMPLES;
- if (up->nkeep >= 1)
- up->rshift = 0;
- if (up->nkeep >= 2)
- up->rshift = 1;
- if (up->nkeep >= 4)
- up->rshift = 2;
- if (up->nkeep >= 8)
- up->rshift = 3;
- if (up->nkeep >= 16)
- up->rshift = 4;
- if (up->nkeep >= 32)
- up->rshift = 5;
- if (up->nkeep >= 64)
- up->rshift = 6;
- up->nkeep = 1;
- i = up->rshift;
- while (i > 0) {
- up->nkeep *= 2;
- i--;
- }
+ instance->sloppyclockflag = instance->peer->procptr->sloppyclockflag;
+ instance->moving = !!(instance->sloppyclockflag & CLK_FLAG2);
+ if (instance->moving)
+ jupiter_debug(instance->peer, "jupiter_config",
+ "mobile platform");
+
+ instance->pollcnt = 2;
+ instance->polled = 0;
+ instance->gpos_gweek = 0;
+ instance->gpos_sweek = 0;
+ instance->gweek = 0;
+ instance->lastsweek = 2 * WEEKSECS;
+ instance->timecode = 0;
+ instance->stime = 0;
+ instance->ssize = 0;
/* Stop outputting all messages */
- jupiter_canmsg(peer, JUPITER_ALL);
+ jupiter_canmsg(instance, JUPITER_ALL);
/* Request the receiver id so we can syslog the firmware version */
- jupiter_reqonemsg(peer, JUPITER_O_ID);
+ jupiter_reqonemsg(instance, JUPITER_O_ID);
/* Flag that this the id was requested (so we don't get called again) */
- up->wantid = 1;
+ instance->wantid = 1;
/* Request perodic time mark pulse messages */
- jupiter_reqmsg(peer, JUPITER_O_PULSE, 1);
+ jupiter_reqmsg(instance, JUPITER_O_PULSE, 1);
+
+ /* Request perodic geodetic position status */
+ jupiter_reqmsg(instance, JUPITER_O_GPOS, 1);
/* Set application platform type */
- if (up->moving)
- jupiter_platform(peer, JUPITER_I_PLAT_MED);
+ if (instance->moving)
+ jupiter_platform(instance, JUPITER_I_PLAT_MED);
+ else
+ jupiter_platform(instance, JUPITER_I_PLAT_LOW);
+
+ return (1);
+}
+
+#ifdef HAVE_PPSAPI
+/*
+ * Initialize PPSAPI
+ */
+int
+jupiter_ppsapi(
+ struct instance *instance, /* unit structure pointer */
+ int enb_clear, /* clear enable */
+ int enb_hardpps /* hardpps enable */
+ )
+{
+ int capability;
+
+ if (time_pps_getcap(instance->pps_handle, &capability) < 0) {
+ msyslog(LOG_ERR,
+ "refclock_jupiter: time_pps_getcap failed: %m");
+ return (0);
+ }
+ memset(&instance->pps_params, 0, sizeof(pps_params_t));
+ if (enb_clear)
+ instance->pps_params.mode = capability & PPS_CAPTURECLEAR;
else
- jupiter_platform(peer, JUPITER_I_PLAT_LOW);
+ instance->pps_params.mode = capability & PPS_CAPTUREASSERT;
+ if (!(instance->pps_params.mode & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR))) {
+ msyslog(LOG_ERR,
+ "refclock_jupiter: invalid capture edge %d",
+ !enb_clear);
+ return (0);
+ }
+ instance->pps_params.mode |= PPS_TSFMT_TSPEC;
+ if (time_pps_setparams(instance->pps_handle, &instance->pps_params) < 0) {
+ msyslog(LOG_ERR,
+ "refclock_jupiter: time_pps_setparams failed: %m");
+ return (0);
+ }
+ if (enb_hardpps) {
+ if (time_pps_kcbind(instance->pps_handle, PPS_KC_HARDPPS,
+ instance->pps_params.mode & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR),
+ PPS_TSFMT_TSPEC) < 0) {
+ msyslog(LOG_ERR,
+ "refclock_jupiter: time_pps_kcbind failed: %m");
+ return (0);
+ }
+ pps_enable = 1;
+ }
+/* instance->peer->precision = PPS_PRECISION; */
+
+#if DEBUG
+ if (debug) {
+ time_pps_getparams(instance->pps_handle, &instance->pps_params);
+ jupiter_debug(instance->peer, "refclock_jupiter",
+ "pps capability 0x%x version %d mode 0x%x kern %d",
+ capability, instance->pps_params.api_version,
+ instance->pps_params.mode, enb_hardpps);
+ }
+#endif
+
+ return (1);
+}
+
+/*
+ * Get PPSAPI timestamps.
+ *
+ * Return 0 on failure and 1 on success.
+ */
+static int
+jupiter_pps(struct instance *instance)
+{
+ pps_info_t pps_info;
+ struct timespec timeout, ts;
+ double dtemp;
+ l_fp tstmp;
+
+ /*
+ * Convert the timespec nanoseconds field to ntp l_fp units.
+ */
+ if (instance->pps_handle == 0)
+ return 1;
+ timeout.tv_sec = 0;
+ timeout.tv_nsec = 0;
+ memcpy(&pps_info, &instance->pps_info, sizeof(pps_info_t));
+ if (time_pps_fetch(instance->pps_handle, PPS_TSFMT_TSPEC, &instance->pps_info,
+ &timeout) < 0)
+ return 1;
+ if (instance->pps_params.mode & PPS_CAPTUREASSERT) {
+ if (pps_info.assert_sequence ==
+ instance->pps_info.assert_sequence)
+ return 1;
+ ts = instance->pps_info.assert_timestamp;
+ } else if (instance->pps_params.mode & PPS_CAPTURECLEAR) {
+ if (pps_info.clear_sequence ==
+ instance->pps_info.clear_sequence)
+ return 1;
+ ts = instance->pps_info.clear_timestamp;
+ } else {
+ return 1;
+ }
+ if ((instance->ts.tv_sec == ts.tv_sec) && (instance->ts.tv_nsec == ts.tv_nsec))
+ return 1;
+ instance->ts = ts;
+
+ tstmp.l_ui = ts.tv_sec + JAN_1970;
+ dtemp = ts.tv_nsec * FRAC / 1e9;
+ tstmp.l_uf = (u_int32)dtemp;
+ instance->peer->procptr->lastrec = tstmp;
+ return 0;
}
+#endif /* HAVE_PPSAPI */
/*
* jupiter_poll - jupiter watchdog routine
*/
static void
-jupiter_poll(register int unit, register struct peer *peer)
+jupiter_poll(int unit, struct peer *peer)
{
- register struct jupiterunit *up;
- register struct refclockproc *pp;
+ struct instance *instance;
+ struct refclockproc *pp;
pp = peer->procptr;
- up = (struct jupiterunit *)pp->unitptr;
+ instance = (struct instance *)pp->unitptr;
/*
* You don't need to poll this clock. It puts out timecodes
@@ -383,79 +460,106 @@ jupiter_poll(register int unit, register struct peer *peer)
/*
* If we haven't had a response in a while, reset the receiver.
*/
- if (up->pollcnt > 0) {
- up->pollcnt--;
+ if (instance->pollcnt > 0) {
+ instance->pollcnt--;
} else {
refclock_report(peer, CEVNT_TIMEOUT);
/* Request the receiver id to trigger a reconfig */
- jupiter_reqonemsg(peer, JUPITER_O_ID);
- up->wantid = 0;
+ jupiter_reqonemsg(instance, JUPITER_O_ID);
+ instance->wantid = 0;
}
/*
* polled every 64 seconds. Ask jupiter_receive to hand in
* a timestamp.
*/
- up->polled = 1;
+ instance->polled = 1;
pp->polls++;
}
/*
- * jupiter_receive - receive gps data
- * Gag me!
+ * jupiter_control - fudge control
*/
static void
-jupiter_receive(register struct recvbuf *rbufp)
+jupiter_control(
+ int unit, /* unit (not used) */
+ struct refclockstat *in, /* input parameters (not used) */
+ struct refclockstat *out, /* output parameters (not used) */
+ struct peer *peer /* peer structure pointer */
+ )
{
- register int bpcnt, cc, size, ppsret;
- register u_int32 last_timecode, laststime;
- register char *cp;
- register u_char *bp;
- register u_short *sp;
- register u_long sloppyclockflag;
- register struct jupiterunit *up;
- register struct jid *ip;
- register struct jheader *hp;
- register struct refclockproc *pp;
- register struct peer *peer;
+ struct refclockproc *pp;
+ struct instance *instance;
+ u_char sloppyclockflag;
- /* Initialize pointers and read the timecode and timestamp */
- peer = (struct peer *)rbufp->recv_srcclock;
pp = peer->procptr;
- up = (struct jupiterunit *)pp->unitptr;
+ instance = (struct instance *)pp->unitptr;
- /*
- * If operating mode has been changed, then reinitialize the receiver
- * before doing anything else.
- */
-/* XXX Sloppy clock flags are broken!! */
- sloppyclockflag = up->sloppyclockflag;
- up->sloppyclockflag = pp->sloppyclockflag;
- if ((pp->sloppyclockflag & CLK_FLAG2) !=
+ DTOLFP(pp->fudgetime2, &instance->limit);
+ /* Force positive value. */
+ if (L_ISNEG(&instance->limit))
+ L_NEG(&instance->limit);
+
+#ifdef HAVE_PPSAPI
+ instance->assert = !(pp->sloppyclockflag & CLK_FLAG3);
+ jupiter_ppsapi(instance, !instance->assert, 0);
+#endif /* HAVE_PPSAPI */
+
+ sloppyclockflag = instance->sloppyclockflag;
+ instance->sloppyclockflag = pp->sloppyclockflag;
+ if ((instance->sloppyclockflag & CLK_FLAG2) !=
(sloppyclockflag & CLK_FLAG2)) {
jupiter_debug(peer,
- "jupiter_receive: mode switch: reset receiver\n");
- jupiter_config(peer);
+ "jupiter_control",
+ "mode switch: reset receiver");
+ jupiter_config(instance);
return;
}
+}
+
+/*
+ * jupiter_receive - receive gps data
+ * Gag me!
+ */
+static void
+jupiter_receive(struct recvbuf *rbufp)
+{
+ int bpcnt, cc, size, ppsret;
+ time_t last_timecode;
+ u_int32 laststime;
+ char *cp;
+ u_char *bp;
+ u_short *sp;
+ struct jid *ip;
+ struct jheader *hp;
+ struct peer *peer;
+ struct refclockproc *pp;
+ struct instance *instance;
+ l_fp tstamp;
- up->pollcnt = 2;
+ /* Initialize pointers and read the timecode and timestamp */
+ peer = (struct peer *)rbufp->recv_srcclock;
+ pp = peer->procptr;
+ instance = (struct instance *)pp->unitptr;
bp = (u_char *)rbufp->recv_buffer;
bpcnt = rbufp->recv_length;
/* This shouldn't happen */
- if (bpcnt > sizeof(up->sbuf) - up->ssize)
- bpcnt = sizeof(up->sbuf) - up->ssize;
+ if (bpcnt > sizeof(instance->sbuf) - instance->ssize)
+ bpcnt = sizeof(instance->sbuf) - instance->ssize;
/* Append to input buffer */
- memcpy((u_char *)up->sbuf + up->ssize, bp, bpcnt);
- up->ssize += bpcnt;
+ memcpy((u_char *)instance->sbuf + instance->ssize, bp, bpcnt);
+ instance->ssize += bpcnt;
+
+ /* While there's at least a header and we parse an intact message */
+ while (instance->ssize > sizeof(*hp) && (cc = jupiter_recv(instance)) > 0) {
+ instance->pollcnt = 2;
- /* While there's at least a header and we parse a intact message */
- while (up->ssize > sizeof(*hp) && (cc = jupiter_recv(peer)) > 0) {
- hp = (struct jheader *)up->sbuf;
+ tstamp = rbufp->recv_time;
+ hp = (struct jheader *)instance->sbuf;
sp = (u_short *)(hp + 1);
size = cc - sizeof(*hp);
switch (getshort(hp->id)) {
@@ -463,7 +567,7 @@ jupiter_receive(register struct recvbuf *rbufp)
case JUPITER_O_PULSE:
if (size != sizeof(struct jpulse)) {
jupiter_debug(peer,
- "jupiter_receive: pulse: len %d != %u\n",
+ "jupiter_receive", "pulse: len %d != %u",
size, (int)sizeof(struct jpulse));
refclock_report(peer, CEVNT_BADREPLY);
break;
@@ -479,23 +583,32 @@ jupiter_receive(register struct recvbuf *rbufp)
* pulse message in the last 210 ms, we skip
* this one.
*/
- laststime = up->stime;
- up->stime = DS2UI(((struct jpulse *)sp)->stime);
- if (laststime != 0 && up->stime - laststime <= 21) {
- jupiter_debug(peer, "jupiter_receive: \
-avoided firmware bug (stime %.2f, laststime %.2f)\n",
- (double)up->stime * 0.01, (double)laststime * 0.01);
+ laststime = instance->stime;
+ instance->stime = DS2UI(((struct jpulse *)sp)->stime);
+ if (laststime != 0 && instance->stime - laststime <= 21) {
+ jupiter_debug(peer, "jupiter_receive",
+ "avoided firmware bug (stime %.2f, laststime %.2f)",
+ (double)instance->stime * 0.01, (double)laststime * 0.01);
break;
}
/* Retrieve pps timestamp */
- ppsret = jupiter_pps(peer);
+ ppsret = jupiter_pps(instance);
+
+ /*
+ * Add one second if msg received early
+ * (i.e. before limit, a.k.a. fudgetime2) in
+ * the second.
+ */
+ L_SUB(&tstamp, &pp->lastrec);
+ if (!L_ISGEQ(&tstamp, &instance->limit))
+ ++pp->lastrec.l_ui;
/* Parse timecode (even when there's no pps) */
- last_timecode = up->timecode;
- if ((cp = jupiter_parse_t(peer, sp)) != NULL) {
+ last_timecode = instance->timecode;
+ if ((cp = jupiter_parse_t(instance, sp)) != NULL) {
jupiter_debug(peer,
- "jupiter_receive: pulse: %s\n", cp);
+ "jupiter_receive", "pulse: %s", cp);
break;
}
@@ -508,300 +621,118 @@ avoided firmware bug (stime %.2f, laststime %.2f)\n",
break;
/* Add the new sample to a median filter */
- if ((cp = jupiter_offset(peer)) != NULL) {
- jupiter_debug(peer,
- "jupiter_receive: offset: %s\n", cp);
- refclock_report(peer, CEVNT_BADTIME);
- break;
- }
+ tstamp.l_ui = JAN_1970 + last_timecode;
+ tstamp.l_uf = 0;
+
+ refclock_process_offset(pp, tstamp, pp->lastrec, pp->fudgetime1);
/*
* The clock will blurt a timecode every second
* but we only want one when polled. If we
* havn't been polled, bail out.
*/
- if (!up->polled)
+ if (!instance->polled)
break;
+ instance->polled = 0;
/*
* It's a live one! Remember this time.
*/
- pp->lasttime = current_time;
+
+ pp->lastref = pp->lastrec;
+ refclock_receive(peer);
/*
- * Determine the reference clock offset and
- * dispersion. NKEEP of NSAMPLE offsets are
- * passed through a median filter.
- * Save the (filtered) offset and dispersion in
- * pp->offset and pp->disp.
- */
- if ((cp = jupiter_process(peer)) != NULL) {
- jupiter_debug(peer,
- "jupiter_receive: process: %s\n", cp);
- refclock_report(peer, CEVNT_BADTIME);
- break;
- }
- /*
- * Return offset and dispersion to control
- * module. We use lastrec as both the reference
- * time and receive time in order to avoid
- * being cute, like setting the reference time
- * later than the receive time, which may cause
- * a paranoid protocol module to chuck out the
- * data.
+ * If we get here - what we got from the clock is
+ * OK, so say so
*/
- jupiter_debug(peer,
- "jupiter_receive: process time: \
-%4d-%03d %02d:%02d:%02d at %s, %s\n",
- pp->year, pp->day,
- pp->hour, pp->minute, pp->second,
- prettydate(&pp->lastrec), lfptoa(&pp->offset, 6));
-
- refclock_receive(peer);
+ refclock_report(peer, CEVNT_NOMINAL);
/*
* We have succeeded in answering the poll.
* Turn off the flag and return
*/
- up->polled = 0;
+ instance->polled = 0;
+ break;
+
+ case JUPITER_O_GPOS:
+ if (size != sizeof(struct jgpos)) {
+ jupiter_debug(peer,
+ "jupiter_receive", "gpos: len %d != %u",
+ size, (int)sizeof(struct jgpos));
+ refclock_report(peer, CEVNT_BADREPLY);
+ break;
+ }
+
+ if ((cp = jupiter_parse_gpos(instance, sp)) != NULL) {
+ jupiter_debug(peer,
+ "jupiter_receive", "gpos: %s", cp);
+ break;
+ }
break;
case JUPITER_O_ID:
if (size != sizeof(struct jid)) {
jupiter_debug(peer,
- "jupiter_receive: id: len %d != %u\n",
+ "jupiter_receive", "id: len %d != %u",
size, (int)sizeof(struct jid));
refclock_report(peer, CEVNT_BADREPLY);
break;
}
/*
* If we got this message because the Jupiter
- * just powered up, it needs to be reconfigured.
+ * just powered instance, it needs to be reconfigured.
*/
ip = (struct jid *)sp;
jupiter_debug(peer,
- "jupiter_receive: >> %s chan ver %s, %s (%s)\n",
+ "jupiter_receive", "%s chan ver %s, %s (%s)",
ip->chans, ip->vers, ip->date, ip->opts);
msyslog(LOG_DEBUG,
"jupiter_receive: %s chan ver %s, %s (%s)\n",
ip->chans, ip->vers, ip->date, ip->opts);
- if (up->wantid)
- up->wantid = 0;
+ if (instance->wantid)
+ instance->wantid = 0;
else {
jupiter_debug(peer,
- "jupiter_receive: reset receiver\n");
- jupiter_config(peer);
- /* Rese since jupiter_config() just zeroed it */
- up->ssize = cc;
+ "jupiter_receive", "reset receiver");
+ jupiter_config(instance);
+ /*
+ * Restore since jupiter_config() just
+ * zeroed it
+ */
+ instance->ssize = cc;
}
break;
default:
jupiter_debug(peer,
- "jupiter_receive: >> unknown message id %d\n",
+ "jupiter_receive", "unknown message id %d",
getshort(hp->id));
break;
}
- up->ssize -= cc;
- if (up->ssize < 0) {
+ instance->ssize -= cc;
+ if (instance->ssize < 0) {
fprintf(stderr, "jupiter_recv: negative ssize!\n");
abort();
- } else if (up->ssize > 0)
- memcpy(up->sbuf, (u_char *)up->sbuf + cc, up->ssize);
+ } else if (instance->ssize > 0)
+ memcpy(instance->sbuf, (u_char *)instance->sbuf + cc, instance->ssize);
}
- record_clock_stats(&peer->srcadr, "<timecode is binary>");
}
-/*
- * jupiter_offset - Calculate the offset, and add to the rolling filter.
- */
static char *
-jupiter_offset(register struct peer *peer)
+jupiter_parse_t(struct instance *instance, u_short *sp)
{
- register struct jupiterunit *up;
- register struct refclockproc *pp;
- register int i;
- l_fp offset;
-
- pp = peer->procptr;
- up = (struct jupiterunit *)pp->unitptr;
+ struct tm *tm;
+ char *cp;
+ struct jpulse *jp;
+ u_int32 sweek;
+ time_t last_timecode;
+ u_short flags;
- /*
- * Calculate the offset
- */
- if (!clocktime(pp->day, pp->hour, pp->minute, pp->second, GMT,
- pp->lastrec.l_ui, &pp->yearstart, &offset.l_ui)) {
- return ("jupiter_process: clocktime failed");
- }
- if (pp->usec) {
- TVUTOTSF(pp->usec, offset.l_uf);
- } else {
- MSUTOTSF(pp->msec, offset.l_uf);
- }
- L_ADD(&offset, &pp->fudgetime1);
- up->lastref = offset; /* save last reference time */
- L_SUB(&offset, &pp->lastrec); /* form true offset */
-
- /*
- * A rolling filter. Initialize first time around.
- */
- i = ((up->coderecv)) % NSAMPLES;
-
- up->filter[i] = offset;
- if (up->coderecv == 0)
- for (i = 1; (u_int) i < NSAMPLES; i++)
- up->filter[i] = up->filter[0];
- up->coderecv++;
-
- return (NULL);
-}
-
-/*
- * jupiter_process - process the sample from the clock,
- * passing it through a median filter and optionally averaging
- * the samples. Returns offset and dispersion in "up" structure.
- */
-static char *
-jupiter_process(register struct peer *peer)
-{
- register struct jupiterunit *up;
- register struct refclockproc *pp;
- register int i, n;
- register int j, k;
- l_fp offset, median, lftmp;
- u_fp disp;
- l_fp off[NSAMPLES];
-
- pp = peer->procptr;
- up = (struct jupiterunit *)pp->unitptr;
-
- /*
- * Copy the raw offsets and sort into ascending order
- */
- for (i = 0; i < NSAMPLES; i++)
- off[i] = up->filter[i];
- qsort((char *)off, (size_t)NSAMPLES, sizeof(l_fp), jupiter_cmpl_fp);
-
- /*
- * Reject the furthest from the median of NSAMPLES samples until
- * NKEEP samples remain.
- */
- i = 0;
- n = NSAMPLES;
- while ((n - i) > up->nkeep) {
- lftmp = off[n - 1];
- median = off[(n + i) / 2];
- L_SUB(&lftmp, &median);
- L_SUB(&median, &off[i]);
- if (L_ISHIS(&median, &lftmp)) {
- /* reject low end */
- i++;
- } else {
- /* reject high end */
- n--;
- }
- }
-
- /*
- * Copy key values to the billboard to measure performance.
- */
- pp->lastref = up->lastref;
- pp->coderecv = up->coderecv;
- pp->filter[0] = off[0]; /* smallest offset */
- pp->filter[1] = off[NSAMPLES-1]; /* largest offset */
- for (j = 2, k = i; k < n; j++, k++)
- pp->filter[j] = off[k]; /* offsets actually examined */
-
- /*
- * Compute the dispersion based on the difference between the
- * extremes of the remaining offsets. Add to this the time since
- * the last clock update, which represents the dispersion
- * increase with time. We know that NTP_MAXSKEW is 16. If the
- * sum is greater than the allowed sample dispersion, bail out.
- * If the loop is unlocked, return the most recent offset;
- * otherwise, return the median offset.
- */
- lftmp = off[n - 1];
- L_SUB(&lftmp, &off[i]);
- disp = LFPTOFP(&lftmp);
- if (disp > REFCLOCKMAXDISPERSE)
- return ("Maximum dispersion exceeded");
-
- /*
- * Now compute the offset estimate. If fudge flag 1
- * is set, average the remainder, otherwise pick the
- * median.
- */
- if (pp->sloppyclockflag & CLK_FLAG1) {
- L_CLR(&lftmp);
- while (i < n) {
- L_ADD(&lftmp, &off[i]);
- i++;
- }
- i = up->rshift;
- while (i > 0) {
- L_RSHIFT(&lftmp);
- i--;
- }
- offset = lftmp;
- } else {
- i = (n + i) / 2;
- offset = off[i];
- }
-
- /*
- * The payload: filtered offset and dispersion.
- */
-
- pp->offset = offset;
- pp->disp = disp;
-
- return (NULL);
-
-}
-
-/* Compare two l_fp's, used with qsort() */
-#ifdef QSORT_USES_VOID_P
-int
-jupiter_cmpl_fp(register const void *p1, register const void *p2)
-#else
-int
-jupiter_cmpl_fp(register const l_fp *fp1, register const l_fp *fp2)
-#endif
-{
-#ifdef QSORT_USES_VOID_P
- register const l_fp *fp1 = (const l_fp *)p1;
- register const l_fp *fp2 = (const l_fp *)p2;
-#endif
-
- if (!L_ISGEQ(fp1, fp2))
- return (-1);
- if (L_ISEQU(fp1, fp2))
- return (0);
- return (1);
-}
-
-static char *
-jupiter_parse_t(register struct peer *peer, register u_short *sp)
-{
- register struct refclockproc *pp;
- register struct jupiterunit *up;
- register struct tm *tm;
- register char *cp;
- register struct jpulse *jp;
- register struct calendar *jt;
- register u_int32 sweek;
- register u_int32 last_timecode;
- register u_short flags;
- time_t t;
- struct calendar cal;
-
- pp = peer->procptr;
- up = (struct jupiterunit *)pp->unitptr;
jp = (struct jpulse *)sp;
/* The timecode is presented as seconds into the current GPS week */
- sweek = DS2UI(jp->sweek);
+ sweek = DS2UI(jp->sweek) % WEEKSECS;
/*
* If we don't know the current GPS week, calculate it from the
@@ -815,12 +746,31 @@ jupiter_parse_t(register struct peer *peer, register u_short *sp)
* If we already know the current GPS week, increment it when
* we wrap into a new week.
*/
- if (up->gweek == 0)
- up->gweek = (time(NULL) - GPS_EPOCH) / WEEKSECS;
- else if (sweek == 0 && up->lastsweek == WEEKSECS - 1) {
- ++up->gweek;
- jupiter_debug(peer,
- "jupiter_parse_t: NEW gps week %u\n", up->gweek);
+ if (instance->gweek == 0) {
+ if (!instance->gpos_gweek) {
+ return ("jupiter_parse_t: Unknown gweek");
+ }
+
+ instance->gweek = instance->gpos_gweek;
+
+ /*
+ * Fix warps. GPOS has GPS time and PULSE has UTC.
+ * Plus, GPOS need not be completely in synch with
+ * the PPS signal.
+ */
+ if (instance->gpos_sweek >= sweek) {
+ if ((instance->gpos_sweek - sweek) > WEEKSECS / 2)
+ ++instance->gweek;
+ }
+ else {
+ if ((sweek - instance->gpos_sweek) > WEEKSECS / 2)
+ --instance->gweek;
+ }
+ }
+ else if (sweek == 0 && instance->lastsweek == WEEKSECS - 1) {
+ ++instance->gweek;
+ jupiter_debug(instance->peer,
+ "jupiter_parse_t", "NEW gps week %u", instance->gweek);
}
/*
@@ -835,167 +785,145 @@ jupiter_parse_t(register struct peer *peer, register u_short *sp)
*
* Then we warped.
*/
- if (up->lastsweek == sweek)
- jupiter_debug(peer,
- "jupiter_parse_t: gps sweek not incrementing (%d)\n",
+ if (instance->lastsweek == sweek)
+ jupiter_debug(instance->peer,
+ "jupiter_parse_t", "gps sweek not incrementing (%d)",
sweek);
- else if (up->lastsweek != 2 * WEEKSECS &&
- up->lastsweek + 1 != sweek &&
- !(sweek == 0 && up->lastsweek == WEEKSECS - 1))
- jupiter_debug(peer,
- "jupiter_parse_t: gps sweek jumped (was %d, now %d)\n",
- up->lastsweek, sweek);
- up->lastsweek = sweek;
+ else if (instance->lastsweek != 2 * WEEKSECS &&
+ instance->lastsweek + 1 != sweek &&
+ !(sweek == 0 && instance->lastsweek == WEEKSECS - 1))
+ jupiter_debug(instance->peer,
+ "jupiter_parse_t", "gps sweek jumped (was %d, now %d)",
+ instance->lastsweek, sweek);
+ instance->lastsweek = sweek;
/* This timecode describes next pulse */
- last_timecode = up->timecode;
- up->timecode = (u_int32)JAN_1970 +
- GPS_EPOCH + (up->gweek * WEEKSECS) + sweek;
+ last_timecode = instance->timecode;
+ instance->timecode =
+ GPS_EPOCH + (instance->gweek * WEEKSECS) + sweek;
if (last_timecode == 0)
/* XXX debugging */
- jupiter_debug(peer,
- "jupiter_parse_t: UTC <none> (gweek/sweek %u/%u)\n",
- up->gweek, sweek);
+ jupiter_debug(instance->peer,
+ "jupiter_parse_t", "UTC <none> (gweek/sweek %u/%u)",
+ instance->gweek, sweek);
else {
/* XXX debugging */
- t = last_timecode - (u_int32)JAN_1970;
- tm = gmtime(&t);
+ tm = gmtime(&last_timecode);
cp = asctime(tm);
- jupiter_debug(peer,
- "jupiter_parse_t: UTC %.24s (gweek/sweek %u/%u)\n",
- cp, up->gweek, sweek);
+ jupiter_debug(instance->peer,
+ "jupiter_parse_t", "UTC %.24s (gweek/sweek %u/%u)",
+ cp, instance->gweek, sweek);
/* Billboard last_timecode (which is now the current time) */
- jt = &cal;
- caljulian(last_timecode, jt);
- pp = peer->procptr;
- pp->year = jt->year;
- pp->day = jt->yearday;
- pp->hour = jt->hour;
- pp->minute = jt->minute;
- pp->second = jt->second;
- pp->msec = 0;
- pp->usec = 0;
+ instance->peer->procptr->year = tm->tm_year + 1900;
+ instance->peer->procptr->day = tm->tm_yday + 1;
+ instance->peer->procptr->hour = tm->tm_hour;
+ instance->peer->procptr->minute = tm->tm_min;
+ instance->peer->procptr->second = tm->tm_sec;
}
- /* XXX debugging */
- tm = gmtime(&up->ppsev.tv.tv_sec);
- cp = asctime(tm);
flags = getshort(jp->flags);
- jupiter_debug(peer,
- "jupiter_parse_t: PPS %.19s.%06lu %.4s (serial %u)%s\n",
- cp, up->ppsev.tv.tv_usec, cp + 20, up->ppsev.serial,
- (flags & JUPITER_O_PULSE_VALID) == 0 ?
- " NOT VALID" : "");
/* Toss if not designated "valid" by the gps */
if ((flags & JUPITER_O_PULSE_VALID) == 0) {
- refclock_report(peer, CEVNT_BADTIME);
+ refclock_report(instance->peer, CEVNT_BADTIME);
return ("time mark not valid");
}
/* We better be sync'ed to UTC... */
if ((flags & JUPITER_O_PULSE_UTC) == 0) {
- refclock_report(peer, CEVNT_BADTIME);
+ refclock_report(instance->peer, CEVNT_BADTIME);
return ("time mark not sync'ed to UTC");
}
return (NULL);
}
-/*
- * Process a PPS signal, returning a timestamp.
- */
-static int
-jupiter_pps(register struct peer *peer)
+static char *
+jupiter_parse_gpos(struct instance *instance, u_short *sp)
{
- register struct refclockproc *pp;
- register struct jupiterunit *up;
- register int firsttime;
- struct timeval ntp_tv;
+ struct jgpos *jg;
+ time_t t;
+ struct tm *tm;
+ char *cp;
- pp = peer->procptr;
- up = (struct jupiterunit *)pp->unitptr;
+ jg = (struct jgpos *)sp;
- /*
- * Grab the timestamp of the PPS signal.
- */
- firsttime = (up->ppsev.tv.tv_sec == 0);
- if (ioctl(pp->io.fd, CIOGETEV, (caddr_t)&up->ppsev) < 0) {
- /* XXX Actually, if this fails, we're pretty much screwed */
- jupiter_debug(peer, "jupiter_pps: CIOGETEV: %s\n",
- strerror(errno));
- refclock_report(peer, CEVNT_FAULT);
- return (1);
+ if (jg->navval != 0) {
+ /*
+ * Solution not valid. Use caution and refuse
+ * to determine GPS week from this message.
+ */
+ instance->gpos_gweek = 0;
+ instance->gpos_sweek = 0;
+ return ("Navigation solution not valid");
}
- /*
- * Check pps serial number against last one
- */
- if (!firsttime && up->lastserial + 1 != up->ppsev.serial) {
- if (up->ppsev.serial == up->lastserial)
- jupiter_debug(peer, "jupiter_pps: no new pps event\n");
- else
- jupiter_debug(peer,
- "jupiter_pps: missed %d pps events\n",
- up->ppsev.serial - up->lastserial - 1);
- up->lastserial = up->ppsev.serial;
- refclock_report(peer, CEVNT_FAULT);
- return (1);
+ instance->gpos_gweek = jg->gweek;
+ instance->gpos_sweek = DS2UI(jg->sweek);
+ while(instance->gpos_sweek >= WEEKSECS) {
+ instance->gpos_sweek -= WEEKSECS;
+ ++instance->gpos_gweek;
}
- up->lastserial = up->ppsev.serial;
+ instance->gweek = 0;
- /*
- * Return the timestamp in pp->lastrec
- */
- ntp_tv = up->ppsev.tv;
- ntp_tv.tv_sec += (u_int32)JAN_1970;
- TVTOTS(&ntp_tv, &pp->lastrec);
+ t = GPS_EPOCH + (instance->gpos_gweek * WEEKSECS) + instance->gpos_sweek;
+ tm = gmtime(&t);
+ cp = asctime(tm);
- return (0);
+ jupiter_debug(instance->peer,
+ "jupiter_parse_g", "GPS %.24s (gweek/sweek %u/%u)",
+ cp, instance->gpos_gweek, instance->gpos_sweek);
+ return (NULL);
}
/*
* jupiter_debug - print debug messages
*/
-#if defined(__STDC__)
+#if defined(__STDC__) || defined(SYS_WINNT)
static void
-jupiter_debug(struct peer *peer, char *fmt, ...)
+jupiter_debug(struct peer *peer, char *function, char *fmt, ...)
#else
static void
-jupiter_debug(peer, fmt, va_alist)
+jupiter_debug(peer, function, fmt, va_alist)
struct peer *peer;
+ char *function;
char *fmt;
#endif /* __STDC__ */
{
+ char buffer[200];
va_list ap;
- if (debug) {
-
-#if defined(__STDC__)
- va_start(ap, fmt);
+#if defined(__STDC__) || defined(SYS_WINNT)
+ va_start(ap, fmt);
#else
- va_start(ap);
+ va_start(ap);
#endif /* __STDC__ */
- /*
- * Print debug message to stdout
- * In the future, we may want to get get more creative...
- */
- vfprintf(stderr, fmt, ap);
-
- va_end(ap);
+ /*
+ * Print debug message to stdout
+ * In the future, we may want to get get more creative...
+ */
+ vsnprintf(buffer, sizeof(buffer), fmt, ap);
+ record_clock_stats(&(peer->srcadr), buffer);
+ if (debug) {
+ fprintf(stdout, "%s: ", function);
+ fprintf(stdout, buffer);
+ fprintf(stdout, "\n");
+ fflush(stdout);
}
+
+ va_end(ap);
}
/* Checksum and transmit a message to the Jupiter */
static char *
-jupiter_send(register struct peer *peer, register struct jheader *hp)
+jupiter_send(struct instance *instance, struct jheader *hp)
{
- register u_int len, size;
- register int cc;
- register u_short *sp;
+ u_int len, size;
+ int cc;
+ u_short *sp;
static char errstr[132];
size = sizeof(*hp);
@@ -1008,7 +936,7 @@ jupiter_send(register struct peer *peer, register struct jheader *hp)
size += (len + 1) * sizeof(u_short);
}
- if ((cc = write(peer->procptr->io.fd, (char *)hp, size)) < 0) {
+ if ((cc = write(instance->peer->procptr->io.fd, (char *)hp, size)) < 0) {
(void)sprintf(errstr, "write: %s", strerror(errno));
return (errstr);
} else if (cc != size) {
@@ -1025,65 +953,65 @@ static struct {
} reqmsg = {
{ putshort(JUPITER_SYNC), 0,
putshort((sizeof(struct jrequest) / sizeof(u_short)) - 1),
- 0, putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK |
+ 0, (u_char)putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK |
JUPITER_FLAG_CONN | JUPITER_FLAG_LOG), 0 },
{ 0, 0, 0, 0 }
};
/* An interval of zero means to output on trigger */
static void
-jupiter_reqmsg(register struct peer *peer, register u_int id,
- register u_int interval)
+jupiter_reqmsg(struct instance *instance, u_int id,
+ u_int interval)
{
- register struct jheader *hp;
- register struct jrequest *rp;
- register char *cp;
+ struct jheader *hp;
+ struct jrequest *rp;
+ char *cp;
hp = &reqmsg.jheader;
hp->id = putshort(id);
rp = &reqmsg.jrequest;
rp->trigger = putshort(interval == 0);
rp->interval = putshort(interval);
- if ((cp = jupiter_send(peer, hp)) != NULL)
- jupiter_debug(peer, "jupiter_reqmsg: %u: %s\n", id, cp);
+ if ((cp = jupiter_send(instance, hp)) != NULL)
+ jupiter_debug(instance->peer, "jupiter_reqmsg", "%u: %s", id, cp);
}
/* Cancel periodic message output */
static struct jheader canmsg = {
putshort(JUPITER_SYNC), 0, 0, 0,
- putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK | JUPITER_FLAG_DISC),
+ (u_char)putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK | JUPITER_FLAG_DISC),
0
};
static void
-jupiter_canmsg(register struct peer *peer, register u_int id)
+jupiter_canmsg(struct instance *instance, u_int id)
{
- register struct jheader *hp;
- register char *cp;
+ struct jheader *hp;
+ char *cp;
hp = &canmsg;
hp->id = putshort(id);
- if ((cp = jupiter_send(peer, hp)) != NULL)
- jupiter_debug(peer, "jupiter_canmsg: %u: %s\n", id, cp);
+ if ((cp = jupiter_send(instance, hp)) != NULL)
+ jupiter_debug(instance->peer, "jupiter_canmsg", "%u: %s", id, cp);
}
/* Request a single message output */
static struct jheader reqonemsg = {
putshort(JUPITER_SYNC), 0, 0, 0,
- putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK | JUPITER_FLAG_QUERY),
+ (u_char)putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK | JUPITER_FLAG_QUERY),
0
};
static void
-jupiter_reqonemsg(register struct peer *peer, register u_int id)
+jupiter_reqonemsg(struct instance *instance, u_int id)
{
- register struct jheader *hp;
- register char *cp;
+ struct jheader *hp;
+ char *cp;
hp = &reqonemsg;
hp->id = putshort(id);
- if ((cp = jupiter_send(peer, hp)) != NULL)
- jupiter_debug(peer, "jupiter_reqonemsg: %u: %s\n", id, cp);
+ if ((cp = jupiter_send(instance, hp)) != NULL)
+ jupiter_debug(instance->peer, "jupiter_reqonemsg", "%u: %s", id, cp);
}
/* Set the platform dynamics */
@@ -1093,29 +1021,29 @@ static struct {
} platmsg = {
{ putshort(JUPITER_SYNC), putshort(JUPITER_I_PLAT),
putshort((sizeof(struct jplat) / sizeof(u_short)) - 1), 0,
- putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK), 0 },
+ (u_char)putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK), 0 },
{ 0, 0, 0 }
};
static void
-jupiter_platform(register struct peer *peer, register u_int platform)
+jupiter_platform(struct instance *instance, u_int platform)
{
- register struct jheader *hp;
- register struct jplat *pp;
- register char *cp;
+ struct jheader *hp;
+ struct jplat *pp;
+ char *cp;
hp = &platmsg.jheader;
pp = &platmsg.jplat;
pp->platform = putshort(platform);
- if ((cp = jupiter_send(peer, hp)) != NULL)
- jupiter_debug(peer, "jupiter_platform: %u: %s\n", platform, cp);
+ if ((cp = jupiter_send(instance, hp)) != NULL)
+ jupiter_debug(instance->peer, "jupiter_platform", "%u: %s", platform, cp);
}
/* Checksum "len" shorts */
static u_short
-jupiter_cksum(register u_short *sp, register u_int len)
+jupiter_cksum(u_short *sp, u_int len)
{
- register u_short sum, x;
+ u_short sum, x;
sum = 0;
while (len-- > 0) {
@@ -1127,60 +1055,61 @@ jupiter_cksum(register u_short *sp, register u_int len)
/* Return the size of the next message (or zero if we don't have it all yet) */
static int
-jupiter_recv(register struct peer *peer)
+jupiter_recv(struct instance *instance)
{
- register int n, len, size, cc;
- register struct refclockproc *pp;
- register struct jupiterunit *up;
- register struct jheader *hp;
- register u_char *bp;
- register u_short *sp;
-
- pp = peer->procptr;
- up = (struct jupiterunit *)pp->unitptr;
+ int n, len, size, cc;
+ struct jheader *hp;
+ u_char *bp;
+ u_short *sp;
/* Must have at least a header's worth */
cc = sizeof(*hp);
- size = up->ssize;
+ size = instance->ssize;
if (size < cc)
return (0);
/* Search for the sync short if missing */
- sp = up->sbuf;
+ sp = instance->sbuf;
hp = (struct jheader *)sp;
if (getshort(hp->sync) != JUPITER_SYNC) {
/* Wasn't at the front, sync up */
- jupiter_debug(peer, "syncing");
+ jupiter_debug(instance->peer, "jupiter_recv", "syncing");
bp = (u_char *)sp;
n = size;
while (n >= 2) {
if (bp[0] != (JUPITER_SYNC & 0xff)) {
- jupiter_debug(peer, "{0x%x}", bp[0]);
+ /*
+ jupiter_debug(instance->peer, "{0x%x}", bp[0]);
+ */
++bp;
--n;
continue;
}
if (bp[1] == ((JUPITER_SYNC >> 8) & 0xff))
break;
- jupiter_debug(peer, "{0x%x 0x%x}", bp[0], bp[1]);
+ /*
+ jupiter_debug(instance->peer, "{0x%x 0x%x}", bp[0], bp[1]);
+ */
bp += 2;
n -= 2;
}
- jupiter_debug(peer, "\n");
+ /*
+ jupiter_debug(instance->peer, "\n");
+ */
/* Shuffle data to front of input buffer */
if (n > 0)
memcpy(sp, bp, n);
size = n;
- up->ssize = size;
+ instance->ssize = size;
if (size < cc || hp->sync != JUPITER_SYNC)
return (0);
}
if (jupiter_cksum(sp, (cc / sizeof(u_short) - 1)) !=
getshort(hp->hsum)) {
- jupiter_debug(peer, "jupiter_recv: bad header checksum!\n");
+ jupiter_debug(instance->peer, "jupiter_recv", "bad header checksum!");
/* This is drastic but checksum errors should be rare */
- up->ssize = 0;
+ instance->ssize = 0;
return (0);
}
@@ -1195,10 +1124,10 @@ jupiter_recv(register struct peer *peer)
/* Check payload checksum */
sp = (u_short *)(hp + 1);
if (jupiter_cksum(sp, len) != getshort(sp[len])) {
- jupiter_debug(peer,
- "jupiter_recv: bad payload checksum!\n");
+ jupiter_debug(instance->peer,
+ "jupiter_recv", "bad payload checksum!");
/* This is drastic but checksum errors should be rare */
- up->ssize = 0;
+ instance->ssize = 0;
return (0);
}
cc += n;
@@ -1206,57 +1135,6 @@ jupiter_recv(register struct peer *peer)
return (cc);
}
-static int
-jupiter_ttyinit(register struct peer *peer, register int fd)
-{
- struct termios termios;
-
- memset((char *)&termios, 0, sizeof(termios));
- if (cfsetispeed(&termios, B9600) < 0 ||
- cfsetospeed(&termios, B9600) < 0) {
- jupiter_debug(peer,
- "jupiter_ttyinit: cfsetispeed/cfgetospeed: %s\n",
- strerror(errno));
- return (0);
- }
-#ifdef HAVE_CFMAKERAW
- cfmakeraw(&termios);
-#else
- termios.c_iflag &= ~(IMAXBEL | IXOFF | INPCK | BRKINT | PARMRK |
- ISTRIP | INLCR | IGNCR | ICRNL | IXON | IGNPAR);
- termios.c_iflag |= IGNBRK;
- termios.c_oflag &= ~OPOST;
- termios.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL | ICANON | ISIG |
- IEXTEN | NOFLSH | TOSTOP | PENDIN);
- termios.c_cflag &= ~(CSIZE | PARENB);
- termios.c_cflag |= CS8 | CREAD;
- termios.c_cc[VMIN] = 1;
-#endif
- termios.c_cflag |= CLOCAL;
- if (tcsetattr(fd, TCSANOW, &termios) < 0) {
- jupiter_debug(peer, "jupiter_ttyinit: tcsetattr: %s\n",
- strerror(errno));
- return (0);
- }
-
-#ifdef TIOCSPPS
- if (ioctl(fd, TIOCSPPS, (char *)&fdpps) < 0) {
- jupiter_debug(peer, "jupiter_ttyinit: TIOCSPPS: %s\n",
- strerror(errno));
- return (0);
- }
-#endif
-#ifdef I_PUSH
- if (ioctl(fd, I_PUSH, "ppsclock") < 0) {
- jupiter_debug(peer, "jupiter_ttyinit: push ppsclock: %s\n",
- strerror(errno));
- return (0);
- }
-#endif
-
- return (1);
-}
-
-#else /* not (REFCLOCK && CLOCK_JUPITER && PPS) */
+#else /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
int refclock_jupiter_bs;
-#endif /* not (REFCLOCK && CLOCK_JUPITER && PPS) */
+#endif /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
diff --git a/contrib/ntp/ntpd/refclock_leitch.c b/contrib/ntp/ntpd/refclock_leitch.c
index 42b02fce81d9..d7cd9bbd6168 100644
--- a/contrib/ntp/ntpd/refclock_leitch.c
+++ b/contrib/ntp/ntpd/refclock_leitch.c
@@ -446,6 +446,7 @@ leitch_receive(
leitch->state = STATE_IDLE;
break;
}
+ leitch->reftime1.l_uf = 0;
#ifdef DEBUG
if (debug)
fprintf(stderr, "%lu\n", (u_long)leitch->reftime1.l_ui);
diff --git a/contrib/ntp/ntpd/refclock_local.c b/contrib/ntp/ntpd/refclock_local.c
index 0a0ecc011f9b..3478f43838e6 100644
--- a/contrib/ntp/ntpd/refclock_local.c
+++ b/contrib/ntp/ntpd/refclock_local.c
@@ -1,7 +1,8 @@
-/* wjm 17-aug-1995: add a hook for special treatment of VMS_LOCALUNIT */
/*
* refclock_local - local pseudo-clock driver
+ *
+ * wjm 17-aug-1995: add a hook for special treatment of VMS_LOCALUNIT
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -69,31 +70,34 @@
*
* Fudge Factors
*
- * The stratum for this driver set at 5 by default, but it can be changed
- * by the fudge command and/or the ntpdc utility. The reference ID is
- * "LCL" by default, but can be changed using the same mechanism. *NEVER*
- * configure this driver to operate at a stratum which might possibly
- * disrupt a client with access to a bona fide primary server, unless the
- * local clock oscillator is reliably disciplined by another source.
- * *NEVER NEVER* configure a server which might devolve to an undisciplined
- * local clock to use multicast mode. Always remember that an improperly
- * configured local clock driver let loose in the Internet can cause
- * very serious disruption. This is why most of us who care about good
- * time use cryptographic authentication.
+ * The stratum for this driver set at 5 by default, but it can be
+ * changed by the fudge command and/or the ntpdc utility. The reference
+ * ID is "LCL" by default, but can be changed using the same mechanism.
+ * *NEVER* configure this driver to operate at a stratum which might
+ * possibly disrupt a client with access to a bona fide primary server,
+ * unless the local clock oscillator is reliably disciplined by another
+ * source. *NEVER NEVER* configure a server which might devolve to an
+ * undisciplined local clock to use multicast mode. Always remember that
+ * an improperly configured local clock driver let loose in the Internet
+ * can cause very serious disruption. This is why most of us who care
+ * about good time use cryptographic authentication.
*
* This driver provides a mechanism to trim the local clock in both time
* and frequency, as well as a way to manipulate the leap bits. The
* fudge time1 parameter adjusts the time, in seconds, and the fudge
- * time2 parameter adjusts the frequency, in ppm. The fudge time1 parameter
- * is additive; that is, it adds an increment to the current time. The
- * fudge time2 parameter directly sets the frequency.
+ * time2 parameter adjusts the frequency, in ppm. The fudge time1
+ * parameter is additive; that is, it adds an increment to the current
+ * time. The fudge time2 parameter directly sets the frequency.
*/
-
/*
* Local interface definitions
*/
#define PRECISION (-7) /* about 10 ms precision */
-#define REFID "LCL\0" /* reference ID */
+#if defined(VMS) && defined(VMS_LOCALUNIT)
+#define REFID "LCLv" /* reference ID */
+#else /* VMS VMS_LOCALUNIT */
+#define REFID "LCL\0" /* reference ID */
+#endif /* VMS VMS_LOCALUNIT */
#define DESCRIPTION "Undisciplined local clock" /* WRU */
#define STRATUM 5 /* default stratum */
@@ -160,14 +164,11 @@ local_start(
* Initialize miscellaneous variables
*/
peer->precision = sys_precision;
+ pp->leap = LEAP_NOTINSYNC;
peer->stratum = STRATUM;
+ pp->stratum = STRATUM;
pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
-#if defined(VMS) && defined(VMS_LOCALUNIT)
- /* provide a non-standard REFID */
- if(unit == VMS_LOCALUNIT)
- memcpy((char *)&pp->refid,"LCLv",4);
-#endif /* VMS && VMS_LOCALUNIT */
+ memcpy(&pp->refid, "INIT", 4);
poll_time = current_time;
return (1);
}
@@ -175,6 +176,15 @@ local_start(
/*
* local_poll - called by the transmit procedure
+ *
+ * LOCKCLOCK: If the kernel supports the nanokernel or microkernel
+ * system calls, the leap bits are extracted from the kernel. If there
+ * is a kernel error or the kernel leap bits are set to 11, the NTP leap
+ * bits are set to 11 and the stratum is set to infinity. Otherwise, the
+ * NTP leap bits are set to the kernel leap bits and the stratum is set
+ * as fudged. This behavior does not faithfully follow the
+ * specification, but is probably more appropriate in a multiple-server
+ * national laboratory network.
*/
static void
local_poll(
@@ -182,20 +192,19 @@ local_poll(
struct peer *peer
)
{
- struct refclockproc *pp;
-#if defined(KERNEL_PLL) && defined(STA_CLK)
+#if defined(KERNEL_PLL) && defined(LOCKCLOCK)
struct timex ntv;
- int retval;
-#endif /* KERNEL_PLL STA_CLK */
+#endif /* KERNEL_PLL LOCKCLOCK */
+ struct refclockproc *pp;
#if defined(VMS) && defined(VMS_LOCALUNIT)
- if(unit == VMS_LOCALUNIT) {
+ if (unit == VMS_LOCALUNIT) {
extern void vms_local_poll(struct peer *);
vms_local_poll(peer);
return;
}
-#endif /* VMS && VMS_LOCALUNIT */
+#endif /* VMS && VMS_LOCALUNIT */
pp = peer->procptr;
pp->polls++;
@@ -210,48 +219,42 @@ local_poll(
pp->fudgetime1 += pp->fudgetime2 * 1e-6 * (current_time -
poll_time);
poll_time = current_time;
- refclock_process_offset(pp, pp->lastrec, pp->lastrec, pp->fudgetime1);
- pp->leap = LEAP_NOWARNING;
- pp->disp = DISPERSION;
- pp->jitter = 0;
-#if defined(KERNEL_PLL) && defined(STA_CLK)
+ refclock_process_offset(pp, pp->lastrec, pp->lastrec,
+ pp->fudgetime1);
/*
- * If the kernel pll code is up and running, somebody else
- * may come diddle the clock. If so, they better use ntp_adjtime(),
- * and set the STA_CLK bit in the status word. In this case, the
- * performance information is read from the kernel and becomes the
- * variables presented to the clock mitigation process.
+ * If another process is disciplining the system clock, we set
+ * the leap bits and quality indicators from the kernel.
*/
- if (pll_control && kern_enable && (peer->flags & FLAG_PREFER)) {
- memset((char *)&ntv, 0, sizeof ntv);
- retval = ntp_adjtime(&ntv);
- if (ntv.status & STA_CLK) {
- ext_enable = 1;
- switch(retval) {
+#if defined(KERNEL_PLL) && defined(LOCKCLOCK)
+ memset(&ntv, 0, sizeof ntv);
+ switch (ntp_adjtime(&ntv)) {
+ case TIME_OK:
+ pp->leap = LEAP_NOWARNING;
+ peer->stratum = pp->stratum;
+ break;
- case TIME_OK:
- pp->leap = LEAP_NOWARNING;
- break;
+ case TIME_INS:
+ pp->leap = LEAP_ADDSECOND;
+ peer->stratum = pp->stratum;
+ break;
- case TIME_INS:
- pp->leap = LEAP_ADDSECOND;
- break;
+ case TIME_DEL:
+ pp->leap = LEAP_DELSECOND;
+ peer->stratum = pp->stratum;
+ break;
- case TIME_DEL:
- pp->leap = LEAP_DELSECOND;
- break;
-
- case TIME_ERROR:
- pp->leap = LEAP_NOTINSYNC;
- }
- pp->disp = ntv.maxerror / 1e6;
- pp->jitter = SQUARE(ntv.esterror / 1e6);
- }
- } else {
- ext_enable = 0;
+ default:
+ pp->leap = LEAP_NOTINSYNC;
+ peer->stratum = STRATUM_UNSPEC;
}
-#endif /* KERNEL_PLL STA_CLK */
+ pp->disp = 0;
+ pp->jitter = 0;
+#else /* KERNEL_PLL LOCKCLOCK */
+ pp->leap = LEAP_NOWARNING;
+ pp->disp = DISPERSION;
+ pp->jitter = 0;
+#endif /* KERNEL_PLL LOCKCLOCK */
pp->lastref = pp->lastrec;
refclock_receive(peer);
pp->fudgetime1 = 0;
diff --git a/contrib/ntp/ntpd/refclock_msfees.c b/contrib/ntp/ntpd/refclock_msfees.c
index b1aaa5658f91..ebfb9830b305 100644
--- a/contrib/ntp/ntpd/refclock_msfees.c
+++ b/contrib/ntp/ntpd/refclock_msfees.c
@@ -99,7 +99,7 @@
* On the next minute it steps forward again :-(
* This is typically 16.5uS/S then 3975uS at the 4min re-sync,
* or 9.5uS/S then 3990.5uS at a 7min re-sync,
- * at which point it may loose the "00" second time stamp.
+ * at which point it may lose the "00" second time stamp.
* I assume that the most accurate time is just AFTER the re-sync.
* Hence remember the last cycle interval,
*
@@ -720,7 +720,7 @@ ees_receive(
/* Incomplete. Wait for more. */
if (debug & DB_LOG_AWAITMORE)
msyslog(LOG_INFO,
- "I: ees clock %d: %x == %x: await more",
+ "I: ees clock %d: %p == %p: await more",
ees->unit, dpt, dpend);
return;
}
diff --git a/contrib/ntp/ntpd/refclock_mx4200.c b/contrib/ntp/ntpd/refclock_mx4200.c
index 3c520b0b190e..bc694ad0a69a 100644
--- a/contrib/ntp/ntpd/refclock_mx4200.c
+++ b/contrib/ntp/ntpd/refclock_mx4200.c
@@ -67,6 +67,8 @@
# include <sys/ppsclock.h>
#endif
+#include "ntp_sprintf.h"
+
#ifndef HAVE_STRUCT_PPSCLOCKEV
struct ppsclockev {
# ifdef HAVE_STRUCT_TIMESPEC
@@ -892,7 +894,7 @@ mx4200_receive(
mx4200_debug(peer, "%4d-%03d %02d:%02d:%02d at %s, %.6f\n",
pp->year, pp->day, pp->hour, pp->minute, pp->second,
prettydate(&pp->lastrec), pp->offset);
-
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
/*
@@ -947,7 +949,7 @@ mx4200_receive(
* 10 int User Time Bias: Operator specified bias, in nanoseconds
* 11 int Leap Second Flag: Indicates that a leap second will
* occur. This value is usually zero, except during
- * the week prior to the leap second occurence, when
+ * the week prior to the leap second occurrence, when
* this value will be set to +1 or -1. A value of
* +1 indicates that GPS time will be 1 second
* further ahead of UTC time.
@@ -1103,8 +1105,6 @@ mx4200_parse_t(
pp->hour = hour;
pp->minute = minute;
pp->second = second;
- pp->msec = 0;
- pp->usec = 0;
/*
* Toss if sentence is marked invalid
@@ -1636,25 +1636,11 @@ mx4200_send(peer, fmt, va_alist)
cp = buf;
*cp++ = '$';
-#ifdef notdef
- /* BSD is rational */
- n = vsnprintf(cp, sizeof(buf) - 1, fmt, ap);
-#else
- /* SunOS sucks */
- (void)vsprintf(cp, fmt, ap);
- n = strlen(cp);
-#endif /* notdef */
+ n = VSNPRINTF((cp, sizeof(buf) - 1, fmt, ap));
ck = mx4200_cksum(cp, n);
cp += n;
++n;
-#ifdef notdef
- /* BSD is rational */
- n += snprintf(cp, sizeof(buf) - n - 5, "*%02X\r\n", ck);
-#else
- /* SunOS sucks */
- sprintf(cp, "*%02X\r\n", ck);
- n += strlen(cp);
-#endif /* notdef */
+ n += SNPRINTF((cp, sizeof(buf) - n - 5, "*%02X\r\n", ck));
m = write(pp->io.fd, buf, (unsigned)n);
if (m < 0)
diff --git a/contrib/ntp/ntpd/refclock_neoclock4x.c b/contrib/ntp/ntpd/refclock_neoclock4x.c
index 3b6401752bba..082b1cffa69f 100644
--- a/contrib/ntp/ntpd/refclock_neoclock4x.c
+++ b/contrib/ntp/ntpd/refclock_neoclock4x.c
@@ -1,15 +1,15 @@
/*
*
- * refclock_neoclock4x.c
+ * Refclock_neoclock4x.c
* - NeoClock4X driver for DCF77 or FIA Timecode
*
- * Date: 2002-04-27 1.0
+ * Date: 2003-07-07 v1.13
*
* see http://www.linum.com/redir/jump/id=neoclock4x&action=redir
* for details about the NeoClock4X device
*
- * Copyright (C) 2002 by Linum Software GmbH <support@linum.com>
- *
+ * Copyright (C) 2002-2003 by Linum Software GmbH <neoclock4x@linum.com>
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -58,6 +58,24 @@
# include <sys/ioctl.h>
#endif
+/*
+ * If you want the driver for whatever reason to not use
+ * the TX line to send anything to your NeoClock4X
+ * device you must tell the NTP refclock driver which
+ * firmware you NeoClock4X device uses.
+ *
+ * If you want to enable this feature change the "#if 0"
+ * line to "#if 1" and make sure that the defined firmware
+ * matches the firmware off your NeoClock4X receiver!
+ *
+ */
+
+#if 0
+#define NEOCLOCK4X_FIRMWARE NEOCLOCK4X_FIRMWARE_VERSION_A
+#endif
+
+#define NEOCLOCK4X_FIRMWARE_VERSION_A 'A'
+
#define NEOCLOCK4X_TIMECODELEN 37
#define NEOCLOCK4X_OFFSET_SERIAL 3
@@ -77,14 +95,17 @@
#define NEOCLOCK4X_OFFSET_ANTENNA2 33
#define NEOCLOCK4X_OFFSET_CRC 35
+#define NEOCLOCK4X_DRIVER_VERSION "1.12 (2003-01-10)"
+
struct neoclock4x_unit {
l_fp laststamp; /* last receive timestamp */
short unit; /* NTP refclock unit number */
- u_long polled; /* flag to detect noreplies */
+ u_long polled; /* flag to detect noreplies */
char leap_status; /* leap second flag */
int recvnow;
-
+
char firmware[80];
+ char firmwaretag;
char serial[7];
char radiosignal[4];
char timesource;
@@ -112,8 +133,13 @@ static int neol_hexatoi_len P((const char str[], int *, int));
static void neol_jdn_to_ymd P((unsigned long, int *, int *, int *));
static void neol_localtime P((unsigned long, int* , int*, int*, int*, int*, int*));
static unsigned long neol_mktime P((int, int, int, int, int, int));
+#if 0
static void neol_mdelay P((int));
+#endif
+#if !defined(NEOCLOCK4X_FIRMWARE)
static int neol_query_firmware P((int, int, char *, int));
+static int neol_check_firmware P((int, const char*, char *));
+#endif
struct refclock refclock_neoclock4x = {
neoclock4x_start, /* start up driver */
@@ -134,11 +160,15 @@ neoclock4x_start(int unit,
int fd;
char dev[20];
int sl232;
+#if defined(HAVE_TERMIOS)
struct termios termsettings;
+#endif
+#if !defined(NEOCLOCK4X_FIRMWARE)
int tries;
+#endif
+
+ (void) snprintf(dev, sizeof(dev)-1, "/dev/neoclock4x-%d", unit);
- (void) sprintf(dev, "/dev/neoclock4x-%d", unit);
-
/* LDISC_STD, LDISC_RAW
* Open serial port. Use CLK line discipline, if available.
*/
@@ -147,13 +177,61 @@ neoclock4x_start(int unit,
{
return (0);
}
-
+
+#if defined(HAVE_TERMIOS)
+ if(tcgetattr(fd, &termsettings) < 0)
+ {
+ msyslog(LOG_CRIT, "NeoClock4X(%d): (tcgetattr) can't query serial port settings: %m", unit);
+ (void) close(fd);
+ return (0);
+ }
+
+ /* 2400 Baud 8N2 */
+ termsettings.c_cflag &= ~PARENB;
+ termsettings.c_cflag |= CSTOPB;
+ termsettings.c_cflag &= ~CSIZE;
+ termsettings.c_cflag |= CS8;
+
+ if(tcsetattr(fd, TCSANOW, &termsettings) < 0)
+ {
+ msyslog(LOG_CRIT, "NeoClock4X(%d): (tcsetattr) can't set serial port 2400 8N2: %m", unit);
+ (void) close(fd);
+ return (0);
+ }
+#elif defined(HAVE_SYSV_TTYS)
+ if(ioctl(fd, TCGETA, &termsettings) < 0)
+ {
+ msyslog(LOG_CRIT, "NeoClock4X(%d): (TCGETA) can't query serial port settings: %m", unit);
+ (void) close(fd);
+ return (0);
+ }
+
+ /* 2400 Baud 8N2 */
+ termsettings.c_cflag &= ~PARENB;
+ termsettings.c_cflag |= CSTOPB;
+ termsettings.c_cflag &= ~CSIZE;
+ termsettings.c_cflag |= CS8;
+
+ if(ioctl(fd, TCSETA, &termsettings) < 0)
+ {
+ msyslog(LOG_CRIT, "NeoClock4X(%d): (TSGETA) can't set serial port 2400 8N2: %m", unit);
+ (void) close(fd);
+ return (0);
+ }
+#else
+ msyslog(LOG_EMERG, "NeoClock4X(%d): don't know how to set port to 2400 8N2 with this OS!", unit);
+ (void) close(fd);
+ return (0);
+#endif
+
#if defined(TIOCMSET) && (defined(TIOCM_RTS) || defined(CIOCM_RTS))
/* turn on RTS, and DTR for power supply */
/* NeoClock4x is powered from serial line */
if(ioctl(fd, TIOCMGET, (caddr_t)&sl232) == -1)
{
msyslog(LOG_CRIT, "NeoClock4X(%d): can't query RTS/DTR state: %m", unit);
+ (void) close(fd);
+ return (0);
}
#ifdef TIOCM_RTS
sl232 = sl232 | TIOCM_DTR | TIOCM_RTS; /* turn on RTS, and DTR for power supply */
@@ -163,28 +241,16 @@ neoclock4x_start(int unit,
if(ioctl(fd, TIOCMSET, (caddr_t)&sl232) == -1)
{
msyslog(LOG_CRIT, "NeoClock4X(%d): can't set RTS/DTR to power neoclock4x: %m", unit);
- }
-
- if(ioctl(fd, TCGETS, (caddr_t)&termsettings) == -1)
- {
- msyslog(LOG_CRIT, "NeoClock4X(%d): can't query serial port settings: %m", unit);
- }
-
- /* 2400 Baud mit 8N2 */
- termsettings.c_cflag &= ~PARENB;
- termsettings.c_cflag |= CSTOPB;
- termsettings.c_cflag &= ~CSIZE;
- termsettings.c_cflag |= CS8;
-
- if(ioctl(fd, TCSETS, &termsettings) == -1)
- {
- msyslog(LOG_CRIT, "NeoClock4X(%d): can't set serial port to 2400 8N2: %m", unit);
+ (void) close(fd);
+ return (0);
}
#else
- msyslog(LOG_EMERG, "NeoClock4X(%d): OS interface is incapable of setting DTR/RTS to power NeoClock4X",
+ msyslog(LOG_EMERG, "NeoClock4X(%d): don't know how to set DTR/RTS to power NeoClock4X with this OS!",
unit);
+ (void) close(fd);
+ return (0);
#endif
-
+
up = (struct neoclock4x_unit *) emalloc(sizeof(struct neoclock4x_unit));
if(!(up))
{
@@ -201,31 +267,26 @@ neoclock4x_start(int unit,
pp->io.srcclock = (caddr_t)peer;
pp->io.datalen = 0;
pp->io.fd = fd;
- /* no time is given by user! use 169.583333 ms to compensate the serial line delay
+ /*
+ * no fudge time is given by user!
+ * use 169.583333 ms to compensate the serial line delay
* formula is:
* 2400 Baud / 11 bit = 218.18 charaters per second
* (NeoClock4X timecode len)
*/
pp->fudgetime1 = (NEOCLOCK4X_TIMECODELEN * 11) / 2400.0;
- if (!io_addclock(&pp->io))
- {
- msyslog(LOG_ERR, "NeoClock4X(%d): error add peer to ntpd: %m",unit);
- (void) close(fd);
- free(up);
- return (0);
- }
-
/*
* Initialize miscellaneous variables
*/
peer->precision = -10;
peer->burst = NSTAGE;
memcpy((char *)&pp->refid, "neol", 4);
-
+
up->leap_status = 0;
up->unit = unit;
strcpy(up->firmware, "?");
+ up->firmwaretag = '?';
strcpy(up->serial, "?");
strcpy(up->radiosignal, "?");
up->timesource = '?';
@@ -241,13 +302,25 @@ neoclock4x_start(int unit,
up->utc_second = 0;
up->utc_msec = 0;
+#if defined(NEOCLOCK4X_FIRMWARE)
+#if NEOCLOCK4X_FIRMWARE == NEOCLOCK4X_FIRMWARE_VERSION_A
+ strcpy(up->firmware, "(c) 2002 NEOL S.A. FRANCE / L0.01 NDF:A:* (compile time)");
+ up->firmwaretag = 'A';
+#else
+ msyslog(LOG_EMERG, "NeoClock4X(%d): Unkown firmware defined at compile time for NeoClock4X",
+ unit);
+ (void) close(fd);
+ pp->io.fd = -1;
+ free(pp->unitptr);
+ pp->unitptr = NULL;
+ return (0);
+#endif
+#else
for(tries=0; tries < 5; tries++)
{
- /*
- * Wait 3 second for receiver to power up
- */
NLOG(NLOG_CLOCKINFO)
- msyslog(LOG_INFO, "NeoClock4X(%d): try query NeoClock4X firmware version (%d/5)", unit, tries);
+ msyslog(LOG_INFO, "NeoClock4X(%d): checking NeoClock4X firmware version (%d/5)", unit, tries);
+ /* wait 3 seconds for receiver to power up */
sleep(3);
if(neol_query_firmware(pp->io.fd, up->unit, up->firmware, sizeof(up->firmware)))
{
@@ -255,9 +328,30 @@ neoclock4x_start(int unit,
}
}
+ /* can I handle this firmware version? */
+ if(!neol_check_firmware(up->unit, up->firmware, &up->firmwaretag))
+ {
+ (void) close(fd);
+ pp->io.fd = -1;
+ free(pp->unitptr);
+ pp->unitptr = NULL;
+ return (0);
+ }
+#endif
+
+ if(!io_addclock(&pp->io))
+ {
+ msyslog(LOG_ERR, "NeoClock4X(%d): error add peer to ntpd: %m", unit);
+ (void) close(fd);
+ pp->io.fd = -1;
+ free(pp->unitptr);
+ pp->unitptr = NULL;
+ return (0);
+ }
+
NLOG(NLOG_CLOCKINFO)
msyslog(LOG_INFO, "NeoClock4X(%d): receiver setup successful done", unit);
-
+
return (1);
}
@@ -269,30 +363,47 @@ neoclock4x_shutdown(int unit,
struct refclockproc *pp;
int sl232;
- pp = peer->procptr;
- up = (struct neoclock4x_unit *)pp->unitptr;
-
-#if defined(TIOCMSET) && (defined(TIOCM_RTS) || defined(CIOCM_RTS))
- /* turn on RTS, and DTR for power supply */
- /* NeoClock4x is powered from serial line */
- if(ioctl(pp->io.fd, TIOCMGET, (caddr_t)&sl232) == -1)
+ if(NULL != peer)
{
- msyslog(LOG_CRIT, "NeoClock4X(%d): can't query RTS/DTR state: %m", unit);
- }
+ pp = peer->procptr;
+ if(pp != NULL)
+ {
+ up = (struct neoclock4x_unit *)pp->unitptr;
+ if(up != NULL)
+ {
+ if(-1 != pp->io.fd)
+ {
+#if defined(TIOCMSET) && (defined(TIOCM_RTS) || defined(CIOCM_RTS))
+ /* turn on RTS, and DTR for power supply */
+ /* NeoClock4x is powered from serial line */
+ if(ioctl(pp->io.fd, TIOCMGET, (caddr_t)&sl232) == -1)
+ {
+ msyslog(LOG_CRIT, "NeoClock4X(%d): can't query RTS/DTR state: %m",
+ unit);
+ }
#ifdef TIOCM_RTS
- sl232 &= ~(TIOCM_DTR | TIOCM_RTS); /* turn on RTS, and DTR for power supply */
+ /* turn on RTS, and DTR for power supply */
+ sl232 &= ~(TIOCM_DTR | TIOCM_RTS);
#else
- sl232 &= ~(CIOCM_DTR | CIOCM_RTS); /* turn on RTS, and DTR for power supply */
+ /* turn on RTS, and DTR for power supply */
+ sl232 &= ~(CIOCM_DTR | CIOCM_RTS);
#endif
- if(ioctl(pp->io.fd, TIOCMSET, (caddr_t)&sl232) == -1)
- {
- msyslog(LOG_CRIT, "NeoClock4X(%d): can't set RTS/DTR to power neoclock4x: %m", unit);
- }
+ if(ioctl(pp->io.fd, TIOCMSET, (caddr_t)&sl232) == -1)
+ {
+ msyslog(LOG_CRIT, "NeoClock4X(%d): can't set RTS/DTR to power neoclock4x: %m",
+ unit);
+ }
#endif
+ io_closeclock(&pp->io);
+ }
+ free(up);
+ pp->unitptr = NULL;
+ }
+ }
+ }
+
msyslog(LOG_ERR, "NeoClock4X(%d): shutdown", unit);
- io_closeclock(&pp->io);
- free(up);
NLOG(NLOG_CLOCKINFO)
msyslog(LOG_INFO, "NeoClock4X(%d): receiver shutdown done", unit);
}
@@ -307,23 +418,25 @@ neoclock4x_receive(struct recvbuf *rbufp)
int day;
int month; /* ddd conversion */
int c;
+ int dsec;
unsigned char calc_chksum;
int recv_chksum;
-
+
peer = (struct peer *)rbufp->recv_srcclock;
pp = peer->procptr;
up = (struct neoclock4x_unit *)pp->unitptr;
-
+
/* wait till poll interval is reached */
if(0 == up->recvnow)
return;
-
+
/* reset poll interval flag */
up->recvnow = 0;
/* read last received timecode */
pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &pp->lastrec);
-
+ pp->leap = LEAP_NOWARNING;
+
if(NEOCLOCK4X_TIMECODELEN != pp->lencode)
{
NLOG(NLOG_CLOCKEVENT)
@@ -353,7 +466,7 @@ neoclock4x_receive(struct recvbuf *rbufp)
/* Allow synchronization even is quartz clock is
* never initialized.
* WARNING: This is dangerous!
- */
+ */
up->quarzstatus = pp->a_lastcode[NEOCLOCK4X_OFFSET_QUARZSTATUS];
if(0==(pp->sloppyclockflag & CLK_FLAG2))
{
@@ -373,9 +486,9 @@ neoclock4x_receive(struct recvbuf *rbufp)
msyslog(LOG_NOTICE, "NeoClock4X(%d): using uninitialized quartz clock for time synchronization: %s",
up->unit, pp->a_lastcode);
}
-
+
/*
- * If NeoClock4X is not synchronized to a radio clock
+ * If NeoClock4X is not synchronized to a radio clock
* check if we're allowed to synchronize with the quartz
* clock.
*/
@@ -410,9 +523,9 @@ neoclock4x_receive(struct recvbuf *rbufp)
neol_atoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_HOUR], &pp->hour, 2);
neol_atoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_MINUTE], &pp->minute, 2);
neol_atoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_SECOND], &pp->second, 2);
- neol_atoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_HSEC], &pp->msec, 2);
- pp->msec *= 10; /* convert 1/100s from neoclock to real miliseconds */
-
+ neol_atoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_HSEC], &dsec, 2);
+ pp->nsec = dsec * 10000; /* convert 1/100s from neoclock to nanoseconds */
+
memcpy(up->radiosignal, &pp->a_lastcode[NEOCLOCK4X_OFFSET_RADIOSIGNAL], 3);
up->radiosignal[3] = 0;
memcpy(up->serial, &pp->a_lastcode[NEOCLOCK4X_OFFSET_SERIAL], 6);
@@ -438,18 +551,23 @@ neoclock4x_receive(struct recvbuf *rbufp)
refclock_report(peer, CEVNT_BADDATE);
return;
}
-
- /* Year-2000 check! */
- /* wrap 2-digit date into 4-digit */
-
- if(pp->year < YEAR_PIVOT) /* < 98 */
- {
- pp->year += 100;
- }
- pp->year += 1900;
-
+
+ /* Year-2000 check not needed anymore. Same problem
+ * will arise at 2099 but what should we do...?
+ *
+ * wrap 2-digit date into 4-digit
+ *
+ * if(pp->year < YEAR_PIVOT)
+ * {
+ * pp->year += 100;
+ * }
+ */
+ pp->year += 2000;
+
+ /* adjust NeoClock4X local time to UTC */
calc_utc = neol_mktime(pp->year, month, day, pp->hour, pp->minute, pp->second);
calc_utc -= 3600;
+ /* adjust NeoClock4X daylight saving time if needed */
if('S' == up->dststatus)
calc_utc -= 3600;
neol_localtime(calc_utc, &pp->year, &month, &day, &pp->hour, &pp->minute, &pp->second);
@@ -457,16 +575,15 @@ neoclock4x_receive(struct recvbuf *rbufp)
/*
some preparations
*/
- pp->day = ymd2yd(pp->year,month,day);
+ pp->day = ymd2yd(pp->year, month, day);
pp->leap = 0;
-
if(pp->sloppyclockflag & CLK_FLAG4)
{
- msyslog(LOG_DEBUG, "NeoClock4X(%d): calculated UTC date/time: %04d-%02d-%02d %02d:%02d:%02d.%03d",
+ msyslog(LOG_DEBUG, "NeoClock4X(%d): calculated UTC date/time: %04d-%02d-%02d %02d:%02d:%02d.%03ld",
up->unit,
pp->year, month, day,
- pp->hour, pp->minute, pp->second, pp->msec);
+ pp->hour, pp->minute, pp->second, pp->nsec/1000);
}
up->utc_year = pp->year;
@@ -475,8 +592,8 @@ neoclock4x_receive(struct recvbuf *rbufp)
up->utc_hour = pp->hour;
up->utc_minute = pp->minute;
up->utc_second = pp->second;
- up->utc_msec = pp->msec;
-
+ up->utc_msec = pp->nsec/1000;
+
if(!refclock_process(pp))
{
NLOG(NLOG_CLOCKEVENT)
@@ -485,7 +602,10 @@ neoclock4x_receive(struct recvbuf *rbufp)
return;
}
refclock_receive(peer);
-
+
+ /* report good status */
+ refclock_report(peer, CEVNT_NOMINAL);
+
record_clock_stats(&peer->srcadr, pp->a_lastcode);
}
@@ -511,7 +631,7 @@ neoclock4x_control(int unit,
{
struct neoclock4x_unit *up;
struct refclockproc *pp;
-
+
if(NULL == peer)
{
msyslog(LOG_ERR, "NeoClock4X(%d): control: unit invalid/inactive", unit);
@@ -542,7 +662,7 @@ neoclock4x_control(int unit,
msyslog(LOG_NOTICE, "NeoClock4X(%d): using fudgetime1 with %0.5fs from ntp.conf.",
unit, pp->fudgetime1);
}
-
+
/* notify */
if(pp->sloppyclockflag & CLK_FLAG1)
{
@@ -561,61 +681,66 @@ neoclock4x_control(int unit,
static char outstatus[800]; /* status output buffer */
char *tt;
char tmpbuf[80];
-
+
outstatus[0] = '\0';
out->kv_list = (struct ctl_var *)0;
out->type = REFCLK_NEOCLOCK4X;
-
- sprintf(tmpbuf, "%04d-%02d-%02d %02d:%02d:%02d.%03d",
- up->utc_year, up->utc_month, up->utc_day,
- up->utc_hour, up->utc_minute, up->utc_second,
- up->utc_msec);
-
- tt = add_var(&out->kv_list, 512, RO|DEF);
- tt += sprintf(tt, "calc_utc=\"%s\"", tmpbuf);
- tt = add_var(&out->kv_list, 512, RO|DEF);
- tt += sprintf(tt, "radiosignal=\"%s\"", up->radiosignal);
- tt = add_var(&out->kv_list, 512, RO|DEF);
- tt += sprintf(tt, "antenna1=\"%d\"", up->antenna1);
- tt = add_var(&out->kv_list, 512, RO|DEF);
- tt += sprintf(tt, "antenna2=\"%d\"", up->antenna2);
- tt = add_var(&out->kv_list, 512, RO|DEF);
+
+ snprintf(tmpbuf, sizeof(tmpbuf)-1,
+ "%04d-%02d-%02d %02d:%02d:%02d.%03d",
+ up->utc_year, up->utc_month, up->utc_day,
+ up->utc_hour, up->utc_minute, up->utc_second,
+ up->utc_msec);
+ tt = add_var(&out->kv_list, sizeof(tmpbuf)-1, RO|DEF);
+ snprintf(tt, sizeof(tmpbuf)-1, "calc_utc=\"%s\"", tmpbuf);
+
+ tt = add_var(&out->kv_list, 40, RO|DEF);
+ snprintf(tt, 39, "radiosignal=\"%s\"", up->radiosignal);
+ tt = add_var(&out->kv_list, 40, RO|DEF);
+ snprintf(tt, 39, "antenna1=\"%d\"", up->antenna1);
+ tt = add_var(&out->kv_list, 40, RO|DEF);
+ snprintf(tt, 39, "antenna2=\"%d\"", up->antenna2);
+ tt = add_var(&out->kv_list, 40, RO|DEF);
if('A' == up->timesource)
- tt += sprintf(tt, "timesource=\"radio\"");
+ snprintf(tt, 39, "timesource=\"radio\"");
else if('C' == up->timesource)
- tt += sprintf(tt, "timesource=\"quartz\"");
+ snprintf(tt, 39, "timesource=\"quartz\"");
else
- tt += sprintf(tt, "timesource=\"unknown\"");
- tt = add_var(&out->kv_list, 512, RO|DEF);
+ snprintf(tt, 39, "timesource=\"unknown\"");
+ tt = add_var(&out->kv_list, 40, RO|DEF);
if('I' == up->quarzstatus)
- tt += sprintf(tt, "quartzstatus=\"synchronized\"");
+ snprintf(tt, 39, "quartzstatus=\"synchronized\"");
else if('X' == up->quarzstatus)
- tt += sprintf(tt, "quartzstatus=\"not synchronized\"");
+ snprintf(tt, 39, "quartzstatus=\"not synchronized\"");
else
- tt += sprintf(tt, "quartzstatus=\"unknown\"");
- tt = add_var(&out->kv_list, 512, RO|DEF);
+ snprintf(tt, 39, "quartzstatus=\"unknown\"");
+ tt = add_var(&out->kv_list, 40, RO|DEF);
if('S' == up->dststatus)
- tt += sprintf(tt, "dststatus=\"summer\"");
+ snprintf(tt, 39, "dststatus=\"summer\"");
else if('W' == up->dststatus)
- tt += sprintf(tt, "dststatus=\"winter\"");
+ snprintf(tt, 39, "dststatus=\"winter\"");
else
- tt += sprintf(tt, "dststatus=\"unknown\"");
- tt = add_var(&out->kv_list, 512, RO|DEF);
- tt += sprintf(tt, "firmware=\"%s\"", up->firmware);
- tt = add_var(&out->kv_list, 512, RO|DEF);
- tt += sprintf(tt, "serialnumber=\"%s\"", up->serial);
- tt = add_var(&out->kv_list, 512, RO|DEF);
+ snprintf(tt, 39, "dststatus=\"unknown\"");
+ tt = add_var(&out->kv_list, 80, RO|DEF);
+ snprintf(tt, 79, "firmware=\"%s\"", up->firmware);
+ tt = add_var(&out->kv_list, 40, RO|DEF);
+ snprintf(tt, 39, "firmwaretag=\"%c\"", up->firmwaretag);
+ tt = add_var(&out->kv_list, 80, RO|DEF);
+ snprintf(tt, 79, "driver version=\"%s\"", NEOCLOCK4X_DRIVER_VERSION);
+ tt = add_var(&out->kv_list, 80, RO|DEF);
+ snprintf(tt, 79, "serialnumber=\"%s\"", up->serial);
}
}
-static int neol_hexatoi_len(const char str[],
- int *result,
- int maxlen)
+static int
+neol_hexatoi_len(const char str[],
+ int *result,
+ int maxlen)
{
int hexdigit;
int i;
int n = 0;
-
+
for(i=0; isxdigit(str[i]) && i < maxlen; i++)
{
hexdigit = isdigit(str[i]) ? toupper(str[i]) - '0' : toupper(str[i]) - 'A' + 10;
@@ -625,14 +750,15 @@ static int neol_hexatoi_len(const char str[],
return (n);
}
-int neol_atoi_len(const char str[],
+static int
+neol_atoi_len(const char str[],
int *result,
int maxlen)
{
int digit;
int i;
int n = 0;
-
+
for(i=0; isdigit(str[i]) && i < maxlen; i++)
{
digit = str[i] - '0';
@@ -657,12 +783,13 @@ int neol_atoi_len(const char str[],
* machines were long is 32-bit! (However, as time_t is signed, we
* will already get problems at other places on 2038-01-19 03:14:08)
*/
-static unsigned long neol_mktime(int year,
- int mon,
- int day,
- int hour,
- int min,
- int sec)
+static unsigned long
+neol_mktime(int year,
+ int mon,
+ int day,
+ int hour,
+ int min,
+ int sec)
{
if (0 >= (int) (mon -= 2)) { /* 1..12 . 11,12,1..10 */
mon += 12; /* Puts Feb last since it has leap day */
@@ -676,41 +803,36 @@ static unsigned long neol_mktime(int year,
)*60 + sec; /* finally seconds */
}
-static void neol_localtime(unsigned long utc,
- int* year,
- int* month,
- int* day,
- int* hour,
- int* minute,
- int* second)
+static void
+neol_localtime(unsigned long utc,
+ int* year,
+ int* month,
+ int* day,
+ int* hour,
+ int* min,
+ int* sec)
{
- ldiv_t d;
-
- /* Sekunden */
- d = ldiv(utc, 60);
- *second = d.rem;
-
- /* Minute */
- d = ldiv(d.quot, 60);
- *minute = d.rem;
-
- /* Stunden */
- d = ldiv(d.quot, 24);
- *hour = d.rem;
-
+ *sec = utc % 60;
+ utc /= 60;
+ *min = utc % 60;
+ utc /= 60;
+ *hour = utc % 24;
+ utc /= 24;
+
/* JDN Date 1/1/1970 */
- neol_jdn_to_ymd(d.quot + 2440588L, year, month, day);
+ neol_jdn_to_ymd(utc + 2440588L, year, month, day);
}
-static void neol_jdn_to_ymd(unsigned long jdn,
- int *yy,
- int *mm,
- int *dd)
+static void
+neol_jdn_to_ymd(unsigned long jdn,
+ int *yy,
+ int *mm,
+ int *dd)
{
unsigned long x, z, m, d, y;
unsigned long daysPer400Years = 146097UL;
unsigned long fudgedDaysPer4000Years = 1460970UL + 31UL;
-
+
x = jdn + 68569UL;
z = 4UL * x / daysPer400Years;
x = x - (daysPer400Years * z + 3UL) / 4UL;
@@ -721,83 +843,110 @@ static void neol_jdn_to_ymd(unsigned long jdn,
x = m / 11UL;
m = m + 2UL - 12UL * x;
y = 100UL * (z - 49UL) + y + x;
-
+
*yy = (int)y;
*mm = (int)m;
*dd = (int)d;
}
-/*
- * delay in milliseconds
- */
-static void
-neol_mdelay(int milliseconds)
-{
- struct timeval tv;
-
- if (milliseconds)
- {
- tv.tv_sec = 0;
- tv.tv_usec = milliseconds * 1000;
- select(1, NULL, NULL, NULL, &tv);
- }
+#if 0
+/*
+ * delay in milliseconds
+ */
+static void
+neol_mdelay(int milliseconds)
+{
+ struct timeval tv;
+
+ if(milliseconds)
+ {
+ tv.tv_sec = 0;
+ tv.tv_usec = milliseconds * 1000;
+ select(1, NULL, NULL, NULL, &tv);
+ }
}
+#endif
+#if !defined(NEOCLOCK4X_FIRMWARE)
static int
neol_query_firmware(int fd,
int unit,
char *firmware,
int maxlen)
{
- unsigned char tmpbuf[256];
+ char tmpbuf[256];
int len;
int lastsearch;
unsigned char c;
int last_c_was_crlf;
int last_crlf_conv_len;
int init;
- int read_tries;
+ int read_errors;
int flag = 0;
+ int chars_read;
/* wait a little bit */
- neol_mdelay(250);
+ sleep(1);
if(-1 != write(fd, "V", 1))
{
/* wait a little bit */
- neol_mdelay(250);
+ sleep(1);
memset(tmpbuf, 0x00, sizeof(tmpbuf));
-
+
len = 0;
lastsearch = 0;
last_c_was_crlf = 0;
last_crlf_conv_len = 0;
init = 1;
- read_tries = 0;
+ read_errors = 0;
+ chars_read = 0;
for(;;)
{
- if(read_tries++ > 500)
+ if(read_errors > 5)
{
msyslog(LOG_ERR, "NeoClock4X(%d): can't read firmware version (timeout)", unit);
strcpy(tmpbuf, "unknown due to timeout");
break;
}
+ if(chars_read > 500)
+ {
+ msyslog(LOG_ERR, "NeoClock4X(%d): can't read firmware version (garbage)", unit);
+ strcpy(tmpbuf, "unknown due to garbage input");
+ break;
+ }
if(-1 == read(fd, &c, 1))
{
- neol_mdelay(25);
+ if(EAGAIN != errno)
+ {
+ msyslog(LOG_DEBUG, "NeoClock4x(%d): read: %s", unit ,strerror(errno));
+ read_errors++;
+ }
+ else
+ {
+ sleep(1);
+ }
continue;
}
+ else
+ {
+ chars_read++;
+ }
+
if(init)
{
if(0xA9 != c) /* wait for (c) char in input stream */
continue;
-
+
strcpy(tmpbuf, "(c)");
len = 3;
init = 0;
continue;
}
-
- //msyslog(LOG_NOTICE, "NeoClock4X(%d): firmware %c = %02Xh", unit, c, c);
+
+#if 0
+ msyslog(LOG_NOTICE, "NeoClock4X(%d): firmware %c = %02Xh", unit, c, c);
+#endif
+
if(0x0A == c || 0x0D == c)
{
if(last_c_was_crlf)
@@ -823,7 +972,7 @@ neol_query_firmware(int fd,
{
last_c_was_crlf = 0;
if(0x00 != c)
- tmpbuf[len++] = c;
+ tmpbuf[len++] = (char) c;
}
tmpbuf[len] = '\0';
if(len > sizeof(tmpbuf)-5)
@@ -846,7 +995,35 @@ neol_query_firmware(int fd,
return (flag);
}
-
+
+static int
+neol_check_firmware(int unit,
+ const char *firmware,
+ char *firmwaretag)
+{
+ char *ptr;
+
+ *firmwaretag = '?';
+ ptr = strstr(firmware, "NDF:");
+ if(NULL != ptr)
+ {
+ if((strlen(firmware) - strlen(ptr)) >= 7)
+ {
+ if(':' == *(ptr+5) && '*' == *(ptr+6))
+ *firmwaretag = *(ptr+4);
+ }
+ }
+
+ if('A' != *firmwaretag)
+ {
+ msyslog(LOG_CRIT, "NeoClock4X(%d): firmware version \"%c\" not supported with this driver version!", unit, *firmwaretag);
+ return (0);
+ }
+
+ return (1);
+}
+#endif
+
#else
int refclock_neoclock4x_bs;
#endif /* REFCLOCK */
@@ -858,7 +1035,34 @@ int refclock_neoclock4x_bs;
* 2002/04/27 cjh
* Revision 1.0 first release
*
- * 2002/0715 cjh
+ * 2002/07/15 cjh
* preparing for bitkeeper reposity
*
+ * 2002/09/09 cjh
+ * Revision 1.1
+ * - don't assume sprintf returns an int anymore
+ * - change the way the firmware version is read
+ * - some customers would like to put a device called
+ * data diode to the NeoClock4X device to disable
+ * the write line. We need to now the firmware
+ * version even in this case. We made a compile time
+ * definition in this case. The code was previously
+ * only available on request.
+ *
+ * 2003/01/08 cjh
+ * Revision 1.11
+ * - changing xprinf to xnprinf to avoid buffer overflows
+ * - change some logic
+ * - fixed memory leaks if drivers can't initialize
+ *
+ * 2003/01/10 cjh
+ * Revision 1.12
+ * - replaced ldiv
+ * - add code to support FreeBSD
+ *
+ * 2003/07/07 cjh
+ * Revision 1.13
+ * - fix reporting of clock status
+ * changes. previously a bad clock
+ * status was never reset.
*/
diff --git a/contrib/ntp/ntpd/refclock_nmea.c b/contrib/ntp/ntpd/refclock_nmea.c
index e9304eed11ec..28d62630d17a 100644
--- a/contrib/ntp/ntpd/refclock_nmea.c
+++ b/contrib/ntp/ntpd/refclock_nmea.c
@@ -7,6 +7,11 @@
#include <config.h>
#endif
+#if defined(SYS_WINNT)
+#undef close
+#define close closesocket
+#endif
+
#if defined(REFCLOCK) && defined(CLOCK_NMEA)
#include "ntpd.h"
@@ -147,14 +152,15 @@ nmea_start(
*/
(void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
+ fd = refclock_open(device, SPEED232, LDISC_CLK);
+ if (fd < 0)
return (0);
/*
* Allocate and initialize unit structure
*/
- if (!(up = (struct nmeaunit *)
- emalloc(sizeof(struct nmeaunit)))) {
+ up = (struct nmeaunit *)emalloc(sizeof(struct nmeaunit));
+ if (up == NULL) {
(void) close(fd);
return (0);
}
@@ -380,7 +386,7 @@ nmea_receive(
peer = (struct peer *)rbufp->recv_srcclock;
pp = peer->procptr;
up = (struct nmeaunit *)pp->unitptr;
- rd_lencode = refclock_gtlin(rbufp, rd_lastcode, BMAX, &rd_tmp);
+ rd_lencode = (u_short)refclock_gtlin(rbufp, rd_lastcode, BMAX, &rd_tmp);
/*
* There is a case that a <CR><LF> gives back a "blank" line
@@ -433,8 +439,8 @@ nmea_receive(
/* See if I want to process this message type */
- if ( ((peer->ttlmax == 0) && (cmdtype != GPRMC))
- || ((peer->ttlmax != 0) && !(cmdtype & peer->ttlmax)) )
+ if ( ((peer->ttl == 0) && (cmdtype != GPRMC))
+ || ((peer->ttl != 0) && !(cmdtype & peer->ttl)) )
return;
pp->lencode = rd_lencode;
@@ -530,21 +536,21 @@ nmea_receive(
/* Default to 0 milliseconds, if decimal convert milliseconds in
one, two or three digits
*/
- pp->msec = 0;
+ pp->nsec = 0;
if (dp[6] == '.') {
if (isdigit((int)dp[7])) {
- pp->msec = (dp[7] - '0') * 100;
+ pp->nsec = (dp[7] - '0') * 100000000;
if (isdigit((int)dp[8])) {
- pp->msec += (dp[8] - '0') * 10;
+ pp->nsec += (dp[8] - '0') * 10000000;
if (isdigit((int)dp[9])) {
- pp->msec += (dp[9] - '0');
+ pp->nsec += (dp[9] - '0') * 1000000;
}
}
}
}
if (pp->hour > 23 || pp->minute > 59 || pp->second > 59
- || pp->msec > 1000) {
+ || pp->nsec > 1000000000) {
refclock_report(peer, CEVNT_BADTIME);
return;
}
@@ -604,7 +610,7 @@ nmea_receive(
*/
if (nmea_pps(up, &rd_tmp) == 1) {
pp->lastrec = up->tstamp = rd_tmp;
- pp->msec = 0;
+ pp->nsec = 0;
}
#endif /* HAVE_PPSAPI */
@@ -630,7 +636,7 @@ nmea_receive(
if (!up->polled)
return;
up->polled = 0;
-
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
/* If we get here - what we got from the clock is OK, so say so */
diff --git a/contrib/ntp/ntpd/refclock_oncore.c b/contrib/ntp/ntpd/refclock_oncore.c
index 43a38fb6dd71..14db92f27d42 100644
--- a/contrib/ntp/ntpd/refclock_oncore.c
+++ b/contrib/ntp/ntpd/refclock_oncore.c
@@ -9,8 +9,9 @@
* refclock_oncore.c
*
* Driver for some of the various the Motorola Oncore GPS receivers.
- * should work with Basic, PVT6, VP, UT, UT+, GT, GT+, SL, M12.
- * The receivers with TRAIM (VP, UT, UT+), will be more accurate than the others.
+ * should work with Basic, PVT6, VP, UT, UT+, GT, GT+, SL, M12, M12+T
+ * The receivers with TRAIM (VP, UT, UT+, M12+T), will be more accurate
+ * than the others.
* The receivers without position hold (GT, GT+) will be less accurate.
*
* Tested with:
@@ -28,16 +29,16 @@
* OPTIONS LIST IB
*
* (Basic) (M12)
- * COPYRIGHT 1991-1996 MOTOROLA INC. COPYRIGHT 1991-2000 MOTOROLA INC.
- * SFTW P/N # 98-P36830P SFTW P/N # 61-G10002A
- * SOFTWARE VER # 8 SOFTWARE VER # 1
- * SOFTWARE REV # 8 SOFTWARE REV # 3
- * SOFTWARE DATE 06 Aug 1996 SOFTWARE DATE Mar 13 2000
- * MODEL # B4121P1155 MODEL # P143T12NR1
+ * COPYRIGHT 1991-1994 MOTOROLA INC. COPYRIGHT 1991-2000 MOTOROLA INC.
+ * SFTW P/N # 98-P39949M SFTW P/N # 61-G10002A
+ * SOFTWARE VER # 5 SOFTWARE VER # 1
+ * SOFTWARE REV # 0 SOFTWARE REV # 3
+ * SOFTWARE DATE 20 JAN 1994 SOFTWARE DATE Mar 13 2000
+ * MODEL # A11121P116 MODEL # P143T12NR1
* HDWR P/N # _ HWDR P/N # 1
- * SERIAL # SSG0226478 SERIAL # P003UD
- * MANUFACTUR DATE 7E02 MANUFACTUR DATE 0C27
- * OPTIONS LIST IB
+ * SERIAL # SSG0049809 SERIAL # P003UD
+ * MANUFACTUR DATE 417AMA199 MANUFACTUR DATE 0C27
+ * OPTIONS LIST AB
*
* --------------------------------------------------------------------------
* This code uses the two devices
@@ -138,7 +139,9 @@ struct ppsclockev {
enum receive_state {
ONCORE_NO_IDEA,
- ONCORE_ID_SENT,
+ ONCORE_CHECK_ID,
+ ONCORE_CHECK_CHAN,
+ ONCORE_HAVE_CHAN,
ONCORE_RESET_SENT,
ONCORE_TEST_SENT,
ONCORE_INIT,
@@ -154,6 +157,14 @@ enum site_survey_state {
ONCORE_SS_DONE
};
+enum antenna_state {
+ ONCORE_ANTENNA_UNKNOWN = -1,
+ ONCORE_ANTENNA_OK = 0,
+ ONCORE_ANTENNA_OC = 1,
+ ONCORE_ANTENNA_UC = 2,
+ ONCORE_ANTENNA_NV = 3
+};
+
/* Model Name, derived from the @@Cj message.
* Used to initialize some variables.
*/
@@ -204,7 +215,7 @@ struct instance {
int ttyfd; /* TTY file descriptor */
int ppsfd; /* PPS file descriptor */
- int statusfd; /* Status shm descriptor */
+ int shmemfd; /* Status shm descriptor */
#ifdef HAVE_PPSAPI
pps_handle_t pps_h;
pps_params_t pps_p;
@@ -212,6 +223,7 @@ struct instance {
enum receive_state o_state; /* Receive state */
enum posn_mode mode; /* 0D, 2D, 3D */
enum site_survey_state site_survey; /* Site Survey state */
+ enum antenna_state ant_state; /* antenna state */
int Bj_day;
@@ -224,9 +236,10 @@ struct instance {
u_int shmem_Ba;
u_int shmem_Ea;
u_int shmem_Ha;
- u_char shmem_first;
u_char shmem_reset;
u_char shmem_Posn;
+ u_char shmem_bad_Ea;
+ u_char almanac_from_shmem;
double ss_lat;
double ss_long;
@@ -240,59 +253,98 @@ struct instance {
u_int revision;
u_char chan; /* 6 for PVT6 or BASIC, 8 for UT/VP, 12 for m12, 0 if unknown */
- s_char traim; /* do we have traim? yes UT/VP, no BASIC, GT, -1 unknown, 0 no, +1 yes */
+ s_char traim; /* do we have traim? yes UT/VP, no BASIC, GT, M12+T, -1 unknown, 0 no, +1 yes */
+
+ /* the following 7 are all timing counters */
u_char traim_delay; /* seconds counter, waiting for reply */
+ u_char count; /* cycles thru Ea before starting */
+ u_char count1; /* cycles thru Ea after SS_TESTING, waiting for SS_HW */
+ u_char count2; /* cycles thru Ea after count, to check for @@Ea */
+ u_char count3; /* cycles thru Ea checking for # channels */
+ u_char count4; /* cycles thru leap after Gj to issue Bj */
+ u_char pollcnt;
+ u_char timeout; /* count to retry Cj after Fa self-test */
struct RSM rsm; /* bits extracted from Receiver Status Msg in @@Ea */
u_char printed;
u_char polled;
- int pollcnt;
- u_int ev_serial;
+ u_long ev_serial;
int Rcvptr;
u_char Rcvbuf[500];
- u_char Ea[160]; /* Ba, Ea or Ha */
- u_char En[70]; /* Bn or En */
+ u_char BEHa[160]; /* Ba, Ea or Ha */
+ u_char BEHn[80]; /* Bn , En , or Hn */
u_char Cj[300];
- u_char As;
- u_char Ay;
- u_char Az;
+ u_char Ag; /* Satellite mask angle */
+ u_char saw_At;
+ u_char saw_Ay;
+ u_char saw_Az;
+ s_char saw_Gj;
u_char have_dH;
u_char init_type;
s_char saw_tooth;
- u_int timeout; /* count to retry Cj after Fa self-test */
- u_char count; /* cycles thru Ea before starting */
+ s_char chan_in; /* chan number from INPUT, will always use it */
+ u_char chan_id; /* chan number determined from part number */
+ u_char chan_ck; /* chan number determined by sending commands to hardware */
+ s_char traim_in; /* TRAIM from INPUT, will always use it */
+ s_char traim_id; /* TRAIM determined from part number */
+ u_char traim_ck; /* TRAIM determined by sending commands to hardware */
+ u_char once; /* one pass code at top of BaEaHa */
s_char assert;
- u_int saw_At;
+ u_char hardpps;
};
#define rcvbuf instance->Rcvbuf
#define rcvptr instance->Rcvptr
-static void oncore_consume P((struct instance *));
-static void oncore_poll P((int, struct peer *));
-static void oncore_read_config P((struct instance *));
-static void oncore_receive P((struct recvbuf *));
-static void oncore_sendmsg P((int fd, u_char *, size_t));
-static void oncore_shutdown P((int, struct peer *));
-static int oncore_start P((int, struct peer *));
-static void oncore_get_timestamp P((struct instance *, long, long));
-static void oncore_init_shmem P((struct instance *));
-static void oncore_print_As P((struct instance *));
+static int oncore_start P((int, struct peer *));
+static void oncore_control P((int, struct refclockstat *, struct refclockstat *, struct peer *));
+static void oncore_poll P((int, struct peer *));
+static void oncore_shutdown P((int, struct peer *));
+static void oncore_consume P((struct instance *));
+static void oncore_read_config P((struct instance *));
+static void oncore_receive P((struct recvbuf *));
+static int oncore_ppsapi P((struct instance *));
+static void oncore_get_timestamp P((struct instance *, long, long));
+static void oncore_init_shmem P((struct instance *));
+
+static void oncore_antenna_report P((struct instance *, enum antenna_state));
+static void oncore_chan_test P((struct instance *));
+static void oncore_check_almanac P((struct instance *));
+static void oncore_check_antenna P((struct instance *));
+static void oncore_check_leap_sec P((struct instance *));
+static int oncore_checksum_ok P((u_char *, int));
+static void oncore_compute_dH P((struct instance *));
+static void oncore_load_almanac P((struct instance *));
+static void oncore_print_Cb P((struct instance *, u_char *));
+/* static void oncore_print_array P((u_char *, int)); */
+static void oncore_print_posn P((struct instance *));
+static void oncore_sendmsg P((int, u_char *, size_t));
+static void oncore_set_posn P((struct instance *));
+static void oncore_set_traim P((struct instance *));
+static void oncore_shmem_get_3D P((struct instance *));
+static void oncore_ss P((struct instance *));
+static int oncore_wait_almanac P((struct instance *));
static void oncore_msg_any P((struct instance *, u_char *, size_t, int));
+static void oncore_msg_Adef P((struct instance *, u_char *, size_t));
+static void oncore_msg_Ag P((struct instance *, u_char *, size_t));
static void oncore_msg_As P((struct instance *, u_char *, size_t));
static void oncore_msg_At P((struct instance *, u_char *, size_t));
static void oncore_msg_Ay P((struct instance *, u_char *, size_t));
static void oncore_msg_Az P((struct instance *, u_char *, size_t));
static void oncore_msg_BaEaHa P((struct instance *, u_char *, size_t));
+static void oncore_msg_Bd P((struct instance *, u_char *, size_t));
static void oncore_msg_Bj P((struct instance *, u_char *, size_t));
-static void oncore_msg_BnEn P((struct instance *, u_char *, size_t));
+static void oncore_msg_BnEnHn P((struct instance *, u_char *, size_t));
static void oncore_msg_CaFaIa P((struct instance *, u_char *, size_t));
static void oncore_msg_Cb P((struct instance *, u_char *, size_t));
static void oncore_msg_Cf P((struct instance *, u_char *, size_t));
static void oncore_msg_Cj P((struct instance *, u_char *, size_t));
static void oncore_msg_Cj_id P((struct instance *, u_char *, size_t));
static void oncore_msg_Cj_init P((struct instance *, u_char *, size_t));
+static void oncore_msg_Ga P((struct instance *, u_char *, size_t));
+static void oncore_msg_Gb P((struct instance *, u_char *, size_t));
+static void oncore_msg_Gd P((struct instance *, u_char *, size_t));
static void oncore_msg_Gj P((struct instance *, u_char *, size_t));
static void oncore_msg_Sz P((struct instance *, u_char *, size_t));
@@ -300,7 +352,7 @@ struct refclock refclock_oncore = {
oncore_start, /* start up driver */
oncore_shutdown, /* shut down driver */
oncore_poll, /* transmit poll message */
- noentry, /* not used */
+ oncore_control, /* fudge (flag) control messages */
noentry, /* not used */
noentry, /* not used */
NOFLAGS /* not used */
@@ -322,13 +374,15 @@ static struct msg_desc {
{ "Ea", 76, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdimsdimsdsC" },
{ "Ba", 68, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdsC" },
{ "Ha", 154, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmaaaaoooohhhhmmmmVVvvhhddntimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddssrrccooooTTushmvvvvvvC" },
- { "En", 69, oncore_msg_BnEn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffsffffsffffC" },
- { "Bn", 59, oncore_msg_BnEn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffC" },
+ { "Bn", 59, oncore_msg_BnEnHn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffC" },
+ { "En", 69, oncore_msg_BnEnHn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffsffffsffffC" },
+ { "Hn", 78, oncore_msg_BnEnHn, "" },
{ "Ab", 10, 0, "" },
{ "Ac", 11, 0, "" },
- { "Ad", 11, 0, "" },
- { "Ae", 11, 0, "" },
- { "Af", 15, 0, "" },
+ { "Ad", 11, oncore_msg_Adef, "" },
+ { "Ae", 11, oncore_msg_Adef, "" },
+ { "Af", 15, oncore_msg_Adef, "" },
+ { "Ag", 8, oncore_msg_Ag, "" }, /* Satellite mask angle */
{ "As", 20, oncore_msg_As, "" },
{ "At", 8, oncore_msg_At, "" },
{ "Au", 12, 0, "" },
@@ -338,6 +392,7 @@ static struct msg_desc {
{ "Az", 11, oncore_msg_Az, "" },
{ "AB", 8, 0, "" },
{ "Bb", 92, 0, "" },
+ { "Bd", 23, oncore_msg_Bd, "" },
{ "Bj", 8, oncore_msg_Bj, "" },
{ "Ca", 9, oncore_msg_CaFaIa, "" },
{ "Cb", 33, oncore_msg_Cb, "" },
@@ -347,132 +402,92 @@ static struct msg_desc {
{ "Cj", 294, oncore_msg_Cj, "" },
{ "Ek", 71, 0, "" },
{ "Fa", 9, oncore_msg_CaFaIa, "" },
- { "Gd", 8, 0, "" },
+ { "Ga", 20, oncore_msg_Ga, "" },
+ { "Gb", 17, oncore_msg_Gb, "" },
+ { "Gc", 8, 0, "" },
+ { "Gd", 8, oncore_msg_Gd, "" },
+ { "Ge", 8, 0, "" },
{ "Gj", 21, oncore_msg_Gj, "" },
{ "Ia", 10, oncore_msg_CaFaIa, "" },
{ "Sz", 8, oncore_msg_Sz, "" },
{ {0}, 7, 0, "" }
};
-/*
- * Position Set.
- */
-u_char oncore_cmd_Ad[] = { 'A', 'd', 0,0,0,0 };
-u_char oncore_cmd_Ae[] = { 'A', 'e', 0,0,0,0 };
-u_char oncore_cmd_Af[] = { 'A', 'f', 0,0,0,0, 0 };
-u_char oncore_cmd_Ga[] = { 'G', 'a', 0,0,0,0, 0,0,0,0, 0,0,0,0, 0 };
-
-/*
- * Position-Hold Mode
- * Start automatic site survey
- */
-static u_char oncore_cmd_At0[] = { 'A', 't', 0 }; /* Posn Hold off */
-static u_char oncore_cmd_At1[] = { 'A', 't', 1 }; /* Posn Hold on */
-static u_char oncore_cmd_At2[] = { 'A', 't', 2 }; /* Start Site Survey */
-
-/*
- * 0D/2D Position and Set.
- */
-u_char oncore_cmd_As[] = { 'A', 's', 0,0,0,0, 0,0,0,0, 0,0,0,0, 0 };
-u_char oncore_cmd_Asx[]= { 'A', 's', 0x7f, 0xff, 0xff, 0xff,
- 0x7f, 0xff, 0xff, 0xff,
- 0x7f, 0xff, 0xff, 0xff, 0xff };
-u_char oncore_cmd_Au[] = { 'A', 'u', 0,0,0,0,0 };
-
-u_char oncore_cmd_Av0[] = { 'A', 'v', 0 };
-u_char oncore_cmd_Av1[] = { 'A', 'v', 1 };
-
-u_char oncore_cmd_Gd0[] = { 'G', 'd', 0 }; /* 3D */
-u_char oncore_cmd_Gd1[] = { 'G', 'd', 1 }; /* 0D */
-u_char oncore_cmd_Gd2[] = { 'G', 'd', 2 }; /* 2D */
-
-/*
- * Set to UTC time (not GPS).
- */
-u_char oncore_cmd_Aw[] = { 'A', 'w', 1 };
-
-/*
- * Output Almanac when it changes
- */
-u_char oncore_cmd_Be[] = { 'B', 'e', 1 };
-/*
- * Read back PPS Offset for Output
- */
-u_char oncore_cmd_Ay[] = { 'A', 'y', 0, 0, 0, 0 };
-u_char oncore_cmd_Ayx[] = { 'A', 'y', 0xff, 0xff, 0xff, 0xff };
-
-/*
- * Read back Cable Delay for Output
+static u_char oncore_cmd_Aa[] = { 'A', 'a', 0, 0, 0 }; /* 6/8 Time of Day */
+static u_char oncore_cmd_Ab[] = { 'A', 'b', 0, 0, 0 }; /* 6/8 GMT Correction */
+static u_char oncore_cmd_AB[] = { 'A', 'B', 4 }; /* VP Application Type: Static */
+static u_char oncore_cmd_Ac[] = { 'A', 'c', 0, 0, 0, 0 }; /* 6/8 Date */
+static u_char oncore_cmd_Ad[] = { 'A', 'd', 0,0,0,0 }; /* 6/8 Latitude */
+static u_char oncore_cmd_Ae[] = { 'A', 'e', 0,0,0,0 }; /* 6/8 Longitude */
+static u_char oncore_cmd_Af[] = { 'A', 'f', 0,0,0,0, 0 }; /* 6/8 Height */
+static u_char oncore_cmd_Ag[] = { 'A', 'g', 0 }; /* 6/8/12 Satellite Mask Angle */
+static u_char oncore_cmd_Agx[] = { 'A', 'g', 0xff }; /* 6/8/12 Satellite Mask Angle: read */
+static u_char oncore_cmd_As[] = { 'A', 's', 0,0,0,0, 0,0,0,0, 0,0,0,0, 0 }; /* 6/8/12 Posn Hold Parameters */
+static u_char oncore_cmd_Asx[] = { 'A', 's', 0x7f,0xff,0xff,0xff, /* 6/8/12 Posn Hold Readback */
+ 0x7f,0xff,0xff,0xff, /* on UT+ this doesnt work with 0xff */
+ 0x7f,0xff,0xff,0xff, 0xff }; /* but does work with 0x7f (sigh). */
+static u_char oncore_cmd_At0[] = { 'A', 't', 0 }; /* 6/8 Posn Hold: off */
+static u_char oncore_cmd_At1[] = { 'A', 't', 1 }; /* 6/8 Posn Hold: on */
+static u_char oncore_cmd_At2[] = { 'A', 't', 2 }; /* 6/8 Posn Hold: Start Site Survey */
+static u_char oncore_cmd_Atx[] = { 'A', 't', 0xff }; /* 6/8 Posn Hold: Read Back */
+static u_char oncore_cmd_Au[] = { 'A', 'u', 0,0,0,0, 0 }; /* GT/M12 Altitude Hold Ht. */
+static u_char oncore_cmd_Av0[] = { 'A', 'v', 0 }; /* VP/GT Altitude Hold: off */
+static u_char oncore_cmd_Av1[] = { 'A', 'v', 1 }; /* VP/GT Altitude Hold: on */
+static u_char oncore_cmd_Aw[] = { 'A', 'w', 1 }; /* 6/8/12 UTC/GPS time selection */
+static u_char oncore_cmd_Ay[] = { 'A', 'y', 0, 0, 0, 0 }; /* Timing 1PPS time offset: set */
+static u_char oncore_cmd_Ayx[] = { 'A', 'y', 0xff, 0xff, 0xff, 0xff }; /* Timing 1PPS time offset: Read */
+static u_char oncore_cmd_Az[] = { 'A', 'z', 0, 0, 0, 0 }; /* 6/8UT/12 1PPS Cable Delay: set */
+static u_char oncore_cmd_Azx[] = { 'A', 'z', 0xff, 0xff, 0xff, 0xff }; /* 6/8UT/12 1PPS Cable Delay: Read */
+static u_char oncore_cmd_Ba0[] = { 'B', 'a', 0 }; /* 6 Position/Data/Status: off */
+static u_char oncore_cmd_Ba[] = { 'B', 'a', 1 }; /* 6 Position/Data/Status: on */
+static u_char oncore_cmd_Bb[] = { 'B', 'b', 1 }; /* 6/8/12 Visible Satellites */
+static u_char oncore_cmd_Bd[] = { 'B', 'd', 1 }; /* 6/8/12? Almanac Status Msg. */
+static u_char oncore_cmd_Be[] = { 'B', 'e', 1 }; /* 6/8/12 Request Almanac Data */
+static u_char oncore_cmd_Bj[] = { 'B', 'j', 0 }; /* 6/8 Leap Second Pending */
+static u_char oncore_cmd_Bn0[] = { 'B', 'n', 0, 1, 0,10, 2, 0,0,0, 0,0,0,0,0,0,0 }; /* 6 TRAIM setup/status: msg off, traim on */
+static u_char oncore_cmd_Bn[] = { 'B', 'n', 1, 1, 0,10, 2, 0,0,0, 0,0,0,0,0,0,0 }; /* 6 TRAIM setup/status: msg on traim on */
+static u_char oncore_cmd_Bnx[] = { 'B', 'n', 1, 0, 0,10, 2, 0,0,0, 0,0,0,0,0,0,0 }; /* 6 TRAIM setup/status: msg on traim off */
+static u_char oncore_cmd_Ca[] = { 'C', 'a' }; /* 6 Self Test */
+static u_char oncore_cmd_Cf[] = { 'C', 'f' }; /* 6/8/12 Set to Defaults */
+static u_char oncore_cmd_Cg[] = { 'C', 'g', 1 }; /* VP Posn Fix/Idle Mode */
+static u_char oncore_cmd_Cj[] = { 'C', 'j' }; /* 6/8/12 Receiver ID */
+static u_char oncore_cmd_Ea0[] = { 'E', 'a', 0 }; /* 8 Position/Data/Status: off */
+static u_char oncore_cmd_Ea[] = { 'E', 'a', 1 }; /* 8 Position/Data/Status: on */
+static u_char oncore_cmd_Ek[] = { 'E', 'k', 0 }; /* just turn off */ /* 8 Posn/Status/Data - extension */
+static u_char oncore_cmd_En0[] = { 'E', 'n', 0, 1, 0,10, 2, 0,0,0, 0,0,0,0,0,0,0 }; /* 8/GT TRAIM setup/status: msg off, traim on */
+static u_char oncore_cmd_En[] = { 'E', 'n', 1, 1, 0,10, 2, 0,0,0, 0,0,0,0,0,0,0 }; /* 8/GT TRAIM setup/status: msg on traim on */
+static u_char oncore_cmd_Enx[] = { 'E', 'n', 1, 0, 0,10, 2, 0,0,0, 0,0,0,0,0,0,0 }; /* 8/GT TRAIM setup/status: msg on traim off */
+static u_char oncore_cmd_Fa[] = { 'F', 'a' }; /* 8 Self Test */
+static u_char oncore_cmd_Ga[] = { 'G', 'a', 0,0,0,0, 0,0,0,0, 0,0,0,0, 0 }; /* 12 Position Set */
+static u_char oncore_cmd_Gax[] = { 'G', 'a', 0xff, 0xff, 0xff, 0xff, /* 12 Position Set: Read */
+ 0xff, 0xff, 0xff, 0xff, /* */
+ 0xff, 0xff, 0xff, 0xff, 0xff }; /* */
+static u_char oncore_cmd_Gb[] = { 'G', 'b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* 12 set Date/Time */
+static u_char oncore_cmd_Gc[] = { 'G', 'c', 1 }; /* 12 PPS Control: On Cont */
+static u_char oncore_cmd_Gd0[] = { 'G', 'd', 0 }; /* 12 Position Control: 3D (no hold) */
+static u_char oncore_cmd_Gd1[] = { 'G', 'd', 1 }; /* 12 Position Control: 0D (3D hold) */
+static u_char oncore_cmd_Gd2[] = { 'G', 'd', 2 }; /* 12 Position Control: 2D (Alt Hold) */
+static u_char oncore_cmd_Gd3[] = { 'G', 'd', 3 }; /* 12 Position Coltrol: Start Site Survey */
+static u_char oncore_cmd_Ge0[] = { 'G', 'e', 0 }; /* M12+T TRAIM: off */
+static u_char oncore_cmd_Ge[] = { 'G', 'e', 1 }; /* M12+T TRAIM: on */
+static u_char oncore_cmd_Gj[] = { 'G', 'j' }; /* 8?/12 Leap Second Pending */
+static u_char oncore_cmd_Ha0[] = { 'H', 'a', 0 }; /* 12 Position/Data/Status: off */
+static u_char oncore_cmd_Ha[] = { 'H', 'a', 1 }; /* 12 Position/Data/Status: on */
+static u_char oncore_cmd_Hn0[] = { 'H', 'n', 0 }; /* 12 TRAIM Status: off */
+static u_char oncore_cmd_Hn[] = { 'H', 'n', 1 }; /* 12 TRAIM Status: on */
+static u_char oncore_cmd_Ia[] = { 'I', 'a' }; /* 12 Self Test */
+
+/* it appears that as of 1997/1998, the UT had As,At, but not Au,Av
+ * the GT had Au,Av, but not As,At
+ * This was as of v2.0 of both firmware sets. possibly 1.3 for UT.
+ * Bj in UT at v1.3
+ * dont see Bd in UT/GT thru 1999
+ * Gj in UT as of 3.0, 1999 , Bj as of 1.3
*/
-u_char oncore_cmd_Az[] = { 'A', 'z', 0, 0, 0, 0 };
-u_char oncore_cmd_Azx[] = { 'A', 'z', 0xff, 0xff, 0xff, 0xff };
-/*
- * Application type = static.
- */
-u_char oncore_cmd_AB[] = { 'A', 'B', 4 };
-
-/*
- * Visible Satellite Status Msg.
- */
-u_char oncore_cmd_Bb[] = { 'B', 'b', 1 };
-
-/*
- * Leap Second Pending Message
- * Request message once
- */
-u_char oncore_cmd_Bj[] = { 'B', 'j', 0 };
-u_char oncore_cmd_Gj[] = { 'G', 'j' };
-
-/*
- * Set to Defaults
- */
-static u_char oncore_cmd_Cf[] = { 'C', 'f' };
-
-/*
- * Set to Position Fix mode (only needed on VP).
- */
-u_char oncore_cmd_Cg[] = { 'C', 'g', 1 };
-
-/*
- * Receiver Id
- */
-static u_char oncore_cmd_Cj[] = { 'C', 'j' };
-
-/*
- * Position/Status/Data message
- * Send once per second
- */
-static u_char oncore_cmd_Ea[] = { 'E', 'a', 1 };
-static u_char oncore_cmd_Ba[] = { 'B', 'a', 1 };
-static u_char oncore_cmd_Ha[] = { 'H', 'a', 1 };
-static u_char oncore_cmd_Ea0[] = { 'E', 'a', 0 };
-static u_char oncore_cmd_Ba0[] = { 'B', 'a', 0 };
-
-/*
- * Position/Status Extension Msg
- */
-u_char oncore_cmd_Ek[] = { 'E', 'k', 0 }; /* just turn off */
-
-/*
- * Time Raim Setup & Status Message
- * Send once per second
- * Time-RAIM on
- * Alarm limit 1us
- * PPS on when we have the first sat
- */
-static u_char oncore_cmd_En[] = { 'E', 'n', 1, 1, 0,10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-static u_char oncore_cmd_En0[] = { 'E', 'n', 0, 1, 0,10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-static u_char oncore_cmd_Bn[] = { 'B', 'n', 1, 1, 0,10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-static u_char oncore_cmd_Bn0[] = { 'B', 'n', 0, 1, 0,10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-
-/*
- * Self-test
- */
-static u_char oncore_cmd_Ca[] = { 'C', 'a' }; /* 6 Chan */
-static u_char oncore_cmd_Fa[] = { 'F', 'a' }; /* 8 Chan */
-static u_char oncore_cmd_Ia[] = { 'I', 'a' }; /* 12 Chan */
+static char *Month[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jly",
+ "Aug", "Sep", "Oct", "Nov", "Dec" };
#define DEVICE1 "/dev/oncore.serial.%d" /* name of serial device */
#define DEVICE2 "/dev/oncore.pps.%d" /* name of pps device */
@@ -502,10 +517,6 @@ static u_char oncore_cmd_Ia[] = { 'I', 'a' }; /* 12 Chan */
/* from buffer, char *buf, result to an int */
#define buf_w32(buf) (((buf)[0]&0200) ? (-(~w32(buf)+1)) : w32(buf))
-extern int pps_assert;
-extern int pps_hardpps;
-
-
/*
* oncore_start - initialize data for processing
@@ -519,7 +530,7 @@ oncore_start(
{
register struct instance *instance;
struct refclockproc *pp;
- int fd1, fd2, mode;
+ int fd1, fd2;
char device1[30], device2[30];
const char *cp;
struct stat stat1, stat2;
@@ -548,6 +559,14 @@ oncore_start(
exit(1);
}
+ /* create instance structure for this unit */
+
+ if (!(instance = (struct instance *) malloc(sizeof *instance))) {
+ perror("malloc");
+ return (0);
+ }
+ memset((char *) instance, 0, sizeof *instance);
+
if ((stat1.st_dev == stat2.st_dev) && (stat1.st_ino == stat2.st_ino)) {
/* same device here */
if (!(fd1 = refclock_open(device1, SPEED, LDISC_RAW
@@ -559,7 +578,7 @@ oncore_start(
exit(1);
}
fd2 = fd1;
- } else { /* different devices here */
+ } else { /* different devices here */
if (!(fd1=refclock_open(device1, SPEED, LDISC_RAW))) {
perror("ONCORE: fd1");
exit(1);
@@ -570,24 +589,18 @@ oncore_start(
}
}
- /* Devices now open, create instance structure for this unit */
-
- if (!(instance = (struct instance *) malloc(sizeof *instance))) {
- perror("malloc");
- close(fd1);
- return (0);
- }
- memset((char *) instance, 0, sizeof *instance);
-
- /* link instance up and down */
+ /* initialize miscellaneous variables */
pp = peer->procptr;
pp->unitptr = (caddr_t) instance;
instance->pp = pp;
instance->unit = unit;
instance->peer = peer;
+ instance->assert = 1;
+ instance->once = 1;
- /* initialize miscellaneous variables */
+ cp = "ONCORE DRIVER -- CONFIGURING";
+ record_clock_stats(&(instance->peer->srcadr), cp);
instance->o_state = ONCORE_NO_IDEA;
cp = "state = ONCORE_NO_IDEA";
@@ -597,11 +610,14 @@ oncore_start(
instance->ppsfd = fd2;
instance->Bj_day = -1;
- instance->assert = pps_assert;
instance->traim = -1;
+ instance->traim_in = -1;
+ instance->chan_in = -1;
instance->model = ONCORE_UNKNOWN;
instance->mode = MODE_UNKNOWN;
instance->site_survey = ONCORE_SS_UNKNOWN;
+ instance->Ag = 0xff; /* Satellite mask angle, unset by user */
+ instance->ant_state = ONCORE_ANTENNA_UNKNOWN;
peer->precision = -26;
peer->minpoll = 4;
@@ -609,7 +625,7 @@ oncore_start(
pp->clockdesc = "Motorola Oncore GPS Receiver";
memcpy((char *)&pp->refid, "GPS\0", (size_t) 4);
- /* go read any input data in /etc/ntp.oncoreX */
+ /* go read any input data in /etc/ntp.oncoreX or /etc/ntp/oncore.X */
oncore_read_config(instance);
@@ -619,15 +635,183 @@ oncore_start(
return(0);
}
+ if (instance->assert)
+ cp = "Initializing timing to Assert.";
+ else
+ cp = "Initializing timing to Clear.";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+
+ if (instance->hardpps) {
+ cp = "HARDPPS Set.";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ }
+
+ if (!oncore_ppsapi(instance))
+ return(0);
+#endif
+
+ pp->io.clock_recv = oncore_receive;
+ pp->io.srcclock = (caddr_t)peer;
+ pp->io.datalen = 0;
+ pp->io.fd = fd1;
+ if (!io_addclock(&pp->io)) {
+ perror("io_addclock");
+ (void) close(fd1);
+ free(instance);
+ return (0);
+ }
+
+#ifdef ONCORE_SHMEM_STATUS
+ /*
+ * Before starting ONCORE, lets setup SHMEM
+ * This will include merging an old SHMEM into the new one if
+ * an old one is found.
+ */
+
+ oncore_init_shmem(instance);
+#endif
+
+ /*
+ * This will return the Model of the Oncore receiver.
+ * and start the Initialization loop in oncore_msg_Cj.
+ */
+
+ instance->o_state = ONCORE_CHECK_ID;
+ cp = "state = ONCORE_CHECK_ID";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+
+ instance->timeout = 4;
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Cg, sizeof(oncore_cmd_Cg)); /* Set Posn Fix mode (not Idle (VP)) */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Cj, sizeof(oncore_cmd_Cj));
+
+ instance->pollcnt = 2;
+ return (1);
+}
+
+
+/*
+ * Fudge control (get Flag2 and Flag3, not available at oncore_start time.
+ */
+
+static void
+oncore_control(
+ int unit, /* unit (not used) */
+ struct refclockstat *in, /* input parameters (not used) */
+ struct refclockstat *out, /* output parameters (not used) */
+ struct peer *peer /* peer structure pointer */
+ )
+{
+ char *cp;
+ struct refclockproc *pp;
+ struct instance *instance;
+
+ pp = peer->procptr;
+ instance = (struct instance *) pp->unitptr;
+
+ instance->assert = !(pp->sloppyclockflag & CLK_FLAG2);
+ instance->hardpps = pp->sloppyclockflag & CLK_FLAG3;
+
+ if (instance->assert)
+ cp = "Resetting timing to Assert.";
+ else
+ cp = "Resetting timing to Clear.";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+
+ if (instance->hardpps) {
+ cp = "HARDPPS Set.";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ }
+
+ (void) oncore_ppsapi(instance);
+}
+
+
+
+/*
+ * oncore_shutdown - shut down the clock
+ */
+
+static void
+oncore_shutdown(
+ int unit,
+ struct peer *peer
+ )
+{
+ register struct instance *instance;
+ struct refclockproc *pp;
+
+ pp = peer->procptr;
+ instance = (struct instance *) pp->unitptr;
+
+ io_closeclock(&pp->io);
+
+ close(instance->ttyfd);
+ close(instance->ppsfd);
+ if (instance->shmemfd)
+ close(instance->shmemfd);
+ free(instance);
+}
+
+
+
+/*
+ * oncore_poll - called by the transmit procedure
+ */
+
+static void
+oncore_poll(
+ int unit,
+ struct peer *peer
+ )
+{
+ struct instance *instance;
+
+ instance = (struct instance *) peer->procptr->unitptr;
+ if (instance->timeout) {
+ char *cp;
+
+ instance->timeout--;
+ if (instance->timeout == 0) {
+ cp = "Oncore: No response from @@Cj, shutting down driver";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ oncore_shutdown(unit, peer);
+ } else {
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Cj, sizeof(oncore_cmd_Cj));
+ cp = "Oncore: Resend @@Cj";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ }
+ return;
+ }
+
+ if (!instance->pollcnt)
+ refclock_report(peer, CEVNT_TIMEOUT);
+ else
+ instance->pollcnt--;
+ peer->procptr->polls++;
+ instance->polled = 1;
+}
+
+
+
+/*
+ * Initialize PPSAPI
+ */
+
+#ifdef HAVE_PPSAPI
+static int
+oncore_ppsapi(
+ struct instance *instance
+ )
+{
+ int mode;
+
if (time_pps_getcap(instance->pps_h, &mode) < 0) {
- msyslog(LOG_ERR,
- "refclock_ioctl: time_pps_getcap failed: %m");
+ msyslog(LOG_ERR, "refclock_ioctl: time_pps_getcap failed: %m");
return (0);
}
if (time_pps_getparams(instance->pps_h, &instance->pps_p) < 0) {
- msyslog(LOG_ERR,
- "refclock_ioctl: time_pps_getparams failed: %m");
+ msyslog(LOG_ERR, "refclock_ioctl: time_pps_getparams failed: %m");
return (0);
}
@@ -652,59 +836,183 @@ oncore_start(
exit(1);
}
- if (pps_device && pps_device[0]) {
- if (stat(pps_device, &stat1)) {
- perror("ONCORE: stat pps_device");
- return(0);
- }
+ /* If HARDPPS is on, we tell kernel */
- /* must have hardpps ON, and fd2 must be the same device as on the pps line */
+ if (instance->hardpps) {
+ int i;
- if (pps_hardpps && ((stat1.st_dev == stat2.st_dev) && (stat1.st_ino == stat2.st_ino))) {
- int i;
+ if (instance->assert)
+ i = PPS_CAPTUREASSERT;
+ else
+ i = PPS_CAPTURECLEAR;
- if (instance->assert)
- i = PPS_CAPTUREASSERT;
- else
- i = PPS_CAPTURECLEAR;
-
- if (i&mode) {
- if (time_pps_kcbind(instance->pps_h, PPS_KC_HARDPPS, i,
- PPS_TSFMT_TSPEC) < 0) {
- msyslog(LOG_ERR,
- "refclock_ioctl: time_pps_kcbind failed: %m");
- return (0);
- }
- pps_enable = 1;
+ if (i&mode) {
+ if (time_pps_kcbind(instance->pps_h, PPS_KC_HARDPPS, i,
+ PPS_TSFMT_TSPEC) < 0) {
+ msyslog(LOG_ERR, "refclock_ioctl: time_pps_kcbind failed: %m");
+ return (0);
}
+ pps_enable = 1;
}
}
+ return(1);
+}
#endif
- pp->io.clock_recv = oncore_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd1;
- if (!io_addclock(&pp->io)) {
- perror("io_addclock");
- (void) close(fd1);
- free(instance);
- return (0);
+
+
+#ifdef ONCORE_SHMEM_STATUS
+static void
+oncore_init_shmem(
+ struct instance *instance
+ )
+{
+ int i, l, n, fd, shmem_old_size, n1;
+ char *buf, Msg[160];
+ u_char *cp, *cp1, *shmem_old;
+ struct msg_desc *mp;
+ struct stat sbuf;
+ size_t shmem_length;
+
+ /*
+ * The first thing we do is see if there is an instance->shmem_fname file (still)
+ * out there from a previous run. If so, we copy it in and use it to initialize
+ * shmem (so we won't lose our almanac if we need it).
+ */
+
+ shmem_old = 0;
+ if ((fd = open(instance->shmem_fname, O_RDONLY)) < 0)
+ perror("LOAD:SHMEM");
+ else {
+ fstat(fd, &sbuf);
+ shmem_old_size = sbuf.st_size;
+ shmem_old = (u_char *) malloc((unsigned) sbuf.st_size);
+ if (shmem_old == NULL) {
+ perror("malloc");
+ close(fd);
+ return;
+ }
+
+ read(fd, shmem_old, shmem_old_size);
+ close(fd);
}
- /*
- * This will return the Model Number of the Oncore receiver.
+ /* OK, we now create the NEW SHMEM. */
+
+ if ((instance->shmemfd = open(instance->shmem_fname, O_RDWR|O_CREAT|O_TRUNC, 0644)) < 0) {
+ perror(instance->shmem_fname);
+ return;
+ }
+
+ /* see how big it needs to be */
+
+ n = 1;
+ for (mp=oncore_messages; mp->flag[0]; mp++) {
+ mp->shmem = n;
+ /* Allocate space for multiplexed almanac, and 0D/2D/3D @@Ea records */
+ if (!strcmp(mp->flag, "Cb")) {
+ instance->shmem_Cb = n;
+ n += (mp->len + 3) * 34;
+ }
+ if (!strcmp(mp->flag, "Ba")) {
+ instance->shmem_Ba = n;
+ n += (mp->len + 3) * 3;
+ }
+ if (!strcmp(mp->flag, "Ea")) {
+ instance->shmem_Ea = n;
+ n += (mp->len + 3) * 3;
+ }
+ if (!strcmp(mp->flag, "Ha")) {
+ instance->shmem_Ha = n;
+ n += (mp->len + 3) * 3;
+ }
+ n += (mp->len + 3);
+ }
+ shmem_length = n + 2;
+ fprintf(stderr, "ONCORE: SHMEM length: %d bytes\n", (int) shmem_length);
+
+ buf = malloc(shmem_length);
+ if (buf == NULL) {
+ perror("malloc");
+ close(instance->shmemfd);
+ return;
+ }
+
+ memset(buf, 0, shmem_length);
+
+ /* next build the new SHMEM buffer in memory */
+
+ for (mp=oncore_messages; mp->flag[0]; mp++) {
+ l = mp->shmem;
+ buf[l + 0] = mp->len >> 8;
+ buf[l + 1] = mp->len & 0xff;
+ buf[l + 2] = 0;
+ buf[l + 3] = '@';
+ buf[l + 4] = '@';
+ buf[l + 5] = mp->flag[0];
+ buf[l + 6] = mp->flag[1];
+ if (!strcmp(mp->flag, "Cb") || !strcmp(mp->flag, "Ba") || !strcmp(mp->flag, "Ea") || !strcmp(mp->flag, "Ha")) {
+ if (!strcmp(mp->flag, "Cb"))
+ n = 35;
+ else
+ n = 4;
+ for (i=1; i<n; i++) {
+ buf[l + i * (mp->len+3) + 0] = mp->len >> 8;
+ buf[l + i * (mp->len+3) + 1] = mp->len & 0xff;
+ buf[l + i * (mp->len+3) + 2] = 0;
+ buf[l + i * (mp->len+3) + 3] = '@';
+ buf[l + i * (mp->len+3) + 4] = '@';
+ buf[l + i * (mp->len+3) + 5] = mp->flag[0];
+ buf[l + i * (mp->len+3) + 6] = mp->flag[1];
+ }
+ }
+ }
+
+ /* we now walk thru the two buffers (shmem_old and buf, soon to become shmem)
+ * copying the data in shmem_old to buf. When we are done we write it out
+ * and free both buffers.
+ * If the structures change (an addition or deletion) I will stop copying.
+ * The two will be the same unless we add/subtract from the oncore_messages list
+ * so this should work most of the time, and takes a lot less code than doing it right.
*/
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Cj, sizeof(oncore_cmd_Cj));
- instance->o_state = ONCORE_ID_SENT;
- cp = "state = ONCORE_ID SENT";
- record_clock_stats(&(instance->peer->srcadr), cp);
- instance->timeout = 4;
+ if (shmem_old) {
+ for (cp=buf+4, cp1=shmem_old+4; (n = 256*(*(cp-3)) + *(cp-2)); cp+=(n+3), cp1+=(n+3)) {
+ n1 = 256*(*(cp1-3)) + *(cp1-2);
+ if (n1 != n || strncmp(cp, cp1, 4))
+ break;
- instance->pollcnt = 2;
- return (1);
+ memcpy(cp, cp1, (size_t) n);
+ }
+ free(shmem_old);
+ }
+
+ i = write(instance->shmemfd, buf, shmem_length);
+ free(buf);
+
+ if (i != shmem_length) {
+ perror(instance->shmem_fname);
+ close(instance->shmemfd);
+ return;
+ }
+
+ instance->shmem = (u_char *) mmap(0, shmem_length,
+ PROT_READ | PROT_WRITE,
+#ifdef MAP_HASSEMAPHORE
+ MAP_HASSEMAPHORE |
+#endif
+ MAP_SHARED, instance->shmemfd, (off_t)0);
+
+ if (instance->shmem == (u_char *)MAP_FAILED) {
+ instance->shmem = 0;
+ close(instance->shmemfd);
+ return;
+ }
+
+ sprintf(Msg, "SHMEM (size = %d) is CONFIGURED and available as %s", shmem_length, instance->shmem_fname);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
}
+#endif /* ONCORE_SHMEM_STATUS */
@@ -751,8 +1059,8 @@ oncore_read_config(
* -------------------------------------------------------------------------------
*
* If we open one or the other of the files, we read it looking for
- * MODE, LAT, LON, (HT, HTGPS, HTMSL), DELAY, OFFSET, ASSERT, CLEAR, STATUS,
- * POSN3D, POSN2D, CHAN, TRAIM
+ * MODE, LAT, LON, (HT, HTGPS, HTMSL), DELAY, OFFSET, ASSERT, CLEAR, HARDPPS,
+ * STATUS, POSN3D, POSN2D, CHAN, TRAIM
* then initialize using method MODE. For Mode = (1,3) all of (LAT, LON, HT) must
* be present or mode reverts to (2,4).
*
@@ -773,7 +1081,7 @@ oncore_read_config(
* Expect to see one line with 'HT' as first field,
* followed by 1-2 fields. First is a number, the second is 'FT' or 'M'
* for feet or meters. HT is the height above the GPS ellipsoid.
- * If the reciever reports height in both GPS and MSL, then we will report
+ * If the receiver reports height in both GPS and MSL, then we will report
* the difference GPS-MSL on the clockstats file.
*
* There is an optional line, starting with DELAY, followed
@@ -793,24 +1101,36 @@ oncore_read_config(
* There is an optional line, with either ASSERT or CLEAR on it, which
* determine which transition of the PPS signal is used for timing by the
* PPSAPI. If neither is present, then ASSERT is assumed.
+ * ASSERT/CLEAR can also be set with FLAG2 of the ntp.conf input.
+ * For Flag2, ASSERT=0, and hence is default.
+ *
+ * There is an optional line, with HARDPPS on it. Including this line causes
+ * the PPS signal to control the kernel PLL.
+ * HARDPPS can also be set with FLAG3 of the ntp.conf input.
+ * For Flag3, 0 is disabled, and the default.
*
- * There are three options that have to do with using the shared memory opition.
- * First, to enable the option there must be an ASSERT line with a file name.
+ * There are three options that have to do with using the shared memory option.
+ * First, to enable the option there must be a SHMEM line with a file name.
* The file name is the file associated with the shared memory.
*
- * In the shared memory there are three 'records' containing the @@Ea (or equivalent)
- * data, and this contains the position data. There will always be data in the
- * record cooresponding to the '0D' @@Ea record, and the user has a choice of
- * filling the '3D' @@Ea record by specifying POSN3D, or the '2D' record by
- * specifying POSN2D. In either case the '2D' or '3D' record is filled once
- * every 15s.
+ * In shared memory, there is one 'record' for each returned variable.
+ * For the @@Ea data there are three 'records' containing position data.
+ * There will always be data in the record corresponding to the '0D' @@Ea record,
+ * and the user has a choice of filling the '3D' record by specifying POSN3D,
+ * or the '2D' record by specifying POSN2D. In either case the '2D' or '3D'
+ * record is filled once every 15s.
*
* Two additional variables that can be set are CHAN and TRAIM. These should be
* set correctly by the code examining the @@Cj record, but we bring them out here
- * to allow the user to override either the # of channels, or the existance of TRAIM.
+ * to allow the user to override either the # of channels, or the existence of TRAIM.
* CHAN expects to be followed by in integer: 6, 8, or 12. TRAIM expects to be
* followed by YES or NO.
*
+ * There is an optional line with MASK on it followed by one integer field in the
+ * range 0 to 89. This sets the satellite mask angle and will determine the minimum
+ * elevation angle for satellites to be tracked by the receiver. The default value
+ * is 10 deg for the VP and 0 deg for all other receivers.
+ *
* So acceptable input would be
* # these are my coordinates (RWC)
* LON -106 34.610
@@ -821,7 +1141,7 @@ oncore_read_config(
FILE *fd;
char *cp, *cc, *ca, line[100], units[2], device[20], Msg[160];
- int i, sign, lat_flg, long_flg, ht_flg, mode;
+ int i, sign, lat_flg, long_flg, ht_flg, mode, mask;
double f1, f2, f3;
sprintf(device, "%s%d", INIT_FILE, instance->unit); /* try "ntp.oncore0" first */
@@ -835,7 +1155,7 @@ oncore_read_config(
}
}
- mode = 0;
+ mode = mask = 0;
lat_flg = long_flg = ht_flg = 0;
while (fgets(line, 100, fd)) {
@@ -871,12 +1191,6 @@ oncore_read_config(
for (; *ca && isascii((int)*ca) && (isspace((int)*ca) || (*ca == '=')); ca++)
continue;
- /*
- * move call to oncore_shmem_init() from here to after
- * we have determined Oncore Model, so we can ignore
- * request if model doesnt 'support' it
- */
-
if (!strncmp(cc, "STATUS", (size_t) 6) || !strncmp(cc, "SHMEM", (size_t) 5)) {
i = strlen(ca);
instance->shmem_fname = (char *) malloc((unsigned) (i+1));
@@ -963,6 +1277,8 @@ oncore_read_config(
instance->assert = 1;
} else if (!strncmp(cc, "CLEAR", (size_t) 5)) {
instance->assert = 0;
+ } else if (!strncmp(cc, "HARDPPS", (size_t) 7)) {
+ instance->hardpps = 1;
} else if (!strncmp(cc, "POSN2D", (size_t) 6)) {
instance->shmem_Posn = 2;
} else if (!strncmp(cc, "POSN3D", (size_t) 6)) {
@@ -970,11 +1286,15 @@ oncore_read_config(
} else if (!strncmp(cc, "CHAN", (size_t) 4)) {
sscanf(ca, "%d", &i);
if ((i == 6) || (i == 8) || (i == 12))
- instance->chan = i;
+ instance->chan_in = i;
} else if (!strncmp(cc, "TRAIM", (size_t) 5)) {
- instance->traim = 1; /* so TRAIM alone is YES */
+ instance->traim_in = 1; /* so TRAIM alone is YES */
if (!strcmp(ca, "NO") || !strcmp(ca, "OFF")) /* Yes/No, On/Off */
- instance->traim = 0;
+ instance->traim_in = 0;
+ } else if (!strncmp(cc, "MASK", (size_t) 4)) {
+ sscanf(ca, "%d", &mask);
+ if (mask > -1 && mask < 90)
+ instance->Ag = mask; /* Satellite mask angle */
}
}
fclose(fd);
@@ -985,7 +1305,7 @@ oncore_read_config(
*/
instance->posn_set = 1;
- if ((lat_flg || long_flg || ht_flg) && !(lat_flg * long_flg * ht_flg)) {
+ if (!( lat_flg && long_flg && ht_flg )) {
printf("ONCORE: incomplete data on %s\n", INIT_FILE);
instance->posn_set = 0;
if (mode == 1 || mode == 3) {
@@ -1002,170 +1322,8 @@ oncore_read_config(
-static void
-oncore_init_shmem(
- struct instance *instance
- )
-{
-#ifdef ONCORE_SHMEM_STATUS
- int i, l, n;
- char *buf;
- struct msg_desc *mp;
- size_t oncore_shmem_length;
-
- if (instance->shmem_first)
- return;
-
- instance->shmem_first++;
-
- if ((instance->statusfd = open(instance->shmem_fname, O_RDWR|O_CREAT|O_TRUNC, 0644)) < 0) {
- perror(instance->shmem_fname);
- return;
- }
-
- n = 1;
- for (mp = oncore_messages; mp->flag[0]; mp++) {
- mp->shmem = n;
- /* Allocate space for multiplexed almanac, and 0D/2D/3D @@Ea records */
- if (!strcmp(mp->flag, "Cb")) {
- instance->shmem_Cb = n;
- n += (mp->len + 3) * 34;
- }
- if (!strcmp(mp->flag, "Ba")) {
- instance->shmem_Ba = n;
- n += (mp->len + 3) * 3;
- }
- if (!strcmp(mp->flag, "Ea")) {
- instance->shmem_Ea = n;
- n += (mp->len + 3) * 3;
- }
- if (!strcmp(mp->flag, "Ha")) {
- instance->shmem_Ha = n;
- n += (mp->len + 3) * 3;
- }
- n += (mp->len + 3);
- }
- oncore_shmem_length = n + 2;
- fprintf(stderr, "ONCORE: SHMEM length: %d bytes\n", (int) oncore_shmem_length);
-
- buf = malloc(oncore_shmem_length);
- if (buf == NULL) {
- perror("malloc");
- return;
- }
- memset(buf, 0, sizeof(buf));
- i = write(instance->statusfd, buf, oncore_shmem_length);
- if (i != oncore_shmem_length) {
- perror(instance->shmem_fname);
- return;
- }
- free(buf);
- instance->shmem = (u_char *) mmap(0, oncore_shmem_length,
- PROT_READ | PROT_WRITE,
-#ifdef MAP_HASSEMAPHORE
- MAP_HASSEMAPHORE |
-#endif
- MAP_SHARED,
- instance->statusfd, (off_t)0);
- if (instance->shmem == (u_char *)MAP_FAILED) {
- instance->shmem = 0;
- close (instance->statusfd);
- return;
- }
- for (mp = oncore_messages; mp->flag[0]; mp++) {
- l = mp->shmem;
- instance->shmem[l + 0] = mp->len >> 8;
- instance->shmem[l + 1] = mp->len & 0xff;
- instance->shmem[l + 2] = 0;
- instance->shmem[l + 3] = '@';
- instance->shmem[l + 4] = '@';
- instance->shmem[l + 5] = mp->flag[0];
- instance->shmem[l + 6] = mp->flag[1];
- if (!strcmp(mp->flag, "Cb") || !strcmp(mp->flag, "Ba") || !strcmp(mp->flag, "Ea") || !strcmp(mp->flag, "Ha")) {
- if (!strcmp(mp->flag, "Cb"))
- n = 35;
- else
- n = 4;
- for (i = 1; i < n; i++) {
- instance->shmem[l + i * (mp->len+3) + 0] = mp->len >> 8;
- instance->shmem[l + i * (mp->len+3) + 1] = mp->len & 0xff;
- instance->shmem[l + i * (mp->len+3) + 2] = 0;
- instance->shmem[l + i * (mp->len+3) + 3] = '@';
- instance->shmem[l + i * (mp->len+3) + 4] = '@';
- instance->shmem[l + i * (mp->len+3) + 5] = mp->flag[0];
- instance->shmem[l + i * (mp->len+3) + 6] = mp->flag[1];
- }
- }
- }
-#endif /* ONCORE_SHMEM_STATUS */
-}
-
-
-
/*
- * oncore_shutdown - shut down the clock
- */
-
-static void
-oncore_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct instance *instance;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- instance = (struct instance *) pp->unitptr;
-
- io_closeclock(&pp->io);
-
- free(instance);
-}
-
-
-
-/*
- * oncore_poll - called by the transmit procedure
- */
-
-static void
-oncore_poll(
- int unit,
- struct peer *peer
- )
-{
- struct instance *instance;
-
- instance = (struct instance *) peer->procptr->unitptr;
- if (instance->timeout) {
- char *cp;
-
- instance->timeout--;
- if (instance->timeout == 0) {
- cp = "Oncore: No response from @@Cj, shutting down driver";
- record_clock_stats(&(instance->peer->srcadr), cp);
- oncore_shutdown(unit, peer);
- } else {
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Cj, sizeof(oncore_cmd_Cj));
- cp = "Oncore: Resend @@Cj";
- record_clock_stats(&(instance->peer->srcadr), cp);
- }
- return;
- }
-
- if (!instance->pollcnt)
- refclock_report(peer, CEVNT_TIMEOUT);
- else
- instance->pollcnt--;
- peer->procptr->polls++;
- instance->polled = 1;
-}
-
-
-
-/*
- * move data from NTP to buffer (toss in unlikely case it wont fit)
+ * move data from NTP to buffer (toss the extra in the unlikely case it won't fit)
*/
static void
@@ -1215,7 +1373,7 @@ oncore_consume(
struct instance *instance
)
{
- int i, j, m;
+ int i, m;
unsigned l;
while (rcvptr >= 7) {
@@ -1261,10 +1419,7 @@ oncore_consume(
if (debug)
printf("ONCORE[%d]: NO <CR><LF> at end of message\n", instance->unit);
} else { /* check the CheckSum */
- j = 0;
- for (i = 2; i < l-3; i++)
- j ^= rcvbuf[i];
- if (j == rcvbuf[l-3]) {
+ if (oncore_checksum_ok(rcvbuf, l)) {
if (instance->shmem != NULL) {
instance->shmem[oncore_messages[m].shmem + 2]++;
memcpy(instance->shmem + oncore_messages[m].shmem + 3,
@@ -1274,7 +1429,7 @@ oncore_consume(
if (oncore_messages[m].handler)
oncore_messages[m].handler(instance, rcvbuf, (size_t) (l-3));
} else if (debug) {
- printf("ONCORE[%d]: Checksum mismatch! calc %o is %o\n", instance->unit, j, rcvbuf[l-3]);
+ printf("ONCORE[%d]: Checksum mismatch!\n", instance->unit);
printf("ONCORE[%d]: @@%c%c ", instance->unit, rcvbuf[2], rcvbuf[3]);
for (i=4; i<l; i++)
printf("%03o ", rcvbuf[i]);
@@ -1290,29 +1445,317 @@ oncore_consume(
-/*
- * write message to Oncore.
- */
-
static void
-oncore_sendmsg(
- int fd,
- u_char *ptr,
- size_t len
+oncore_get_timestamp(
+ struct instance *instance,
+ long dt1, /* tick offset THIS time step */
+ long dt2 /* tick offset NEXT time step */
)
{
- u_char cs = 0;
+ int Rsm;
+ u_long i, j;
+ l_fp ts, ts_tmp;
+ double dmy;
+#ifdef HAVE_STRUCT_TIMESPEC
+ struct timespec *tsp = 0;
+#else
+ struct timeval *tsp = 0;
+#endif
+#ifdef HAVE_PPSAPI
+ int current_mode;
+ pps_params_t current_params;
+ struct timespec timeout;
+ pps_info_t pps_i;
+#else /* ! HAVE_PPSAPI */
+#ifdef HAVE_CIOGETEV
+ struct ppsclockev ev;
+ int r = CIOGETEV;
+#endif
+#ifdef HAVE_TIOCGPPSEV
+ struct ppsclockev ev;
+ int r = TIOCGPPSEV;
+#endif
+#if TIOCDCDTIMESTAMP
+ struct timeval tv;
+#endif
+#endif /* ! HAVE_PPS_API */
- printf("ONCORE: Send @@%c%c %d\n", ptr[0], ptr[1], (int) len);
- write(fd, "@@", (size_t) 2);
- write(fd, ptr, len);
- while (len--)
- cs ^= *ptr++;
- write(fd, &cs, (size_t) 1);
- write(fd, "\r\n", (size_t) 2);
+#if 1
+ /* If we are in SiteSurvey mode, then we are in 3D mode, and we fall thru.
+ * If we have Finished the SiteSurvey, then we fall thru for the 14/15
+ * times we get here in 0D mode (the 1/15 is in 3D for SHMEM).
+ * This gives good time, which gets better when the SS is done.
+ */
+
+ if ((instance->site_survey == ONCORE_SS_DONE) && (instance->mode != MODE_0D))
+#else
+ /* old check, only fall thru for SS_DONE and 0D mode, 2h45m wait for ticks */
+
+ if ((instance->site_survey != ONCORE_SS_DONE) || (instance->mode != MODE_0D))
+#endif
+ return;
+
+ /* Don't do anything without an almanac to define the GPS->UTC delta */
+
+ if (instance->rsm.bad_almanac)
+ return;
+
+#ifdef HAVE_PPSAPI
+ j = instance->ev_serial;
+ timeout.tv_sec = 0;
+ timeout.tv_nsec = 0;
+ if (time_pps_fetch(instance->pps_h, PPS_TSFMT_TSPEC, &pps_i,
+ &timeout) < 0) {
+ printf("ONCORE: time_pps_fetch failed\n");
+ return;
+ }
+
+ if (instance->assert) {
+ tsp = &pps_i.assert_timestamp;
+
+ if (debug > 2) {
+ i = (u_long) pps_i.assert_sequence;
+#ifdef HAVE_STRUCT_TIMESPEC
+ printf("ONCORE[%d]: serial/j (%lu, %lu) %ld.%09ld\n",
+ instance->unit, i, j,
+ (long)tsp->tv_sec, (long)tsp->tv_nsec);
+#else
+ printf("ONCORE[%d]: serial/j (%lu, %lu) %ld.%06ld\n",
+ instance->unit, i, j,
+ (long)tsp->tv_sec, (long)tsp->tv_usec);
+#endif
+ }
+
+ if (pps_i.assert_sequence == j) {
+ printf("ONCORE: oncore_get_timestamp, error serial pps\n");
+ return;
+ }
+ instance->ev_serial = pps_i.assert_sequence;
+ } else {
+ tsp = &pps_i.clear_timestamp;
+
+ if (debug > 2) {
+ i = (u_long) pps_i.clear_sequence;
+#ifdef HAVE_STRUCT_TIMESPEC
+ printf("ONCORE[%d]: serial/j (%lu, %lu) %ld.%09ld\n",
+ instance->unit, i, j, (long)tsp->tv_sec, (long)tsp->tv_nsec);
+#else
+ printf("ONCORE[%d]: serial/j (%lu, %lu) %ld.%06ld\n",
+ instance->unit, i, j, (long)tsp->tv_sec, (long)tsp->tv_usec);
+#endif
+ }
+
+ if (pps_i.clear_sequence == j) {
+ printf("ONCORE: oncore_get_timestamp, error serial pps\n");
+ return;
+ }
+ instance->ev_serial = pps_i.clear_sequence;
+ }
+
+ /* convert timespec -> ntp l_fp */
+
+ dmy = tsp->tv_nsec;
+ dmy /= 1e9;
+ ts.l_uf = dmy * 4294967296.0;
+ ts.l_ui = tsp->tv_sec;
+#if 0
+ alternate code for previous 4 lines is
+ dmy = 1.0e-9*tsp->tv_nsec; /* fractional part */
+ DTOLFP(dmy, &ts);
+ dmy = tsp->tv_sec; /* integer part */
+ DTOLFP(dmy, &ts_tmp);
+ L_ADD(&ts, &ts_tmp);
+ or more simply
+ dmy = 1.0e-9*tsp->tv_nsec; /* fractional part */
+ DTOLFP(dmy, &ts);
+ ts.l_ui = tsp->tv_sec;
+#endif /* 0 */
+#else
+# if defined(HAVE_TIOCGPPSEV) || defined(HAVE_CIOGETEV)
+ j = instance->ev_serial;
+ if (ioctl(instance->ppsfd, r, (caddr_t) &ev) < 0) {
+ perror("ONCORE: IOCTL:");
+ return;
+ }
+
+ tsp = &ev.tv;
+
+ if (debug > 2)
+#ifdef HAVE_STRUCT_TIMESPEC
+ printf("ONCORE: serial/j (%d, %d) %ld.%09ld\n",
+ ev.serial, j, tsp->tv_sec, tsp->tv_nsec);
+#else
+ printf("ONCORE: serial/j (%d, %d) %ld.%06ld\n",
+ ev.serial, j, tsp->tv_sec, tsp->tv_usec);
+#endif
+
+ if (ev.serial == j) {
+ printf("ONCORE: oncore_get_timestamp, error serial pps\n");
+ return;
+ }
+ instance->ev_serial = ev.serial;
+
+ /* convert timeval -> ntp l_fp */
+
+ TVTOTS(tsp, &ts);
+# else
+# if defined(TIOCDCDTIMESTAMP)
+ if(ioctl(instance->ppsfd, TIOCDCDTIMESTAMP, &tv) < 0) {
+ perror("ONCORE: ioctl(TIOCDCDTIMESTAMP)");
+ return;
+ }
+ tsp = &tv;
+ TVTOTS(tsp, &ts);
+# else
+#error "Cannot compile -- no PPS mechanism configured!"
+# endif
+# endif
+#endif
+ /* now have timestamp in ts */
+ /* add in saw_tooth and offset, these will be ZERO if no TRAIM */
+
+ /* saw_tooth not really necessary if using TIMEVAL */
+ /* since its only precise to us, but do it anyway. */
+
+ /* offset in ns, and is positive (late), we subtract */
+ /* to put the PPS time transition back where it belongs */
+
+#ifdef HAVE_PPSAPI
+ /* must hand the offset for the NEXT sec off to the Kernel to do */
+ /* the addition, so that the Kernel PLL sees the offset too */
+
+ if (instance->assert)
+ instance->pps_p.assert_offset.tv_nsec = -dt2;
+ else
+ instance->pps_p.clear_offset.tv_nsec = -dt2;
+
+ /* The following code is necessary, and not just a time_pps_setparams,
+ * using the saved instance->pps_p, since some other process on the
+ * machine may have diddled with the mode bits (say adding something
+ * that it needs). We take what is there and ADD what we need.
+ * [[ The results from the time_pps_getcap is unlikely to change so
+ * we could probably just save it, but I choose to do the call ]]
+ * Unfortunately, there is only ONE set of mode bits in the kernel per
+ * interface, and not one set for each open handle.
+ *
+ * There is still a race condition here where we might mess up someone
+ * elses mode, but if he is being careful too, he should survive.
+ */
+
+ if (time_pps_getcap(instance->pps_h, &current_mode) < 0) {
+ msyslog(LOG_ERR, "refclock_ioctl: time_pps_getcap failed: %m");
+ return;
+ }
+
+ if (time_pps_getparams(instance->pps_h, &current_params) < 0) {
+ msyslog(LOG_ERR, "refclock_ioctl: time_pps_getparams failed: %m");
+ return;
+ }
+
+ /* or current and mine */
+ current_params.mode |= instance->pps_p.mode;
+ /* but only set whats legal */
+ current_params.mode &= current_mode;
+
+ current_params.assert_offset.tv_sec = 0;
+ current_params.assert_offset.tv_nsec = -dt2;
+ current_params.clear_offset.tv_sec = 0;
+ current_params.clear_offset.tv_nsec = -dt2;
+
+ if (time_pps_setparams(instance->pps_h, &current_params))
+ perror("time_pps_setparams");
+#else
+ /* if not PPSAPI, no way to inform kernel of OFFSET, just add the */
+ /* offset for THIS second */
+
+ dmy = -1.0e-9*dt1;
+ DTOLFP(dmy, &ts_tmp);
+ L_ADD(&ts, &ts_tmp);
+#endif
+ /* have time from UNIX origin, convert to NTP origin. */
+
+ ts.l_ui += JAN_1970;
+ instance->pp->lastrec = ts;
+
+ /* print out information about this timestamp (long line) */
+
+ ts_tmp = ts;
+ ts_tmp.l_ui = 0; /* zero integer part */
+ LFPTOD(&ts_tmp, dmy); /* convert fractional part to a double */
+ j = 1.0e9*dmy; /* then to integer ns */
+
+ Rsm = 0;
+ if (instance->chan == 6)
+ Rsm = instance->BEHa[64];
+ else if (instance->chan == 8)
+ Rsm = instance->BEHa[72];
+ else if (instance->chan == 12)
+ Rsm = ((instance->BEHa[129]<<8) | instance->BEHa[130]);
+
+ if (instance->chan == 6 || instance->chan == 8) {
+ sprintf(instance->pp->a_lastcode, /* MAX length 128, currently at 117 */
+ "%u.%09lu %d %d %2d %2d %2d %2ld rstat %02x dop %4.1f nsat %2d,%d traim %d sigma %2d neg-sawtooth %3d sat %d%d%d%d%d%d%d%d",
+ ts.l_ui, j,
+ instance->pp->year, instance->pp->day,
+ instance->pp->hour, instance->pp->minute, instance->pp->second,
+ (long) tsp->tv_sec % 60,
+ Rsm, 0.1*(256*instance->BEHa[35]+instance->BEHa[36]),
+ /*rsat dop */
+ instance->BEHa[38], instance->BEHa[39], instance->BEHn[21],
+ /* nsat visible, nsat tracked, traim */
+ instance->BEHn[23]*256+instance->BEHn[24], (s_char) instance->BEHn[25],
+ /* sigma neg-sawtooth */
+ /*sat*/ instance->BEHa[41], instance->BEHa[45], instance->BEHa[49], instance->BEHa[53],
+ instance->BEHa[57], instance->BEHa[61], instance->BEHa[65], instance->BEHa[69]
+ ); /* will be 0 for 6 chan */
+ } else if (instance->chan == 12) {
+ sprintf(instance->pp->a_lastcode,
+ "%u.%09lu %d %d %2d %2d %2d %2ld rstat %02x dop %4.1f nsat %2d,%d traim %d sigma %d neg-sawtooth %3d sat %d%d%d%d%d%d%d%d%d%d%d%d",
+ ts.l_ui, j,
+ instance->pp->year, instance->pp->day,
+ instance->pp->hour, instance->pp->minute, instance->pp->second,
+ (long) tsp->tv_sec % 60,
+ Rsm, 0.1*(256*instance->BEHa[53]+instance->BEHa[54]),
+ /*rsat dop */
+ instance->BEHa[55], instance->BEHa[56], instance->BEHn[6],
+ /* nsat visible, nsat tracked traim */
+ instance->BEHn[12]*256+instance->BEHn[13], (s_char) instance->BEHn[14],
+ /* sigma neg-sawtooth */
+ /*sat*/ instance->BEHa[58], instance->BEHa[64], instance->BEHa[70], instance->BEHa[76],
+ instance->BEHa[82], instance->BEHa[88], instance->BEHa[94], instance->BEHa[100],
+ instance->BEHa[106], instance->BEHa[112], instance->BEHa[118], instance->BEHa[124]
+ );
+ }
+
+ if (debug > 2) {
+ int n;
+ n = strlen(instance->pp->a_lastcode);
+ printf("ONCORE[%d]: len = %d %s\n", instance->unit, n, instance->pp->a_lastcode);
+ }
+
+ /* and some things I dont understnd (magic ntp things) */
+
+ if (!refclock_process(instance->pp)) {
+ refclock_report(instance->peer, CEVNT_BADTIME);
+ return;
+ }
+
+ record_clock_stats(&(instance->peer->srcadr), instance->pp->a_lastcode);
+ instance->pollcnt = 2;
+
+ if (instance->polled) {
+ instance->polled = 0;
+/*
+ instance->pp->dispersion = instance->pp->skew = 0;
+*/
+ instance->pp->lastref = instance->pp->lastrec;
+ refclock_receive(instance->peer);
+ }
}
+/*************** oncore_msg_XX routines start here *******************/
+
/*
* print Oncore response message.
@@ -1336,9 +1779,9 @@ oncore_msg_any(
if (debug > 3) {
#ifdef HAVE_GETCLOCK
- (void) getclock(TIMEOFDAY, &ts);
- tv.tv_sec = ts.tv_sec;
- tv.tv_usec = ts.tv_nsec / 1000;
+ (void) getclock(TIMEOFDAY, &ts);
+ tv.tv_sec = ts.tv_sec;
+ tv.tv_usec = ts.tv_nsec / 1000;
#else
GETTIMEOFDAY(&tv, 0);
#endif
@@ -1368,542 +1811,344 @@ oncore_msg_any(
-/*
- * Demultiplex the almanac into shmem
- */
+/* Latitude, Longitude, Height */
static void
-oncore_msg_Cb(
+oncore_msg_Adef(
struct instance *instance,
u_char *buf,
size_t len
)
{
- int i;
+}
- if (instance->shmem == NULL)
- return;
- if (buf[4] == 5)
- i = buf[5];
- else if (buf[4] == 4 && buf[5] <= 5)
- i = buf[5] + 24;
- else if (buf[4] == 4 && buf[5] <= 10)
- i = buf[5] + 23;
- else
- i = 34;
- i *= 36;
- instance->shmem[instance->shmem_Cb + i + 2]++;
- memcpy(instance->shmem + instance->shmem_Cb + i + 3, buf, (size_t) (len + 3));
-}
+/* Mask Angle */
+static void
+oncore_msg_Ag(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{ char Msg[160], *cp;
+
+ cp = "set to";
+ if (instance->o_state == ONCORE_RUN)
+ cp = "is";
+
+ instance->Ag = buf[4];
+ sprintf(Msg, "Satellite mask angle %s %d degrees", cp, (int) instance->Ag);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+}
-/*
- * We do an @@Cj twice in the initialization sequence.
- * o Once at the very beginning to get the Model number so we know what commands
- * we can issue,
- * o And once later after we have done a reset and test, (which may hang),
- * as we are about to initialize the Oncore and start it running.
- * o We have one routine below for each case.
- */
/*
- * Determine the Type from the Model #, this determines #chan and if TRAIM is
- * available. We use ONLY the #chans, and determint TRAIM by trying it.
+ * get Position hold position
*/
static void
-oncore_msg_Cj(
+oncore_msg_As(
struct instance *instance,
u_char *buf,
size_t len
)
{
- memcpy(instance->Cj, buf, len);
+ instance->ss_lat = buf_w32(&buf[4]);
+ instance->ss_long = buf_w32(&buf[8]);
+ instance->ss_ht = buf_w32(&buf[12]);
- instance->timeout = 0;
- if (instance->o_state == ONCORE_ID_SENT)
- oncore_msg_Cj_id(instance, buf, len);
- else if (instance->o_state == ONCORE_INIT)
- oncore_msg_Cj_init(instance, buf, len);
+ /* Print out Position */
+ oncore_print_posn(instance);
}
-/* The information on determing a Oncore 'Model', viz VP, UT, etc, from
- * the Model Number comes from "Richard M. Hambly" <rick@cnssys.com>
- * and from Motorola. Until recently Rick was the only source of
- * this information as Motorola didnt give the information out.
+/*
+ * Try to use Oncore UT+ Auto Survey Feature
+ * If its not there (VP), set flag to do it ourselves.
*/
static void
-oncore_msg_Cj_id(
+oncore_msg_At(
struct instance *instance,
u_char *buf,
size_t len
)
{
- char *cp, *cp1, *cp2, Model[21], Msg[160];
- int mode;
+ char *cp;
- /* Write Receiver ID message to clockstats file */
+ instance->saw_At = 1;
+ if (instance->site_survey == ONCORE_SS_TESTING) {
+ if (buf[4] == 2) {
+ record_clock_stats(&(instance->peer->srcadr),
+ "Initiating hardware 3D site survey");
- instance->Cj[294] = '\0';
- for (cp=(char *)instance->Cj; cp< (char *) &instance->Cj[294]; ) {
- cp1 = strchr(cp, '\r');
- if (!cp1)
- cp1 = (char *)&instance->Cj[294];
- *cp1 = '\0';
- record_clock_stats(&(instance->peer->srcadr), cp);
- *cp1 = '\r';
- cp = cp1+2;
+ cp = "SSstate = ONCORE_SS_HW";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ instance->site_survey = ONCORE_SS_HW;
+ }
}
+}
- /* next, the Firmware Version and Revision numbers */
- instance->version = atoi(&instance->Cj[83]);
- instance->revision = atoi(&instance->Cj[111]);
- /* from model number decide which Oncore this is,
- and then the number of channels */
-
- for (cp=&instance->Cj[160]; *cp == ' '; cp++) /* start right after 'Model #' */
- ;
- cp1 = cp;
- cp2 = Model;
- for (; !isspace((int)*cp) && cp-cp1 < 20; cp++, cp2++)
- *cp2 = *cp;
- *cp2 = '\0';
+/*
+ * get PPS Offset
+ * Nb. @@Ay is not supported for early UT (no plus) model
+ */
- cp = 0;
- if (!strncmp(Model, "PVT6", (size_t) 4)) {
- cp = "PVT6";
- instance->model = ONCORE_PVT6;
- } else if (Model[0] == 'A') {
- cp = "Basic";
- instance->model = ONCORE_BASIC;
- } else if (Model[0] == 'B' || !strncmp(Model, "T8", (size_t) 2)) {
- cp = "VP";
- instance->model = ONCORE_VP;
- } else if (!strncmp(Model, "P1", (size_t) 2)) {
- cp = "M12";
- instance->model = ONCORE_M12;
- } else if (Model[0] == 'R') {
- if (Model[5] == 'N') {
- cp = "GT";
- instance->model = ONCORE_GT;
- } else if ((Model[1] == '3' || Model[1] == '4') && Model[5] == 'G') {
- cp = "GT+";
- instance->model = ONCORE_GTPLUS;
- } else if ((Model[1] == '5' && Model[5] == 'U') || (Model[1] == '1' && Model[5] == 'A')) {
- cp = "UT";
- instance->model = ONCORE_UT;
- } else if (Model[1] == '5' && Model[5] == 'G') {
- cp = "UT+";
- instance->model = ONCORE_UTPLUS;
- } else if (Model[1] == '6' && Model[5] == 'G') {
- cp = "SL";
- instance->model = ONCORE_SL;
- } else {
- cp = "Unknown";
- instance->model = ONCORE_UNKNOWN;
- }
- } else {
- cp = "Unknown";
- instance->model = ONCORE_UNKNOWN;
- }
+static void
+oncore_msg_Ay(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ char Msg[120];
- sprintf(Msg, "This looks like an Oncore %s with version %d.%d firmware.", cp, instance->version, instance->revision);
- record_clock_stats(&(instance->peer->srcadr), Msg);
+ if (instance->saw_Ay)
+ return;
- if (instance->chan == 0) { /* dont reset if set in input data */
- instance->chan = 8; /* default */
- if (instance->model == ONCORE_BASIC || instance->model == ONCORE_PVT6)
- instance->chan = 6;
- else if (instance->model == ONCORE_VP || instance->model == ONCORE_UT || instance->model == ONCORE_UTPLUS)
- instance->chan = 8;
- else if (instance->model == ONCORE_M12)
- instance->chan = 12;
- }
+ instance->saw_Ay = 1;
- if (instance->traim == -1) { /* dont reset if set in input data */
- instance->traim = 0; /* default */
- if (instance->model == ONCORE_BASIC || instance->model == ONCORE_PVT6)
- instance->traim = 0;
- else if (instance->model == ONCORE_VP || instance->model == ONCORE_UT || instance->model == ONCORE_UTPLUS)
- instance->traim = 1;
- else if (instance->model == ONCORE_M12)
- instance->traim = 0;
- }
+ instance->offset = buf_w32(&buf[4]);
- sprintf(Msg, "Channels = %d, TRAIM = %s", instance->chan,
- ((instance->traim < 0) ? "UNKNOWN" : ((instance->traim > 0) ? "ON" : "OFF")));
+ sprintf(Msg, "PPS Offset is set to %ld ns", instance->offset);
record_clock_stats(&(instance->peer->srcadr), Msg);
+}
- /* The M12 with 1.3 Firmware, looses track of all Satellites and has to
- * start again if we go from 0D -> 3D, then looses them again when we
- * go from 3D -> 0D. We do this to get a @@Ea message for SHMEM.
- * For NOW we have SHMEM turned off for the M12, v1.3
- */
-/*BAD M12*/ if (instance->model == ONCORE_M12 && instance->version == 1 && instance->revision <= 3) {
- instance->shmem_fname = 0;
- cp = "*** SHMEM turned off for ONCORE M12 ***";
- record_clock_stats(&(instance->peer->srcadr), cp);
- }
- /*
- * we now know model number and have zeroed
- * instance->shmem_fname if SHMEM is not supported
- */
+/*
+ * get Cable Delay
+ */
- if (instance->shmem_fname);
- oncore_init_shmem(instance);
+static void
+oncore_msg_Az(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ char Msg[120];
- if (instance->shmem)
- cp = "SHMEM is available";
- else
- cp = "SHMEM is NOT available";
- record_clock_stats(&(instance->peer->srcadr), cp);
+ if (instance->saw_Az)
+ return;
-#ifdef HAVE_PPSAPI
- if (instance->assert)
- cp = "Timing on Assert.";
- else
- cp = "Timing on Clear.";
- record_clock_stats(&(instance->peer->srcadr), cp);
-#endif
+ instance->saw_Az = 1;
- mode = instance->init_type;
- if (mode == 3 || mode == 4) { /* Cf will call Fa */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Cf, sizeof(oncore_cmd_Cf));
- instance->o_state = ONCORE_RESET_SENT;
- cp = "state = ONCORE_RESET_SENT";
- record_clock_stats(&(instance->peer->srcadr), cp);
- } else {
- if (instance->chan == 6)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ca, sizeof(oncore_cmd_Ca));
- else if (instance->chan == 8)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Fa, sizeof(oncore_cmd_Fa));
- else if (instance->chan == 12)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ia, sizeof(oncore_cmd_Ia));
+ instance->delay = buf_w32(&buf[4]);
- instance->o_state = ONCORE_TEST_SENT;
- cp = "state = ONCORE_TEST_SENT";
- record_clock_stats(&(instance->peer->srcadr), cp);
- instance->timeout = 4;
- }
+ sprintf(Msg, "Cable delay is set to %ld ns", instance->delay);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
}
+/* Ba, Ea and Ha come here, these contain Position */
+
static void
-oncore_msg_Cj_init(
+oncore_msg_BaEaHa(
struct instance *instance,
u_char *buf,
size_t len
)
{
- char *cp, Cmd[20], Msg[160];
- int mode;
-
- /* OK, know type of Oncore, have possibly reset, and have tested.
- * If we have or don't have TRAIM and position hold may still be unknown.
- * Now initialize.
- */
-
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Cg, sizeof(oncore_cmd_Cg)); /* Set Posn Fix mode (not Idle (VP)) */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Bb, sizeof(oncore_cmd_Bb)); /* turn on for shmem */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ek, sizeof(oncore_cmd_Ek)); /* turn off */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Aw, sizeof(oncore_cmd_Aw)); /* UTC time */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_AB, sizeof(oncore_cmd_AB)); /* Appl type static */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Be, sizeof(oncore_cmd_Be)); /* Tell us the Almanac for shmem */
-
- /* Turn OFF position hold, it needs to be off to set position (for some units),
- will get set ON in @@Ea later */
-
- if (instance->chan == 12)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd0, sizeof(oncore_cmd_Gd0));
- else {
- oncore_sendmsg(instance->ttyfd, oncore_cmd_At0, sizeof(oncore_cmd_At0));
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Av0, sizeof(oncore_cmd_Av0));
- }
-
- mode = instance->init_type;
- if (debug) {
- printf("ONCORE[%d]: INIT mode = %d\n", instance->unit, mode);
- printf("ONCORE[%d]: chan = %d\n", instance->unit, instance->chan);
- }
+ const char *cp;
+ char Msg[160];
+ int mode;
- /* If there is Position input in the Config file
- * and mode = (1,3) set it as posn hold posn, goto 0D mode.
- * or mode = (2,4) set it as INITIAL position, and do Site Survey.
+ /* OK, we are close to the RUN state now.
+ * But we have a few more items to initialize first.
+ *
+ * At the beginning of this routine there are several 'timers'.
+ * We enter this routine 1/sec, and since the upper levels of NTP have usurped
+ * the use of timers, we use the 1/sec entry to do things that
+ * we would normally do with timers...
*/
-
- if (instance->posn_set) {
- switch (mode) { /* if we have a position, put it in as posn and posn-hold posn */
- case 0:
- break;
- case 1:
- case 2:
- case 3:
- case 4:
- memcpy(Cmd, oncore_cmd_As, sizeof(oncore_cmd_As)); /* dont modify static variables */
- w32_buf(&Cmd[2], (int) instance->ss_lat);
- w32_buf(&Cmd[6], (int) instance->ss_long);
- w32_buf(&Cmd[10], (int) instance->ss_ht);
- Cmd[14] = 0;
- oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_As));
-
- memcpy(Cmd, oncore_cmd_Au, sizeof(oncore_cmd_Au));
- w32_buf(&Cmd[2], (int) instance->ss_ht);
- Cmd[6] = 0;
- oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Au));
-
- if (instance->chan == 12) {
- memcpy(Cmd, oncore_cmd_Ga, sizeof(oncore_cmd_Ga));
- w32_buf(&Cmd[2], (int) instance->ss_lat);
- w32_buf(&Cmd[6], (int) instance->ss_long);
- w32_buf(&Cmd[10], (int) instance->ss_ht);
- Cmd[14] = 0;
- oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Ga));
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd1, sizeof(oncore_cmd_Gd1));
- } else {
- memcpy(Cmd, oncore_cmd_Ad, sizeof(oncore_cmd_Ad));
- w32_buf(&Cmd[2], (int) instance->ss_lat);
- oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Ad));
-
- memcpy(Cmd, oncore_cmd_Ae, sizeof(oncore_cmd_Ae));
- w32_buf(&Cmd[2], (int) instance->ss_long);
- oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Ae));
-
- memcpy(Cmd, oncore_cmd_Af, sizeof(oncore_cmd_Af));
- w32_buf(&Cmd[2], (int) instance->ss_ht);
- Cmd[6] = 0;
- oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Af));
- oncore_sendmsg(instance->ttyfd, oncore_cmd_At1, sizeof(oncore_cmd_At1));
- }
- break;
+ if (instance->o_state == ONCORE_CHECK_CHAN) { /* here while checking for the # chan */
+ if (buf[2] == 'B') { /* 6chan */
+ if (instance->chan_ck < 6) instance->chan_ck = 6;
+ } else if (buf[2] == 'E') { /* 8chan */
+ if (instance->chan_ck < 8) instance->chan_ck = 8;
+ } else if (buf[2] == 'H') { /* 12chan */
+ if (instance->chan_ck < 12) instance->chan_ck = 12;
}
- }
+ if (instance->count3++ < 5)
+ return;
- switch (mode) {
- case 0: /* NO initialization, don't change anything */
- instance->site_survey = ONCORE_SS_DONE;
- break;
+ instance->count3 = 0;
- case 1:
- case 3: /* Use given Position */
- instance->site_survey = ONCORE_SS_DONE;
- break;
+ if (instance->chan_in != -1) /* set in Input */
+ instance->chan = instance->chan_in;
+ else /* set from test */
+ instance->chan = instance->chan_ck;
- case 2:
- case 4: /* Site Survey */
- if (instance->chan == 12) { /* no 12chan site survey command */
- instance->site_survey = ONCORE_SS_SW;
- sprintf(Msg, "Initiating software 3D site survey (%d samples)", POS_HOLD_AVERAGE);
- record_clock_stats(&(instance->peer->srcadr), Msg);
- } else {
- instance->site_survey = ONCORE_SS_TESTING;
- oncore_sendmsg(instance->ttyfd, oncore_cmd_At2, sizeof(oncore_cmd_At2));
- }
- break;
- }
+ sprintf(Msg, "Input says chan = %d", instance->chan_in);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+ sprintf(Msg, "Model # says chan = %d", instance->chan_id);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+ sprintf(Msg, "Testing says chan = %d", instance->chan_ck);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+ sprintf(Msg, "Using chan = %d", instance->chan);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
- if (mode != 0) {
- /* cable delay in ns */
- memcpy(Cmd, oncore_cmd_Az, sizeof(oncore_cmd_Az));
- w32_buf(&Cmd[2], instance->delay);
- oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Az));
+ instance->o_state = ONCORE_HAVE_CHAN;
+ cp = "state = ONCORE_HAVE_CHAN";
+ record_clock_stats(&(instance->peer->srcadr), cp);
- /* PPS offset in ns */
- if (instance->offset) {
- if (instance->model == ONCORE_VP || instance->model == ONCORE_UT ||
- instance->model == ONCORE_UTPLUS) {
- memcpy(Cmd, oncore_cmd_Ay, sizeof(oncore_cmd_Ay));
- w32_buf(&Cmd[2], instance->offset);
- oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Ay));
- } else {
- cp = "Can only set PPS OFFSET for VP/UT/UT+, offset ignored";
- record_clock_stats(&(instance->peer->srcadr), cp);
- instance->offset = 0;
- }
- }
+ instance->timeout = 4;
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Cj, sizeof(oncore_cmd_Cj));
+ return;
}
- /* 6, 8 12 chan - Position/Status/Data Output Message, 1/s */
- /* now we're really running */
-
- if (instance->chan == 6) { /* kill 8 chan commands, possibly testing VP in 6chan mode */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ba, sizeof(oncore_cmd_Ba));
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ea0, sizeof(oncore_cmd_Ea0));
- oncore_sendmsg(instance->ttyfd, oncore_cmd_En0, sizeof(oncore_cmd_En0));
- } else if (instance->chan == 8) { /* kill 6chan commands */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ea, sizeof(oncore_cmd_Ea));
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ba0, sizeof(oncore_cmd_Ba0));
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Bn0, sizeof(oncore_cmd_Bn0));
- } else if (instance->chan == 12)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ha, sizeof(oncore_cmd_Ha));
-
- instance->count = 1;
- instance->o_state = ONCORE_ALMANAC;
- cp = "state = ONCORE_ALMANAC";
- record_clock_stats(&(instance->peer->srcadr), cp);
-}
-
-
-
-/*
- * Set to Factory Defaults (Reasonable for UT w/ no Battery Backup
- * not so for VP (eeprom) or any unit with a battery
- */
-
-static void
-oncore_msg_Cf(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- const char *cp;
+ if (instance->o_state != ONCORE_ALMANAC && instance->o_state != ONCORE_RUN)
+ return;
- if (instance->o_state == ONCORE_RESET_SENT) {
- if (instance->chan == 6)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ca, sizeof(oncore_cmd_Ca));
- else if (instance->chan == 8)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Fa, sizeof(oncore_cmd_Fa));
- else if (instance->chan == 12)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ia, sizeof(oncore_cmd_Ia));
+ /* PAUSE 5sec */
- instance->o_state = ONCORE_TEST_SENT;
- cp = "state = ONCORE_TEST_SENT";
- record_clock_stats(&(instance->peer->srcadr), cp);
+ if (instance->count) {
+ if (instance->count++ < 5) /* make sure results are stable, using position */
+ return;
+ instance->count = 0;
}
-}
-
+ memcpy(instance->BEHa, buf, (size_t) (len+3)); /* Ba, Ea or Ha */
-/* Here for @@Ca, @@Fa and @@Ia messages */
+ /* check the antenna and almanac for changes (did it get unplugged, is it ready?) */
-/* There are good reasons NOT to do a @@Ca or @@Fa command with the ONCORE.
- * Doing it, it was found that under some circumstances the following
- * command would fail if issued immediately after the return from the
- * @@Fa, but a 2sec delay seemed to fix things. Since simply calling
- * sleep(2) is wastefull, and may cause trouble for some OS's, repeating
- * itimer, we set a flag, and test it at the next POLL. If it hasnt
- * been cleared, we reissue the @@Cj that is issued below.
- * Note that we do a @@Cj at the beginning, and again here.
- * The first is to get the info, the 2nd is just used as a safe command
- * after the @@Fa for all Oncores (and it was in this posn in the
- * original code).
- */
+ oncore_check_almanac(instance);
+ oncore_check_antenna(instance);
-static void
-oncore_msg_CaFaIa(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- char *cp;
+ /* Almanac mode, waiting for Almanac, we can't do anything till we have it */
+ /* When we have an almanac, we will start the Bn/En/@@Hn messages */
- if (instance->o_state == ONCORE_TEST_SENT) {
- int antenna;
+ if (instance->o_state == ONCORE_ALMANAC)
+ if (oncore_wait_almanac(instance))
+ return;
- instance->timeout = 0;
+ /* do some things once when we get this far in BaEaHa */
- if (debug > 2) {
- if (buf[2] == 'I')
- printf("ONCORE[%d]: >>@@%ca %x %x %x\n", instance->unit, buf[2], buf[4], buf[5], buf[6]);
- else
- printf("ONCORE[%d]: >>@@%ca %x %x\n", instance->unit, buf[2], buf[4], buf[5]);
- }
+ if (instance->once) {
+ instance->once = 0;
+ instance->count2 = 1;
- antenna = buf[4] & 0xc0;
- antenna >>= 6;
- buf[4] &= ~0xc0;
+ /* Have we seen an @@At (position hold) command response */
+ /* if not, message out */
- if (buf[4] || buf[5] || ((buf[2] == 'I') && buf[6])) {
- cp = "ONCORE: Self Test Failed, shutting down driver";
+ if (instance->chan != 12 && !instance->saw_At) {
+ cp = "Not Good, no @@At command (no Position Hold), must be a GT/GT+";
record_clock_stats(&(instance->peer->srcadr), cp);
- oncore_shutdown(instance->unit, instance->peer);
- return;
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Av1, sizeof(oncore_cmd_Av1));
}
- if (antenna) {
- char *cp1, Msg[160];
- cp1 = (antenna == 0x1) ? "(Over Current)" :
- ((antenna == 0x2) ? "(Under Current)" : "(No Voltage)");
+ /* have an Almanac, can start the SiteSurvey
+ * (actually only need to get past the almanac_load where we diddle with At
+ * command,- we can't change it after we start the HW_SS below
+ */
- cp = "ONCORE: Self Test, NonFatal Antenna Problems ";
- strcpy(Msg, cp);
- strcat(Msg, cp1);
- record_clock_stats(&(instance->peer->srcadr), Msg);
+ mode = instance->init_type;
+ switch (mode) {
+ case 0: /* NO initialization, don't change anything */
+ case 1: /* Use given Position */
+ case 3:
+ instance->site_survey = ONCORE_SS_DONE;
+ cp = "SSstate = ONCORE_SS_DONE";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ break;
+
+ case 2:
+ case 4: /* Site Survey */
+ cp = "SSstate = ONCORE_SS_TESTING";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ instance->site_survey = ONCORE_SS_TESTING;
+ instance->count1 = 1;
+ if (instance->chan == 12)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd3, sizeof(oncore_cmd_Gd3)); /* M12+T */
+ else
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_At2, sizeof(oncore_cmd_At2)); /* not GT, arg not VP */
+ break;
}
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Cj, sizeof(oncore_cmd_Cj));
- instance->o_state = ONCORE_INIT;
- cp = "state = ONCORE_INIT";
- record_clock_stats(&(instance->peer->srcadr), cp);
- }
-}
+ /* Read back PPS Offset for Output */
+ /* Nb. This will fail silently for early UT (no plus) and M12 models */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ayx, sizeof(oncore_cmd_Ayx));
+ /* Read back Cable Delay for Output */
-/* Ba, Ea and Ha come here */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Azx, sizeof(oncore_cmd_Azx));
-static void
-oncore_msg_BaEaHa(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- const char *cp;
- char Msg[160], Cmd[20];
- u_char *vp; /* pointer to start of shared mem for Ba/Ea/Ha */
- size_t Len;
+ /* Read back Satellite Mask Angle for Output */
+
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Agx, sizeof(oncore_cmd_Agx));
+ }
+
+ if (instance->count1) {
+ if (instance->count1++ > 5 || instance->site_survey == ONCORE_SS_HW) {
+ instance->count1 = 0;
+ if (instance->site_survey == ONCORE_SS_TESTING) {
+ /*
+ * For instance->site_survey to still be ONCORE_SS_TESTING, then after a 5sec
+ * wait after the @@At2/@@Gd3 command we have not changed the state to
+ * ONCORE_SS_HW. If the Hardware is capable of doing a Site Survey, then
+ * the variable would have been changed by now.
+ * There are three possibilities:
+ * 6/8chan
+ * (a) We did not get a response to the @@At0 or @@At2 commands,
+ * and it must be a GT/GT+/SL with no position hold mode.
+ * We will have to do it ourselves.
+ * (b) We saw the @@At0, @@At2 commands, but @@At2 failed,
+ * must be a VP or older UT which doesn't have Site Survey mode.
+ * We will have to do it ourselves.
+ * 12chan
+ * (c) We saw the @@Gd command, but @@Gd3 failed,
+ * We will have to do it ourselves.
+ */
+
+ sprintf(Msg, "Initiating software 3D site survey (%d samples)",
+ POS_HOLD_AVERAGE);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
- /* At the beginning of Ea here there are various 'timers'.
- * We enter Ea 1/sec, and since the upper levels of NTP have usurped
- * the use of timers, we use the 1/sec entry to Ea to do things that
- * we would normally do with timers...
- */
+ record_clock_stats(&(instance->peer->srcadr), "SSstate = ONCORE_SS_SW");
+ instance->site_survey = ONCORE_SS_SW;
- if (instance->count) {
- if (instance->count++ < 5) /* make sure results are stable, using position */
- return;
- instance->count = 0;
+ instance->ss_lat = instance->ss_long = instance->ss_ht = 0;
+ if (instance->chan == 12)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd0, sizeof(oncore_cmd_Gd0)); /* disable */
+ else {
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_At0, sizeof(oncore_cmd_At0)); /* disable */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Av0, sizeof(oncore_cmd_Av0)); /* disable */
+ }
+ }
+ }
}
- if (instance->o_state != ONCORE_ALMANAC && instance->o_state != ONCORE_RUN)
- return;
-
- Len = len+3; /* message length @@ -> CR,LF */
- memcpy(instance->Ea, buf, Len); /* Ba, Ea or Ha */
+ /* check the mode we are in 0/2/3D */
- if (buf[2] == 'B') { /* 6chan */
- if (instance->Ea[64]&0x8)
+ if (instance->chan == 6) {
+ if (instance->BEHa[64]&0x8)
instance->mode = MODE_0D;
- else if (instance->Ea[64]&0x10)
+ else if (instance->BEHa[64]&0x10)
instance->mode = MODE_2D;
- else if (instance->Ea[64]&0x20)
+ else if (instance->BEHa[64]&0x20)
instance->mode = MODE_3D;
- } else if (buf[2] == 'E') { /* 8chan */
- if (instance->Ea[72]&0x8)
+ } else if (instance->chan == 8) {
+ if (instance->BEHa[72]&0x8)
instance->mode = MODE_0D;
- else if (instance->Ea[72]&0x10)
+ else if (instance->BEHa[72]&0x10)
instance->mode = MODE_2D;
- else if (instance->Ea[72]&0x20)
+ else if (instance->BEHa[72]&0x20)
instance->mode = MODE_3D;
- } else if (buf[2] == 'H') { /* 12chan */
+ } else if (instance->chan == 12) {
int bits;
- bits = (instance->Ea[129]>>5) & 0x7; /* actually Ha */
+ bits = (instance->BEHa[129]>>5) & 0x7; /* actually Ha */
if (bits == 0x4)
instance->mode = MODE_0D;
else if (bits == 0x6)
@@ -1912,131 +2157,36 @@ oncore_msg_BaEaHa(
instance->mode = MODE_3D;
}
- vp = (u_char) 0; /* just to keep compiler happy */
- if (instance->chan == 6) {
- instance->rsm.bad_almanac = instance->Ea[64]&0x1;
- instance->rsm.bad_fix = instance->Ea[64]&0x52;
- vp = &instance->shmem[instance->shmem_Ba];
- } else if (instance->chan == 8) {
- instance->rsm.bad_almanac = instance->Ea[72]&0x1;
- instance->rsm.bad_fix = instance->Ea[72]&0x52;
- vp = &instance->shmem[instance->shmem_Ea];
- } else if (instance->chan == 12) {
- int bits1, bits2;
-
- bits1 = (instance->Ea[129]>>5) & 0x7; /* actually Ha */
- bits2 = instance->Ea[130];
- instance->rsm.bad_almanac = (bits2 & 0x80);
- instance->rsm.bad_fix = (bits2 & 0x8) || (bits1 == 0x2);
- /* too few sat Bad Geom */
- vp = &instance->shmem[instance->shmem_Ha];
-#if 0
-fprintf(stderr, "ONCORE: DEBUG BITS: (%x %x), (%x %x), %x %x %x %x %x\n",
- instance->Ea[129], instance->Ea[130], bits1, bits2, instance->mode == MODE_0D, instance->mode == MODE_2D,
- instance->mode == MODE_3D, instance->rsm.bad_almanac, instance->rsm.bad_fix);
-#endif
- }
-
- /* Here calculate dH = GPS - MSL for output message */
- /* also set Altitude Hold mode if GT */
-
- if (!instance->have_dH) {
- int GPS, MSL;
-
- instance->have_dH++;
- if (instance->chan == 12) {
- GPS = buf_w32(&instance->Ea[39]);
- MSL = buf_w32(&instance->Ea[43]);
- } else {
- GPS = buf_w32(&instance->Ea[23]);
- MSL = buf_w32(&instance->Ea[27]);
- }
- instance->dH = GPS - MSL;
- instance->dH /= 100.;
-
- if (MSL) { /* not set ! */
- sprintf(Msg, "dH = (GPS - MSL) = %.2fm", instance->dH);
- record_clock_stats(&(instance->peer->srcadr), Msg);
- }
-
- /* stuck in here as it only gets done once */
-
- if (instance->chan != 12 && !instance->saw_At) {
- cp = "Not Good, no @@At command, must be a GT/GT+";
- record_clock_stats(&(instance->peer->srcadr), cp);
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Av1, sizeof(oncore_cmd_Av1));
- }
- }
-
- /*
- * For instance->site_survey to be ONCORE_SS_TESTING, this must be the first
- * time thru @@Ea. There are two choices
- * (a) We did not get a response to the @@At0 or @@At2 commands,
- * must be a GT/GT+/SL with no position hold mode.
- * (b) Saw the @@At0, @@At2 commands, but @@At2 failed,
- * must be a VP or older UT which doesnt have Site Survey mode.
- * We will have to do it ourselves.
- */
-
- if (instance->site_survey == ONCORE_SS_TESTING) { /* first time thru Ea */
- sprintf(Msg, "Initiating software 3D site survey (%d samples)",
- POS_HOLD_AVERAGE);
- record_clock_stats(&(instance->peer->srcadr), Msg);
- instance->site_survey = ONCORE_SS_SW;
-
- instance->ss_lat = instance->ss_long = instance->ss_ht = 0;
- oncore_sendmsg(instance->ttyfd, oncore_cmd_At0, sizeof(oncore_cmd_At0)); /* disable */
- }
+ /* copy the record to the (extra) location in SHMEM */
if (instance->shmem) {
int i;
+ u_char *smp; /* pointer to start of shared mem for Ba/Ea/Ha */
- i = 0;
- if (instance->mode == MODE_0D) /* 0D, Position Hold */
- i = 1;
- else if (instance->mode == MODE_2D) /* 2D, Altitude Hold */
- i = 2;
- else if (instance->mode == MODE_3D) /* 3D fix */
- i = 3;
- if (i) {
- i *= (Len+3);
- vp[i + 2]++;
- memcpy(&vp[i+3], buf, Len);
+ switch(instance->chan) {
+ case 6: smp = &instance->shmem[instance->shmem_Ba]; break;
+ case 8: smp = &instance->shmem[instance->shmem_Ea]; break;
+ case 12: smp = &instance->shmem[instance->shmem_Ha]; break;
+ default: smp = (u_char) 0; break;
}
- }
- /* Almanac mode, waiting for Almanac, cant do anything till we have it */
- /* When we have an almanac, start the En/Bn messages */
+ switch (instance->mode) {
+ case MODE_0D: i = 1; break; /* 0D, Position Hold */
+ case MODE_2D: i = 2; break; /* 2D, Altitude Hold */
+ case MODE_3D: i = 3; break; /* 3D fix */
+ default: i = 0; break;
+ }
- if (instance->o_state == ONCORE_ALMANAC) {
- if (instance->rsm.bad_almanac) {
- if (debug)
- printf("ONCORE: waiting for almanac\n");
- return;
- } else { /* Here we have almanac.
- Start TRAIM (@@En/@@Bn) dependant on TRAIM flag.
- If flag == -1, then we dont know if this unit supports
- traim, and we issue the command and then wait up to
- 5sec to see if we get a reply */
-
- if (instance->traim != 0) { /* either yes or unknown */
- if (instance->chan == 6)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Bn, sizeof(oncore_cmd_Bn));
- else if (instance->chan == 8)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_En, sizeof(oncore_cmd_En));
-
- if (instance->traim == -1)
- instance->traim_delay = 1;
- }
- instance->o_state = ONCORE_RUN;
- cp = "state = ONCORE_RUN";
- record_clock_stats(&(instance->peer->srcadr), cp);
+ if (i) {
+ i *= (len+6);
+ smp[i + 2]++;
+ memcpy(&smp[i+3], buf, (size_t) (len+3));
}
}
/*
* check if timer active
- * if it hasnt been cleared, then @@En/@@Bn did not respond
+ * if it hasn't been cleared, then @@Bn/@@En/@@Hn did not respond
*/
if (instance->traim_delay) {
@@ -2045,175 +2195,135 @@ fprintf(stderr, "ONCORE: DEBUG BITS: (%x %x), (%x %x), %x %x %x %x %x\n",
instance->traim_delay = 0;
cp = "ONCORE: Did not detect TRAIM response, TRAIM = OFF";
record_clock_stats(&(instance->peer->srcadr), cp);
- }
+
+ oncore_set_traim(instance);
+ } else
+ return;
+
}
+ /* by now should have a @@Ba/@@Ea/@@Ha with good data in it */
+
+ if (!instance->have_dH && !instance->traim_delay)
+ oncore_compute_dH(instance);
+
/*
* must be ONCORE_RUN if we are here.
+ * Have # chan and TRAIM by now.
*/
- instance->pp->year = buf[6]*256+buf[7];
- instance->pp->day = ymd2yd(buf[6]*256+buf[7], buf[4], buf[5]);
- instance->pp->hour = buf[8];
+ instance->pp->year = buf[6]*256+buf[7];
+ instance->pp->day = ymd2yd(buf[6]*256+buf[7], buf[4], buf[5]);
+ instance->pp->hour = buf[8];
instance->pp->minute = buf[9];
instance->pp->second = buf[10];
/*
- * Check to see if Hardware SiteSurvey has Finished.
+ * Are we doing a Hardware or Software Site Survey?
*/
- if ((instance->site_survey == ONCORE_SS_HW) && !(instance->Ea[37] & 0x20)) {
- record_clock_stats(&(instance->peer->srcadr), "Now in 0D mode");
- instance->site_survey = ONCORE_SS_DONE;
- }
+ if (instance->site_survey == ONCORE_SS_HW || instance->site_survey == ONCORE_SS_SW)
+ oncore_ss(instance);
- if (!instance->printed && instance->site_survey == ONCORE_SS_DONE) {
- instance->printed = 1;
- /* Read back Position Hold Params (cant for GT) */
- if (instance->saw_At)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Asx, sizeof(oncore_cmd_Asx));
- else
- oncore_print_As(instance);
+ /* see if we ever saw a response from the @@Ayx above */
- /* Read back PPS Offset for Output */
- /* Nb. This will fail silently for early UT (no plus) and M12 models */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Ayx, sizeof(oncore_cmd_Ayx));
+ if (instance->count2) {
+ if (instance->count2++ > 5) { /* this delay to check on @@Ay command */
+ instance->count2 = 0;
- /* Read back Cable Delay for Output */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Azx, sizeof(oncore_cmd_Azx));
+ /* Have we seen an Ay (1PPS time offset) command response */
+ /* if not, and non-zero offset, zero the offset, and send message */
+
+ if (!instance->saw_Ay && instance->offset) {
+ cp = "No @@Ay command, PPS OFFSET ignored";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ instance->offset = 0;
+ }
+ }
}
/*
* Check the leap second status once per day.
*/
- if (instance->Bj_day != buf[5]) { /* do this 1/day */
- instance->Bj_day = buf[5];
-
- if (instance->chan == 12)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Gj, sizeof(oncore_cmd_Gj));
- else {
- /*
- * The following additional check, checking for June/December, is a
- * workaround for incorrect ONCORE firmware. The oncore starts
- * reporting the leap second when the GPS satellite data message
- * (page 18, subframe 4) is updated to a date in the future, which
- * can be several months before the leap second. WWV and other
- * services seem to wait until the month of the event to turn
- * on their indicators (which is usually a single bit).
- */
-
- if ((buf[4] == 6) || (buf[4] == 12))
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Bj, sizeof(oncore_cmd_Bj));
- }
- }
+ oncore_check_leap_sec(instance);
/*
* if SHMEM active, every 15s, steal one 'tick' to get 2D or 3D posn.
*/
- if (instance->shmem && instance->shmem_Posn && (instance->site_survey == ONCORE_SS_DONE)) { /* dont screw up the SS by changing mode */
- if (instance->pp->second%15 == 3) { /* start the sequence */
- instance->shmem_reset = 1;
- if (instance->chan == 12) {
- if (instance->shmem_Posn == 2)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd2, sizeof(oncore_cmd_Gd2)); /* 2D */
- else
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd0, sizeof(oncore_cmd_Gd0)); /* 3D */
- } else {
- if (instance->saw_At) {
- oncore_sendmsg(instance->ttyfd, oncore_cmd_At0, sizeof(oncore_cmd_At0)); /* out of 0D to 3D mode */
- if (instance->shmem_Posn == 2)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Av1, sizeof(oncore_cmd_Av1)); /* 3D to 2D mode */
- } else
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Av0, sizeof(oncore_cmd_Av0));
- }
- } else if (instance->shmem_reset || (instance->mode != MODE_0D)) {
- instance->shmem_reset = 0;
- if (instance->chan == 12)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd1, sizeof(oncore_cmd_Gd1)); /* 0D */
- else {
- if (instance->saw_At) {
- if (instance->mode == MODE_2D)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Av0, sizeof(oncore_cmd_Av0)); /* 2D -> 3D or 0D */
- oncore_sendmsg(instance->ttyfd, oncore_cmd_At1, sizeof(oncore_cmd_At1)); /* to 0D mode */
- } else
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Av1, sizeof(oncore_cmd_Av1));
- }
- }
- }
+ if (instance->shmem && !instance->shmem_bad_Ea && instance->shmem_Posn && (instance->site_survey == ONCORE_SS_DONE))
+ oncore_shmem_get_3D(instance);
- if (instance->traim == 0) /* NO traim, go get tick */
+ if (!instance->traim) /* NO traim, no BnEnHn, go get tick */
oncore_get_timestamp(instance, instance->offset, instance->offset);
+}
- if (instance->site_survey != ONCORE_SS_SW)
- return;
-
- /*
- * We have to average our own position for the Position Hold Mode
- * We use Heights from the GPS ellipsoid.
- */
-
- if (instance->rsm.bad_fix) /* Not if poor geometry or less than 3 sats */
- return;
- if (instance->mode != MODE_3D) /* Only 3D Fix */
- return;
- instance->ss_lat += buf_w32(&instance->Ea[15]);
- instance->ss_long += buf_w32(&instance->Ea[19]);
- instance->ss_ht += buf_w32(&instance->Ea[23]); /* GPS ellipsoid */
- instance->ss_count++;
+/* Almanac Status */
- if (instance->ss_count != POS_HOLD_AVERAGE)
- return;
-
- instance->ss_lat /= POS_HOLD_AVERAGE;
- instance->ss_long /= POS_HOLD_AVERAGE;
- instance->ss_ht /= POS_HOLD_AVERAGE;
+static void
+oncore_msg_Bd(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ char Msg[160];
- sprintf(Msg, "Surveyed posn: lat %.3f long %.3f ht %.3f",
- instance->ss_lat, instance->ss_long, instance->ss_ht);
+ sprintf(Msg, "Bd: Almanac %s, week = %d, t = %d, %d SVs: %x",
+ ((buf[4]) ? "LOADED" : "(NONE)"), buf[5], buf[6], buf[7], w32(&buf[8]) );
record_clock_stats(&(instance->peer->srcadr), Msg);
+}
- /* set newly determined position as 3D Position hold position */
- memcpy(Cmd, oncore_cmd_As, sizeof(oncore_cmd_As));
- w32_buf(&Cmd[2], (int) instance->ss_lat);
- w32_buf(&Cmd[6], (int) instance->ss_long);
- w32_buf(&Cmd[10], (int) instance->ss_ht);
- Cmd[14] = 0;
- oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_As));
- /* set height seperately for 2D */
+/* get leap-second warning message */
- memcpy(Cmd, oncore_cmd_Au, sizeof(oncore_cmd_Au));
- w32_buf(&Cmd[2], (int) instance->ss_ht);
- Cmd[6] = 0;
- oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Au));
+/*
+ * @@Bj does NOT behave as documented in current Oncore firmware.
+ * It turns on the LEAP indicator when the data is set, and does not,
+ * as documented, wait until the beginning of the month when the
+ * leap second will occur.
+ * Since this firmware bug will never be fixed in all the outstanding Oncore receivers
+ * @@Bj is only called in June/December.
+ */
- /* and set Position Hold */
+static void
+oncore_msg_Bj(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ const char *cp;
- if (instance->chan == 12)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd1, sizeof(oncore_cmd_Gd1));
- else {
- if (instance->saw_At)
- oncore_sendmsg(instance->ttyfd, oncore_cmd_At1, sizeof(oncore_cmd_At1));
- else
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Av1, sizeof(oncore_cmd_Av1));
+ switch(buf[4]) {
+ case 1:
+ instance->peer->leap = LEAP_ADDSECOND;
+ cp = "Set peer.leap to LEAP_ADDSECOND";
+ break;
+ case 2:
+ instance->peer->leap = LEAP_DELSECOND;
+ cp = "Set peer.leap to LEAP_DELSECOND";
+ break;
+ case 0:
+ default:
+ instance->peer->leap = LEAP_NOWARNING;
+ cp = "Set peer.leap to LEAP_NOWARNING";
+ break;
}
-
- record_clock_stats(&(instance->peer->srcadr), "Now in 0D mode");
- instance->site_survey = ONCORE_SS_DONE;
+ record_clock_stats(&(instance->peer->srcadr), cp);
}
static void
-oncore_msg_BnEn(
+oncore_msg_BnEnHn(
struct instance *instance,
u_char *buf,
- size_t len
+ size_t len
)
{
long dt1, dt2;
@@ -2222,385 +2332,570 @@ oncore_msg_BnEn(
if (instance->o_state != ONCORE_RUN)
return;
- if (instance->traim_delay) { /* flag that @@En/@@Bn returned */
- instance->traim = 1;
+ if (instance->traim_delay) { /* flag that @@Bn/@@En/Hn returned */
+ instance->traim_ck = 1;
instance->traim_delay = 0;
cp = "ONCORE: Detected TRAIM, TRAIM = ON";
record_clock_stats(&(instance->peer->srcadr), cp);
+
+ oncore_set_traim(instance);
}
- memcpy(instance->En, buf, len); /* En or Bn */
+ memcpy(instance->BEHn, buf, (size_t) len); /* Bn or En or Hn */
/* If Time RAIM doesn't like it, don't trust it */
- if (instance->En[21])
- return;
+ if (buf[2] == 'H') {
+ if (instance->BEHn[6]) /* bad TRAIM */
+ return;
- dt1 = instance->saw_tooth + instance->offset; /* dt this time step */
- instance->saw_tooth = (s_char) instance->En[25]; /* update for next time */
- dt2 = instance->saw_tooth + instance->offset; /* dt next time step */
+ dt1 = instance->saw_tooth + instance->offset; /* dt this time step */
+ instance->saw_tooth = (s_char) instance->BEHn[10]; /* update for next time Hn[10] */
+ dt2 = instance->saw_tooth + instance->offset; /* dt next time step */
+ } else {
+ if (instance->BEHn[21]) /* bad TRAIM */
+ return;
+
+ dt1 = instance->saw_tooth + instance->offset; /* dt this time step */
+ instance->saw_tooth = (s_char) instance->BEHn[25]; /* update for next time */
+ dt2 = instance->saw_tooth + instance->offset; /* dt next time step */
+ }
oncore_get_timestamp(instance, dt1, dt2);
}
+/* Here for @@Ca, @@Fa and @@Ia messages */
+
+/* These are Self test Commands for 6, 8, and 12 chan receivers.
+ * There are good reasons NOT to do a @@Ca, @@Fa or @@Ia command with the ONCORE.
+ * It was found that under some circumstances the following
+ * command would fail if issued immediately after the return from the
+ * @@Fa, but a 2sec delay seemed to fix things. Since simply calling
+ * sleep(2) is wasteful, and may cause trouble for some OS's, repeating
+ * itimer, we set a flag, and test it at the next POLL. If it hasn't
+ * been cleared, we reissue the @@Cj that is issued below.
+ * Note that we do a @@Cj at the beginning, and again here.
+ * The first is to get the info, the 2nd is just used as a safe command
+ * after the @@Fa for all Oncores (and it was in this posn in the
+ * original code).
+ */
+
static void
-oncore_get_timestamp(
+oncore_msg_CaFaIa(
struct instance *instance,
- long dt1, /* tick offset THIS time step */
- long dt2 /* tick offset NEXT time step */
+ u_char *buf,
+ size_t len
)
{
- int Rsm;
- u_long i, j;
- l_fp ts, ts_tmp;
- double dmy;
-#ifdef HAVE_STRUCT_TIMESPEC
- struct timespec *tsp = 0;
-#else
- struct timeval *tsp = 0;
-#endif
-#ifdef HAVE_PPSAPI
- int current_mode;
- pps_params_t current_params;
- struct timespec timeout;
- pps_info_t pps_i;
-#else /* ! HAVE_PPSAPI */
-#ifdef HAVE_CIOGETEV
- struct ppsclockev ev;
- int r = CIOGETEV;
-#endif
-#ifdef HAVE_TIOCGPPSEV
- struct ppsclockev ev;
- int r = TIOCGPPSEV;
-#endif
-#if TIOCDCDTIMESTAMP
- struct timeval tv;
-#endif
-#endif /* ! HAVE_PPS_API */
-
- if ((instance->site_survey == ONCORE_SS_DONE) && (instance->mode != MODE_0D))
- return;
-
- /* Don't do anything without an almanac to define the GPS->UTC delta */
-
- if (instance->rsm.bad_almanac)
- return;
+ char *cp;
+ int i;
-#ifdef HAVE_PPSAPI
- j = instance->ev_serial;
- timeout.tv_sec = 0;
- timeout.tv_nsec = 0;
- if (time_pps_fetch(instance->pps_h, PPS_TSFMT_TSPEC, &pps_i,
- &timeout) < 0) {
- printf("ONCORE: time_pps_fetch failed\n");
- return;
- }
+ if (instance->o_state == ONCORE_TEST_SENT) {
+ enum antenna_state antenna;
- if (instance->assert) {
- tsp = &pps_i.assert_timestamp;
+ instance->timeout = 0;
if (debug > 2) {
- i = (u_long) pps_i.assert_sequence;
-#ifdef HAVE_STRUCT_TIMESPEC
- printf("ONCORE[%d]: serial/j (%lu, %lu) %ld.%09ld\n",
- instance->unit, i, j,
- (long)tsp->tv_sec, (long)tsp->tv_nsec);
-#else
- printf("ONCORE[%d]: serial/j (%lu, %lu) %ld.%06ld\n",
- instance->unit, i, j,
- (long)tsp->tv_sec, (long)tsp->tv_usec);
-#endif
+ if (buf[2] == 'I')
+ printf("ONCORE[%d]: >>@@%ca %x %x %x\n", instance->unit, buf[2], buf[4], buf[5], buf[6]);
+ else
+ printf("ONCORE[%d]: >>@@%ca %x %x\n", instance->unit, buf[2], buf[4], buf[5]);
}
- if (pps_i.assert_sequence == j) {
- printf("ONCORE: oncore_get_timestamp, error serial pps\n");
- return;
- }
- instance->ev_serial = pps_i.assert_sequence;
- } else {
- tsp = &pps_i.clear_timestamp;
+ antenna = (buf[4] & 0xc0) >> 6;
+ buf[4] &= ~0xc0;
- if (debug > 2) {
- i = (u_long) pps_i.clear_sequence;
-#ifdef HAVE_STRUCT_TIMESPEC
- printf("ONCORE[%d]: serial/j (%lu, %lu) %ld.%09ld\n",
- instance->unit, i, j, (long)tsp->tv_sec, (long)tsp->tv_nsec);
-#else
- printf("ONCORE[%d]: serial/j (%lu, %lu) %ld.%06ld\n",
- instance->unit, i, j, (long)tsp->tv_sec, (long)tsp->tv_usec);
-#endif
- }
+ i = buf[4] || buf[5];
+ if (buf[2] == 'I') i = i || buf[6];
+ if (i) {
+ if (buf[2] == 'I') {
+ msyslog(LOG_ERR, "ONCORE[%d]: self test failed: result %02x %02x %02x",
+ instance->unit, buf[4], buf[5], buf[6]);
+ } else {
+ msyslog(LOG_ERR, "ONCORE[%d]: self test failed: result %02x %02x",
+ instance->unit, buf[4], buf[5]);
+ }
+ cp = "ONCORE: self test failed, shutting down driver";
+ record_clock_stats(&instance->peer->srcadr, cp);
- if (pps_i.clear_sequence == j) {
- printf("ONCORE: oncore_get_timestamp, error serial pps\n");
+ refclock_report(instance->peer, CEVNT_FAULT);
+ oncore_shutdown(instance->unit, instance->peer);
return;
}
- instance->ev_serial = pps_i.clear_sequence;
- }
- /* convert timespec -> ntp l_fp */
+ /* report the current antenna state */
- dmy = tsp->tv_nsec;
- dmy /= 1e9;
- ts.l_uf = dmy * 4294967296.0;
- ts.l_ui = tsp->tv_sec;
-#if 0
- alternate code for previous 4 lines is
- dmy = 1.0e-9*tsp->tv_nsec; /* fractional part */
- DTOLFP(dmy, &ts);
- dmy = tsp->tv_sec; /* integer part */
- DTOLFP(dmy, &ts_tmp);
- L_ADD(&ts, &ts_tmp);
- or more simply
- dmy = 1.0e-9*tsp->tv_nsec; /* fractional part */
- DTOLFP(dmy, &ts);
- ts.l_ui = tsp->tv_sec;
-#endif /* 0 */
-#else
-# if defined(HAVE_TIOCGPPSEV) || defined(HAVE_CIOGETEV)
- j = instance->ev_serial;
- if (ioctl(instance->ppsfd, r, (caddr_t) &ev) < 0) {
- perror("ONCORE: IOCTL:");
- return;
+ oncore_antenna_report(instance, antenna);
+
+ instance->o_state = ONCORE_INIT;
+ cp = "state = ONCORE_INIT";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+
+ instance->timeout = 4;
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Cj, sizeof(oncore_cmd_Cj));
}
+}
- tsp = &ev.tv;
- if (debug > 2)
-#ifdef HAVE_STRUCT_TIMESPEC
- printf("ONCORE: serial/j (%d, %d) %ld.%09ld\n",
- ev.serial, j, tsp->tv_sec, tsp->tv_nsec);
-#else
- printf("ONCORE: serial/j (%d, %d) %ld.%06ld\n",
- ev.serial, j, tsp->tv_sec, tsp->tv_usec);
-#endif
- if (ev.serial == j) {
- printf("ONCORE: oncore_get_timestamp, error serial pps\n");
+/*
+ * Demultiplex the almanac into shmem
+ */
+
+static void
+oncore_msg_Cb(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ int i;
+
+ if (instance->shmem == NULL)
return;
- }
- instance->ev_serial = ev.serial;
- /* convert timeval -> ntp l_fp */
+ if (buf[4] == 5 && buf[5] > 0 && buf[5] < 26)
+ i = buf[5];
+ else if (buf[4] == 4 && buf[5] <= 5)
+ i = buf[5] + 24;
+ else if (buf[4] == 4 && buf[5] <= 10)
+ i = buf[5] + 23;
+ else if (buf[4] == 4 && buf[5] == 25)
+ i = 34;
+ else {
+ char *cp;
- TVTOTS(tsp, &ts);
-# else
-# if defined(TIOCDCDTIMESTAMP)
- if(ioctl(instance->ppsfd, TIOCDCDTIMESTAMP, &tv) < 0) {
- perror("ONCORE: ioctl(TIOCDCDTIMESTAMP)");
+ cp = "Cb: Response is NO ALMANAC";
+ record_clock_stats(&(instance->peer->srcadr), cp);
return;
}
- tsp = &tv;
- TVTOTS(tsp, &ts);
-# else
-#error "Cannot compile -- no PPS mechanism configured!"
-# endif
-# endif
+
+ i *= 36;
+ instance->shmem[instance->shmem_Cb + i + 2]++;
+ memcpy(instance->shmem + instance->shmem_Cb + i + 3, buf, (size_t) (len + 3));
+
+#if 1
+ {
+ char Msg[160];
+ sprintf(Msg, "See Cb [%d,%d]", buf[4], buf[5]);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+ }
#endif
- /* now have timestamp in ts */
- /* add in saw_tooth and offset, these will be ZERO if no TRAIM */
+}
- /* saw_tooth not really necessary if using TIMEVAL */
- /* since its only precise to us, but do it anyway. */
- /* offset in ns, and is positive (late), we subtract */
- /* to put the PPS time transition back where it belongs */
-#ifdef HAVE_PPSAPI
- /* must hand the offset for the NEXT sec off to the Kernel to do */
- /* the addition, so that the Kernel PLL sees the offset too */
+/*
+ * Set to Factory Defaults (Reasonable for UT w/ no Battery Backup
+ * not so for VP (eeprom) or any unit with a battery
+ */
- if (instance->assert)
- instance->pps_p.assert_offset.tv_nsec = -dt2;
- else
- instance->pps_p.clear_offset.tv_nsec = -dt2;
+static void
+oncore_msg_Cf(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ const char *cp;
- /* The following code is necessary, and not just a time_pps_setparams,
- * using the saved instance->pps_p, since some other process on the
- * machine may have diddled with the mode bits (say adding something
- * that it needs). We take what is there and ADD what we need.
- * [[ The results from the time_pps_getcap is unlikely to change so
- * we could probably just save it, but I choose to do the call ]]
- * Unfortunately, there is only ONE set of mode bits in the kernel per
- * interface, and not one set for each open handle.
- *
- * There is still a race condition here where we might mess up someone
- * elses mode, but if he is being careful too, he should survive.
- */
+ if (instance->o_state == ONCORE_RESET_SENT) {
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Cg, sizeof(oncore_cmd_Cg)); /* Return to Posn Fix mode */
+ /* Reset set VP to IDLE */
+ instance->o_state = ONCORE_TEST_SENT;
+ cp = "state = ONCORE_TEST_SENT";
+ record_clock_stats(&(instance->peer->srcadr), cp);
- if (time_pps_getcap(instance->pps_h, &current_mode) < 0) {
- msyslog(LOG_ERR,
- "refclock_ioctl: time_pps_getcap failed: %m");
- return;
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Cj, sizeof(oncore_cmd_Cj));
}
+}
- if (time_pps_getparams(instance->pps_h, &current_params) < 0) {
- msyslog(LOG_ERR,
- "refclock_ioctl: time_pps_getparams failed: %m");
- return;
- }
- /* or current and mine */
- current_params.mode |= instance->pps_p.mode;
- /* but only set whats legal */
- current_params.mode &= current_mode;
- current_params.assert_offset.tv_sec = 0;
- current_params.assert_offset.tv_nsec = -dt2;
- current_params.clear_offset.tv_sec = 0;
- current_params.clear_offset.tv_nsec = -dt2;
+/*
+ * This is the Grand Central Station for the Preliminary Initialization.
+ * Once done here we move on to oncore_msg_BaEaHa for final Initialization and Running.
+ *
+ * We do an @@Cj whenever we need a safe command for all Oncores.
+ * The @@Cj gets us back here where we can switch to the next phase of setup.
+ *
+ * o Once at the very beginning (in start) to get the Model number.
+ * This info is printed, but no longer used.
+ * o Again after we have determined the number of Channels in the receiver.
+ * o And once later after we have done a reset and test, (which may hang),
+ * as we are about to initialize the Oncore and start it running.
+ * o We have one routine below for each case.
+ */
- if (time_pps_setparams(instance->pps_h, &current_params))
- perror("time_pps_setparams");
-#else
- /* if not PPSAPI, no way to inform kernel of OFFSET, just add the */
- /* offset for THIS second */
+static void
+oncore_msg_Cj(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ int mode;
+ char *cp;
- dmy = -1.0e-9*dt1;
- DTOLFP(dmy, &ts_tmp);
- L_ADD(&ts, &ts_tmp);
-#endif
- /* have time from UNIX origin, convert to NTP origin. */
+ memcpy(instance->Cj, buf, len);
- ts.l_ui += JAN_1970;
- instance->pp->lastrec = ts;
- instance->pp->msec = 0;
+ instance->timeout = 0;
+ if (instance->o_state == ONCORE_CHECK_ID) {
+ oncore_msg_Cj_id(instance, buf, len);
+ oncore_chan_test(instance);
+ } else if (instance->o_state == ONCORE_HAVE_CHAN) {
+ mode = instance->init_type;
+ if (mode == 3 || mode == 4) { /* Cf will return here to check for TEST */
+ instance->o_state = ONCORE_RESET_SENT;
+ cp = "state = ONCORE_RESET_SENT";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Cf, sizeof(oncore_cmd_Cf));
+ } else {
+ instance->o_state = ONCORE_TEST_SENT;
+ cp = "state = ONCORE_TEST_SENT";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ }
+ }
- ts_tmp = ts;
- ts_tmp.l_ui = 0; /* zero integer part */
- LFPTOD(&ts_tmp, dmy); /* convert fractional part to a double */
- j = 1.0e9*dmy; /* then to integer ns */
+ if (instance->o_state == ONCORE_TEST_SENT) {
+ if (instance->chan == 6)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ca, sizeof(oncore_cmd_Ca));
+ else if (instance->chan == 8)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Fa, sizeof(oncore_cmd_Fa));
+ else if (instance->chan == 12)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ia, sizeof(oncore_cmd_Ia));
+ } else if (instance->o_state == ONCORE_INIT)
+ oncore_msg_Cj_init(instance, buf, len);
+}
- Rsm = 0;
- if (instance->chan == 6)
- Rsm = instance->Ea[64];
- else if (instance->chan == 8)
- Rsm = instance->Ea[72];
- else if (instance->chan == 12)
- Rsm = ((instance->Ea[129]<<8) | instance->Ea[130]);
- if (instance->chan == 6 || instance->chan == 8) {
- sprintf(instance->pp->a_lastcode, /* MAX length 128, currently at 117 */
- "%u.%09lu %d %d %2d %2d %2d %2ld rstat %02x dop %4.1f nsat %2d,%d traim %d sigma %d neg-sawtooth %3d sat %d%d%d%d%d%d%d%d",
- ts.l_ui, j,
- instance->pp->year, instance->pp->day,
- instance->pp->hour, instance->pp->minute, instance->pp->second,
- (long) tsp->tv_sec % 60,
- Rsm, 0.1*(256*instance->Ea[35]+instance->Ea[36]),
- /*rsat dop */
- instance->Ea[38], instance->Ea[39], instance->En[21],
- /* nsat visible, nsat tracked, traim */
- instance->En[23]*256+instance->En[24], (s_char) instance->En[25],
- /* sigma neg-sawtooth */
- /*sat*/ instance->Ea[41], instance->Ea[45], instance->Ea[49], instance->Ea[53],
- instance->Ea[57], instance->Ea[61], instance->Ea[65], instance->Ea[69]
- ); /* will be 0 for 6 chan */
- } else if (instance->chan == 12) {
- sprintf(instance->pp->a_lastcode,
- "%u.%09lu %d %d %2d %2d %2d %2ld rstat %02x dop %4.1f nsat %2d,%d sat %d%d%d%d%d%d%d%d%d%d%d%d",
- ts.l_ui, j,
- instance->pp->year, instance->pp->day,
- instance->pp->hour, instance->pp->minute, instance->pp->second,
- (long) tsp->tv_sec % 60,
- Rsm, 0.1*(256*instance->Ea[53]+instance->Ea[54]),
- /*rsat dop */
- instance->Ea[55], instance->Ea[56],
- /* nsat visible, nsat tracked */
- /*sat*/ instance->Ea[58], instance->Ea[64], instance->Ea[70], instance->Ea[76],
- instance->Ea[82], instance->Ea[88], instance->Ea[94], instance->Ea[100],
- instance->Ea[106], instance->Ea[112], instance->Ea[118], instance->Ea[124]
- );
- }
- if (debug > 2) {
- int n;
- n = strlen(instance->pp->a_lastcode);
- printf("ONCORE[%d]: len = %d %s\n", instance->unit, n, instance->pp->a_lastcode);
- }
+/* The information on determining a Oncore 'Model', viz VP, UT, etc, from
+ * the Model Number comes from "Richard M. Hambly" <rick@cnssys.com>
+ * and from Motorola. Until recently Rick was the only source of
+ * this information as Motorola didn't give the information out.
+ *
+ * Determine the Type from the Model #, this determines #chan and if TRAIM is
+ * available.
+ *
+ * The Information from this routine is NO LONGER USED.
+ * The RESULTS are PRINTED, BUT NOT USED, and the routine COULD BE DELETED
+ */
- if (!refclock_process(instance->pp)) {
- refclock_report(instance->peer, CEVNT_BADTIME);
- return;
+static void
+oncore_msg_Cj_id(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ char *cp, *cp1, *cp2, Model[21], Msg[160];
+
+ /* Write Receiver ID message to clockstats file */
+
+ instance->Cj[294] = '\0';
+ for (cp=(char *)instance->Cj; cp< (char *) &instance->Cj[294]; ) {
+ cp1 = strchr(cp, '\r');
+ if (!cp1)
+ cp1 = (char *)&instance->Cj[294];
+ *cp1 = '\0';
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ *cp1 = '\r';
+ cp = cp1+2;
}
- record_clock_stats(&(instance->peer->srcadr), instance->pp->a_lastcode);
- instance->pollcnt = 2;
+ /* next, the Firmware Version and Revision numbers */
- if (instance->polled) {
- instance->polled = 0;
-/*
- instance->pp->dispersion = instance->pp->skew = 0;
-*/
- refclock_receive(instance->peer);
+ instance->version = atoi(&instance->Cj[83]);
+ instance->revision = atoi(&instance->Cj[111]);
+
+ /* from model number decide which Oncore this is,
+ and then the number of channels */
+
+ for (cp=&instance->Cj[160]; *cp == ' '; cp++) /* start right after 'Model #' */
+ ;
+ cp1 = cp;
+ cp2 = Model;
+ for (; !isspace((int)*cp) && cp-cp1 < 20; cp++, cp2++)
+ *cp2 = *cp;
+ *cp2 = '\0';
+
+ cp = 0;
+ if (!strncmp(Model, "PVT6", (size_t) 4)) {
+ cp = "PVT6";
+ instance->model = ONCORE_PVT6;
+ } else if (Model[0] == 'A') {
+ cp = "Basic";
+ instance->model = ONCORE_BASIC;
+ } else if (Model[0] == 'B' || !strncmp(Model, "T8", (size_t) 2)) {
+ cp = "VP";
+ instance->model = ONCORE_VP;
+ } else if (Model[0] == 'P') {
+ cp = "M12";
+ instance->model = ONCORE_M12;
+ } else if (Model[0] == 'R' || Model[0] == 'D' || Model[0] == 'S') {
+ if (Model[5] == 'N') {
+ cp = "GT";
+ instance->model = ONCORE_GT;
+ } else if ((Model[1] == '3' || Model[1] == '4') && Model[5] == 'G') {
+ cp = "GT+";
+ instance->model = ONCORE_GTPLUS;
+ } else if ((Model[1] == '5' && Model[5] == 'U') || (Model[1] == '1' && Model[5] == 'A')) {
+ cp = "UT";
+ instance->model = ONCORE_UT;
+ } else if (Model[1] == '5' && Model[5] == 'G') {
+ cp = "UT+";
+ instance->model = ONCORE_UTPLUS;
+ } else if (Model[1] == '6' && Model[5] == 'G') {
+ cp = "SL";
+ instance->model = ONCORE_SL;
+ } else {
+ cp = "Unknown";
+ instance->model = ONCORE_UNKNOWN;
+ }
+ } else {
+ cp = "Unknown";
+ instance->model = ONCORE_UNKNOWN;
}
+
+ /* use MODEL to set CHAN and TRAIM and possibly zero SHMEM */
+
+ sprintf(Msg, "This looks like an Oncore %s with version %d.%d firmware.", cp, instance->version, instance->revision);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+
+ instance->chan_id = 8; /* default */
+ if (instance->model == ONCORE_BASIC || instance->model == ONCORE_PVT6)
+ instance->chan_id = 6;
+ else if (instance->model == ONCORE_VP || instance->model == ONCORE_UT || instance->model == ONCORE_UTPLUS)
+ instance->chan_id = 8;
+ else if (instance->model == ONCORE_M12)
+ instance->chan_id = 12;
+
+ instance->traim_id = 0; /* default */
+ if (instance->model == ONCORE_BASIC || instance->model == ONCORE_PVT6)
+ instance->traim_id = 0;
+ else if (instance->model == ONCORE_VP || instance->model == ONCORE_UT || instance->model == ONCORE_UTPLUS)
+ instance->traim_id = 1;
+ else if (instance->model == ONCORE_M12)
+ instance->traim_id = -1;
+
+ sprintf(Msg, "Channels = %d, TRAIM = %s", instance->chan_id,
+ ((instance->traim_id < 0) ? "UNKNOWN" : ((instance->traim_id > 0) ? "ON" : "OFF")));
+ record_clock_stats(&(instance->peer->srcadr), Msg);
}
-/*
- * Try to use Oncore UT+ Auto Survey Feature
- * If its not there (VP), set flag to do it ourselves.
+/* OK, know type of Oncore, have possibly reset it, and have tested it.
+ * We know the number of channels.
+ * We will determine whether we have TRAIM before we actually start.
+ * Now initialize.
*/
static void
-oncore_msg_At(
+oncore_msg_Cj_init(
struct instance *instance,
u_char *buf,
size_t len
)
{
- instance->saw_At = 1;
- if (instance->site_survey == ONCORE_SS_TESTING) {
- if (buf[4] == 2) {
- record_clock_stats(&(instance->peer->srcadr),
- "Initiating hardware 3D site survey");
- instance->site_survey = ONCORE_SS_HW;
+ char *cp, Cmd[20], Msg[160];
+ int mode;
+
+
+ /* The M12 with 1.3 or 2.0 Firmware, loses track of all Satellites and has to
+ * start again if we go from 0D -> 3D, then loses them again when we
+ * go from 3D -> 0D. We do this to get a @@Ea message for SHMEM.
+ * For NOW we will turn this aspect of filling SHMEM off for the M12
+ */
+
+ if (instance->chan == 12) {
+ instance->shmem_bad_Ea = 1;
+ sprintf(Msg, "*** SHMEM partially enabled for ONCORE M12 s/w v%d.%d ***", instance->version, instance->revision);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+ }
+
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Cg, sizeof(oncore_cmd_Cg)); /* Return to Posn Fix mode */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Bb, sizeof(oncore_cmd_Bb)); /* turn on for shmem (6/8/12) */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ek, sizeof(oncore_cmd_Ek)); /* turn off (VP) */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Aw, sizeof(oncore_cmd_Aw)); /* UTC time (6/8/12) */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_AB, sizeof(oncore_cmd_AB)); /* Appl type static (VP) */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Be, sizeof(oncore_cmd_Be)); /* Tell us the Almanac for shmem (6/8/12) */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Bd, sizeof(oncore_cmd_Bd)); /* Tell us when Almanac changes */
+
+ mode = instance->init_type;
+
+ /* If there is Position input in the Config file
+ * and mode = (1,3) set it as posn hold posn, goto 0D mode.
+ * or mode = (2,4) set it as INITIAL position, and do Site Survey.
+ */
+
+ if (instance->posn_set) {
+ record_clock_stats(&(instance->peer->srcadr), "Setting Posn from input data");
+ oncore_set_posn(instance); /* this should print posn indirectly thru the As cmd */
+ } else /* must issue an @@At here to check on 6/8 Position Hold, set_posn would have */
+ if (instance->chan != 12)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Atx, sizeof(oncore_cmd_Atx));
+
+ if (mode != 0) {
+ /* cable delay in ns */
+ memcpy(Cmd, oncore_cmd_Az, (size_t) sizeof(oncore_cmd_Az));
+ w32_buf(&Cmd[-2+4], instance->delay);
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Az)); /* 6,8,12 */
+
+ /* PPS offset in ns */
+ if (instance->offset) {
+ memcpy(Cmd, oncore_cmd_Ay, (size_t) sizeof(oncore_cmd_Ay)); /* some have it, some don't */
+ w32_buf(&Cmd[-2+4], instance->offset); /* will check for hw response */
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Ay));
+ }
+
+ /* Satellite mask angle */
+
+ if (instance->Ag != 0xff) { /* will have 0xff in it if not set by user */
+ memcpy(Cmd, oncore_cmd_Ag, (size_t) sizeof(oncore_cmd_Ag));
+ Cmd[-2+4] = instance->Ag;
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Ag));
}
}
+
+ /* 6, 8 12 chan - Position/Status/Data Output Message, 1/s
+ * now we're really running
+ * these were ALL started in the chan test,
+ * However, if we had mode=3,4 then commands got turned off, so we turn
+ * them on again here just in case
+ */
+
+ if (instance->chan == 6) { /* start 6chan, kill 8,12chan commands, possibly testing VP in 6chan mode */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ea0, sizeof(oncore_cmd_Ea0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_En0, sizeof(oncore_cmd_En0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ha0, sizeof(oncore_cmd_Ha0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Hn0, sizeof(oncore_cmd_Hn0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ba, sizeof(oncore_cmd_Ba ));
+ } else if (instance->chan == 8) { /* start 8chan, kill 6,12chan commands */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ba0, sizeof(oncore_cmd_Ba0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Bn0, sizeof(oncore_cmd_Bn0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ha0, sizeof(oncore_cmd_Ha0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Hn0, sizeof(oncore_cmd_Hn0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ea, sizeof(oncore_cmd_Ea ));
+ } else if (instance->chan == 12){ /* start 12chan, kill 6,12chan commands */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ba0, sizeof(oncore_cmd_Ba0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Bn0, sizeof(oncore_cmd_Bn0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ea0, sizeof(oncore_cmd_Ea0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_En0, sizeof(oncore_cmd_En0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ha, sizeof(oncore_cmd_Ha ));
+ }
+
+ instance->count = 1;
+ instance->o_state = ONCORE_ALMANAC;
+ cp = "state = ONCORE_ALMANAC";
+ record_clock_stats(&(instance->peer->srcadr), cp);
}
-/* get leap-second warning message */
+/* 12chan position */
+
+static void
+oncore_msg_Ga(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ char Msg[160];
+ long lat, lon, ht;
+ double Lat, Lon, Ht;
+
+
+ lat = buf_w32(&buf[4]);
+ lon = buf_w32(&buf[8]);
+ ht = buf_w32(&buf[12]); /* GPS ellipsoid */
+
+ Lat = lat;
+ Lon = lon;
+ Ht = ht;
+
+ Lat /= 3600000;
+ Lon /= 3600000;
+ Ht /= 100;
+
+
+ sprintf(Msg, "Ga Posn Lat = %.7f, Lon = %.7f, Ht = %.2f", Lat, Lon, Ht);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+
+ instance->ss_lat = lat;
+ instance->ss_long = lon;
+ instance->ss_ht = ht;
+
+ oncore_print_posn(instance);
+}
+
+
+
+/* 12 chan time/date */
+
+static void
+oncore_msg_Gb(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ char Msg[160], *gmts;
+ int mo, d, y, h, m, s, gmth, gmtm;
+
+ mo = buf[4];
+ d = buf[5];
+ y = 256*buf[6]+buf[7];
+
+ h = buf[8];
+ m = buf[9];
+ s = buf[10];
+
+ gmts = ((buf[11] == 0) ? "+" : "-");
+ gmth = buf[12];
+ gmtm = buf[13];
+
+ sprintf(Msg, "Date/Time set to: %d%s%d %2d:%02d:%02d GMT (GMT offset is %s%02d:%02d)",
+ d, Month[mo+1], y, h, m, s, gmts, gmth, gmtm);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+}
+
+
/*
- * @@Bj does NOT behave as documented in current Oncore firmware.
- * It turns on the LEAP indicator when the data is set, and does not,
- * as documented, wait until the beginning of the month when the
- * leap second will occur.
- * Until this firmware bug is fixed, @@Bj is only called in June/December.
+ * Try to use Oncore M12+Timing Auto Survey Feature
+ * If its not there (M12), set flag to do it ourselves.
*/
static void
-oncore_msg_Bj(
+oncore_msg_Gd(
struct instance *instance,
u_char *buf,
size_t len
)
{
- const char *cp;
+ char *cp;
- switch(buf[4]) {
- case 1:
- instance->peer->leap = LEAP_ADDSECOND;
- cp = "Set peer.leap to LEAP_ADDSECOND";
- break;
- case 2:
- instance->peer->leap = LEAP_DELSECOND;
- cp = "Set peer.leap to LEAP_DELSECOND";
- break;
- case 0:
- default:
- instance->peer->leap = LEAP_NOWARNING;
- cp = "Set peer.leap to LEAP_NOWARNING";
- break;
+ if (instance->site_survey == ONCORE_SS_TESTING) {
+ if (buf[4] == 3) {
+ record_clock_stats(&(instance->peer->srcadr),
+ "Initiating hardware 3D site survey");
+
+ cp = "SSstate = ONCORE_SS_HW";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ instance->site_survey = ONCORE_SS_HW;
+ }
}
- record_clock_stats(&(instance->peer->srcadr), cp);
}
+
+
/* Leap Second for M12, gives all info from satellite message */
+/* also in UT v3.0 */
static void
oncore_msg_Gj(
@@ -2611,8 +2906,8 @@ oncore_msg_Gj(
{
int dt;
char Msg[160], *cp;
- static char *Month[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jly",
- "Aug", "Sep", "Oct", "Nov", "Dec" };
+
+ instance->saw_Gj = 1; /* flag, saw_Gj, dont need to try Bj in check_leap */
/* print the message to verify whats there */
@@ -2639,8 +2934,8 @@ oncore_msg_Gj(
instance->peer->leap = LEAP_NOWARNING;
cp = "Set peer.leap to LEAP_NOWARNING";
- if (buf[6] == instance->Ea[6] && buf[7] == instance->Ea[7] && /* year */
- buf[8] == instance->Ea[4]) { /* month */
+ if (buf[6] == instance->BEHa[6] && buf[7] == instance->BEHa[7] && /* year */
+ buf[8] == instance->BEHa[4]) { /* month */
if (dt) {
if (dt < 0) {
instance->peer->leap = LEAP_DELSECOND;
@@ -2656,34 +2951,426 @@ oncore_msg_Gj(
-/*
- * get Position hold position
- */
+/* Power on failure */
static void
-oncore_msg_As(
+oncore_msg_Sz(
struct instance *instance,
u_char *buf,
size_t len
)
{
- if (!instance->printed || instance->As)
+ const char *cp;
+
+ cp = "Oncore: System Failure at Power On";
+ if (instance && instance->peer) {
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ oncore_shutdown(instance->unit, instance->peer);
+ }
+}
+
+/************** Small Subroutines ***************/
+
+
+static void
+oncore_antenna_report(
+ struct instance *instance,
+ enum antenna_state new_state)
+{
+ char *cp;
+
+ if (instance->ant_state == new_state)
return;
- instance->As = 1;
+ switch (new_state) {
+ case ONCORE_ANTENNA_OK: cp = "GPS antenna: OK"; break;
+ case ONCORE_ANTENNA_OC: cp = "GPS antenna: short (overcurrent)"; break;
+ case ONCORE_ANTENNA_UC: cp = "GPS antenna: open (not connected)"; break;
+ case ONCORE_ANTENNA_NV: cp = "GPS antenna: short (no voltage)"; break;
+ default: cp = "GPS antenna: ?"; break;
+ }
- instance->ss_lat = buf_w32(&buf[4]);
- instance->ss_long = buf_w32(&buf[8]);
- instance->ss_ht = buf_w32(&buf[12]);
+ instance->ant_state = new_state;
+ record_clock_stats(&instance->peer->srcadr, cp);
+}
- /* Print out Position */
- oncore_print_As(instance);
+
+
+static void
+oncore_chan_test(
+ struct instance *instance
+ )
+{
+ char *cp;
+
+ /* subroutine oncore_Cj_id has determined the number of channels from the
+ * model number of the attached oncore. This is not always correct since
+ * the oncore could have non-standard firmware. Here we check (independently) by
+ * trying a 6, 8, and 12 chan command, and see which responds.
+ * Caution: more than one CAN respond.
+ *
+ * This #chan is used by the code rather than that calculated from the model number.
+ */
+
+ instance->o_state = ONCORE_CHECK_CHAN;
+ cp = "state = ONCORE_CHECK_CHAN";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+
+ instance->count3 = 1;
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ba, sizeof(oncore_cmd_Ba));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ea, sizeof(oncore_cmd_Ea));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ha, sizeof(oncore_cmd_Ha));
+}
+
+
+
+/* check for a GOOD Almanac, have we got one yet? */
+
+static void
+oncore_check_almanac(
+ struct instance *instance
+ )
+{
+ if (instance->chan == 6) {
+ instance->rsm.bad_almanac = instance->BEHa[64]&0x1;
+ instance->rsm.bad_fix = instance->BEHa[64]&0x52;
+ } else if (instance->chan == 8) {
+ instance->rsm.bad_almanac = instance->BEHa[72]&0x1;
+ instance->rsm.bad_fix = instance->BEHa[72]&0x52;
+ } else if (instance->chan == 12) {
+ int bits1, bits2;
+
+ bits1 = (instance->BEHa[129]>>5) & 0x7; /* actually Ha */
+ bits2 = instance->BEHa[130];
+ instance->rsm.bad_almanac = (bits2 & 0x80);
+ instance->rsm.bad_fix = (bits2 & 0x8) || (bits1 == 0x2);
+ /* too few sat Bad Geom */
+#if 0
+ fprintf(stderr, "ONCORE[%d]: DEBUG BITS: (%x %x), (%x %x), %x %x %x %x %x\n",
+ instance->unit,
+ instance->BEHa[129], instance->BEHa[130], bits1, bits2, instance->mode == MODE_0D,
+ instance->mode == MODE_2D, instance->mode == MODE_3D,
+ instance->rsm.bad_almanac, instance->rsm.bad_fix);
+#endif
+ }
+}
+
+
+
+/* check the antenna for changes (did it get unplugged?) */
+
+static void
+oncore_check_antenna(
+ struct instance *instance
+ )
+{
+ enum antenna_state antenna; /* antenna state */
+
+ antenna = instance->ant_state;
+ if (instance->chan == 12)
+ antenna = (instance->BEHa[130] & 0x6 ) >> 1;
+ else
+ antenna = (instance->BEHa[37] & 0xc0) >> 6; /* prob unset 6, set GT, UT unset VP */
+
+ oncore_antenna_report (instance, antenna);
+}
+
+
+
+/*
+ * Check the leap second status once per day.
+ *
+ * Note that the ONCORE firmware for the Bj command is wrong at
+ * least in the VP.
+ * It starts advertising a LEAP SECOND as soon as the GPS satellite
+ * data message (page 18, subframe 4) is updated to a date in the
+ * future, and does not wait for the month that it will occur.
+ * The event will usually be advertised several months in advance.
+ * Since there is a one bit flag, there is no way to tell if it is
+ * this month, or when...
+ *
+ * As such, we have the workaround below, of only checking for leap
+ * seconds with the Bj command in June/December.
+ *
+ * The Gj command gives more information, and we can tell in which
+ * month to apply the correction.
+ *
+ * Note that with the VP we COULD read the raw data message, and
+ * interpret it ourselves, but since this is specific to this receiver
+ * only, and the above workaround is adequate, we don't bother.
+ */
+
+static void
+oncore_check_leap_sec(
+ struct instance *instance
+ )
+{
+ if (instance->Bj_day != instance->BEHa[5]) { /* do this 1/day */
+ instance->Bj_day = instance->BEHa[5];
+
+ if (instance->saw_Gj < 0) { /* -1 DONT have Gj use Bj */
+ if ((instance->BEHa[4] == 6) || (instance->BEHa[4] == 12))
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Bj, sizeof(oncore_cmd_Bj));
+ return;
+ }
+
+ if (instance->saw_Gj == 0) /* 0 is dont know if we have Gj */
+ instance->count4 = 1;
+
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Gj, sizeof(oncore_cmd_Gj));
+ return;
+ }
+
+ /* Gj works for some 6/8 chan UT and the M12 */
+ /* if no response from Gj in 5 sec, we try Bj */
+ /* which isnt implemented in all the GT/UT either */
+
+ if (instance->count4) { /* delay, waiting for Gj response */
+ if (instance->saw_Gj == 1)
+ instance->count4 = 0;
+ else if (instance->count4++ > 5) { /* delay, waiting for Gj response */
+ instance->saw_Gj = -1; /* didnt see it, will use Bj */
+ instance->count4 = 0;
+ if ((instance->BEHa[4] == 6) || (instance->BEHa[4] == 12))
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Bj, sizeof(oncore_cmd_Bj));
+ }
+ }
+}
+
+
+
+/* check the message checksum,
+ * buf points to START of message ( @@ )
+ * len is length WITH CR/LF.
+ */
+
+static int
+oncore_checksum_ok(
+ u_char *buf,
+ int len
+ )
+{
+ int i, j;
+
+ j = 0;
+ for (i = 2; i < len-3; i++)
+ j ^= buf[i];
+
+ return(j == buf[len-3]);
+}
+
+
+
+static void
+oncore_compute_dH(
+ struct instance *instance
+ )
+{
+ int GPS, MSL;
+ char Msg[160];
+
+ /* Here calculate dH = GPS - MSL for output message */
+ /* also set Altitude Hold mode if GT */
+
+ instance->have_dH = 1;
+ if (instance->chan == 12) {
+ GPS = buf_w32(&instance->BEHa[39]);
+ MSL = buf_w32(&instance->BEHa[43]);
+ } else {
+ GPS = buf_w32(&instance->BEHa[23]);
+ MSL = buf_w32(&instance->BEHa[27]);
+ }
+ instance->dH = GPS - MSL;
+ instance->dH /= 100.;
+
+ /* if MSL is not set, the calculation is meaningless */
+
+ if (MSL) { /* not set ! */
+ sprintf(Msg, "dH = (GPS - MSL) = %.2fm", instance->dH);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+ }
+}
+
+
+
+/*
+ * try loading Almanac from shmem (where it was copied from shmem_old
+ */
+
+static void
+oncore_load_almanac(
+ struct instance *instance
+ )
+{
+ u_char *cp, Cmd[20];
+ int n;
+ struct timeval tv;
+ struct tm *tm;
+
+ if (!instance->shmem)
+ return;
+
+#if 1
+ for (cp=instance->shmem+4; (n = 256*(*(cp-3)) + *(cp-2)); cp+=(n+3)) {
+ if (!strncmp(cp, "@@Cb", 4) &&
+ oncore_checksum_ok(cp, 33) &&
+ (*(cp+4) == 4 || *(cp+4) == 5)) {
+ write(instance->ttyfd, cp, n);
+#if 1
+ oncore_print_Cb(instance, cp);
+#endif
+ }
+ }
+#else
+/************DEBUG************/
+ for (cp=instance->shmem+4; (n = 256*(*(cp-3)) + *(cp-2)); cp+=(n+3)) {
+ char Msg[160];
+
+ sprintf(Msg, "See %c%c%c%c %d", *(cp), *(cp+1), *(cp+2), *(cp+3), *(cp+4));
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+
+ if (!strncmp(cp, "@@Cb", 4)) {
+ oncore_print_Cb(instance, cp);
+ if (oncore_checksum_ok(cp, 33)) {
+ if (*(cp+4) == 4 || *(cp+4) == 5) {
+ record_clock_stats(&(instance->peer->srcadr), "GOOD SF");
+ write(instance->ttyfd, cp, n);
+ } else
+ record_clock_stats(&(instance->peer->srcadr), "BAD SF");
+ } else
+ record_clock_stats(&(instance->peer->srcadr), "BAD CHECKSUM");
+ }
+ }
+/************DEBUG************/
+#endif
+
+ /* Must load position and time or the Almanac doesn't do us any good */
+
+ if (!instance->posn_set) { /* if we input a posn use it, else from SHMEM */
+ record_clock_stats(&(instance->peer->srcadr), "Loading Posn from SHMEM");
+ for (cp=instance->shmem+4; (n = 256*(*(cp-3)) + *(cp-2)); cp+=(n+3)) {
+ if ((instance->chan == 6 && (!strncmp(cp, "@@Ba", 4) && oncore_checksum_ok(cp, 68))) ||
+ (instance->chan == 8 && (!strncmp(cp, "@@Ea", 4) && oncore_checksum_ok(cp, 76))) ||
+ (instance->chan == 12 && (!strncmp(cp, "@@Ha", 4) && oncore_checksum_ok(cp, 154)))) {
+ int ii, jj, kk;
+
+ instance->posn_set = 1;
+ ii = buf_w32(cp + 15);
+ jj = buf_w32(cp + 19);
+ kk = buf_w32(cp + 23);
+{
+char Msg[160];
+sprintf(Msg, "SHMEM posn = %d (%d, %d, %d)", cp-instance->shmem, ii, jj, kk);
+record_clock_stats(&(instance->peer->srcadr), Msg);
+}
+ if (ii != 0 || jj != 0 || kk != 0) { /* phk asked for this test */
+ instance->ss_lat = ii;
+ instance->ss_long = jj;
+ instance->ss_ht = kk;
+ }
+ }
+ }
+ }
+ oncore_set_posn(instance);
+
+ /* and set time to time from Computer clock */
+
+ gettimeofday(&tv, 0);
+ tm = gmtime((const time_t *) &tv.tv_sec);
+#if 1
+ {
+ char Msg[160];
+ sprintf(Msg, "DATE %d %d %d, %d %d %d", 1900+tm->tm_year, tm->tm_mon, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+ }
+#endif
+ if (instance->chan == 12) {
+ memcpy(Cmd, oncore_cmd_Gb, (size_t) sizeof(oncore_cmd_Gb));
+ Cmd[-2+4] = tm->tm_mon;
+ Cmd[-2+5] = tm->tm_mday;
+ Cmd[-2+6] = (1900+tm->tm_year)/256;
+ Cmd[-2+7] = (1900+tm->tm_year)%256;
+ Cmd[-2+8] = tm->tm_hour;
+ Cmd[-2+9] = tm->tm_min;
+ Cmd[-2+10] = tm->tm_sec;
+ Cmd[-2+11] = 0;
+ Cmd[-2+12] = 0;
+ Cmd[-2+13] = 0;
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Gb));
+ } else {
+ /* First set GMT offset to zero */
+
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ab, sizeof(oncore_cmd_Ab));
+
+ memcpy(Cmd, oncore_cmd_Ac, (size_t) sizeof(oncore_cmd_Ac));
+ Cmd[-2+4] = tm->tm_mon;
+ Cmd[-2+5] = tm->tm_mday;
+ Cmd[-2+6] = (1900+tm->tm_year)/256;
+ Cmd[-2+7] = (1900+tm->tm_year)%256;
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Ac));
+
+ memcpy(Cmd, oncore_cmd_Aa, (size_t) sizeof(oncore_cmd_Aa));
+ Cmd[-2+4] = tm->tm_hour;
+ Cmd[-2+5] = tm->tm_min;
+ Cmd[-2+6] = tm->tm_sec;
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Aa));
+ }
+
+ record_clock_stats(&(instance->peer->srcadr), "Setting Posn and Time after Loading Almanac");
}
+/* Almanac data input */
+
static void
-oncore_print_As(
+oncore_print_Cb(
+ struct instance *instance,
+ u_char *cp
+ )
+{
+#if 0
+ int ii;
+ char Msg[160];
+
+ printf("DEBUG: See: %c%c%c%c\n", *(cp), *(cp+1), *(cp+2), *(cp+3));
+ printf("DEBUG: Cb: [%d,%d]", *(cp+4), *(cp+5));
+ for(ii=0; ii<33; ii++)
+ printf(" %d", *(cp+ii));
+ printf("\n");
+
+ sprintf(Msg, "Debug: Cb: [%d,%d]", *(cp+4), *(cp+5));
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+#endif
+}
+
+
+#if 0
+static void
+oncore_print_array(
+ u_char *cp,
+ int n
+ )
+{
+ int jj, i, j, nn;
+
+ nn = 0;
+ printf("\nTOP\n");
+ jj = n/16;
+ for (j=0; j<jj; j++) {
+ printf("%4d: ", nn);
+ nn += 16;
+ for (i=0; i<16; i++)
+ printf(" %o", *cp++);
+ printf("\n");
+ }
+}
+#endif
+
+
+static void
+oncore_print_posn(
struct instance *instance
)
{
@@ -2721,7 +3408,8 @@ oncore_print_As(
imy = lon%3600000;
xm = imx/60000.;
ym = imy/60000.;
- sprintf(Msg, "Lat = %c %3ddeg %7.4fm, Long = %c %3ddeg %8.5fm, Alt = %7.2fm (%7.2fft) GPS", ns, idx, xm, ew, idy, ym, hm, hft);
+ sprintf(Msg,
+ "Lat = %c %3ddeg %7.4fm, Long = %c %3ddeg %8.5fm, Alt = %7.2fm (%7.2fft) GPS", ns, idx, xm, ew, idy, ym, hm, hft);
record_clock_stats(&(instance->peer->srcadr), Msg);
imx = xm;
@@ -2730,79 +3418,306 @@ oncore_print_As(
xs = is/1000.;
is = lon%60000;
ys = is/1000.;
- sprintf(Msg, "Lat = %c %3ddeg %2dm %5.2fs, Long = %c %3ddeg %2dm %5.2fs, Alt = %7.2fm (%7.2fft) GPS", ns, idx, imx, xs, ew, idy, imy, ys, hm, hft);
+ sprintf(Msg,
+ "Lat = %c %3ddeg %2dm %5.2fs, Long = %c %3ddeg %2dm %5.2fs, Alt = %7.2fm (%7.2fft) GPS", ns, idx, imx, xs, ew, idy, imy, ys, hm, hft);
record_clock_stats(&(instance->peer->srcadr), Msg);
}
/*
- * get PPS Offset
- * Nb. @@Ay is not supported for early UT (no plus) model
+ * write message to Oncore.
*/
static void
-oncore_msg_Ay(
- struct instance *instance,
- u_char *buf,
+oncore_sendmsg(
+ int fd,
+ u_char *ptr,
size_t len
)
{
- char Msg[120];
+ u_char cs = 0;
- if (!instance->printed || instance->Ay)
- return;
+ if (debug > 4)
+ printf("ONCORE: Send @@%c%c %d\n", ptr[0], ptr[1], (int) len);
+ write(fd, "@@", (size_t) 2);
+ write(fd, ptr, len);
+ while (len--)
+ cs ^= *ptr++;
+ write(fd, &cs, (size_t) 1);
+ write(fd, "\r\n", (size_t) 2);
+}
- instance->Ay = 1;
- instance->offset = buf_w32(&buf[4]);
- sprintf(Msg, "PPS Offset is set to %ld ns", instance->offset);
+static void
+oncore_set_posn(
+ struct instance *instance
+ )
+{
+ int mode;
+ char Cmd[20];
+
+ /* Turn OFF position hold, it needs to be off to set position (for some units),
+ will get set ON in @@Ea later */
+
+ if (instance->chan == 12)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd0, sizeof(oncore_cmd_Gd0)); /* (12) */
+ else {
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_At0, sizeof(oncore_cmd_At0)); /* (6/8) */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Av0, sizeof(oncore_cmd_Av0)); /* (6/8) */
+ }
+
+ mode = instance->init_type;
+
+ if (mode != 0) { /* first set posn hold position */
+ memcpy(Cmd, oncore_cmd_As, (size_t) sizeof(oncore_cmd_As)); /* don't modify static variables */
+ w32_buf(&Cmd[-2+4], (int) instance->ss_lat);
+ w32_buf(&Cmd[-2+8], (int) instance->ss_long);
+ w32_buf(&Cmd[-2+12], (int) instance->ss_ht);
+ Cmd[-2+16] = 0;
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_As)); /* posn hold 3D posn (6/8/12) */
+
+ memcpy(Cmd, oncore_cmd_Au, (size_t) sizeof(oncore_cmd_Au));
+ w32_buf(&Cmd[-2+4], (int) instance->ss_ht);
+ Cmd[-2+8] = 0;
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Au)); /* altitude hold (6/8/12 not UT, M12T) */
+
+ /* next set current position */
+
+ if (instance->chan == 12) {
+ memcpy(Cmd, oncore_cmd_Ga, (size_t) sizeof(oncore_cmd_Ga));
+ w32_buf(&Cmd[-2+4], (int) instance->ss_lat);
+ w32_buf(&Cmd[-2+8], (int) instance->ss_long);
+ w32_buf(&Cmd[-2+12],(int) instance->ss_ht);
+ Cmd[-2+16] = 0;
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Ga)); /* 3d posn (12) */
+ } else {
+ memcpy(Cmd, oncore_cmd_Ad, (size_t) sizeof(oncore_cmd_Ad));
+ w32_buf(&Cmd[-2+4], (int) instance->ss_lat);
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Ad)); /* lat (6/8) */
+
+ memcpy(Cmd, oncore_cmd_Ae, (size_t) sizeof(oncore_cmd_Ae));
+ w32_buf(&Cmd[-2+4], (int) instance->ss_long);
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Ae)); /* long (6/8) */
+
+ memcpy(Cmd, oncore_cmd_Af, (size_t) sizeof(oncore_cmd_Af));
+ w32_buf(&Cmd[-2+4], (int) instance->ss_ht);
+ Cmd[-2+8] = 0;
+ oncore_sendmsg(instance->ttyfd, Cmd, sizeof(oncore_cmd_Af)); /* ht (6/8) */
+ }
+
+ /* Finally, turn on position hold */
+
+ if (instance->chan == 12)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd1, sizeof(oncore_cmd_Gd1));
+ else
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_At1, sizeof(oncore_cmd_At1));
+ }
+}
+
+
+
+static void
+oncore_set_traim(
+ struct instance *instance
+ )
+{
+ char Msg[160];
+
+ if (instance->traim_in != -1) /* set in Input */
+ instance->traim = instance->traim_in;
+ else
+ instance->traim = instance->traim_ck;
+
+ sprintf(Msg, "Input says TRAIM = %d", instance->traim_in);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+ sprintf(Msg, "Model # says TRAIM = %d", instance->traim_id);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+ sprintf(Msg, "Testing says TRAIM = %d", instance->traim_ck);
record_clock_stats(&(instance->peer->srcadr), Msg);
+ sprintf(Msg, "Using TRAIM = %d", instance->traim);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+
+ if (instance->traim_ck == 1 && instance->traim == 0) {
+ /* if it should be off, and I turned it on during testing,
+ then turn it off again */
+ if (instance->chan == 6)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Bnx, sizeof(oncore_cmd_Bnx));
+ else if (instance->chan == 8)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Enx, sizeof(oncore_cmd_Enx));
+ else /* chan == 12 */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ge0, sizeof(oncore_cmd_Ge0));
+ }
}
/*
- * get Cable Delay
+ * if SHMEM active, every 15s, steal one 'tick' to get 2D or 3D posn.
*/
static void
-oncore_msg_Az(
- struct instance *instance,
- u_char *buf,
- size_t len
+oncore_shmem_get_3D(
+ struct instance *instance
)
{
- char Msg[120];
-
- if (!instance->printed || instance->Az)
- return;
+ if (instance->pp->second%15 == 3) { /* start the sequence */ /* by changing mode */
+ instance->shmem_reset = 1;
+ if (instance->chan == 12) {
+ if (instance->shmem_Posn == 2)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd2, sizeof(oncore_cmd_Gd2)); /* 2D */
+ else
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd0, sizeof(oncore_cmd_Gd0)); /* 3D */
+ } else {
+ if (instance->saw_At) { /* out of 0D -> 3D mode */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_At0, sizeof(oncore_cmd_At0));
+ if (instance->shmem_Posn == 2) /* 3D -> 2D mode */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Av1, sizeof(oncore_cmd_Av1));
+ } else
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Av0, sizeof(oncore_cmd_Av0));
+ }
+ } else if (instance->shmem_reset || (instance->mode != MODE_0D)) {
+ instance->shmem_reset = 0;
+ if (instance->chan == 12)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Gd1, sizeof(oncore_cmd_Gd1)); /* 0D */
+ else {
+ if (instance->saw_At) {
+ if (instance->mode == MODE_2D) /* 2D -> 3D or 0D mode */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Av0, sizeof(oncore_cmd_Av0));
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_At1, sizeof(oncore_cmd_At1)); /* to 0D mode */
+ } else
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Av1, sizeof(oncore_cmd_Av1));
+ }
+ }
+}
- instance->Az = 1;
- instance->delay = buf_w32(&buf[4]);
- sprintf(Msg, "Cable delay is set to %ld ns", instance->delay);
- record_clock_stats(&(instance->peer->srcadr), Msg);
-}
+/*
+ * Here we do the Software SiteSurvey.
+ * We have to average our own position for the Position Hold Mode
+ * We use Heights from the GPS ellipsoid.
+ * We check for the END of either HW or SW SiteSurvey.
+ */
static void
-oncore_msg_Sz(
- struct instance *instance,
- u_char *buf,
- size_t len
+oncore_ss(
+ struct instance *instance
)
{
- const char *cp;
+ char *cp, Msg[160];
+ double lat, lon, ht;
- cp = "Oncore: System Failure at Power On";
- if (instance && instance->peer) {
+
+ if (instance->site_survey == ONCORE_SS_HW) {
+
+ /*
+ * Check to see if Hardware SiteSurvey has Finished.
+ */
+
+ if ((instance->chan == 8 && !(instance->BEHa[37] & 0x20)) ||
+ (instance->chan == 12 && !(instance->BEHa[130] & 0x10))) {
+ record_clock_stats(&(instance->peer->srcadr), "Now in 0D mode");
+
+ if (instance->chan == 12)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Gax, sizeof(oncore_cmd_Gax));
+ else
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Asx, sizeof(oncore_cmd_Asx));
+
+ cp = "SSstate = ONCORE_SS_DONE";
+ record_clock_stats(&(instance->peer->srcadr), cp);
+ instance->site_survey = ONCORE_SS_DONE;
+ }
+ } else {
+ /*
+ * Must be a Software Site Survey.
+ */
+
+ if (instance->rsm.bad_fix) /* Not if poor geometry or less than 3 sats */
+ return;
+
+ if (instance->mode != MODE_3D) /* Use only 3D Fixes */
+ return;
+
+ instance->ss_lat += buf_w32(&instance->BEHa[15]);
+ instance->ss_long += buf_w32(&instance->BEHa[19]);
+ instance->ss_ht += buf_w32(&instance->BEHa[23]); /* GPS ellipsoid */
+ instance->ss_count++;
+
+ if (instance->ss_count != POS_HOLD_AVERAGE)
+ return;
+
+ instance->ss_lat /= POS_HOLD_AVERAGE;
+ instance->ss_long /= POS_HOLD_AVERAGE;
+ instance->ss_ht /= POS_HOLD_AVERAGE;
+
+ sprintf(Msg, "Surveyed posn: lat %.3f (mas) long %.3f (mas) ht %.3f (cm)",
+ instance->ss_lat, instance->ss_long, instance->ss_ht);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+ lat = instance->ss_lat/3600000.;
+ lon = instance->ss_long/3600000.;
+ ht = instance->ss_ht/100;
+ sprintf(Msg, "Surveyed posn: lat %.7f (deg) long %.7f (deg) ht %.2f (m)",
+ lat, lon, ht);
+ record_clock_stats(&(instance->peer->srcadr), Msg);
+
+ oncore_set_posn(instance);
+
+ record_clock_stats(&(instance->peer->srcadr), "Now in 0D mode");
+
+ cp = "SSstate = ONCORE_SS_DONE";
record_clock_stats(&(instance->peer->srcadr), cp);
- oncore_shutdown(instance->unit, instance->peer);
+ instance->site_survey = ONCORE_SS_DONE;
}
}
+
+
+static int
+oncore_wait_almanac(
+ struct instance *instance
+ )
+{
+ if (instance->rsm.bad_almanac) {
+ if (debug)
+ printf("ONCORE[%d]: waiting for almanac\n", instance->unit);
+
+ /*
+ * If we get here (first time) then we don't have an almanac in memory.
+ * Check if we have a SHMEM, and if so try to load whatever is there.
+ */
+
+ if (!instance->almanac_from_shmem) {
+ instance->almanac_from_shmem = 1;
+ oncore_load_almanac(instance);
+ }
+ return(1);
+ } else { /* Here we have the Almanac, we will be starting the @@Bn/@@En/@@Hn
+ commands, and can finally check for TRAIM. Again, we set a delay
+ (5sec) and wait for things to settle down */
+
+ if (instance->chan == 6)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Bn, sizeof(oncore_cmd_Bn));
+ else if (instance->chan == 8)
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_En, sizeof(oncore_cmd_En));
+ else if (instance->chan == 12) {
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Gc, sizeof(oncore_cmd_Gc)); /* 1PPS on, continuous */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Ge, sizeof(oncore_cmd_Ge)); /* TRAIM on */
+ oncore_sendmsg(instance->ttyfd, oncore_cmd_Hn, sizeof(oncore_cmd_Hn)); /* TRAIM status 1/s */
+ }
+ instance->traim_delay = 1;
+
+ record_clock_stats(&(instance->peer->srcadr), "Have now loaded an ALMANAC");
+
+ instance->o_state = ONCORE_RUN;
+ record_clock_stats(&(instance->peer->srcadr), "state = ONCORE_RUN");
+ }
+ return(0);
+}
+
+
+
#else
int refclock_oncore_bs;
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_palisade.c b/contrib/ntp/ntpd/refclock_palisade.c
index 4b36b788009d..897221bf3020 100644
--- a/contrib/ntp/ntpd/refclock_palisade.c
+++ b/contrib/ntp/ntpd/refclock_palisade.c
@@ -56,6 +56,11 @@
#include "config.h"
#endif
+#if defined(SYS_WINNT)
+#undef close
+#define close closesocket
+#endif
+
#if defined(REFCLOCK) && (defined(PALISADE) || defined(CLOCK_PALISADE))
#include "refclock_palisade.h"
@@ -88,6 +93,16 @@ struct refclock refclock_palisade = {
int day_of_year P((char *dt));
+/* Extract the clock type from the mode setting */
+#define CLK_TYPE(x) ((int)(((x)->ttl) & 0x7F))
+
+/* Supported clock types */
+#define CLK_TRIMBLE 0 /* Trimble Palisade */
+#define CLK_PRAECIS 1 /* Endrun Technologies Praecis */
+
+int praecis_msg;
+static void praecis_parse(struct recvbuf *rbufp, struct peer *peer);
+
/*
* palisade_start - open the devices and initialize data for processing
*/
@@ -195,6 +210,19 @@ palisade_start (
memset((char *)up, 0, sizeof(struct palisade_unit));
+ up->type = CLK_TYPE(peer);
+ switch (up->type) {
+ case CLK_TRIMBLE:
+ /* Normal mode, do nothing */
+ break;
+ case CLK_PRAECIS:
+ msyslog(LOG_NOTICE, "Palisade(%d) Praecis mode enabled\n",unit);
+ break;
+ default:
+ msyslog(LOG_NOTICE, "Palisade(%d) mode unknown\n",unit);
+ break;
+ }
+
pp = peer->procptr;
pp->io.clock_recv = palisade_io;
pp->io.srcclock = (caddr_t)peer;
@@ -335,7 +363,10 @@ TSIP_decode (
return 0;
}
- if (up->rpt_buf[0] == (char) 0x8f) {
+ /*
+ * We cast both to u_char to as 0x8f uses the sign bit on a char
+ */
+ if ((u_char) up->rpt_buf[0] == (u_char) 0x8f) {
/*
* Superpackets
*/
@@ -385,7 +416,7 @@ if (debug > 1) {
secint = (long) secs;
secfrac = secs - secint; /* 0.0 <= secfrac < 1.0 */
- pp->usec = (long) (secfrac * 1000000);
+ pp->nsec = (long) (secfrac * 1000000000);
secint %= 86400; /* Only care about today */
pp->hour = secint / 3600;
@@ -402,7 +433,7 @@ if (debug > 1) {
if (debug > 1)
printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%06ld %02d/%02d/%04d UTC %02d\n",
up->unit, mb(0) & 0xff, event, pp->hour, pp->minute,
- pp->second, pp->usec, mb(12), mb(11), pp->year, GPS_UTC_Offset);
+ pp->second, pp->nsec, mb(12), mb(11), pp->year, GPS_UTC_Offset);
#endif
/* Only use this packet when no
* 8F-AD's are being received
@@ -463,7 +494,7 @@ if (debug > 1) {
return 0;
}
- pp->usec = (long) (getdbl((u_char *) &mb(3)) * 1000000);
+ pp->nsec = (long) (getdbl((u_char *) &mb(3)) * 1000000);
if ((pp->day = day_of_year(&mb(14))) < 0)
break;
@@ -476,7 +507,7 @@ if (debug > 1) {
if (debug > 1)
printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%06ld %02d/%02d/%04d UTC %02x %s\n",
up->unit, mb(0) & 0xff, event, pp->hour, pp->minute,
- pp->second, pp->usec, mb(15), mb(14), pp->year,
+ pp->second, pp->nsec, mb(15), mb(14), pp->year,
mb(19), *Tracking_Status[st]);
#endif
return 1;
@@ -534,7 +565,7 @@ palisade_receive (
printf(
"palisade_receive: unit %d: %4d %03d %02d:%02d:%02d.%06ld\n",
up->unit, pp->year, pp->day, pp->hour, pp->minute,
- pp->second, pp->usec);
+ pp->second, pp->nsec);
#endif
/*
@@ -544,7 +575,7 @@ palisade_receive (
*/
(void) sprintf(pp->a_lastcode,"%4d %03d %02d:%02d:%02d.%06ld",
- pp->year,pp->day,pp->hour,pp->minute, pp->second,pp->usec);
+ pp->year,pp->day,pp->hour,pp->minute, pp->second,pp->nsec);
pp->lencode = 24;
#ifdef PALISADE
@@ -571,7 +602,7 @@ palisade_receive (
printf("palisade_receive: unit %d: %s\n",
up->unit, prettydate(&pp->lastrec));
#endif
-
+ pp->lastref = pp->lastrec;
refclock_receive(peer
#ifdef PALISADE
, &pp->offset, 0, pp->dispersion,
@@ -620,10 +651,43 @@ palisade_poll (
if (pp->sloppyclockflag & CLK_FLAG2)
return; /* using synchronous packet input */
+ if(up->type == CLK_PRAECIS) {
+ if(write(peer->procptr->io.fd,"SPSTAT\r\n",8) < 0)
+ msyslog(LOG_ERR, "Palisade(%d) write: %m:",unit);
+ else {
+ praecis_msg = 1;
+ return;
+ }
+ }
+
if (HW_poll(pp) < 0)
refclock_report(peer, CEVNT_FAULT);
}
+static void
+praecis_parse(struct recvbuf *rbufp, struct peer *peer)
+{
+ static char buf[100];
+ static int p = 0;
+ struct refclockproc *pp;
+
+ pp = peer->procptr;
+
+ memcpy(buf+p,rbufp->recv_space.X_recv_buffer, rbufp->recv_length);
+ p += rbufp->recv_length;
+
+ if(buf[p-2] == '\r' && buf[p-1] == '\n') {
+ buf[p-2] = '\0';
+ record_clock_stats(&peer->srcadr, buf);
+
+ p = 0;
+ praecis_msg = 0;
+
+ if (HW_poll(pp) < 0)
+ refclock_report(peer, CEVNT_FAULT);
+
+ }
+}
static void
palisade_io (
@@ -649,6 +713,13 @@ palisade_io (
pp = peer->procptr;
up = (struct palisade_unit *)pp->unitptr;
+ if(up->type == CLK_PRAECIS) {
+ if(praecis_msg) {
+ praecis_parse(rbufp,peer);
+ return;
+ }
+ }
+
c = (char *) &rbufp->recv_space;
d = c + rbufp->recv_length;
diff --git a/contrib/ntp/ntpd/refclock_palisade.h b/contrib/ntp/ntpd/refclock_palisade.h
index cc3771639850..7e1ed49658de 100644
--- a/contrib/ntp/ntpd/refclock_palisade.h
+++ b/contrib/ntp/ntpd/refclock_palisade.h
@@ -146,6 +146,7 @@ struct palisade_unit {
char rpt_status; /* TSIP Parser State */
short rpt_cnt; /* TSIP packet length so far */
char rpt_buf[BMAX]; /* packet assembly buffer */
+ int type; /* Clock mode type */
};
/*
diff --git a/contrib/ntp/ntpd/refclock_parse.c b/contrib/ntp/ntpd/refclock_parse.c
index cfb9904e3105..52fadaab0dc1 100644
--- a/contrib/ntp/ntpd/refclock_parse.c
+++ b/contrib/ntp/ntpd/refclock_parse.c
@@ -802,7 +802,7 @@ static struct parse_clockinfo
const char *cl_description; /* device name */
const char *cl_format; /* fixed format */
u_char cl_type; /* clock type (ntp control) */
- u_long cl_maxunsync; /* time to trust oscillator after loosing synch */
+ u_long cl_maxunsync; /* time to trust oscillator after losing synch */
u_long cl_speed; /* terminal input & output baudrate */
u_long cl_cflag; /* terminal control flags */
u_long cl_iflag; /* terminal input flags */
@@ -1181,7 +1181,7 @@ static struct parse_clockinfo
"WHARTON 400A Series clock Output Format 1", /* fixed format */
/* Must match a format-name in a libparse/clk_xxx.c file */
DCF_TYPE, /* clock type (ntp control) */
- (1*60*60), /* time to trust oscillator after loosing synch */
+ (1*60*60), /* time to trust oscillator after losing synch */
B9600, /* terminal input & output baudrate */
(CS8|CREAD|PARENB|CLOCAL|HUPCL),/* terminal control flags */
0, /* terminal input flags */
@@ -1240,10 +1240,10 @@ static struct parse_clockinfo
static int ncltypes = sizeof(parse_clockinfo) / sizeof(struct parse_clockinfo);
-#define CLK_REALTYPE(x) ((int)(((x)->ttlmax) & 0x7F))
+#define CLK_REALTYPE(x) ((int)(((x)->ttl) & 0x7F))
#define CLK_TYPE(x) ((CLK_REALTYPE(x) >= ncltypes) ? ~0 : CLK_REALTYPE(x))
#define CLK_UNIT(x) ((int)REFCLOCKUNIT(&(x)->srcadr))
-#define CLK_PPS(x) (((x)->ttlmax) & 0x80)
+#define CLK_PPS(x) (((x)->ttl) & 0x80)
/*
* Other constant stuff
@@ -3095,7 +3095,7 @@ parse_event(
NLOG(NLOG_CLOCKEVENT) /* conditional if clause for conditional syslog */
ERR(ERR_BADEVENT)
msyslog(LOG_ERR,
- "clock %s fault '%s' (0x%02x)", refnumtoa(parse->peer->srcadr.sin_addr.s_addr), ceventstr(event),
+ "clock %s fault '%s' (0x%02x)", refnumtoa(&parse->peer->srcadr), ceventstr(event),
(u_int)event);
}
else
@@ -3103,7 +3103,7 @@ parse_event(
NLOG(NLOG_CLOCKEVENT) /* conditional if clause for conditional syslog */
if (event == CEVNT_NOMINAL || list_err(parse, ERR_BADEVENT))
msyslog(LOG_INFO,
- "clock %s event '%s' (0x%02x)", refnumtoa(parse->peer->srcadr.sin_addr.s_addr), ceventstr(event),
+ "clock %s event '%s' (0x%02x)", refnumtoa(&parse->peer->srcadr), ceventstr(event),
(u_int)event);
}
@@ -3728,11 +3728,11 @@ gps16x_message(
case GPS_ANT_INFO:
{
ANT_INFO antinfo;
- char buffer[512];
- char *p;
+ u_char buffer[512];
+ u_char *p;
get_mbg_antinfo(&bufp, &antinfo);
- sprintf((char *)buffer, "meinberg_antenna_status=\"");
+ sprintf(buffer, "meinberg_antenna_status=\"");
p = buffer + strlen(buffer);
switch (antinfo.status)
@@ -3750,20 +3750,20 @@ gps16x_message(
CLK_UNIT(parse->peer), p);
p += strlen(p);
- mbg_tm_str((unsigned char **)&p, &antinfo.tm_disconn);
+ mbg_tm_str(&p, &antinfo.tm_disconn);
*p = '\0';
break;
case ANT_RECONN:
strcat(p, "RECONNECTED on ");
p += strlen(p);
- mbg_tm_str((unsigned char **)&p, &antinfo.tm_reconn);
+ mbg_tm_str(&p, &antinfo.tm_reconn);
sprintf(p, ", reconnect clockoffset %c%ld.%07ld s, disconnect time ",
(antinfo.delta_t < 0) ? '-' : '+',
ABS(antinfo.delta_t) / 10000,
ABS(antinfo.delta_t) % 10000);
p += strlen(p);
- mbg_tm_str((unsigned char **)&p, &antinfo.tm_disconn);
+ mbg_tm_str(&p, &antinfo.tm_disconn);
*p = '\0';
break;
@@ -3786,8 +3786,8 @@ gps16x_message(
case GPS_CFGH:
{
CFGH cfgh;
- char buffer[512];
- char *p;
+ u_char buffer[512];
+ u_char *p;
get_mbg_cfgh(&bufp, &cfgh);
if (cfgh.valid)
@@ -3797,7 +3797,7 @@ gps16x_message(
p = buffer;
strcpy(buffer, "gps_tot_51=\"");
p += strlen(p);
- mbg_tgps_str((unsigned char **)&p, &cfgh.tot_51);
+ mbg_tgps_str(&p, &cfgh.tot_51);
*p++ = '"';
*p = '\0';
set_var(&parse->kv, buffer, sizeof(buffer), RO);
@@ -3805,7 +3805,7 @@ gps16x_message(
p = buffer;
strcpy(buffer, "gps_tot_63=\"");
p += strlen(p);
- mbg_tgps_str((unsigned char **)&p, &cfgh.tot_63);
+ mbg_tgps_str(&p, &cfgh.tot_63);
*p++ = '"';
*p = '\0';
set_var(&parse->kv, buffer, sizeof(buffer), RO);
@@ -3813,7 +3813,7 @@ gps16x_message(
p = buffer;
strcpy(buffer, "gps_t0a=\"");
p += strlen(p);
- mbg_tgps_str((unsigned char **)&p, &cfgh.t0a);
+ mbg_tgps_str(&p, &cfgh.t0a);
*p++ = '"';
*p = '\0';
set_var(&parse->kv, buffer, sizeof(buffer), RO);
@@ -5176,7 +5176,7 @@ rawdcf_init_1(
}
#else
static int
-rawdcfdtr_init(
+rawdcfdtr_init_1(
struct parseunit *parse
)
{
diff --git a/contrib/ntp/ntpd/refclock_pcf.c b/contrib/ntp/ntpd/refclock_pcf.c
index ff2b28ebeec5..d4e9fd17a015 100644
--- a/contrib/ntp/ntpd/refclock_pcf.c
+++ b/contrib/ntp/ntpd/refclock_pcf.c
@@ -196,9 +196,9 @@ pcf_poll(
pp->hour = tp->tm_hour;
pp->minute = tp->tm_min;
pp->second = tp->tm_sec;
- pp->usec = buf[16] * 31250;
+ pp->nsec = buf[16] * 31250000;
if (buf[17] & 1)
- pp->usec += 500000;
+ pp->nsec += 500000000;
#ifdef DEBUG
if (debug)
@@ -216,6 +216,7 @@ pcf_poll(
pp->leap = LEAP_NOTINSYNC;
else
pp->leap = LEAP_NOWARNING;
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
}
#else
diff --git a/contrib/ntp/ntpd/refclock_pst.c b/contrib/ntp/ntpd/refclock_pst.c
index b92a2e077ab9..2443b2ca9c8a 100644
--- a/contrib/ntp/ntpd/refclock_pst.c
+++ b/contrib/ntp/ntpd/refclock_pst.c
@@ -71,7 +71,7 @@
/*
* Interface definitions
*/
-#define DEVICE "/dev/pst%d" /* device name and unit */
+#define DEVICE "/dev/wwv%d" /* device name and unit */
#define SPEED232 B9600 /* uart speed (9600 baud) */
#define PRECISION (-10) /* precision assumed (about 1 ms) */
#define WWVREFID "WWV\0" /* WWV reference ID */
@@ -84,7 +84,7 @@
* Unit control structure
*/
struct pstunit {
- u_char tcswitch; /* timecode switch */
+ int tcswitch; /* timecode switch */
char *lastptr; /* pointer to timecode data */
};
@@ -155,9 +155,9 @@ pst_start(
* Initialize miscellaneous variables
*/
peer->precision = PRECISION;
- peer->burst = NSTAGE;
pp->clockdesc = DESCRIPTION;
memcpy((char *)&pp->refid, WWVREFID, 4);
+ peer->burst = MAXSTAGE;
return (1);
}
@@ -214,17 +214,12 @@ pst_receive(
* Note we get a buffer and timestamp for each <cr>, but only
* the first timestamp is retained.
*/
- if (!up->tcswitch)
+ if (up->tcswitch == 0)
pp->lastrec = trtmp;
up->tcswitch++;
pp->lencode = up->lastptr - pp->a_lastcode;
if (up->tcswitch < 3)
return;
-#ifdef DEBUG
- if (debug)
- printf("pst: timecode %d %s\n", pp->lencode,
- pp->a_lastcode);
-#endif
/*
* We get down to business, check the timecode format and decode
@@ -240,13 +235,14 @@ pst_receive(
* Timecode format:
* "ahh:mm:ss.fffs yy/dd/mm/ddd frdzycchhSSFTttttuuxx"
*/
- if (sscanf(pp->a_lastcode, "%c%2d:%2d:%2d.%3d%c %9s%3d%13s%4ld",
- &ampmchar, &pp->hour, &pp->minute, &pp->second,
- &pp->msec, &daychar, junque, &pp->day,
- info, &ltemp) != 10) {
+ if (sscanf(pp->a_lastcode,
+ "%c%2d:%2d:%2d.%3ld%c %9s%3d%13s%4ld",
+ &ampmchar, &pp->hour, &pp->minute, &pp->second, &pp->nsec,
+ &daychar, junque, &pp->day, info, &ltemp) != 10) {
refclock_report(peer, CEVNT_BADREPLY);
return;
}
+ pp->nsec *= 1000000;
/*
* Decode synchronization, quality and last update. If
@@ -263,7 +259,9 @@ pst_receive(
memcpy((char *)&pp->refid, WWVREFID, 4);
if (peer->stratum <= 1)
peer->refid = pp->refid;
- pp->disp = PST_PHI * ltemp;
+ if (ltemp == 0)
+ pp->lastref = pp->lastrec;
+ pp->disp = PST_PHI * ltemp * 60;
/*
* Process the new sample in the median filter and determine the
@@ -290,8 +288,10 @@ pst_poll(
/*
* Time to poll the clock. The PSTI/Traconex clock responds to a
* "QTQDQMT" by returning a timecode in the format specified
- * above. If nothing is heard from the clock for two polls,
- * declare a timeout and keep going.
+ * above. Note there is no checking on state, since this may not
+ * be the only customer reading the clock. Only one customer
+ * need poll the clock; all others just listen in. If the clock
+ * becomes unreachable, declare a timeout and keep going.
*/
pp = peer->procptr;
up = (struct pstunit *)pp->unitptr;
@@ -299,17 +299,21 @@ pst_poll(
up->lastptr = pp->a_lastcode;
if (write(pp->io.fd, "QTQDQMT", 6) != 6)
refclock_report(peer, CEVNT_FAULT);
- else
- pp->polls++;
if (peer->burst > 0)
return;
if (pp->coderecv == pp->codeproc) {
refclock_report(peer, CEVNT_TIMEOUT);
return;
}
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
refclock_receive(peer);
- peer->burst = NSTAGE;
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
+#ifdef DEBUG
+ if (debug)
+ printf("pst: timecode %d %s\n", pp->lencode,
+ pp->a_lastcode);
+#endif
+ peer->burst = MAXSTAGE;
+ pp->polls++;
}
#else
diff --git a/contrib/ntp/ntpd/refclock_ripencc.c b/contrib/ntp/ntpd/refclock_ripencc.c
index f18270e3b7f1..6337f63b1ae7 100644
--- a/contrib/ntp/ntpd/refclock_ripencc.c
+++ b/contrib/ntp/ntpd/refclock_ripencc.c
@@ -461,8 +461,6 @@ struct refclock refclock_ripencc = {
static int day1tab[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
static int day2tab[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
-extern int pps_hardpps;
-extern int pps_assert;
/*
* ripencc_start - open the GPS devices and initialize data for processing
@@ -612,7 +610,7 @@ ripencc_start(int unit, struct peer *peer)
return (1);
}
- return(ripencc_ppsapi(peer, pps_assert, pps_hardpps));
+ return(ripencc_ppsapi(peer, 0, 0));
}
/*
@@ -988,7 +986,7 @@ ripencc_receive(struct recvbuf *rbufp)
*/
if (ripencc_get_pps_ts(up, &rd_tmp) == 1) {
pp->lastrec = up->tstamp = rd_tmp;
- pp->msec = 0;
+ pp->nsec = 0;
}
else
msyslog(LOG_INFO, "%s(): ripencc_get_pps_ts returns failure\n",__FUNCTION__);
@@ -1479,7 +1477,7 @@ parse0x8FAD(rpt, peer)
pp->hour = hour;
pp->minute = minute;
pp-> second = second;
- pp->msec = 0;
+ pp->nsec = 0;
if ((utcflags&UTCF_LEAP_PNDG) && up->leapdelta != 0)
pp-> leap = (up->leapdelta > 0 ? LEAP_ADDSECOND : LEAP_DELSECOND);
@@ -4706,7 +4704,7 @@ int print_msg_table_header (int rptcode, char *HdrStr, int force)
{
/* force header is to help auto-output function */
/* last_rptcode is to determine whether to print a header */
- /* for the first occurence of a series of reports */
+ /* for the first occurrence of a series of reports */
static int
last_rptcode = 0;
int
diff --git a/contrib/ntp/ntpd/refclock_shm.c b/contrib/ntp/ntpd/refclock_shm.c
index 3747ce085a8b..4ab0eded8644 100644
--- a/contrib/ntp/ntpd/refclock_shm.c
+++ b/contrib/ntp/ntpd/refclock_shm.c
@@ -87,6 +87,9 @@ struct shmTime {
int valid;
int dummy[10];
};
+
+struct shmTime *getShmTime(int);
+
struct shmTime *getShmTime (int unit) {
#ifndef SYS_WINNT
int shmid=0;
@@ -149,7 +152,6 @@ struct shmTime *getShmTime (int unit) {
return p;
}
#endif
- return 0;
}
/*
* shm_start - attach to shared memory
@@ -201,7 +203,8 @@ shm_shutdown(
pp = peer->procptr;
up = (struct shmTime *)pp->unitptr;
#ifndef SYS_WINNT
- shmdt (up);
+ /* HMS: shmdt()wants char* or const void * */
+ (void) shmdt (up);
#else
UnmapViewOfFile (up);
#endif
@@ -272,8 +275,7 @@ shm_poll(
pp->hour=t->tm_hour;
pp->minute=t->tm_min;
pp->second=t->tm_sec;
- pp->msec=0;
- pp->usec=tvt.tv_usec;
+ pp->nsec=tvt.tv_usec * 1000;
peer->precision=up->precision;
pp->leap=up->leap;
}
@@ -285,13 +287,16 @@ shm_poll(
}
else {
refclock_report(peer, CEVNT_TIMEOUT);
+ /*
msyslog (LOG_NOTICE, "SHM: no new value found in shared memory");
+ */
return;
}
if (!refclock_process(pp)) {
refclock_report(peer, CEVNT_BADTIME);
return;
}
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
}
diff --git a/contrib/ntp/ntpd/refclock_tpro.c b/contrib/ntp/ntpd/refclock_tpro.c
index 159f81745f76..3c425684ec7a 100644
--- a/contrib/ntp/ntpd/refclock_tpro.c
+++ b/contrib/ntp/ntpd/refclock_tpro.c
@@ -164,6 +164,11 @@ tpro_poll(
* can't use the sec/usec conversion produced by the driver,
* since the year may be suspect. All format error checking is
* done by the sprintf() and sscanf() routines.
+ *
+ * Note that the refclockproc usec member has now become nsec.
+ * We could either multiply the read-in usec value by 1000 or
+ * we could pad the written string appropriately and read the
+ * resulting value in already scaled.
*/
sprintf(pp->a_lastcode,
"%1x%1x%1x %1x%1x:%1x%1x:%1x%1x.%1x%1x%1x%1x%1x%1x %1x",
@@ -179,11 +184,12 @@ tpro_poll(
pp->a_lastcode);
#endif
if (sscanf(pp->a_lastcode, "%3d %2d:%2d:%2d.%6ld", &pp->day,
- &pp->hour, &pp->minute, &pp->second, &pp->usec)
+ &pp->hour, &pp->minute, &pp->second, &pp->nsec)
!= 5) {
refclock_report(peer, CEVNT_BADTIME);
return;
}
+ pp->nsec *= 1000; /* Convert usec to nsec */
if (!tp->status & 0x3)
pp->leap = LEAP_NOTINSYNC;
else
@@ -198,6 +204,8 @@ tpro_poll(
refclock_report(peer, CEVNT_TIMEOUT);
return;
}
+ refclock_receive(peer);
+ pp->lastref = pp->lastrec;
record_clock_stats(&peer->srcadr, pp->a_lastcode);
refclock_receive(peer);
peer->burst = NSTAGE;
diff --git a/contrib/ntp/ntpd/refclock_trak.c b/contrib/ntp/ntpd/refclock_trak.c
index 326a8e92620e..3a4a54e653eb 100644
--- a/contrib/ntp/ntpd/refclock_trak.c
+++ b/contrib/ntp/ntpd/refclock_trak.c
@@ -325,6 +325,7 @@ trak_receive(
refclock_report(peer, CEVNT_BADTIME);
return;
}
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
}
diff --git a/contrib/ntp/ntpd/refclock_true.c b/contrib/ntp/ntpd/refclock_true.c
index 986031d7f77e..dd355d90273b 100644
--- a/contrib/ntp/ntpd/refclock_true.c
+++ b/contrib/ntp/ntpd/refclock_true.c
@@ -503,6 +503,7 @@ true_receive(
refclock_report(peer, CEVNT_BADTIME);
return;
}
+ off.l_uf = 0;
#endif
pp->usec = true_sample720();
@@ -545,8 +546,9 @@ true_receive(
* If clock is good we send a NOMINAL message so that
* any previous BAD messages are nullified
*/
- refclock_report(peer, CEVNT_NOMINAL);
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
+ refclock_report(peer, CEVNT_NOMINAL);
/*
* We have succedded in answering the poll.
diff --git a/contrib/ntp/ntpd/refclock_ulink.c b/contrib/ntp/ntpd/refclock_ulink.c
index 5bf569a66080..1f5e78a86db7 100644
--- a/contrib/ntp/ntpd/refclock_ulink.c
+++ b/contrib/ntp/ntpd/refclock_ulink.c
@@ -248,8 +248,6 @@ ulink_receive(
* proper format, we declare bad format and exit.
*/
syncchar = leapchar = modechar = ' ';
- pp->msec = 0;
-
switch (pp->lencode ) {
case LEN33X:
/*
@@ -347,11 +345,11 @@ ulink_receive(
* T = DST <-> STD transition indicators
*
*/
- if (sscanf(pp->a_lastcode, "%c%1d%c%4d%3d%*c%2d:%2d:%2d.%2d%c",
+ if (sscanf(pp->a_lastcode, "%c%1d%c%4d%3d%*c%2d:%2d:%2d.%2ld%c",
&syncchar, &quality, &modechar, &pp->year, &pp->day,
&pp->hour, &pp->minute, &pp->second,
- &pp->msec,&leapchar) == 10) {
- pp->msec *= 10; /* M320 returns 10's of msecs */
+ &pp->nsec, &leapchar) == 10) {
+ pp->nsec *= 10000000; /* M320 returns 10's of msecs */
if (leapchar == 'I' ) leapchar = '+';
if (leapchar == 'D' ) leapchar = '-';
if (syncchar != '?' ) syncchar = ':';
@@ -487,8 +485,9 @@ ulink_poll(
refclock_report(peer, CEVNT_TIMEOUT);
return;
}
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
- refclock_receive(peer);
+ pp->lastref = pp->lastrec;
+ refclock_receive(peer);
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
peer->burst = NSTAGE;
}
diff --git a/contrib/ntp/ntpd/refclock_usno.c b/contrib/ntp/ntpd/refclock_usno.c
index 30a13300bac5..057eef9fb188 100644
--- a/contrib/ntp/ntpd/refclock_usno.c
+++ b/contrib/ntp/ntpd/refclock_usno.c
@@ -344,8 +344,9 @@ usno_receive(
* protocol module to chuck out the data. Finaly, we unhook the
* timeout, arm for the next call, fold the tent and go home.
*/
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
pp->sloppyclockflag &= ~CLK_FLAG1;
up->pollcnt = 0;
up->state = 0;
@@ -437,7 +438,7 @@ usno_timeout(
peer->nextdate = current_time + ANSWER;
return;
}
- switch (peer->ttlmax) {
+ switch (peer->ttl) {
/*
* In manual mode the calling program is activated
diff --git a/contrib/ntp/ntpd/refclock_wwv.c b/contrib/ntp/ntpd/refclock_wwv.c
index b1d05c7ca33f..11aae7fa038e 100644
--- a/contrib/ntp/ntpd/refclock_wwv.c
+++ b/contrib/ntp/ntpd/refclock_wwv.c
@@ -21,7 +21,7 @@
# include <sys/ioctl.h>
#endif /* HAVE_SYS_IOCTL_H */
-#define ICOM 1 /* undefine to suppress ICOM code */
+#define ICOM 1
#ifdef ICOM
#include "icom.h"
@@ -32,7 +32,7 @@
*
* This driver synchronizes the computer time using data encoded in
* radio transmissions from NIST time/frequency stations WWV in Boulder,
- * CO, and WWVH in Kauai, HI. Transmikssions are made continuously on
+ * CO, and WWVH in Kauai, HI. Transmissions are made continuously on
* 2.5, 5, 10, 15 and 20 MHz in AM mode. An ordinary shortwave receiver
* can be tuned manually to one of these frequencies or, in the case of
* ICOM receivers, the receiver can be tuned automatically using this
@@ -40,16 +40,16 @@
* night.
*
* The driver receives, demodulates and decodes the radio signals when
- * connected to the audio codec of a Sun workstation running SunOS or
- * Solaris, and with a little help, other workstations with similar
- * codecs or sound cards. In this implementation, only one audio driver
- * and codec can be supported on a single machine.
+ * connected to the audio codec of a workstation running Solaris, SunOS
+ * FreeBSD or Linux, and with a little help, other workstations with
+ * similar codecs or sound cards. In this implementation, only one audio
+ * driver and codec can be supported on a single machine.
*
* The demodulation and decoding algorithms used in this driver are
* based on those developed for the TAPR DSP93 development board and the
* TI 320C25 digital signal processor described in: Mills, D.L. A
* precision radio clock for WWV transmissions. Electrical Engineering
- * Report 97-8-1, University of Delaware, August 1997, 25 pp. Available
+ * Report 97-8-1, University of Delaware, August 1997, 25 pp., available
* from www.eecis.udel.edu/~mills/reports.htm. The algorithms described
* in this report have been modified somewhat to improve performance
* under weak signal conditions and to provide an automatic station
@@ -64,66 +64,69 @@
* Interface definitions
*/
#define DEVICE_AUDIO "/dev/audio" /* audio device name */
+#define AUDIO_BUFSIZ 320 /* audio buffer size (50 ms) */
#define PRECISION (-10) /* precision assumed (about 1 ms) */
-#define REFID "NONE" /* reference ID */
#define DESCRIPTION "WWV/H Audio Demodulator/Decoder" /* WRU */
#define SECOND 8000 /* second epoch (sample rate) (Hz) */
#define MINUTE (SECOND * 60) /* minute epoch */
#define OFFSET 128 /* companded sample offset */
#define SIZE 256 /* decompanding table size */
-#define MAXSIG 6000. /* maximum signal level reference */
+#define MAXSIG 6000. /* max signal level reference */
+#define MAXCLP 100 /* max clips above reference per s */
#define MAXSNR 30. /* max SNR reference */
#define DGAIN 20. /* data channel gain reference */
#define SGAIN 10. /* sync channel gain reference */
-#define MAXFREQ (125e-6 * SECOND) /* freq tolerance (.0125%) */
+#define MAXFREQ 1. /* max frequency tolerance (125 PPM) */
#define PI 3.1415926535 /* the real thing */
#define DATSIZ (170 * MS) /* data matched filter size */
#define SYNSIZ (800 * MS) /* minute sync matched filter size */
-#define UTCYEAR 72 /* the first UTC year */
#define MAXERR 30 /* max data bit errors in minute */
-#define NCHAN 5 /* number of channels */
-
-/*
- * Macroni
- */
-#define MOD(x, y) ((x) < 0 ? -(-(x) % (y)) : (x) % (y))
+#define NCHAN 5 /* number of radio channels */
+#define AUDIO_PHI 5e-6 /* dispersion growth factor */
+#ifdef IRIG_SUCKS
+#define WIGGLE 11 /* wiggle filter length */
+#endif /* IRIG_SUCKS */
/*
* General purpose status bits (status)
*
- * Notes: SELV and/or SELH are set when the minute sync pulse from
- * either or both WWV and/or WWVH stations has been heard. MSYNC is set
- * when the minute sync pulse has been acquired and never reset. SSYNC
- * is set when the second sync pulse has been acquired and cleared by
- * watchdog or signal loss. DSYNC is set when the minutes unit digit has
- * reached the threshold and INSYNC is set when if all nine digits have
- * reached the threshold and never cleared.
+ * SELV and/or SELH are set when WWV or WWVH has been heard and cleared
+ * on signal loss. SSYNC is set when the second sync pulse has been
+ * acquired and cleared by signal loss. MSYNC is set when the minute
+ * sync pulse has been acquired. DSYNC is set when a digit reaches the
+ * threshold and INSYNC is set when all nine digits have reached the
+ * threshold. The MSYNC, DSYNC and INSYNC bits are cleared only by
+ * timeout, upon which the driver starts over from scratch.
*
- * DGATE is set if a data bit is invalid, BGATE is set if a BCD digit
+ * DGATE is set if a data bit is invalid and BGATE is set if a BCD digit
* bit is invalid. SFLAG is set when during seconds 59, 0 and 1 while
- * probing for alternate frequencies. LEPSEC is set when the SECWAR of
- * the timecode is set on the last second of 30 June or 31 December. At
- * the end of this minute both the receiver and transmitter insert
- * second 60 in the minute and the minute sync slips a second.
+ * probing alternate frequencies. LEPDAY is set when SECWAR of the
+ * timecode is set on 30 June or 31 December. LEPSEC is set during the
+ * last minute of the day when LEPDAY is set. At the end of this minute
+ * the driver inserts second 60 in the seconds state machine and the
+ * minute sync slips a second. The SLOSS and SJITR bits are for monitor
+ * only.
*/
#define MSYNC 0x0001 /* minute epoch sync */
#define SSYNC 0x0002 /* second epoch sync */
#define DSYNC 0x0004 /* minute units sync */
#define INSYNC 0x0008 /* clock synchronized */
-#define DGATE 0x0010 /* data bit error */
-#define BGATE 0x0020 /* BCD digit bit error */
+#define FGATE 0x0010 /* frequency gate */
+#define DGATE 0x0020 /* data bit error */
+#define BGATE 0x0040 /* BCD digit bit error */
#define SFLAG 0x1000 /* probe flag */
-#define LEPSEC 0x2000 /* leap second in progress */
+#define LEPDAY 0x2000 /* leap second day */
+#define LEPSEC 0x4000 /* leap second minute */
/*
- * Station scoreboard bits (select)
+ * Station scoreboard bits
*
* These are used to establish the signal quality for each of the five
* frequencies and two stations.
*/
-#define JITRNG 0x0001 /* jitter above threshold */
-#define SYNCNG 0x0002 /* sync below threshold or SNR */
-#define DATANG 0x0004 /* data below threshold or SNR */
+#define SYNCNG 0x0001 /* sync or SNR below threshold */
+#define DATANG 0x0002 /* data or SNR below threshold */
+#define ERRRNG 0x0004 /* data error */
#define SELV 0x0100 /* WWV station select */
#define SELH 0x0200 /* WWVH station select */
@@ -131,75 +134,72 @@
* Alarm status bits (alarm)
*
* These bits indicate various alarm conditions, which are decoded to
- * form the quality character included in the timecode. There are four
- * four-bit nibble fields in the word, each corresponding to a specific
- * alarm condition. At the end of each second, the word is shifted left
- * one position and the least significant bit of each nibble cleared.
- * This bit can be set during the next minute if the associated alarm
- * condition is raised. This provides a way to remember alarm conditions
- * up to four minutes.
- *
- * If not tracking both minute sync and second sync, the SYNERR alarm is
- * raised. The data error counter is incremented for each invalid data
- * bit. If too many data bit errors are encountered in one minute, the
- * MODERR alarm is raised. The DECERR alarm is raised if a maximum
- * likelihood digit fails to compare with the current clock digit. If
- * the probability of any miscellaneous bit or any digit falls below the
- * threshold, the SYMERR alarm is raised.
+ * form the quality character included in the timecode. If not tracking
+ * second sync, the SYNERR alarm is raised. The data error counter is
+ * incremented for each invalid data bit. If too many data bit errors
+ * are encountered in one minute, the MODERR alarm is raised. The DECERR
+ * alarm is raised if a maximum likelihood digit fails to compare with
+ * the current clock digit. If the probability of any miscellaneous bit
+ * or any digit falls below the threshold, the SYMERR alarm is raised.
*/
-#define DECERR 0 /* BCD digit compare error */
-#define SYMERR 4 /* low bit or digit probability */
-#define MODERR 8 /* too many data bit errors */
-#define SYNERR 12 /* not synchronized to station */
+#define DECERR 1 /* BCD digit compare error */
+#define SYMERR 2 /* low bit or digit probability */
+#define MODERR 4 /* too many data bit errors */
+#define SYNERR 8 /* not synchronized to station */
/*
- * Watchdog timeouts (watch)
+ * Watchcat timeouts (watch)
*
* If these timeouts expire, the status bits are mashed to zero and the
* driver starts from scratch. Suitably more refined procedures may be
* developed in future. All these are in minutes.
*/
-#define ACQSN 5 /* acquisition timeout */
-#define HSPEC 15 /* second sync timeout */
+#define ACQSN 5 /* station acquisition timeout */
#define DIGIT 30 /* minute unit digit timeout */
-#define PANIC (4 * 1440) /* panic timeout */
+#define HOLD 30 /* reachable timeout */
+#define PANIC (2 * 1440) /* panic timeout */
/*
* Thresholds. These establish the minimum signal level, minimum SNR and
* maximum jitter thresholds which establish the error and false alarm
- * rates of the receiver. The values defined here may be on the
+ * rates of the driver. The values defined here may be on the
* adventurous side in the interest of the highest sensitivity.
*/
-#define ATHR 2000 /* acquisition amplitude threshold */
-#define ASNR 6.0 /* acquisition SNR threshold (dB) */
-#define AWND 50 /* acquisition window threshold (ms) */
-#define AMIN 3 /* acquisition min compare count */
-#define AMAX 6 /* max compare count */
-#define QTHR 2000 /* QSY amplitude threshold */
-#define QSNR 20.0 /* QSY SNR threshold (dB) */
+#define MTHR 13. /* acquisition signal gate (percent) */
+#define TTHR 50. /* tracking signal gate (percent) */
+#define ATHR 2000. /* acquisition amplitude threshold */
+#define ASNR 6. /* acquisition SNR threshold (dB) */
+#define AWND 20. /* acquisition jitter threshold (ms) */
+#define AMIN 3 /* min bit count */
+#define AMAX 6 /* max bit count */
+#define QTHR 2000 /* QSY sync threshold */
+#define QSNR 20. /* QSY sync SNR threshold (dB) */
+#define XTHR 1000. /* QSY data threshold */
+#define XSNR 10. /* QSY data SNR threshold (dB) */
#define STHR 500 /* second sync amplitude threshold */
+#define SSNR 10. /* second sync SNR threshold */
#define SCMP 10 /* second sync compare threshold */
#define DTHR 1000 /* bit amplitude threshold */
-#define DSNR 10.0 /* bit SNR threshold (dB) */
-#define BTHR 1000 /* digit probability threshold */
-#define BSNR 3.0 /* digit likelihood threshold (dB) */
-#define BCMP 5 /* digit compare threshold (dB) */
+#define DSNR 10. /* bit SNR threshold (dB) */
+#define BTHR 1000 /* digit amplitude threshold */
+#define BSNR 3. /* digit likelihood threshold (dB) */
+#define BCMP 5 /* digit compare threshold */
/*
- * Tone frequency definitions.
+ * Tone frequency definitions. The increments are for 4.5-deg sine
+ * table.
*/
-#define MS 8 /* samples per millisecond */
-#define IN100 1 /* 100 Hz 4.5-deg sin table */
-#define IN1000 10 /* 1000 Hz 4.5-deg sin table */
-#define IN1200 12 /* 1200 Hz 4.5-deg sin table */
+#define MS (SECOND / 1000) /* samples per millisecond */
+#define IN100 ((100 * 80) / SECOND) /* 100 Hz increment */
+#define IN1000 ((1000 * 80) / SECOND) /* 1000 Hz increment */
+#define IN1200 ((1200 * 80) / SECOND) /* 1200 Hz increment */
/*
* Acquisition and tracking time constants. Usually powers of 2.
*/
-#define MINAVG 8 /* min time constant (s) */
-#define MAXAVG 7 /* max time constant (log2 s) */
-#define TCONST 16 /* minute time constant (s) */
-#define SYNCTC (1024 / (1 << MAXAVG)) /* FLL constant (s) */
+#define MINAVG 8 /* min time constant */
+#define MAXAVG 1024 /* max time constant */
+#define TCONST 16 /* data bit/digit time constant */
/*
* Miscellaneous status bits (misc)
@@ -212,30 +212,20 @@
#define DUT2 0x02 /* 57 DUT .2 */
#define DUT4 0x04 /* 58 DUT .4 */
#define DUTS 0x08 /* 50 DUT sign */
-#define DST1 0x10 /* 55 DST1 DST in progress */
-#define DST2 0x20 /* 2 DST2 DST change warning */
+#define DST1 0x10 /* 55 DST1 leap warning */
+#define DST2 0x20 /* 2 DST2 DST1 delayed one day */
#define SECWAR 0x40 /* 3 leap second warning */
/*
- * The total system delay with the DSP93 program is at 22.5 ms,
- * including the propagation delay from Ft. Collins, CO, to Newark, DE
- * (8.9 ms), the communications receiver delay and the delay of the
- * DSP93 program itself. The DSP93 program delay is due mainly to the
- * 400-Hz FIR bandpass filter (5 ms) and second sync matched filter (5
- * ms), leaving about 3.6 ms for the receiver delay and strays.
- *
- * The total system delay with this program is estimated at 27.1 ms by
- * comparison with another PPS-synchronized NTP server over a 10-Mb/s
- * Ethernet. The propagation and receiver delays are the same as with
- * the DSP93 program. The program delay is due only to the 600-Hz
- * IIR bandpass filter (1.1 ms), since other delays have been removed.
- * Assuming 4.7 ms for the receiver, program and strays, this leaves
- * 13.5 ms for the audio codec and operating system latencies for a
- * total of 18.2 ms. as the systematic delay. The additional propagation
- * delay specific to each receiver location can be programmed in the
- * fudge time1 and time2 values for WWV and WWVH, respectively.
+ * The on-time synchronization point for the driver is the second epoch
+ * sync pulse produced by the FIR matched filters. As the 5-ms delay of
+ * these filters is compensated, the program delay is 1.1 ms due to the
+ * 600-Hz IIR bandpass filter. The measured receiver delay is 4.7 ms and
+ * the codec delay less than 0.2 ms. The additional propagation delay
+ * specific to each receiver location can be programmed in the fudge
+ * time1 and time2 values for WWV and WWVH, respectively.
*/
-#define PDELAY (.0036 + .0011 + .0135) /* net system delay (s) */
+#define PDELAY (.0011 + .0047 + .0002) /* net system delay (s) */
/*
* Table of sine values at 4.5-degree increments. This is used by the
@@ -280,20 +270,19 @@ struct progx {
* Case switch numbers
*/
#define IDLE 0 /* no operation */
-#define COEF 1 /* BCD bit conditioned on DSYNC */
-#define COEF1 2 /* BCD bit */
-#define COEF2 3 /* BCD bit ignored */
-#define DECIM9 4 /* BCD digit 0-9 */
-#define DECIM6 5 /* BCD digit 0-6 */
-#define DECIM3 6 /* BCD digit 0-3 */
-#define DECIM2 7 /* BCD digit 0-2 */
-#define MSCBIT 8 /* miscellaneous bit */
-#define MSC20 9 /* miscellaneous bit */
-#define MSC21 10 /* QSY probe channel */
-#define MIN1 11 /* minute */
-#define MIN2 12 /* leap second */
-#define SYNC2 13 /* QSY data channel */
-#define SYNC3 14 /* QSY data channel */
+#define COEF 1 /* BCD bit */
+#define COEF2 2 /* BCD bit ignored */
+#define DECIM9 3 /* BCD digit 0-9 */
+#define DECIM6 4 /* BCD digit 0-6 */
+#define DECIM3 5 /* BCD digit 0-3 */
+#define DECIM2 6 /* BCD digit 0-2 */
+#define MSCBIT 7 /* miscellaneous bit */
+#define MSC20 8 /* miscellaneous bit */
+#define MSC21 9 /* QSY probe channel */
+#define MIN1 10 /* minute */
+#define MIN2 11 /* leap second */
+#define SYNC2 12 /* QSY data channel */
+#define SYNC3 13 /* QSY data channel */
/*
* Offsets in decoding matrix
@@ -314,10 +303,10 @@ struct progx progx[] = {
{COEF, 3}, /* 7 8 */
{DECIM9, YR}, /* 8 */
{IDLE, 0}, /* 9 p1 */
- {COEF1, 0}, /* 10 1 minute units */
- {COEF1, 1}, /* 11 2 */
- {COEF1, 2}, /* 12 4 */
- {COEF1, 3}, /* 13 8 */
+ {COEF, 0}, /* 10 1 minute units */
+ {COEF, 1}, /* 11 2 */
+ {COEF, 2}, /* 12 4 */
+ {COEF, 3}, /* 13 8 */
{DECIM9, MN}, /* 14 */
{COEF, 0}, /* 15 10 minute tens */
{COEF, 1}, /* 16 20 */
@@ -442,8 +431,8 @@ double bcd2[][4] = {
*/
char dstcod[] = {
'S', /* 00 standard time */
- 'I', /* 01 daylight warning */
- 'O', /* 10 standard warning */
+ 'I', /* 01 set clock ahead at 0200 local */
+ 'O', /* 10 set clock back at 0200 local */
'D' /* 11 daylight time */
};
@@ -472,32 +461,32 @@ struct decvec {
* for WWVH. Other than frequency, the format is the same.
*/
struct sync {
- double amp; /* sync amplitude (I, Q square) */
- double synamp; /* sync envelope at 800 ms */
+ double epoch; /* accumulated epoch differences */
+ double maxamp; /* sync max envelope (square) */
+ double noiamp; /* sync noise envelope (square) */
+ long pos; /* max amplitude position */
+ long lastpos; /* last max position */
+ long mepoch; /* minute synch epoch */
+
+ double amp; /* sync amplitude (I, Q squares) */
+ double synamp; /* sync max envelope at 800 ms */
double synmax; /* sync envelope at 0 s */
- double synmin; /* avg sync envelope at 59 s, 1 s */
+ double synmin; /* sync envelope at 59, 1 s */
double synsnr; /* sync signal SNR */
- double noise; /* max amplitude off pulse */
- double sigmax; /* max amplitude on pulse */
- double lastmax; /* last max amplitude on pulse */
- long pos; /* position at maximum amplitude */
- long lastpos; /* last position at maximum amplitude */
- long jitter; /* shake, wiggle and waggle */
- long mepoch; /* minute synch epoch */
- int count; /* compare counter */
+ int count; /* bit counter */
char refid[5]; /* reference identifier */
- char ident[4]; /* station identifier */
int select; /* select bits */
+ int reach; /* reachability register */
};
/*
- * The channel structure is used to mitigate between channels. At this
- * point we have already decided which station to use.
+ * The channel structure is used to mitigate between channels.
*/
struct chan {
int gain; /* audio gain */
- int errcnt; /* data bit error counter */
- double noiamp; /* I-channel average noise amplitude */
+ double sigamp; /* data max envelope (square) */
+ double noiamp; /* data noise envelope (square) */
+ double datsnr; /* data signal SNR */
struct sync wwv; /* wwv station */
struct sync wwvh; /* wwvh station */
};
@@ -508,37 +497,42 @@ struct chan {
struct wwvunit {
l_fp timestamp; /* audio sample timestamp */
l_fp tick; /* audio sample increment */
- double comp[SIZE]; /* decompanding table */
double phase, freq; /* logical clock phase and frequency */
double monitor; /* audio monitor point */
int fd_icom; /* ICOM file descriptor */
int errflg; /* error flags */
- int bufcnt; /* samples in buffer */
- int bufptr; /* buffer index pointer */
+ int watch; /* watchcat */
+
+ /*
+ * Audio codec variables
+ */
+ double comp[SIZE]; /* decompanding table */
int port; /* codec port */
int gain; /* codec gain */
+ int mongain; /* codec monitor gain */
int clipcnt; /* sample clipped count */
- int seccnt; /* second countdown */
- int minset; /* minutes since last clock set */
- int watch; /* watchcat */
- int swatch; /* second sync watchcat */
+#ifdef IRIG_SUCKS
+ l_fp wigwag; /* wiggle accumulator */
+ int wp; /* wiggle filter pointer */
+ l_fp wiggle[WIGGLE]; /* wiggle filter */
+ l_fp wigbot[WIGGLE]; /* wiggle bottom fisher*/
+#endif /* IRIG_SUCKS */
/*
* Variables used to establish basic system timing
*/
- int avgint; /* log2 master time constant (s) */
- int epoch; /* second epoch ramp */
- int repoch; /* receiver sync epoch */
- int yepoch; /* transmitter sync epoch */
+ int avgint; /* master time constant */
+ int tepoch; /* sync epoch median */
+ int yepoch; /* sync epoch */
+ int repoch; /* buffered sync epoch */
double epomax; /* second sync amplitude */
+ double eposnr; /* second sync SNR */
double irig; /* data I channel amplitude */
double qrig; /* data Q channel amplitude */
int datapt; /* 100 Hz ramp */
double datpha; /* 100 Hz VFO control */
- int rphase; /* receiver sample counter */
- int rsec; /* receiver seconds counter */
+ int rphase; /* second sample counter */
long mphase; /* minute sample counter */
- long nepoch; /* minute epoch index */
/*
* Variables used to mitigate which channel to use
@@ -553,19 +547,16 @@ struct wwvunit {
* Variables used by the clock state machine
*/
struct decvec decvec[9]; /* decoding matrix */
- int cdelay; /* WWV propagation delay (samples) */
- int hdelay; /* WVVH propagation delay (samples) */
- int pdelay; /* propagation delay (samples) */
- int tphase; /* transmitter sample counter */
- int tsec; /* transmitter seconds counter */
+ int rsec; /* seconds counter */
int digcnt; /* count of digits synchronized */
/*
* Variables used to estimate signal levels and bit/digit
* probabilities
*/
- double sigamp; /* I-channel peak signal amplitude */
- double noiamp; /* I-channel average noise amplitude */
+ double sigsig; /* data max signal */
+ double sigamp; /* data max envelope (square) */
+ double noiamp; /* data noise envelope (square) */
double datsnr; /* data SNR (dB) */
/*
@@ -575,6 +566,7 @@ struct wwvunit {
int alarm; /* alarm flashers */
int misc; /* miscellaneous timecode bits */
int errcnt; /* data bit error counter */
+ int errbit; /* data bit errors in minute */
};
/*
@@ -590,10 +582,10 @@ static void wwv_poll P((int, struct peer *));
*/
static void wwv_epoch P((struct peer *));
static void wwv_rf P((struct peer *, double));
-static void wwv_endpoc P((struct peer *, double, int));
+static void wwv_endpoc P((struct peer *, int));
static void wwv_rsec P((struct peer *, double));
static void wwv_qrz P((struct peer *, struct sync *,
- double));
+ double, int));
static void wwv_corr4 P((struct peer *, struct decvec *,
double [], double [][4]));
static void wwv_gain P((struct peer *));
@@ -603,7 +595,12 @@ static int timecode P((struct wwvunit *, char *));
static double wwv_snr P((double, double));
static int carry P((struct decvec *));
static void wwv_newchan P((struct peer *));
+static void wwv_newgame P((struct peer *));
+static double wwv_metric P((struct sync *));
+#ifdef ICOM
static int wwv_qsy P((struct peer *, int));
+#endif /* ICOM */
+
static double qsy[NCHAN] = {2.5, 5, 10, 15, 20}; /* frequencies (MHz) */
/*
@@ -625,13 +622,12 @@ struct refclock refclock_wwv = {
*/
static int
wwv_start(
- int unit, /* instance number (not used) */
+ int unit, /* instance number (used by PCM) */
struct peer *peer /* peer structure pointer */
)
{
struct refclockproc *pp;
struct wwvunit *up;
- struct chan *cp;
#ifdef ICOM
int temp;
#endif /* ICOM */
@@ -646,7 +642,7 @@ wwv_start(
/*
* Open audio device
*/
- fd = audio_init(DEVICE_AUDIO);
+ fd = audio_init(DEVICE_AUDIO, AUDIO_BUFSIZ, unit);
if (fd < 0)
return (0);
#ifdef DEBUG
@@ -657,12 +653,11 @@ wwv_start(
/*
* Allocate and initialize unit structure
*/
- if (!(up = (struct wwvunit *)
- emalloc(sizeof(struct wwvunit)))) {
- (void) close(fd);
+ if (!(up = (struct wwvunit *)emalloc(sizeof(struct wwvunit)))) {
+ close(fd);
return (0);
}
- memset((char *)up, 0, sizeof(struct wwvunit));
+ memset(up, 0, sizeof(struct wwvunit));
pp = peer->procptr;
pp->unitptr = (caddr_t)up;
pp->io.clock_recv = wwv_receive;
@@ -670,7 +665,7 @@ wwv_start(
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
- (void)close(fd);
+ close(fd);
free(up);
return (0);
}
@@ -680,8 +675,6 @@ wwv_start(
*/
peer->precision = PRECISION;
pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- DTOLFP(1. / SECOND, &up->tick);
/*
* The companded samples are encoded sign-magnitude. The table
@@ -697,6 +690,7 @@ wwv_start(
if (i % 16 == 0)
step *= 2.;
}
+ DTOLFP(1. / SECOND, &up->tick);
/*
* Initialize the decoding matrix with the radix for each digit
@@ -711,22 +705,8 @@ wwv_start(
up->decvec[DA + 2].radix = 4;
up->decvec[YR].radix = 10; /* years */
up->decvec[YR + 1].radix = 10;
-
- /*
- * Initialize the station processes for audio gain, select bit,
- * station/frequency identifier and reference identifier.
- */
- up->gain = 127;
- for (i = 0; i < NCHAN; i++) {
- cp = &up->mitig[i];
- cp->gain = up->gain;
- cp->wwv.select = SELV;
- strcpy(cp->wwv.refid, "WWV ");
- sprintf(cp->wwv.ident,"C%.0f", floor(qsy[i]));
- cp->wwvh.select = SELH;
- strcpy(cp->wwvh.refid, "WWVH");
- sprintf(cp->wwvh.ident, "H%.0f", floor(qsy[i]));
- }
+ wwv_newgame(peer);
+ up->schan = up->achan = 3;
/*
* Initialize autotune if available. Start out at 15 MHz. Note
@@ -739,8 +719,8 @@ wwv_start(
if (debug > 1)
temp = P_TRACE;
#endif
- if (peer->ttlmax != 0) {
- if (peer->ttlmax & 0x80)
+ if (peer->ttl != 0) {
+ if (peer->ttl & 0x80)
up->fd_icom = icom_init("/dev/icom", B1200,
temp);
else
@@ -748,14 +728,17 @@ wwv_start(
temp);
}
if (up->fd_icom > 0) {
- up->schan = 3;
- if ((temp = wwv_qsy(peer, up->schan)) < 0) {
+ if ((temp = wwv_qsy(peer, up->schan)) != 0) {
NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
- msyslog(LOG_ERR,
- "ICOM bus error; autotune disabled");
+ msyslog(LOG_NOTICE,
+ "icom: radio not found");
up->errflg = CEVNT_FAULT;
close(up->fd_icom);
up->fd_icom = 0;
+ } else {
+ NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
+ msyslog(LOG_NOTICE,
+ "icom: autotune enabled");
}
}
#endif /* ICOM */
@@ -806,10 +789,8 @@ wwv_receive(
*/
double sample; /* codec sample */
u_char *dpt; /* buffer pointer */
+ int bufcnt; /* buffer counter */
l_fp ltemp;
- int isneg;
- double dtemp;
- int i, j;
peer = (struct peer *)rbufp->recv_srcclock;
pp = peer->procptr;
@@ -819,13 +800,12 @@ wwv_receive(
* Main loop - read until there ain't no more. Note codec
* samples are bit-inverted.
*/
+ DTOLFP((double)rbufp->recv_length / SECOND, &ltemp);
+ L_SUB(&rbufp->recv_time, &ltemp);
up->timestamp = rbufp->recv_time;
- up->bufcnt = rbufp->recv_length;
- DTOLFP((double)up->bufcnt / SECOND, &ltemp);
- L_SUB(&up->timestamp, &ltemp);
dpt = rbufp->recv_buffer;
- for (up->bufptr = 0; up->bufptr < up->bufcnt; up->bufptr++) {
- sample = up->comp[~*dpt & 0xff];
+ for (bufcnt = 0; bufcnt < rbufp->recv_length; bufcnt++) {
+ sample = up->comp[~*dpt++ & 0xff];
/*
* Clip noise spikes greater than MAXSIG. If no clips,
@@ -841,14 +821,17 @@ wwv_receive(
}
/*
- * Variable frequency oscillator. A phase change of one
- * unit produces a change of 360 degrees; a frequency
- * change of one unit produces a change of 1 Hz.
+ * Variable frequency oscillator. The codec oscillator
+ * runs at the nominal rate of 8000 samples per second,
+ * or 125 us per sample. A frequency change of one unit
+ * results in either duplicating or deleting one sample
+ * per second, which results in a frequency change of
+ * 125 PPM.
*/
up->phase += up->freq / SECOND;
if (up->phase >= .5) {
up->phase -= 1.;
- } else if (up->phase < - .5) {
+ } else if (up->phase < -.5) {
up->phase += 1.;
wwv_rf(peer, sample);
wwv_rf(peer, sample);
@@ -856,71 +839,30 @@ wwv_receive(
wwv_rf(peer, sample);
}
L_ADD(&up->timestamp, &up->tick);
-
- /*
- * Once each second adjust the codec port and gain.
- * While at it, initialize the propagation delay for
- * both WWV and WWVH. Don't forget to correct for the
- * receiver phase delay, mostly due to the 600-Hz
- * IIR bandpass filter used for the sync signals.
- */
- up->cdelay = (int)(SECOND * (pp->fudgetime1 + PDELAY));
- up->hdelay = (int)(SECOND * (pp->fudgetime2 + PDELAY));
- up->seccnt = (up->seccnt + 1) % SECOND;
- if (up->seccnt == 0) {
- if (pp->sloppyclockflag & CLK_FLAG2)
- up->port = 2;
- else
- up->port = 1;
- }
-
- /*
- * During development, it is handy to have an audio
- * monitor that can be switched to various signals. This
- * code converts the linear signal left in up->monitor
- * to codec format.
- */
- isneg = 0;
- dtemp = up->monitor;
- if (sample < 0) {
- isneg = 1;
- dtemp -= dtemp;
- }
- i = 0;
- j = OFFSET >> 1;
- while (j != 0) {
- if (dtemp > up->comp[i])
- i += j;
- else if (dtemp < up->comp[i])
- i -= j;
- else
- break;
- j >>= 1;
- }
- if (isneg)
- *dpt = ~(i + OFFSET);
- else
- *dpt = ~i;
- dpt++;
}
/*
- * Squawk to the monitor speaker if enabled.
+ * Set the input port and monitor gain for the next buffer.
*/
+ if (pp->sloppyclockflag & CLK_FLAG2)
+ up->port = 2;
+ else
+ up->port = 1;
if (pp->sloppyclockflag & CLK_FLAG3)
- if (write(pp->io.fd, (u_char *)&rbufp->recv_space,
- (u_int)up->bufcnt) < 0)
- perror("wwv:");
+ up->mongain = MONGAIN;
+ else
+ up->mongain = 0;
}
/*
* wwv_poll - called by the transmit procedure
*
- * This routine keeps track of status. If nothing is heard for two
- * successive poll intervals, a timeout event is declared and any
- * orphaned timecode updates are sent to foster care. Once the clock is
- * set, it always appears reachable, unless reset by watchdog timeout.
+ * This routine keeps track of status. If no offset samples have been
+ * processed during a poll interval, a timeout event is declared. If
+ * errors have have occurred during the interval, they are reported as
+ * well. Once the clock is set, it always appears reachable, unless
+ * reset by watchdog timeout.
*/
static void
wwv_poll(
@@ -935,13 +877,10 @@ wwv_poll(
up = (struct wwvunit *)pp->unitptr;
if (pp->coderecv == pp->codeproc)
up->errflg = CEVNT_TIMEOUT;
- else
- pp->polls++;
- if (up->status & INSYNC)
- peer->reach |= 1;
if (up->errflg)
refclock_report(peer, up->errflg);
up->errflg = 0;
+ pp->polls++;
}
@@ -953,36 +892,27 @@ wwv_poll(
* form, plus the epoch index of the second sync signal and the second
* index of the minute sync signal.
*
- * There are three 1-s ramps used by this program, all spanning the
- * range 0-7999 logical samples for exactly one second, as determined by
- * the logical clock. The first drives the second epoch and runs
- * continuously. The second determines the receiver phase and the third
- * the transmitter phase within the second. The receiver second begins
- * upon arrival of the 5-ms second sync pulse which begins the second;
- * while the transmitter second begins before it by the specified
- * propagation delay.
- *
- * There are three 1-m ramps spanning the range 0-59 seconds. The first
- * drives the minute epoch in samples and runs continuously. The second
- * determines the receiver second and the third the transmitter second.
- * The receiver second begins upon arrival of the 800-ms sync pulse sent
- * during the first second of the minute; while the transmitter second
- * begins before it by the specified propagation delay.
+ * There are two 1-s ramps used by this program. Both count the 8000
+ * logical clock samples spanning exactly one second. The epoch ramp
+ * counts the samples starting at an arbitrary time. The rphase ramp
+ * counts the samples starting at the 5-ms second sync pulse found
+ * during the epoch ramp.
*
- * The output signals include the epoch maximum and phase and second
- * maximum and index. The epoch phase provides the master reference for
- * all signal and timing functions, while the second index identifies
- * the first second of the minute. The epoch and second maxima are used
- * to calculate SNR for gating functions.
+ * There are two 1-m ramps used by this program. The mphase ramp counts
+ * the 480,000 logical clock samples spanning exactly one minute and
+ * starting at an arbitrary time. The rsec ramp counts the 60 seconds of
+ * the minute starting at the 800-ms minute sync pulse found during the
+ * mphase ramp. The rsec ramp drives the seconds state machine to
+ * determine the bits and digits of the timecode.
*
* Demodulation operations are based on three synthesized quadrature
- * sinusoids: 100 Hz for the data subcarrier, 1000 Hz for the WWV sync
- * signals and 1200 Hz for the WWVH sync signal. These drive synchronous
- * matched filters for the data subcarrier (170 ms at 100 Hz), WWV
- * minute sync signal (800 ms at 1000 Hz) and WWVH minute sync signal
- * (800 ms at 1200 Hz). Two additional matched filters are switched in
- * as required for the WWV seconds sync signal (5 ms at 1000 Hz) and
- * WWVH seconds sync signal (5 ms at 1200 Hz).
+ * sinusoids: 100 Hz for the data signal, 1000 Hz for the WWV sync
+ * signal and 1200 Hz for the WWVH sync signal. These drive synchronous
+ * matched filters for the data signal (170 ms at 100 Hz), WWV minute
+ * sync signal (800 ms at 1000 Hz) and WWVH minute sync signal (800 ms
+ * at 1200 Hz). Two additional matched filters are switched in
+ * as required for the WWV second sync signal (5 ms at 1000 Hz) and
+ * WWVH second sync signal (5 ms at 1200 Hz).
*/
static void
wwv_rf(
@@ -992,6 +922,7 @@ wwv_rf(
{
struct refclockproc *pp;
struct wwvunit *up;
+ struct sync *sp;
static double lpf[5]; /* 150-Hz lpf delay line */
double data; /* lpf output */
@@ -1021,13 +952,14 @@ wwv_rf(
static int epopos; /* epoch sync position buffer */
static int iniflg; /* initialization flag */
- struct sync *sp;
- double dtemp;
- long ltemp;
- int i;
+ int epoch; /* comb filter index */
+ int pdelay; /* propagation delay (samples) */
+ double dtemp;
+ int i;
pp = peer->procptr;
up = (struct wwvunit *)pp->unitptr;
+
if (!iniflg) {
iniflg = 1;
memset((char *)lpf, 0, sizeof(lpf));
@@ -1041,7 +973,6 @@ wwv_rf(
memset((char *)hqbuf, 0, sizeof(hqbuf));
memset((char *)epobuf, 0, sizeof(epobuf));
}
- up->monitor = isig; /* change for debug */
/*
* Baseband data demodulation. The 100-Hz subcarrier is
@@ -1069,13 +1000,9 @@ wwv_rf(
* multiplying the filtered signal by 100-Hz sine and cosine
* signals, respectively. The data signals are demodulated by
* 170-ms synchronous matched filters to produce the amplitude
- * and phase signals used by the decoder. Note the correction
- * due to the propagation delay is necessary for seamless
- * handover between WWV and WWVH.
+ * and phase signals used by the decoder.
*/
- i = up->datapt - up->pdelay % 80;
- if (i < 0)
- i += 80;
+ i = up->datapt;
up->datapt = (up->datapt + IN100) % 80;
dtemp = sintab[i] * data / DATSIZ * DGAIN;
up->irig -= ibuf[iptr];
@@ -1123,9 +1050,14 @@ wwv_rf(
* signals are demodulated by 800-ms synchronous matched filters
* to synchronize the second and minute and to detect which one
* (or both) the WWV or WWVH signal is present.
+ *
+ * Note the master timing ramps, which run continuously. The
+ * minute counter (mphase) counts the samples in the minute,
+ * while the second counter (epoch) counts the samples in the
+ * second.
*/
up->mphase = (up->mphase + 1) % MINUTE;
-
+ epoch = up->mphase % SECOND;
i = csinptr;
csinptr = (csinptr + IN1000) % 80;
dtemp = sintab[i] * syncx / SYNSIZ * SGAIN;
@@ -1135,9 +1067,12 @@ wwv_rf(
dtemp = sintab[i] * syncx / SYNSIZ * SGAIN;
cqamp = cqamp - cqbuf[jptr] + dtemp;
cqbuf[jptr] = dtemp;
+ sp = &up->mitig[up->schan].wwv;
dtemp = ciamp * ciamp + cqamp * cqamp;
- wwv_qrz(peer, &up->mitig[up->schan].wwv, dtemp);
-
+ sp->amp = dtemp;
+ if (!(up->status & MSYNC))
+ wwv_qrz(peer, sp, dtemp, (int)(pp->fudgetime1 *
+ SECOND));
i = hsinptr;
hsinptr = (hsinptr + IN1200) % 80;
dtemp = sintab[i] * syncx / SYNSIZ * SGAIN;
@@ -1147,98 +1082,95 @@ wwv_rf(
dtemp = sintab[i] * syncx / SYNSIZ * SGAIN;
hqamp = hqamp - hqbuf[jptr] + dtemp;
hqbuf[jptr] = dtemp;
+ sp = &up->mitig[up->schan].wwvh;
dtemp = hiamp * hiamp + hqamp * hqamp;
- wwv_qrz(peer, &up->mitig[up->schan].wwvh, dtemp);
-
+ sp->amp = dtemp;
+ if (!(up->status & MSYNC))
+ wwv_qrz(peer, sp, dtemp, (int)(pp->fudgetime2 *
+ SECOND));
jptr = (jptr + 1) % SYNSIZ;
+ /*
+ * The following section is called once per minute. It does
+ * housekeeping and timeout functions and empties the dustbins.
+ */
if (up->mphase == 0) {
-
- /*
- * This section is called once per minute at the minute
- * epoch independently of the transmitter or receiver
- * minute. If the leap bit is set, set the minute epoch
- * back one second so the station processes don't miss a
- * beat. Then, increment the watchdog counter and test
- * for two sets of conditions depending on whether
- * minute sync has been acquired or not.
- */
up->watch++;
- if (up->rsec == 60) {
- up->mphase -= SECOND;
- if (up->mphase < 0)
- up->mphase += MINUTE;
- } else if (!(up->status & MSYNC)) {
-
- /*
- * If minute sync has not been acquired, the
- * program listens for minute sync pulses from
- * both WWV and WWVH. The station with the
- * greater compare count is selected, with ties
- * broken by WWV, but only if the count is at
- * least three. Once a station has been
- * acquired, it is initialized and begins
- * tracking the signal.
+ if (!(up->status & MSYNC)) {
+
+ /*
+ * If minute sync has not been acquired before
+ * timeout, or if no signal is heard, the
+ * program cycles to the next frequency and
+ * tries again.
*/
- if (up->mitig[up->achan].wwv.count >=
- up->mitig[up->achan].wwvh.count)
- sp = &up->mitig[up->achan].wwv;
- else
- sp = &up->mitig[up->achan].wwvh;
- if (sp->count >= AMIN) {
- up->watch = up->swatch = 0;
- up->status |= MSYNC;
- ltemp = sp->mepoch - SYNSIZ;
- if (ltemp < 0)
- ltemp += MINUTE;
- up->rsec = (MINUTE - ltemp) / SECOND;
- if (!(up->status & SSYNC)) {
- up->repoch = ltemp % SECOND;
- up->yepoch = up->repoch -
- up->pdelay;
- if (up->yepoch < 0)
- up->yepoch += SECOND;
+ wwv_newchan(peer);
+ if (!(up->status & (SELV | SELH)) || up->watch >
+ ACQSN) {
+ wwv_newgame(peer);
+#ifdef ICOM
+ if (up->fd_icom > 0) {
+ up->schan = (up->schan + 1) %
+ NCHAN;
+ wwv_qsy(peer, up->schan);
}
- wwv_newchan(peer);
- } else if (sp->count == 0 || up->watch >= ACQSN)
- {
- up->watch = sp->count = 0;
- up->schan = (up->schan + 1) % NCHAN;
- wwv_qsy(peer, up->schan);
+#endif /* ICOM */
}
} else {
/*
- * If minute sync has been acquired, the program
- * watches for timeout. The timeout is reset
- * when the clock is set or verified. If a
- * timeout occurs and the minute units digit has
- * not synchronized, reset the program and start
- * over.
+ * If the leap bit is set, set the minute epoch
+ * back one second so the station processes
+ * don't miss a beat.
*/
- if (up->watch > DIGIT && !(up->status & DSYNC))
- up->watch = up->status = 0;
+ if (up->status & LEPSEC) {
+ up->mphase -= SECOND;
+ if (up->mphase < 0)
+ up->mphase += MINUTE;
+ }
+ }
+ }
- /*
- * If the second sync times out, dim the sync
- * lamp and raise an alarm.
- */
- up->swatch++;
- if (up->swatch > HSPEC)
- up->status &= ~SSYNC;
+ /*
+ * When the channel metric reaches threshold and the second
+ * counter matches the minute epoch within the second, the
+ * driver has synchronized to the station. The second number is
+ * the remaining seconds until the next minute epoch, while the
+ * sync epoch is zero. Watch out for the first second; if
+ * already synchronized to the second, the buffered sync epoch
+ * must be set.
+ */
+ if (up->status & MSYNC) {
+ wwv_epoch(peer);
+ } else if ((sp = up->sptr) != NULL) {
+ struct chan *cp;
+
+ if (sp->count >= AMIN && epoch == sp->mepoch % SECOND) {
+ up->rsec = 60 - sp->mepoch / SECOND;
+ up->rphase = 0;
+ up->status |= MSYNC;
+ up->watch = 0;
if (!(up->status & SSYNC))
- up->alarm |= 1 << SYNERR;
+ up->repoch = up->yepoch = epoch;
+ else
+ up->repoch = up->yepoch;
+ for (i = 0; i < NCHAN; i++) {
+ cp = &up->mitig[i];
+ cp->wwv.count = cp->wwv.reach = 0;
+ cp->wwvh.count = cp->wwvh.reach = 0;
+ }
}
}
/*
- * The second sync pulse is extracted using 5-ms FIR matched
- * filters at 1000 Hz for WWV or 1200 Hz for WWVH. This pulse is
- * used for the most precise synchronization, since if provides
- * a resolution of one sample (125 us).
+ * The second sync pulse is extracted using 5-ms (40 sample) FIR
+ * matched filters at 1000 Hz for WWV or 1200 Hz for WWVH. This
+ * pulse is used for the most precise synchronization, since if
+ * provides a resolution of one sample (125 us). The filters run
+ * only if the station has been reliably determined.
*/
if (up->status & SELV) {
- up->pdelay = up->cdelay;
+ pdelay = (int)(pp->fudgetime1 * SECOND);
/*
* WWV FIR matched filter, five cycles of 1000-Hz
@@ -1286,7 +1218,7 @@ wwv_rf(
mfsync += (mf[1] = mf[0]) * -4.224514e-02;
mf[0] = syncx;
} else if (up->status & SELH) {
- up->pdelay = up->hdelay;
+ pdelay = (int)(pp->fudgetime2 * SECOND);
/*
* WWVH FIR matched filter, six cycles of 1200-Hz
@@ -1335,32 +1267,47 @@ wwv_rf(
mf[0] = syncx;
} else {
mfsync = 0;
+ pdelay = 0;
}
/*
- * Extract the seconds sync pulse using a 1-s comb filter at
- * baseband. Correct for the FIR matched filter delay, which is
- * 5 ms for both the WWV and WWVH filters. Blank the signal when
- * probing.
+ * Enhance the seconds sync pulse using a 1-s (8000-sample) comb
+ * filter. Correct for the FIR matched filter delay, which is 5
+ * ms for both the WWV and WWVH filters, and also for the
+ * propagation delay. Once each second look for second sync. If
+ * not in minute sync, fiddle the codec gain. Note the SNR is
+ * computed from the maximum sample and the two samples 6 ms
+ * before and 6 ms after it, so if we slip more than a cycle the
+ * SNR should plummet.
*/
- up->epoch = (up->epoch + 1) % SECOND;
- if (up->epoch == 0) {
- wwv_endpoc(peer, epomax, epopos);
- up->epomax = epomax;
- epomax = 0;
- if (!(up->status & MSYNC))
- wwv_gain(peer);
- }
- dtemp = (epobuf[up->epoch] += (mfsync - epobuf[up->epoch]) /
- (MINAVG << up->avgint));
+ dtemp = (epobuf[epoch] += (mfsync - epobuf[epoch]) /
+ up->avgint);
if (dtemp > epomax) {
epomax = dtemp;
- epopos = up->epoch - up->pdelay - 5 * MS;
+ epopos = epoch;
+ }
+ if (epoch == 0) {
+ int k, j;
+
+ up->epomax = epomax;
+ k = epopos - 6 * MS;
+ if (k < 0)
+ k += SECOND;
+ j = epopos + 6 * MS;
+ if (j >= SECOND)
+ i -= SECOND;
+ up->eposnr = wwv_snr(epomax, max(abs(epobuf[k]),
+ abs(epobuf[j])));
+ epopos -= pdelay + 5 * MS;
if (epopos < 0)
epopos += SECOND;
+ wwv_endpoc(peer, epopos);
+ if (!(up->status & SSYNC))
+ up->alarm |= SYNERR;
+ epomax = 0;
+ if (!(up->status & MSYNC))
+ wwv_gain(peer);
}
- if (up->status & MSYNC)
- wwv_epoch(peer);
}
@@ -1369,39 +1316,41 @@ wwv_rf(
*
* This routine implements a virtual station process used to acquire
* minute sync and to mitigate among the ten frequency and station
- * combinations. During minute sync acquisition, the process probes each
+ * combinations. During minute sync acquisition the process probes each
* frequency in turn for the minute pulse from either station, which
- * involves searching through the entire epoch minute of samples. After
- * minute sync acquisition, the process searches only during the probe
- * window, which occupies seconds 59, 0 and 1, to construct a metric
- * used to determine which frequency and station provides the best
- * signal.
- *
- * The pulse discriminator requires that (a) the peak on-pulse sample
- * amplitude must be above 2000, (b) the SNR relative to the peak
- * off-pulse sample amplitude must be reduced 6 dB or more below the
- * peak and (c) the maximum difference between the current and previous
- * epoch indices must be less than 50 ms. A compare counter keeps track
- * of the number of successive intervals which satisfy these criteria.
+ * involves searching through the entire minute of samples. After
+ * finding a candidate, the process searches only the seconds before and
+ * after the candidate for the signal and all other seconds for the
+ * noise.
*
* Students of radar receiver technology will discover this algorithm
- * amounts to a range gate discriminator. In practice, the performance
- * of this gadget is amazing. Once setting teeth in a station, it hangs
- * on until the minute beep can barely be heard and long after the
- * second tick and comb filter have given up.
+ * amounts to a range gate discriminator. The discriminator requires
+ * that the peak minute pulse amplitude be at least 2000 and the SNR be
+ * at least 6 dB. In addition after finding a candidate, The peak second
+ * pulse amplitude must be at least 2000, the SNR at least 6 dB and the
+ * difference between the current and previous epoch must be less than
+ * 7.5 ms, which corresponds to a frequency error of 125 PPM.. A compare
+ * counter keeps track of the number of successive intervals which
+ * satisfy these criteria.
+ *
+ * Note that, while the minute pulse is found by by the discriminator,
+ * the actual value is determined from the second epoch. The assumption
+ * is that the discriminator peak occurs about 800 ms into the second,
+ * so the timing is retarted to the previous second epoch.
*/
static void
wwv_qrz(
- struct peer *peer, /* peerstructure pointer */
+ struct peer *peer, /* peer structure pointer */
struct sync *sp, /* sync channel structure */
- double syncx /* bandpass filtered sync signal */
+ double syncx, /* bandpass filtered sync signal */
+ int pdelay /* propagation delay (samples) */
)
{
struct refclockproc *pp;
struct wwvunit *up;
char tbuf[80]; /* monitor buffer */
double snr; /* on-pulse/off-pulse ratio (dB) */
- long epoch;
+ long epoch, fpoch;
int isgood;
pp = peer->procptr;
@@ -1409,171 +1358,147 @@ wwv_qrz(
/*
* Find the sample with peak energy, which defines the minute
- * epoch. If minute sync has been acquired, search only the
- * probe window; otherwise, search the entire minute. If a
- * maximum has been found with good amplitude, search only the
- * second before and after that position for the next maximum
- * and the rest of the window for the noise.
- */
- if (!(up->status & MSYNC) || up->status & SFLAG) {
- sp->amp = syncx;
- if (up->status & MSYNC)
- epoch = up->nepoch;
- else if (sp->count > 1)
- epoch = sp->mepoch;
- else
- epoch = sp->lastpos;
- if (syncx > sp->sigmax) {
- sp->sigmax = syncx;
- sp->pos = up->mphase;
- }
- if (abs(MOD(up->mphase - epoch, MINUTE)) > SYNSIZ &&
- syncx > sp->noise) {
- sp->noise = syncx;
- }
+ * epoch. If a sample has been found with good amplitude,
+ * accumulate the noise squares for all except the second before
+ * and after that position.
+ */
+ isgood = up->epomax > STHR && up->eposnr > SSNR;
+ if (isgood) {
+ fpoch = up->mphase % SECOND - up->tepoch;
+ if (fpoch < 0)
+ fpoch += SECOND;
+ } else {
+ fpoch = pdelay + SYNSIZ;
+ }
+ epoch = up->mphase - fpoch;
+ if (epoch < 0)
+ epoch += MINUTE;
+ if (syncx > sp->maxamp) {
+ sp->maxamp = syncx;
+ sp->pos = epoch;
}
+ if (abs((epoch - sp->lastpos) % MINUTE) > SECOND)
+ sp->noiamp += syncx;
+
+ /*
+ * At the end of the minute, determine the epoch of the
+ * sync pulse, as well as the SNR and difference between
+ * the current and previous epoch, which represents the
+ * intrinsic frequency error plus jitter.
+ */
if (up->mphase == 0) {
+ sp->synmax = sqrt(sp->maxamp);
+ sp->synmin = sqrt(sp->noiamp / (MINUTE - 2 * SECOND));
+ epoch = (sp->pos - sp->lastpos) % MINUTE;
/*
- * At the end of the minute, determine the epoch of the
- * sync pulse, as well as the SNR and difference between
- * the current and previous epoch (jitter).
+ * If not yet in minute sync, we have to do a little
+ * dance to find a valid minute sync pulse, emphasis
+ * valid.
*/
- sp->jitter = MOD(sp->pos - sp->lastpos, MINUTE);
- sp->select &= ~JITRNG;
- if (abs(sp->jitter) > AWND * MS)
- sp->select |= JITRNG;
- sp->sigmax = SQRT(sp->sigmax);
- sp->noise = SQRT(sp->noise);
- if (up->status & MSYNC) {
-
- /*
- * If in minute sync, just count the runs up and
- * down.
- */
- if (sp->select & (DATANG | SYNCNG | JITRNG)) {
- if (sp->count > 0)
- sp->count--;
- } else {
- if (sp->count < AMAX)
- sp->count++;
- }
- } else {
+ snr = wwv_snr(sp->synmax, sp->synmin);
+ isgood = isgood && sp->synmax > ATHR && snr > ASNR;
+ switch (sp->count) {
- /*
- * If not yet in minute sync, we have to do a
- * little dance to find a valid minute sync
- * pulse, emphasis valid.
- */
- snr = wwv_snr(sp->sigmax, sp->noise);
- isgood = sp->sigmax > ATHR && snr > ASNR &&
- !(sp->select & JITRNG);
- switch (sp->count) {
+ /*
+ * In state 0 the station was not heard during the
+ * previous probe. Look for the biggest blip greater
+ * than the amplitude threshold in the minute and assume
+ * that the minute sync pulse. We're fishing here, since
+ * the range gate has not yet been determined. If found,
+ * bump to state 1.
+ */
+ case 0:
+ if (sp->synmax >= ATHR)
+ sp->count++;
+ break;
- /*
- * In state 0 the station was not heard during
- * the previous probe. Look for the biggest blip
- * greater than the amplitude threshold in the
- * minute and assume that the minute sync pulse.
- * If found, bump to state 1.
- */
- case 0:
- if (sp->sigmax >= ATHR)
- sp->count++;
+ /*
+ * In state 1 a candidate blip has been found and the
+ * next minute has been searched for another blip. If
+ * none are found acceptable, drop back to state 0 and
+ * hunt some more. Otherwise, a legitimate minute pulse
+ * may have been found, so bump to state 2.
+ */
+ case 1:
+ if (!isgood) {
+ sp->count = 0;
break;
+ }
+ sp->count++;
+ break;
- /*
- * In state 1 a candidate blip has been found
- * and the next minute has been searched for
- * another blip. If none are found greater than
- * the threshold, or if the biggest blip outside
- * the candidate pulse is less than 6 dB below
- * the biggest blip, drop back to state 0 and
- * hunt some more. Otherwise, a legitimate
- * minute pulse may have been found, so bump to
- * state 2.
- */
- case 1:
- if (sp->sigmax < ATHR) {
- sp->count--;
- break;
- } else if (!isgood) {
- break;
- }
- /* fall through */
-
- /*
- * In states 2 and above, continue to groom
- * samples as before and drop back to the
- * previous state if the groom fails. If it
- * succeeds, bump to the next state until
- * reaching the clamp, if ever.
- */
- default:
- if (!isgood) {
- sp->count--;
- break;
- }
- sp->mepoch = sp->pos;
- if (sp->count < AMAX)
- sp->count++;
- break;
+ /*
+ * In states 2 and above, continue to groom samples as
+ * before and drop back to state 0 if the groom fails.
+ * If it succeeds, set the epoch and bump to the next
+ * state until reaching the threshold, if ever.
+ */
+ default:
+ if (!isgood || abs(epoch) > AWND * MS) {
+ sp->count = 0;
+ break;
}
+ sp->mepoch = sp->pos;
+ sp->count++;
+ break;
+ }
+ if (pp->sloppyclockflag & CLK_FLAG4) {
sprintf(tbuf,
- "wwv8 %d %3d %-3s %d %5.0f %5.1f %7ld %7ld %7ld",
- up->port, up->gain, sp->ident, sp->count,
- sp->sigmax, snr, sp->pos, sp->jitter,
- MOD(sp->pos - up->nepoch - SYNSIZ, MINUTE));
- if (pp->sloppyclockflag & CLK_FLAG4)
- record_clock_stats(&peer->srcadr, tbuf);
+ "wwv8 %d %3d %s %d %5.0f %5.1f %5ld %5d %ld",
+ up->port, up->gain, sp->refid, sp->count,
+ sp->synmax, snr, sp->pos, up->tepoch,
+ epoch);
+ record_clock_stats(&peer->srcadr, tbuf);
#ifdef DEBUG
if (debug)
printf("%s\n", tbuf);
#endif
}
- sp->lastmax = sp->sigmax;
sp->lastpos = sp->pos;
- sp->sigmax = sp->noise = 0;
+ sp->maxamp = sp->noiamp = 0;
}
}
/*
- * wwv_endpoc - process receiver epoch
+ * wwv_endpoc - identify and acquire second sync pulse
*
- * This routine is called at the end of the receiver epoch. It
- * determines the epoch position within the second and disciplines the
- * sample clock using a frequency-lock loop (FLL).
+ * This routine is called at the end of the second sync interval. It
+ * determines the second sync epoch position within the interval and
+ * disciplines the sample clock using a frequency-lock loop (FLL).
*
- * Seconds sync is determined in the RF input routine as the maximum
+ * Second sync is determined in the RF input routine as the maximum
* over all 8000 samples in the second comb filter. To assure accurate
* and reliable time and frequency discipline, this routine performs a
- * great deal of heavy-handed data filtering and grooming.
+ * great deal of heavy-handed heuristic data filtering and grooming.
+ *
+ * Note that, since the minute sync pulse is very wide (800 ms), precise
+ * minute sync epoch acquisition requires at least a rough estimate of
+ * the second sync pulse (5 ms). This becomes more important in choppy
+ * conditions at the lower frequencies at night, since sferics and
+ * cochannel crude can badly distort the minute pulse.
*/
static void
wwv_endpoc(
struct peer *peer, /* peer structure pointer */
- double epomax, /* epoch max */
int epopos /* epoch max position */
)
{
struct refclockproc *pp;
struct wwvunit *up;
-
static int epoch_mf[3]; /* epoch median filter */
- static int tepoch; /* median filter epoch */
- static int tspan; /* median filter span */
static int xepoch; /* last second epoch */
static int zepoch; /* last averaging interval epoch */
- static int syncnt; /* second epoch run length counter */
- static int jitcnt; /* jitter holdoff counter */
+ static int syncnt; /* run length counter */
+ static int maxrun; /* longest run length */
+ static int mepoch; /* longest run epoch */
static int avgcnt; /* averaging interval counter */
static int avginc; /* averaging ratchet */
-
static int iniflg; /* initialization flag */
char tbuf[80]; /* monitor buffer */
double dtemp;
- int tmp2, tmp3;
+ int tmp2;
pp = peer->procptr;
up = (struct wwvunit *)pp->unitptr;
@@ -1584,86 +1509,64 @@ wwv_endpoc(
/*
* A three-stage median filter is used to help denoise the
- * seconds sync pulse. The median sample becomes the candidate
- * epoch; the difference between the other two samples becomes
- * the span, which is used currently only for debugging.
+ * second sync pulse. The median sample becomes the candidate
+ * epoch.
*/
epoch_mf[2] = epoch_mf[1];
epoch_mf[1] = epoch_mf[0];
epoch_mf[0] = epopos;
if (epoch_mf[0] > epoch_mf[1]) {
- if (epoch_mf[1] > epoch_mf[2]) {
- tepoch = epoch_mf[1]; /* 0 1 2 */
- tspan = epoch_mf[0] - epoch_mf[2];
- } else if (epoch_mf[2] > epoch_mf[0]) {
- tepoch = epoch_mf[0]; /* 2 0 1 */
- tspan = epoch_mf[2] - epoch_mf[1];
- } else {
- tepoch = epoch_mf[2]; /* 0 2 1 */
- tspan = epoch_mf[0] - epoch_mf[1];
- }
+ if (epoch_mf[1] > epoch_mf[2])
+ up->tepoch = epoch_mf[1]; /* 0 1 2 */
+ else if (epoch_mf[2] > epoch_mf[0])
+ up->tepoch = epoch_mf[0]; /* 2 0 1 */
+ else
+ up->tepoch = epoch_mf[2]; /* 0 2 1 */
} else {
- if (epoch_mf[1] < epoch_mf[2]) {
- tepoch = epoch_mf[1]; /* 2 1 0 */
- tspan = epoch_mf[2] - epoch_mf[0];
- } else if (epoch_mf[2] < epoch_mf[0]) {
- tepoch = epoch_mf[0]; /* 1 0 2 */
- tspan = epoch_mf[1] - epoch_mf[2];
- } else {
- tepoch = epoch_mf[2]; /* 1 2 0 */
- tspan = epoch_mf[1] - epoch_mf[0];
- }
+ if (epoch_mf[1] < epoch_mf[2])
+ up->tepoch = epoch_mf[1]; /* 2 1 0 */
+ else if (epoch_mf[2] < epoch_mf[0])
+ up->tepoch = epoch_mf[0]; /* 1 0 2 */
+ else
+ up->tepoch = epoch_mf[2]; /* 1 2 0 */
}
/*
- * If the epoch candidate is within 1 ms of the last one, the
- * new candidate replaces the last one and the jitter counter is
- * reset; otherwise, the candidate is ignored and the jitter
- * counter is incremented. If the jitter counter exceeds the
- * frequency averaging interval, the new candidate replaces the
- * old one anyway. The compare counter is incremented if the new
- * candidate is identical to the last one; otherwise, it is
- * forced to zero. If the compare counter increments to 10, the
- * epoch is reset and the receiver second epoch is set.
- *
- * Careful attention to detail here. If the signal amplitude
- * falls below the threshold or if no stations are heard, we
- * certainly cannot be in sync.
+ * If the signal amplitude or SNR fall below thresholds or if no
+ * stations are heard, dim the second sync lamp and start over.
*/
- tmp2 = MOD(tepoch - xepoch, SECOND);
- if (up->epomax < STHR || !(up->status & (SELV | SELH))) {
- up->status &= ~SSYNC;
- jitcnt = syncnt = avgcnt = 0;
- } else if (abs(tmp2) <= MS || jitcnt >= (MINAVG << up->avgint))
- {
- jitcnt = 0;
- if (tmp2 != 0) {
- xepoch = tepoch;
- syncnt = 0;
- } else {
- if (syncnt < SCMP) {
- syncnt++;
- } else {
- up->status |= SSYNC;
- up->swatch = 0;
- up->repoch = tepoch;
- up->yepoch = up->repoch;
- if (up->yepoch < 0)
- up->yepoch += SECOND;
- }
- }
- avgcnt++;
+ if (!(up->status & (SELV | SELH)) || up->epomax < STHR ||
+ up->eposnr < SSNR) {
+ up->status &= ~(SSYNC | FGATE);
+ avgcnt = syncnt = maxrun = 0;
+ return;
+ }
+ avgcnt++;
+
+ /*
+ * If the epoch candidate is the same as the last one, increment
+ * the compare counter. If not, save the length and epoch of the
+ * current run for use later and reset the counter.
+ */
+ tmp2 = (up->tepoch - xepoch) % SECOND;
+ if (tmp2 == 0) {
+ syncnt++;
} else {
- jitcnt++;
- syncnt = avgcnt = 0;
+ if (maxrun > 0 && mepoch == xepoch) {
+ maxrun += syncnt;
+ } else if (syncnt > maxrun) {
+ maxrun = syncnt;
+ mepoch = xepoch;
+ }
+ syncnt = 0;
}
- if (!(up->status & SSYNC) && 0) {
+ if ((pp->sloppyclockflag & CLK_FLAG4) && !(up->status & (SSYNC |
+ MSYNC))) {
sprintf(tbuf,
- "wwv1 %2d %04x %5.0f %2d %5.0f %5d %5d %5d %2d %4d",
- up->rsec, up->status, up->epomax, avgcnt, epomax,
- tepoch, tspan, tmp2, syncnt, jitcnt);
- if (pp->sloppyclockflag & CLK_FLAG4)
- record_clock_stats(&peer->srcadr, tbuf);
+ "wwv1 %04x %5.0f %5.1f %5d %5d %4d %4d",
+ up->status, up->epomax, up->eposnr, up->tepoch,
+ tmp2, avgcnt, syncnt);
+ record_clock_stats(&peer->srcadr, tbuf);
#ifdef DEBUG
if (debug)
printf("%s\n", tbuf);
@@ -1671,72 +1574,122 @@ wwv_endpoc(
}
/*
- * The sample clock frequency is disciplined using a first-order
+ * The sample clock frequency is disciplined using a first order
* feedback loop with time constant consistent with the Allan
- * intercept of typical computer clocks. The loop update is
- * calculated each averaging interval from the epoch change in
- * 125-us units and interval length in seconds. The interval is
- * doubled after four intervals where epoch change is not more
- * than one sample.
+ * intercept of typical computer clocks.
*
+ * The frequency update is calculated from the epoch change in
+ * 125-us units divided by the averaging interval in seconds.
* The averaging interval affects other receiver functions,
- * including the the 1000/1200-Hz comb filter and sample clock
+ * including the the 1000/1200-Hz comb filter and codec clock
* loop. It also affects the 100-Hz subcarrier loop and the bit
* and digit comparison counter thresholds.
*/
- tmp3 = MOD(tepoch - zepoch, SECOND);
- if (avgcnt >= (MINAVG << up->avgint)) {
- if (abs(tmp3) < MS) {
- dtemp = (double)tmp3 / avgcnt;
- up->freq += dtemp / SYNCTC;
- if (up->freq > MAXFREQ)
- up->freq = MAXFREQ;
- else if (up->freq < -MAXFREQ)
- up->freq = -MAXFREQ;
- if (abs(tmp3) <= 1 && up->avgint < MAXAVG) {
- if (avginc < 4) {
+ if (avgcnt < up->avgint) {
+ xepoch = up->tepoch;
+ return;
+ }
+
+ /*
+ * During the averaging interval the longest run of identical
+ * epoches is determined. If the longest run is at least 10
+ * seconds, the SSYNC bit is lit and the value becomes the
+ * reference epoch for the next interval. If not, the second
+ * synd lamp is dark and flashers set.
+ */
+ if (maxrun > 0 && mepoch == xepoch) {
+ maxrun += syncnt;
+ } else if (syncnt > maxrun) {
+ maxrun = syncnt;
+ mepoch = xepoch;
+ }
+ xepoch = up->tepoch;
+ if (maxrun > SCMP) {
+ up->status |= SSYNC;
+ up->yepoch = mepoch;
+ } else {
+ up->status &= ~SSYNC;
+ }
+
+ /*
+ * If the epoch change over the averaging interval is less than
+ * 1 ms, the frequency is adjusted, but clamped at +-125 PPM. If
+ * greater than 1 ms, the counter is decremented. If the epoch
+ * change is less than 0.5 ms, the counter is incremented. If
+ * the counter increments to +3, the averaging interval is
+ * doubled and the counter set to zero; if it increments to -3,
+ * the interval is halved and the counter set to zero.
+ *
+ * Here be spooks. From careful observations, the epoch
+ * sometimes makes a long run of identical samples, then takes a
+ * lurch due apparently to lost interrupts or spooks. If this
+ * happens, the epoch change times the maximum run length will
+ * be greater than the averaging interval, so the lurch should
+ * be believed but the frequency left alone. Really intricate
+ * here.
+ */
+ if (maxrun == 0)
+ mepoch = up->tepoch;
+ dtemp = (mepoch - zepoch) % SECOND;
+ if (up->status & FGATE) {
+ if (abs(dtemp) < MAXFREQ * MINAVG) {
+ if (maxrun * abs(mepoch - zepoch) <
+ avgcnt) {
+ up->freq += dtemp / avgcnt;
+ if (up->freq > MAXFREQ)
+ up->freq = MAXFREQ;
+ else if (up->freq < -MAXFREQ)
+ up->freq = -MAXFREQ;
+ }
+ if (abs(dtemp) < MAXFREQ * MINAVG / 2) {
+ if (avginc < 3) {
avginc++;
} else {
+ if (up->avgint < MAXAVG) {
+ up->avgint <<= 1;
+ avginc = 0;
+ }
+ }
+ }
+ } else {
+ if (avginc > -3) {
+ avginc--;
+ } else {
+ if (up->avgint > MINAVG) {
+ up->avgint >>= 1;
avginc = 0;
- up->avgint++;
}
}
- if (up->avgint < MAXAVG) {
- sprintf(tbuf,
- "wwv2 %2d %04x %5.0f %5d %5d %2d %2d %6.1f %6.1f",
- up->rsec, up->status, up->epomax,
- MINAVG << up->avgint, avgcnt,
- avginc, tmp3, dtemp / SECOND * 1e6,
- up->freq / SECOND * 1e6);
- if (pp->sloppyclockflag & CLK_FLAG4)
- record_clock_stats(
- &peer->srcadr, tbuf);
+ }
+ }
+ if (pp->sloppyclockflag & CLK_FLAG4) {
+ sprintf(tbuf,
+ "wwv2 %04x %4.0f %4d %4d %2d %4d %4.0f %6.1f",
+ up->status, up->epomax, mepoch, maxrun, avginc,
+ avgcnt, dtemp, up->freq * 1e6 / SECOND);
+ record_clock_stats(&peer->srcadr, tbuf);
#ifdef DEBUG
- if (debug)
- printf("%s\n", tbuf);
+ if (debug)
+ printf("%s\n", tbuf);
#endif /* DEBUG */
- }
- }
- zepoch = tepoch;
- avgcnt = 0;
}
+ up->status |= FGATE;
+ zepoch = mepoch;
+ avgcnt = syncnt = maxrun = 0;
}
/*
- * wwv_epoch - main loop
+ * wwv_epoch - epoch scanner
*
- * This routine establishes receiver and transmitter epoch
- * synchronization and determines the data subcarrier pulse length.
- * Receiver synchronization is determined by the minute sync pulse
- * detected in the wwv_rf() routine and the second sync pulse detected
- * in the wwv_epoch() routine. This establishes when to sample the data
- * subcarrier in-phase signal for the maximum level and noise level and
- * when to determine the pulse length. The transmitter second leads the
- * receiver second by the propagation delay, receiver delay and filter
- * delay of this program. It establishes the clock time and implements
- * the sometimes idiosyncratic conventional clock time and civil
- * calendar.
+ * This routine scans the receiver second epoch to determine the signal
+ * amplitudes and pulse timings. Receiver synchronization is determined
+ * by the minute sync pulse detected in the wwv_rf() routine and the
+ * second sync pulse detected in the wwv_epoch() routine. A pulse width
+ * discriminator extracts data signals from the 100-Hz subcarrier. The
+ * transmitted signals are delayed by the propagation delay, receiver
+ * delay and filter delay of this program. Delay corrections are
+ * introduced separately for WWV and WWVH.
*
* Most communications radios use a highpass filter in the audio stages,
* which can do nasty things to the subcarrier phase relative to the
@@ -1750,152 +1703,96 @@ wwv_epoch(
struct peer *peer /* peer structure pointer */
)
{
- static double dpulse; /* data pulse length */
struct refclockproc *pp;
struct wwvunit *up;
struct chan *cp;
- struct sync *sp;
- l_fp offset; /* NTP format offset */
+ static double dpulse; /* data pulse length */
double dtemp;
pp = peer->procptr;
up = (struct wwvunit *)pp->unitptr;
/*
- * Sample the minute sync pulse amplitude at epoch 800 for both
+ * Sample the minute sync pulse envelopes at epoch 800 for both
* the WWV and WWVH stations. This will be used later for
- * channel mitigation.
+ * channel and station mitigation. Note that the seconds epoch
+ * is set here well before the end of the second to make sure we
+ * never seet the epoch backwards.
*/
- cp = &up->mitig[up->achan];
if (up->rphase == 800 * MS) {
- sp = &cp->wwv;
- sp->synamp = SQRT(sp->amp);
- sp = &cp->wwvh;
- sp->synamp = SQRT(sp->amp);
+ up->repoch = up->yepoch;
+ cp = &up->mitig[up->achan];
+ cp->wwv.synamp = cp->wwv.amp;
+ cp->wwvh.synamp = cp->wwvh.amp;
}
- if (up->rsec == 0) {
- up->sigamp = up->datsnr = 0;
- } else {
-
- /*
- * Estimate the noise level by integrating the I-channel
- * energy at epoch 30 ms.
- */
- if (up->rphase == 30 * MS) {
- if (!(up->status & SFLAG))
- up->noiamp += (up->irig - up->noiamp) /
- (MINAVG << up->avgint);
- else
- cp->noiamp += (SQRT(up->irig *
- up->irig + up->qrig * up->qrig) -
- cp->noiamp) / 8;
-
- /*
- * Strobe the peak I-channel data signal at epoch 200
- * ms. Compute the SNR and adjust the 100-Hz reference
- * oscillator phase using the Q-channel data signal at
- * that epoch. Save the envelope amplitude for the probe
- * channel.
- */
- } else if (up->rphase == 200 * MS) {
- if (!(up->status & SFLAG)) {
- up->sigamp = up->irig;
- if (up->sigamp < 0)
- up->sigamp = 0;
- up->datsnr = wwv_snr(up->sigamp,
- up->noiamp);
- up->datpha = up->qrig / (MINAVG <<
- up->avgint);
- if (up->datpha >= 0) {
- up->datapt++;
- if (up->datapt >= 80)
- up->datapt -= 80;
- } else {
- up->datapt--;
- if (up->datapt < 0)
- up->datapt += 80;
- }
- } else {
- up->sigamp = SQRT(up->irig * up->irig +
- up->qrig * up->qrig);
- up->datsnr = wwv_snr(up->sigamp,
- cp->noiamp);
- }
+ /*
+ * Sample the data subcarrier at epoch 15 ms, giving a guard
+ * time of +-15 ms from the beginning of the second until the
+ * pulse rises at 30 ms. The I-channel amplitude is used to
+ * calculate the slice level. The envelope amplitude is used
+ * during the probe seconds to determine the SNR. There is a
+ * compromise here; we want to delay the sample as long as
+ * possible to give the radio time to change frequency and the
+ * AGC to stabilize, but as early as possible if the second
+ * epoch is not exact.
+ */
+ if (up->rphase == 15 * MS) {
+ up->noiamp = up->irig * up->irig + up->qrig * up->qrig;
- /*
- * The slice level is set half way between the peak
- * signal and noise levels. Strobe the negative zero
- * crossing after epoch 200 ms and record the epoch at
- * that time. This defines the length of the data pulse,
- * which will later be converted into scaled bit
- * probabilities.
- */
- } else if (up->rphase > 200 * MS) {
- dtemp = (up->sigamp + up->noiamp) / 2;
- if (up->irig < dtemp && dpulse == 0)
- dpulse = up->rphase;
+ /*
+ * Sample the data subcarrier at epoch 215 ms, giving a guard
+ * time of +-15 ms from the earliest the pulse peak can be
+ * reached to the earliest it can begin to fall. For the data
+ * channel latch the I-channel amplitude for all except the
+ * probe seconds and adjust the 100-Hz reference oscillator
+ * phase using the Q-channel amplitude at this epoch. For the
+ * probe channel latch the envelope amplitude.
+ */
+ } else if (up->rphase == 215 * MS) {
+ up->sigsig = up->irig;
+ if (up->sigsig < 0)
+ up->sigsig = 0;
+ up->datpha = up->qrig / up->avgint;
+ if (up->datpha >= 0) {
+ up->datapt++;
+ if (up->datapt >= 80)
+ up->datapt -= 80;
+ } else {
+ up->datapt--;
+ if (up->datapt < 0)
+ up->datapt += 80;
}
- }
+ up->sigamp = up->irig * up->irig + up->qrig * up->qrig;
/*
- * At the end of the transmitter second, crank the clock state
- * machine. Note we have to be careful to set the transmitter
- * epoch at the same time as the receiver epoch to be sure the
- * right propagation delay is used. We don't bother the heavy
- * machinery unless the clock is set.
+ * The slice level is set half way between the peak signal and
+ * noise levels. Sample the negative zero crossing after epoch
+ * 200 ms and record the epoch at that time. This defines the
+ * length of the data pulse, which will later be converted into
+ * scaled bit probabilities.
*/
- up->tphase++;
- if (up->epoch == up->yepoch) {
- wwv_tsec(up);
- up->tphase = 0;
-
- /*
- * Determine the current offset from the time of century
- * and the sample timestamp, but only if the SYNERR
- * alarm has not been raised in the present or previous
- * minute.
- */
- if (!(up->status & SFLAG) && up->status & INSYNC &&
- (up->alarm & (3 << SYNERR)) == 0) {
- pp->second = up->tsec;
- pp->minute = up->decvec[MN].digit +
- up->decvec[MN + 1].digit * 10;
- pp->hour = up->decvec[HR].digit +
- up->decvec[HR + 1].digit * 10;
- pp->day = up->decvec[DA].digit + up->decvec[DA +
- 1].digit * 10 + up->decvec[DA + 2].digit *
- 100;
- pp->year = up->decvec[YR].digit +
- up->decvec[YR + 1].digit * 10;
- if (pp->year < UTCYEAR)
- pp->year += 2000;
- else
- pp->year += 1900;
-
- /*
- * We have to simulate refclock_process() here,
- * since the fudgetime gets added much earlier
- * than this.
- */
- pp->lastrec = up->timestamp;
- L_CLR(&offset);
- if (!clocktime(pp->day, pp->hour, pp->minute,
- pp->second, GMT, pp->lastrec.l_ui,
- &pp->yearstart, &offset.l_ui))
- up->errflg = CEVNT_BADTIME;
- else
- refclock_process_offset(pp, offset,
- pp->lastrec, 0.);
- }
+ } else if (up->rphase > 200 * MS) {
+ dtemp = (up->sigsig + sqrt(up->noiamp)) / 2;
+ if (up->irig < dtemp && dpulse == 0)
+ dpulse = up->rphase;
}
/*
- * At the end of the receiver second, process the data bit and
- * update the decoding matrix probabilities.
+ * At the end of the second crank the clock state machine and
+ * adjust the codec gain. Note the epoch is buffered from the
+ * center of the second in order to avoid jitter while the
+ * seconds synch is diddling the epoch. Then, determine the true
+ * offset and update the median filter in the driver interface.
+ *
+ * Sample the data subcarrier envelope at the end of the second
+ * to determine the SNR for the pulse. This gives a guard time
+ * of +-30 ms from the decay of the longest pulse to the rise of
+ * the next pulse.
*/
up->rphase++;
- if (up->epoch == up->repoch) {
+ if (up->mphase % SECOND == up->repoch) {
+ up->datsnr = wwv_snr(up->sigsig, sqrt(up->noiamp));
wwv_rsec(peer, dpulse);
wwv_gain(peer);
up->rphase = dpulse = 0;
@@ -1915,9 +1812,7 @@ wwv_epoch(
* for leap years) or 31 December (day 365 or 366 for leap years) is
* augmented by one second numbered 60. This is accomplished by
* extending the minute interval by one second and teaching the state
- * machine to ignore it. BTW, stations WWV/WWVH cowardly kill the
- * transmitter carrier for a few seconds around the leap to avoid icky
- * details of transmission format during the leap.
+ * machine to ignore it.
*/
static void
wwv_rsec(
@@ -1932,9 +1827,14 @@ wwv_rsec(
struct wwvunit *up;
struct chan *cp;
struct sync *sp, *rp;
+ l_fp offset; /* offset in NTP seconds */
double bit; /* bit likelihood */
char tbuf[80]; /* monitor buffer */
int sw, arg, nsec;
+#ifdef IRIG_SUCKS
+ int i;
+ l_fp ltemp;
+#endif /* IRIG_SUCKS */
pp = peer->procptr;
up = (struct wwvunit *)pp->unitptr;
@@ -1969,65 +1869,105 @@ wwv_rsec(
* Probe channel stuff
*
* The WWV/H format contains data pulses in second 59 (position
- * identifier) and second 1 (not used), and the minute sync
- * pulse in second 0. At the end of second 58, we QSYed to the
- * probe channel, which rotates over all WWV/H frequencies. At
- * the end of second 59, we latched the sync noise and tested
- * for data bit error. At the end of second 0, we now latch the
- * sync peak.
+ * identifier), second 1 (not used) and the minute sync pulse in
+ * second 0. At the end of second 58, QSY to the probe channel,
+ * which rotates over all WWV/H frequencies. At the end of
+ * second 1 QSY back to the data channel.
+ *
+ * At the end of second 0 save the minute sync pulse peak value
+ * previously latched at 800 ms.
*/
case SYNC2: /* 0 */
cp = &up->mitig[up->achan];
- sp = &cp->wwv;
- sp->synmax = sp->synamp;
- sp = &cp->wwvh;
- sp->synmax = sp->synamp;
+ cp->wwv.synmax = sqrt(cp->wwv.synamp);
+ cp->wwvh.synmax = sqrt(cp->wwvh.synamp);
break;
/*
- * At the end of second 1, latch and average the sync noise and
- * test for data bit error. Set SYNCNG if the sync pulse
- * amplitude and SNR are not above thresholds. Set DATANG if
- * data error occured on both second 59 and second 1. Finally,
- * QSY back to the data channel.
+ * At the end of second 1 determine the minute sync pulse
+ * amplitude and SNR and set SYNCNG if these values are below
+ * thresholds. Determine the data pulse amplitude and SNR and
+ * set DATANG if these values are below thresholds. Set ERRRNG
+ * if data pulses in second 59 and second 1 are decoded in
+ * error. Shift a 1 into the reachability register if SYNCNG and
+ * DATANG are both lit; otherwise shift a 0. Ignore ERRRNG for
+ * the present. The number of 1 bits in the last six intervals
+ * represents the channel metric used by the mitigation routine.
+ * Finally, QSY back to the data channel.
*/
case SYNC3: /* 1 */
cp = &up->mitig[up->achan];
- if (up->sigamp < DTHR || up->datsnr < DSNR)
- cp->errcnt++;
+ cp->sigamp = sqrt(up->sigamp);
+ cp->noiamp = sqrt(up->noiamp);
+ cp->datsnr = wwv_snr(cp->sigamp, cp->noiamp);
+ /*
+ * WWV station
+ */
sp = &cp->wwv;
- sp->synmin = (sp->synmin + sp->synamp) / 2;
+ sp->synmin = sqrt((sp->synmin + sp->synamp) / 2.);
sp->synsnr = wwv_snr(sp->synmax, sp->synmin);
- sp->select &= ~(DATANG | SYNCNG);
+ sp->select &= ~(SYNCNG | DATANG | ERRRNG);
if (sp->synmax < QTHR || sp->synsnr < QSNR)
sp->select |= SYNCNG;
- if (cp->errcnt > 1)
+ if (cp->sigamp < XTHR || cp->datsnr < XSNR)
sp->select |= DATANG;
+ if (up->errcnt > 2)
+ sp->select |= ERRRNG;
+ sp->reach <<= 1;
+ if (sp->reach & (1 << AMAX))
+ sp->count--;
+ if (!(sp->select & (SYNCNG | DATANG))) {
+ sp->reach |= 1;
+ sp->count++;
+ }
+ /*
+ * WWVH station
+ */
rp = &cp->wwvh;
- rp->synmin = (rp->synmin + rp->synamp) / 2;
+ rp->synmin = sqrt((rp->synmin + rp->synamp) / 2.);
rp->synsnr = wwv_snr(rp->synmax, rp->synmin);
- rp->select &= ~(DATANG | SYNCNG);
+ rp->select &= ~(SYNCNG | DATANG | ERRRNG);
if (rp->synmax < QTHR || rp->synsnr < QSNR)
rp->select |= SYNCNG;
- if (cp->errcnt > 1)
+ if (cp->sigamp < XTHR || cp->datsnr < XSNR)
rp->select |= DATANG;
+ if (up->errcnt > 2)
+ rp->select |= ERRRNG;
+ rp->reach <<= 1;
+ if (rp->reach & (1 << AMAX))
+ rp->count--;
+ if (!(rp->select & (SYNCNG | DATANG | ERRRNG))) {
+ rp->reach |= 1;
+ rp->count++;
+ }
- cp->errcnt = 0;
- sprintf(tbuf,
- "wwv5 %d %3d %-3s %04x %d %.0f/%.1f/%ld %s %04x %d %.0f/%.1f/%ld",
- up->port, up->gain, sp->ident, sp->select,
- sp->count, sp->synmax, sp->synsnr, sp->jitter,
- rp->ident, rp->select, rp->count, rp->synmax,
- rp->synsnr, rp->jitter);
- if (pp->sloppyclockflag & CLK_FLAG4)
+ /*
+ * Set up for next minute.
+ */
+ if (pp->sloppyclockflag & CLK_FLAG4) {
+ sprintf(tbuf,
+ "wwv5 %2d %04x %3d %4d %d %.0f/%.1f %s %04x %.0f %.0f/%.1f %s %04x %.0f %.0f/%.1f",
+ up->port, up->status, up->gain, up->yepoch,
+ up->errcnt, cp->sigamp, cp->datsnr,
+ sp->refid, sp->reach & 0xffff,
+ wwv_metric(sp), sp->synmax, sp->synsnr,
+ rp->refid, rp->reach & 0xffff,
+ wwv_metric(rp), rp->synmax, rp->synsnr);
record_clock_stats(&peer->srcadr, tbuf);
#ifdef DEBUG
- if (debug)
- printf("%s\n", tbuf);
+ if (debug)
+ printf("%s\n", tbuf);
#endif /* DEBUG */
+ }
+#ifdef ICOM
+ if (up->fd_icom > 0)
+ wwv_qsy(peer, up->dchan);
+#endif /* ICOM */
up->status &= ~SFLAG;
+ up->errcnt = 0;
+ up->alarm = 0;
wwv_newchan(peer);
break;
@@ -2038,7 +1978,9 @@ wwv_rsec(
* considered valid. Bits not used in the digit are forced to
* zero and not checked for errors.
*/
- case COEF1: /* 10-13 */
+ case COEF: /* 4-7, 10-13, 15-17, 20-23,
+ 25-26, 30-33, 35-38, 40-41,
+ 51-54 */
if (up->status & DGATE)
up->status |= BGATE;
bcddld[arg] = bit;
@@ -2048,13 +1990,6 @@ wwv_rsec(
bcddld[arg] = 0;
break;
- case COEF: /* 4-7, 15-17, 20-23, 25-26,
- 30-33, 35-38, 40-41, 51-54 */
- if (up->status & DGATE || !(up->status & DSYNC))
- up->status |= BGATE;
- bcddld[arg] = bit;
- break;
-
/*
* Correlate coefficient vector with each valid digit vector and
* save in decoding matrix. We step through the decoding matrix
@@ -2081,122 +2016,207 @@ wwv_rsec(
* Miscellaneous bits. If above the positive threshold, declare
* 1; if below the negative threshold, declare 0; otherwise
* raise the SYMERR alarm. At the end of second 58, QSY to the
- * probe channel.
+ * probe channel. The design is intended to preserve the bits
+ * over periods of signal loss.
*/
case MSC20: /* 55 */
wwv_corr4(peer, &up->decvec[YR + 1], bcddld, bcd9);
/* fall through */
- case MSCBIT: /* 2, 3, 50, 56-57 */
+ case MSCBIT: /* 2-3, 50, 56-57 */
if (bitvec[up->rsec] > BTHR)
up->misc |= arg;
else if (bitvec[up->rsec] < -BTHR)
up->misc &= ~arg;
else
- up->alarm |= 1 << SYMERR;
+ up->alarm |= SYMERR;
break;
+ /*
+ * Save the data channel gain, then QSY to the probe channel.
+ */
case MSC21: /* 58 */
if (bitvec[up->rsec] > BTHR)
up->misc |= arg;
else if (bitvec[up->rsec] < -BTHR)
up->misc &= ~arg;
else
- up->alarm |= 1 << SYMERR;
- up->schan = (up->schan + 1) % NCHAN;
- wwv_qsy(peer, up->schan);
- up->status |= SFLAG;
+ up->alarm |= SYMERR;
+ up->mitig[up->dchan].gain = up->gain;
+#ifdef ICOM
+ if (up->fd_icom > 0) {
+ up->schan = (up->schan + 1) % NCHAN;
+ wwv_qsy(peer, up->schan);
+ }
+#endif /* ICOM */
+ up->status |= SFLAG | SELV | SELH;
+ up->errbit = up->errcnt;
+ up->errcnt = 0;
break;
/*
* The endgames
*
- * Second 59 contains the first data pulse of the probe
- * sequence. Check it for validity and establish the noise floor
- * for the minute sync SNR.
+ * During second 59 the receiver and codec AGC are settling
+ * down, so the data pulse is unusable. At the end of this
+ * second, latch the minute sync pulse noise floor. Then do the
+ * minute processing and update the system clock. If a leap
+ * second sail on to the next second (60); otherwise, set up for
+ * the next minute.
*/
case MIN1: /* 59 */
cp = &up->mitig[up->achan];
- if (up->sigamp < DTHR || up->datsnr < DSNR)
- cp->errcnt++;
- sp = &cp->wwv;
- sp->synmin = sp->synamp;
- sp = &cp->wwvh;
- sp->synmin = sp->synamp;
+ cp->wwv.synmin = cp->wwv.synamp;
+ cp->wwvh.synmin = cp->wwvh.synamp;
/*
- * If SECWARN is set on the last minute of 30 June or 31
- * December, LEPSEC bit is set. At the end of the minute
- * in which LEPSEC is set the transmitter and receiver
- * insert an extra second (60) in the timescale and the
- * minute sync skips a second. We only get to test this
- * wrinkle at intervals of about 18 months, the actual
- * mileage may vary.
+ * Dance the leap if necessary and the kernel has the
+ * right stuff. Then, wind up the clock and initialize
+ * for the following minute. If the leap dance, note the
+ * kernel is armed one second before the actual leap is
+ * scheduled.
*/
- if (up->tsec == 60) {
- up->status &= ~LEPSEC;
- break;
- }
- /* fall through */
-
- /*
- * If all nine clock digits are valid and the SYNERR alarm is
- * not raised in the current or previous second, the clock is
- * set or validated. If at least one digit is set, which by
- * design must be the minute units digit, the clock state
- * machine begins to count the minutes.
- */
- case MIN2: /* 59/60 */
- up->minset = ((current_time - peer->update) + 30) / 60;
- if (up->digcnt > 0)
- up->status |= DSYNC;
- if (up->digcnt >= 9 && (up->alarm & (3 << SYNERR)) == 0)
- {
+ if (up->status & SSYNC && up->digcnt >= 9)
up->status |= INSYNC;
- up->watch = 0;
- }
- pp->lencode = timecode(up, pp->a_lastcode);
- if (up->misc & SECWAR)
+ if (up->status & LEPDAY) {
pp->leap = LEAP_ADDSECOND;
- else
+ } else {
pp->leap = LEAP_NOWARNING;
- refclock_receive(peer);
+ wwv_tsec(up);
+ nsec = up->digcnt = 0;
+ }
+ pp->lencode = timecode(up, pp->a_lastcode);
record_clock_stats(&peer->srcadr, pp->a_lastcode);
#ifdef DEBUG
if (debug)
printf("wwv: timecode %d %s\n", pp->lencode,
pp->a_lastcode);
#endif /* DEBUG */
+ if (up->status & INSYNC && up->watch < HOLD)
+ refclock_receive(peer);
+ break;
- /*
- * The ultimate watchdog is the interval since the
- * reference clock interface code last received an
- * update from this driver. If the interval is greater
- * than a couple of days, manual intervention is
- * probably required, so the program resets and tries to
- * resynchronized from scratch.
- */
- if (up->minset > PANIC)
- up->status = 0;
- up->alarm = (up->alarm & ~0x8888) << 1;
- up->nepoch = (up->mphase + SYNSIZ) % MINUTE;
- up->errcnt = up->digcnt = nsec = 0;
+ /*
+ * If LEPDAY is set on the last minute of 30 June or 31
+ * December, the LEPSEC bit is set. At the end of the minute in
+ * which LEPSEC is set the transmitter and receiver insert an
+ * extra second (60) in the timescale and the minute sync skips
+ * a second. We only get to test this wrinkle at intervals of
+ * about 18 months; the actual mileage may vary.
+ */
+ case MIN2: /* 60 */
+ wwv_tsec(up);
+ nsec = up->digcnt = 0;
break;
}
- if (!(up->status & DSYNC)) {
+
+ /*
+ * If digit sync has not been acquired before timeout or if no
+ * station has been heard, game over and restart from scratch.
+ */
+ if (!(up->status & DSYNC) && (!(up->status & (SELV | SELH)) ||
+ up->watch > DIGIT)) {
+ wwv_newgame(peer);
+ return;
+ }
+
+ /*
+ * If no timestamps have been struck before timeout, game over
+ * and restart from scratch.
+ */
+ if (up->watch > PANIC) {
+ wwv_newgame(peer);
+ return;
+ }
+ pp->disp += AUDIO_PHI;
+ up->rsec = nsec;
+
+#ifdef IRIG_SUCKS
+ /*
+ * You really don't wanna know what comes down here. Leave it to
+ * say Solaris 2.8 broke the nice clean audio stream, apparently
+ * affected by a 5-ms sawtooth jitter. Sundown on Solaris. This
+ * leaves a little twilight.
+ *
+ * The scheme involves differentiation, forward learning and
+ * integration. The sawtooth has a period of 11 seconds. The
+ * timestamp differences are integrated and subtracted from the
+ * signal.
+ */
+ ltemp = pp->lastrec;
+ L_SUB(&ltemp, &pp->lastref);
+ if (ltemp.l_f < 0)
+ ltemp.l_i = -1;
+ else
+ ltemp.l_i = 0;
+ pp->lastref = pp->lastrec;
+ if (!L_ISNEG(&ltemp))
+ L_CLR(&up->wigwag);
+ else
+ L_ADD(&up->wigwag, &ltemp);
+ L_SUB(&pp->lastrec, &up->wigwag);
+ up->wiggle[up->wp] = ltemp;
+
+ /*
+ * Bottom fisher. To understand this, you have to know about
+ * velocity microphones and AM transmitters. No further
+ * explanation is offered, as this is truly a black art.
+ */
+ up->wigbot[up->wp] = pp->lastrec;
+ for (i = 0; i < WIGGLE; i++) {
+ if (i != up->wp)
+ up->wigbot[i].l_ui++;
+ L_SUB(&pp->lastrec, &up->wigbot[i]);
+ if (L_ISNEG(&pp->lastrec))
+ L_ADD(&pp->lastrec, &up->wigbot[i]);
+ else
+ pp->lastrec = up->wigbot[i];
+ }
+ up->wp++;
+ up->wp %= WIGGLE;
+#endif /* IRIG_SUCKS */
+
+ /*
+ * If victory has been declared and seconds sync is lit, strike
+ * a timestamp. It should not be a surprise, especially if the
+ * radio is not tunable, that sometimes no stations are above
+ * the noise and the reference ID set to NONE.
+ */
+ if (up->status & INSYNC && up->status & SSYNC) {
+ pp->second = up->rsec;
+ pp->minute = up->decvec[MN].digit + up->decvec[MN +
+ 1].digit * 10;
+ pp->hour = up->decvec[HR].digit + up->decvec[HR +
+ 1].digit * 10;
+ pp->day = up->decvec[DA].digit + up->decvec[DA +
+ 1].digit * 10 + up->decvec[DA + 2].digit * 100;
+ pp->year = up->decvec[YR].digit + up->decvec[YR +
+ 1].digit * 10;
+ pp->year += 2000;
+ L_CLR(&offset);
+ if (!clocktime(pp->day, pp->hour, pp->minute,
+ pp->second, GMT, up->timestamp.l_ui,
+ &pp->yearstart, &offset.l_ui)) {
+ up->errflg = CEVNT_BADTIME;
+ } else {
+ up->watch = 0;
+ pp->disp = 0;
+ refclock_process_offset(pp, offset,
+ up->timestamp, PDELAY);
+ }
+ }
+ if ((pp->sloppyclockflag & CLK_FLAG4) && !(up->status &
+ DSYNC)) {
sprintf(tbuf,
- "wwv3 %2d %04x %5.0f %5.0f %5.0f %5.1f %5.0f %5.0f",
- up->rsec, up->status, up->epomax, up->sigamp,
- up->datpha, up->datsnr, bit, bitvec[up->rsec]);
- if (pp->sloppyclockflag & CLK_FLAG4)
- record_clock_stats(&peer->srcadr, tbuf);
+ "wwv3 %2d %04x %5.0f %5.1f %5.0f %5.1f %5.0f",
+ up->rsec, up->status, up->epomax, up->eposnr,
+ up->sigsig, up->datsnr, bit);
+ record_clock_stats(&peer->srcadr, tbuf);
#ifdef DEBUG
if (debug)
printf("%s\n", tbuf);
#endif /* DEBUG */
- }
- up->rsec = up->tsec = nsec;
- return;
+ }
}
@@ -2209,7 +2229,12 @@ wwv_rsec(
* bit is bad, a bit error is declared and the probabilities are forced
* to zero. Otherwise, the data gate is enabled and the probabilities
* are calculated. Note that the data matched filter contributes half
- * the pulse width, or 85 ms..
+ * the pulse width, or 85 ms.
+ *
+ * It's important to observe that there are three conditions to
+ * determine: average to +1 (hit), average to -1 (miss) or average to
+ * zero (erasure). The erasure condition results from insufficient
+ * signal (noise) and has no bias toward either a hit or miss.
*/
static double
wwv_data(
@@ -2224,14 +2249,16 @@ wwv_data(
dpulse = pulse - DATSIZ / 2;
/*
- * If the data amplitude or SNR are below threshold or if the
- * pulse length is less than 170 ms, declare an erasure.
+ * If no station is being tracked, if either the data amplitude
+ * or SNR are below threshold or if the pulse length is less
+ * than 170 ms, declare an erasure.
*/
- if (up->sigamp < DTHR || up->datsnr < DSNR || dpulse < DATSIZ) {
+ if (!(up->status & (SELV | SELH)) || up->sigsig < DTHR ||
+ up->datsnr < DSNR || dpulse < DATSIZ) {
up->status |= DGATE;
up->errcnt++;
if (up->errcnt > MAXERR)
- up->alarm |= 1 << MODERR;
+ up->alarm |= MODERR;
return (0);
}
@@ -2325,44 +2352,59 @@ wwv_corr4(
/*
* The maximum likelihood digit is compared with the current
* clock digit. The difference represents the decoding phase
- * error. If the digit probability and likelihood are good and
- * the difference stays the same for a number of comparisons,
- * the clock digit is reset to the maximum likelihood digit.
+ * error. If the clock is not yet synchronized, the phase error
+ * is corrected even of the digit probability and likelihood are
+ * below thresholds. This avoids lengthy averaging times should
+ * a carry mistake occur. However, the digit is not declared
+ * synchronized until these values are above thresholds and the
+ * last five decoded values are identical. If the clock is
+ * synchronized, the phase error is not corrected unless the
+ * last five digits are all above thresholds and identical. This
+ * avoids mistakes when the signal is coming out of the noise
+ * and the SNR is very marginal.
*/
diff = mldigit - vp->digit;
if (diff < 0)
diff += vp->radix;
if (diff != vp->phase) {
- vp->phase = diff;
vp->count = 0;
+ vp->phase = diff;
}
- if (vp->digprb < BTHR || vp->digsnr < BSNR) {
+ if (vp->digsnr < BSNR) {
vp->count = 0;
- up->alarm |= 1 << SYMERR;
- } else if (vp->count < BCMP) {
+ up->alarm |= SYMERR;
+ } else if (vp->digprb < BTHR) {
+ vp->count = 0;
+ up->alarm |= SYMERR;
if (!(up->status & INSYNC)) {
vp->phase = 0;
vp->digit = mldigit;
}
+ } else if (vp->count < BCMP) {
vp->count++;
+ up->status |= DSYNC;
+ if (!(up->status & INSYNC)) {
+ vp->phase = 0;
+ vp->digit = mldigit;
+ }
} else {
vp->phase = 0;
vp->digit = mldigit;
up->digcnt++;
}
if (vp->digit != mldigit)
- up->alarm |= 1 << DECERR;
- if (!(up->status & INSYNC)) {
+ up->alarm |= DECERR;
+ if ((pp->sloppyclockflag & CLK_FLAG4) && !(up->status &
+ INSYNC)) {
sprintf(tbuf,
"wwv4 %2d %04x %5.0f %2d %d %d %d %d %5.0f %5.1f",
- up->rsec, up->status, up->epomax, vp->radix,
+ up->rsec, up->status, up->epomax, vp->radix,
vp->digit, vp->mldigit, vp->phase, vp->count,
vp->digprb, vp->digsnr);
- if (pp->sloppyclockflag & CLK_FLAG4)
- record_clock_stats(&peer->srcadr, tbuf);
+ record_clock_stats(&peer->srcadr, tbuf);
#ifdef DEBUG
- if (debug)
- printf("%s\n", tbuf);
+ if (debug)
+ printf("%s\n", tbuf);
#endif /* DEBUG */
}
up->status &= ~BGATE;
@@ -2370,13 +2412,11 @@ wwv_corr4(
/*
- * wwv_tsec - transmitter second processing
+ * wwv_tsec - transmitter minute processing
*
- * This routine is called at the end of the transmitter second. It
+ * This routine is called at the end of the transmitter minute. It
* implements a state machine that advances the logical clock subject to
- * the funny rules that govern the conventional clock and calendar. Note
- * that carries from the least significant (minutes) digit are inhibited
- * until that digit is synchronized.
+ * the funny rules that govern the conventional clock and calendar.
*/
static void
wwv_tsec(
@@ -2386,18 +2426,10 @@ wwv_tsec(
int minute, day, isleap;
int temp;
- up->tsec++;
- if (up->tsec < 60 || up->status & LEPSEC)
- return;
- up->tsec = 0;
-
/*
- * Advance minute unit of the day. If the minute unit is not
- * synchronized, go no further.
+ * Advance minute unit of the day.
*/
temp = carry(&up->decvec[MN]); /* minute units */
- if (!(up->status & DSYNC))
- return;
/*
* Propagate carries through the day.
@@ -2410,8 +2442,10 @@ wwv_tsec(
temp = carry(&up->decvec[HR + 1]);
/*
- * Decode the current minute and day. Set the leap second enable
- * bit on the last minute of 30 June and 31 December.
+ * Decode the current minute and day. Set leap day if the
+ * timecode leap bit is set on 30 June or 31 December. Set leap
+ * minute if the last minute on leap day. This code fails in
+ * 2400 AD.
*/
minute = up->decvec[MN].digit + up->decvec[MN + 1].digit *
10 + up->decvec[HR].digit * 60 + up->decvec[HR +
@@ -2419,9 +2453,16 @@ wwv_tsec(
day = up->decvec[DA].digit + up->decvec[DA + 1].digit * 10 +
up->decvec[DA + 2].digit * 100;
isleap = (up->decvec[YR].digit & 0x3) == 0;
- if (minute == 1439 && (day == (isleap ? 182 : 183) || day ==
- (isleap ? 365 : 366)) && up->misc & SECWAR)
+ if (up->misc & SECWAR && (day == (isleap ? 182 : 183) || day ==
+ (isleap ? 365 : 366)) && up->status & INSYNC && up->status &
+ SSYNC)
+ up->status |= LEPDAY;
+ else
+ up->status &= ~LEPDAY;
+ if (up->status & LEPDAY && minute == 1439)
up->status |= LEPSEC;
+ else
+ up->status &= ~LEPSEC;
/*
* Roll the day if this the first minute and propagate carries
@@ -2459,8 +2500,8 @@ wwv_tsec(
* carry - process digit
*
* This routine rotates a likelihood vector one position and increments
- * the clock digit modulo the radix. It returns the new clock digit -
- * zero if a carry occured. Once synchronized, the clock digit will
+ * the clock digit modulo the radix. It returns the new clock digit or
+ * zero if a carry occurred. Once synchronized, the clock digit will
* match the maximum likelihood digit corresponding to that position.
*/
static int
@@ -2517,19 +2558,36 @@ wwv_snr(
return (rval);
}
+
/*
* wwv_newchan - change to new data channel
*
- * Assuming the radio can be tuned by this program, it actually appears
- * as a 10-channel receiver, one channel for each of WWV and WWVH on
- * each of five frequencies. While the radio is tuned to the working
- * data channel (frequency and station) for most of the minute, during
- * seconds 59, 0 and 1 the radio is tuned to a probe channel, in order
- * to pick up minute sync and data pulses. The search for WWV and WWVH
- * stations operates simultaneously, with WWV on 1000 Hz and WWVH on
- * 1200 Hz. The probe channel rotates for each minute over the five
- * frequencies. At the end of each rotation, this routine mitigates over
- * all channels and chooses the best frequency and station.
+ * The radio actually appears to have ten channels, one channel for each
+ * of five frequencies and each of two stations (WWV and WWVH), although
+ * if not tunable only the 15 MHz channels appear live. While the radio
+ * is tuned to the working data channel frequency and station for most
+ * of the minute, during seconds 59, 0 and 1 the radio is tuned to a
+ * probe frequency in order to search for minute sync pulse and data
+ * subcarrier from other transmitters.
+ *
+ * The search for WWV and WWVH operates simultaneously, with WWV minute
+ * sync pulse at 1000 Hz and WWVH at 1200 Hz. The probe frequency
+ * rotates each minute over 2.5, 5, 10, 15 and 20 MHz in order and yes,
+ * we all know WWVH is dark on 20 MHz, but few remember when WWV was lit
+ * on 25 MHz.
+ *
+ * This routine selects the best channel using a metric computed from
+ * the reachability register and minute pulse amplitude. Normally, the
+ * award goes to the the channel with the highest metric; but, in case
+ * of ties, the award goes to the channel with the highest minute sync
+ * pulse amplitude and then to the highest frequency.
+ *
+ * The routine performs an important squelch function to keep dirty data
+ * from polluting the integrators. During acquisition and until the
+ * clock is synchronized, the signal metric must be at least MTR (13);
+ * after that the metrict must be at least TTHR (50). If either of these
+ * is not true, the station select bits are cleared so the second sync
+ * is disabled and the data bit integrators averaged to a miss.
*/
static void
wwv_newchan(
@@ -2538,61 +2596,119 @@ wwv_newchan(
{
struct refclockproc *pp;
struct wwvunit *up;
- struct chan *cp;
struct sync *sp, *rp;
- int rank;
+ double rank, dtemp;
int i, j;
pp = peer->procptr;
up = (struct wwvunit *)pp->unitptr;
/*
- * Reset the matched filter selector and station pointer to
- * avoid fooling around should we lose this game.
- */
- up->sptr = 0;
- up->status &= ~(SELV | SELH);
-
- /*
- * Search all five station pairs looking for the station with
- * the maximum compare counter. Ties go to the highest frequency
- * and then to WWV.
+ * Search all five station pairs looking for the channel with
+ * maximum metric. If no station is found above thresholds, the
+ * reference ID is set to NONE and we wait for hotter ions.
*/
j = 0;
- sp = (struct sync *)0;
+ sp = NULL;
rank = 0;
for (i = 0; i < NCHAN; i++) {
- cp = &up->mitig[i];
- rp = &cp->wwvh;
- if (rp->count >= rank) {
+ rp = &up->mitig[i].wwvh;
+ dtemp = wwv_metric(rp);
+ if (dtemp >= rank) {
+ rank = dtemp;
sp = rp;
- rank = rp->count;
j = i;
}
- rp = &cp->wwv;
- if (rp->count >= rank) {
+ rp = &up->mitig[i].wwv;
+ dtemp = wwv_metric(rp);
+ if (dtemp >= rank) {
+ rank = dtemp;
sp = rp;
- rank = rp->count;
j = i;
}
}
+ up->dchan = j;
+ up->sptr = sp;
+ up->status &= ~(SELV | SELH);
+ memcpy(&pp->refid, "NONE", 4);
+ if ((!(up->status & INSYNC) && rank >= MTHR) || ((up->status &
+ INSYNC) && rank >= TTHR)) {
+ up->status |= sp->select & (SELV | SELH);
+ memcpy(&pp->refid, sp->refid, 4);
+ }
+ if (peer->stratum <= 1)
+ memcpy(&peer->refid, &pp->refid, 4);
+}
+
+
+/*
+ * www_newgame - reset and start over
+ */
+static void
+wwv_newgame(
+ struct peer *peer /* peer structure pointer */
+ )
+{
+ struct refclockproc *pp;
+ struct wwvunit *up;
+ struct chan *cp;
+ int i;
+
+ pp = peer->procptr;
+ up = (struct wwvunit *)pp->unitptr;
/*
- * If we find a station, continue to track it. If not, X marks
- * the spot and we wait for better ions.
+ * Initialize strategic values. Note we set the leap bits
+ * NOTINSYNC and the refid "NONE".
*/
- if (rank > 0) {
- up->dchan = j;
- up->sptr = sp;
- up->status |= sp->select & (SELV | SELH);
- memcpy((char *)&pp->refid, sp->refid, 4);
- if (peer->stratum <= 1)
- memcpy((char *)&peer->refid, sp->refid, 4);
- wwv_qsy(peer, up->dchan);
+ peer->leap = LEAP_NOTINSYNC;
+ up->watch = up->status = up->alarm = 0;
+ up->avgint = MINAVG;
+ up->freq = 0;
+ up->sptr = NULL;
+ up->gain = MAXGAIN / 2;
+
+ /*
+ * Initialize the station processes for audio gain, select bit,
+ * station/frequency identifier and reference identifier.
+ */
+ memset(up->mitig, 0, sizeof(up->mitig));
+ for (i = 0; i < NCHAN; i++) {
+ cp = &up->mitig[i];
+ cp->gain = up->gain;
+ cp->wwv.select = SELV;
+ sprintf(cp->wwv.refid, "WV%.0f", floor(qsy[i]));
+ cp->wwvh.select = SELH;
+ sprintf(cp->wwvh.refid, "WH%.0f", floor(qsy[i]));
}
+ wwv_newchan(peer);
+}
+
+/*
+ * wwv_metric - compute station metric
+ *
+ * The most significant bits represent the number of ones in the
+ * reachability register. The least significant bits represent the
+ * minute sync pulse amplitude. The combined value is scaled 0-100.
+ */
+double
+wwv_metric(
+ struct sync *sp /* station pointer */
+ )
+{
+ double dtemp;
+
+ dtemp = sp->count * MAXSIG;
+ if (sp->synmax < MAXSIG)
+ dtemp += sp->synmax;
+ else
+ dtemp += MAXSIG - 1;
+ dtemp /= (AMAX + 1) * MAXSIG;
+ return (dtemp * 100.);
}
+#ifdef ICOM
/*
* wwv_qsy - Tune ICOM receiver
*
@@ -2606,22 +2722,22 @@ wwv_qsy(
int chan /* channel */
)
{
+ int rval = 0;
struct refclockproc *pp;
struct wwvunit *up;
- int rval = 0;
pp = peer->procptr;
up = (struct wwvunit *)pp->unitptr;
- up->mitig[up->achan].gain = up->gain;
-#ifdef ICOM
- if (up->fd_icom > 0)
- rval = icom_freq(up->fd_icom, peer->ttlmax & 0x7f,
+ if (up->fd_icom > 0) {
+ up->mitig[up->achan].gain = up->gain;
+ rval = icom_freq(up->fd_icom, peer->ttl & 0x7f,
qsy[chan]);
-#endif /* ICOM */
- up->achan = chan;
- up->gain = up->mitig[up->achan].gain;
+ up->achan = chan;
+ up->gain = up->mitig[up->achan].gain;
+ }
return (rval);
}
+#endif /* ICOM */
/*
@@ -2629,23 +2745,22 @@ wwv_qsy(
*
* Prettytime format - similar to Spectracom
*
- * sq yy ddd hh:mm:ss.fff ld dut lset agc stn comp errs freq avgt
+ * sq yy ddd hh:mm:ss ld dut lset agc iden sig errs freq avgt
*
* s sync indicator ('?' or ' ')
- * q quality character (hex 0-F)
+ * q error bits (hex 0-F)
* yyyy year of century
* ddd day of year
* hh hour of day
* mm minute of hour
- * ss minute of hour
- * fff millisecond of second
- * l leap second warning ' ' or 'L'
- * d DST state 'S', 'D', 'I', or 'O'
- * dut DUT sign and magnitude in deciseconds
+ * ss second of minute)
+ * l leap second warning (' ' or 'L')
+ * d DST state ('S', 'D', 'I', or 'O')
+ * dut DUT sign and magnitude (0.1 s)
* lset minutes since last clock update
* agc audio gain (0-255)
- * iden station identifier (station and frequency)
- * comp minute sync compare counter
+ * iden reference identifier (station and frequency)
+ * sig signal quality (0-100)
* errs bit errors in last minute
* freq frequency offset (PPM)
* avgt averaging time (s)
@@ -2657,8 +2772,8 @@ timecode(
)
{
struct sync *sp;
- int year, day, hour, minute, second, frac, dut;
- char synchar, qual, leapchar, dst;
+ int year, day, hour, minute, second, dut;
+ char synchar, leapchar, dst;
char cptr[50];
@@ -2666,49 +2781,30 @@ timecode(
* Common fixed-format fields
*/
synchar = (up->status & INSYNC) ? ' ' : '?';
- qual = 0;
- if (up->alarm & (3 << DECERR))
- qual |= 0x1;
- if (up->alarm & (3 << SYMERR))
- qual |= 0x2;
- if (up->alarm & (3 << MODERR))
- qual |= 0x4;
- if (up->alarm & (3 << SYNERR))
- qual |= 0x8;
- year = up->decvec[7].digit + up->decvec[7].digit * 10;
- if (year < UTCYEAR)
- year += 2000;
- else
- year += 1900;
- day = up->decvec[4].digit + up->decvec[5].digit * 10 +
- up->decvec[6].digit * 100;
- hour = up->decvec[2].digit + up->decvec[3].digit * 10;
- minute = up->decvec[0].digit + up->decvec[1].digit * 10;
- second = up->tsec;
- frac = (up->tphase * 1000) / SECOND;
+ year = up->decvec[YR].digit + up->decvec[YR + 1].digit * 10 +
+ 2000;
+ day = up->decvec[DA].digit + up->decvec[DA + 1].digit * 10 +
+ up->decvec[DA + 2].digit * 100;
+ hour = up->decvec[HR].digit + up->decvec[HR + 1].digit * 10;
+ minute = up->decvec[MN].digit + up->decvec[MN + 1].digit * 10;
+ second = 0;
leapchar = (up->misc & SECWAR) ? 'L' : ' ';
dst = dstcod[(up->misc >> 4) & 0x3];
dut = up->misc & 0x7;
if (!(up->misc & DUTS))
dut = -dut;
- sprintf(ptr, "%c%1X", synchar, qual);
- sprintf(cptr, " %4d %03d %02d:%02d:%02d.%.03d %c%c %+d",
- year, day, hour, minute, second, frac, leapchar, dst, dut);
+ sprintf(ptr, "%c%1X", synchar, up->alarm);
+ sprintf(cptr, " %4d %03d %02d:%02d:%02d %c%c %+d",
+ year, day, hour, minute, second, leapchar, dst, dut);
strcat(ptr, cptr);
/*
* Specific variable-format fields
*/
sp = up->sptr;
- if (sp != 0)
- sprintf(cptr, " %d %d %s %d %d %.1f %d", up->minset,
- up->mitig[up->dchan].gain, sp->ident, sp->count,
- up->errcnt, up->freq / SECOND * 1e6, MINAVG <<
- up->avgint);
- else
- sprintf(cptr, " %d %d X 0 %d %.1f %d", up->minset,
- up->mitig[up->dchan].gain, up->errcnt, up->freq /
- SECOND * 1e6, MINAVG << up->avgint);
+ sprintf(cptr, " %d %d %s %.0f %d %.1f %d", up->watch,
+ up->mitig[up->dchan].gain, sp->refid, wwv_metric(sp),
+ up->errbit, up->freq / SECOND * 1e6, up->avgint);
strcat(ptr, cptr);
return (strlen(ptr));
}
@@ -2717,9 +2813,10 @@ timecode(
/*
* wwv_gain - adjust codec gain
*
- * This routine is called once each second. If the signal envelope
- * amplitude is too low, the codec gain is bumped up by four units; if
- * too high, it is bumped down. The decoder is relatively insensitive to
+ * This routine is called at the end of each second. It counts the
+ * number of signal clips above the MAXSIG threshold during the previous
+ * second. If there are no clips, the gain is bumped up; if too many
+ * clips, it is bumped down. The decoder is relatively insensitive to
* amplitude, so this crudity works just fine. The input port is set and
* the error flag is cleared, mostly to be ornery.
*/
@@ -2741,15 +2838,19 @@ wwv_gain(
*/
if (up->clipcnt == 0) {
up->gain += 4;
- if (up->gain > 255)
- up->gain = 255;
- } else if (up->clipcnt > SECOND / 100) {
+ if (up->gain > MAXGAIN)
+ up->gain = MAXGAIN;
+ } else if (up->clipcnt > MAXCLP) {
up->gain -= 4;
if (up->gain < 0)
up->gain = 0;
}
- audio_gain(up->gain, up->port);
+ audio_gain(up->gain, up->mongain, up->port);
up->clipcnt = 0;
+#if DEBUG
+ if (debug > 1)
+ audio_show();
+#endif
}
diff --git a/contrib/ntp/ntpd/refclock_wwvb.c b/contrib/ntp/ntpd/refclock_wwvb.c
index 0ca9f75ab7b1..c5ef9f9bc85e 100644
--- a/contrib/ntp/ntpd/refclock_wwvb.c
+++ b/contrib/ntp/ntpd/refclock_wwvb.c
@@ -103,6 +103,7 @@
#define DESCRIPTION "Spectracom WWVB/GPS Receivers" /* WRU */
#define LENWWVB0 22 /* format 0 timecode length */
+#define LENWWVB1 22 /* format 1 timecode length */
#define LENWWVB2 24 /* format 2 timecode length */
#define LENWWVB3 29 /* format 3 timecode length */
#define MONLIN 15 /* number of monitoring lines */
@@ -187,7 +188,7 @@ wwvb_start(
peer->precision = PRECISION;
pp->clockdesc = DESCRIPTION;
memcpy((char *)&pp->refid, REFID, 4);
- peer->burst = NSTAGE;
+ peer->burst = MAXSTAGE;
return (1);
}
@@ -263,11 +264,6 @@ wwvb_receive(
pp->lastrec = up->laststamp;
up->laststamp = trtmp;
up->tcswitch = 1;
-#ifdef DEBUG
- if (debug)
- printf("wwvb: timecode %d %s\n", pp->lencode,
- pp->a_lastcode);
-#endif
/*
* We get down to business, check the timecode format and decode
@@ -277,10 +273,9 @@ wwvb_receive(
*/
syncchar = qualchar = leapchar = dstchar = ' ';
tz = 0;
- pp->msec = 0;
switch (pp->lencode) {
- case LENWWVB0:
+ case LENWWVB0:
/*
* Timecode format 0: "I ddd hh:mm:ss DTZ=nn"
@@ -289,20 +284,22 @@ wwvb_receive(
"%c %3d %2d:%2d:%2d%c%cTZ=%2d",
&syncchar, &pp->day, &pp->hour, &pp->minute,
&pp->second, &tmpchar, &dstchar, &tz) == 8)
+ pp->nsec = 0;
break;
- case LENWWVB2:
+ case LENWWVB2:
/*
* Timecode format 2: "IQyy ddd hh:mm:ss.mmm LD" */
if (sscanf(pp->a_lastcode,
- "%c%c %2d %3d %2d:%2d:%2d.%3d %c",
+ "%c%c %2d %3d %2d:%2d:%2d.%3ld %c",
&syncchar, &qualchar, &pp->year, &pp->day,
- &pp->hour, &pp->minute, &pp->second, &pp->msec,
+ &pp->hour, &pp->minute, &pp->second, &pp->nsec,
&leapchar) == 9)
+ pp->nsec *= 1000000;
break;
- case LENWWVB3:
+ case LENWWVB3:
/*
* Timecode format 3: "0003I yyyymmdd hhmmss+0000SL#"
@@ -313,10 +310,11 @@ wwvb_receive(
&pp->minute, &pp->second, &dstchar, &leapchar) == 8)
{
pp->day = ymd2yd(pp->year, month, day);
+ pp->nsec = 0;
break;
}
- default:
+ default:
/*
* Unknown format: If dumping internal table, record
@@ -343,6 +341,7 @@ wwvb_receive(
case ' ':
pp->disp = .001;
+ pp->lastref = pp->lastrec;
break;
case 'A':
@@ -411,17 +410,21 @@ wwvb_poll(
pollchar = 'T';
if (write(pp->io.fd, &pollchar, 1) != 1)
refclock_report(peer, CEVNT_FAULT);
- else
- pp->polls++;
if (peer->burst > 0)
return;
if (pp->coderecv == pp->codeproc) {
refclock_report(peer, CEVNT_TIMEOUT);
return;
}
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
refclock_receive(peer);
- peer->burst = NSTAGE;
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
+#ifdef DEBUG
+ if (debug)
+ printf("wwvb: timecode %d %s\n", pp->lencode,
+ pp->a_lastcode);
+#endif
+ peer->burst = MAXSTAGE;
+ pp->polls++;
/*
* If the monitor flag is set (flag4), we dump the internal
diff --git a/contrib/ntp/ntpdate/Makefile.am b/contrib/ntp/ntpdate/Makefile.am
index f4152b0120b9..bfe3fea664c5 100644
--- a/contrib/ntp/ntpdate/Makefile.am
+++ b/contrib/ntp/ntpdate/Makefile.am
@@ -1,10 +1,12 @@
#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
-bin_PROGRAMS = ntpdate ntptimeset
+#bin_PROGRAMS = ntpdate ntptimeset
+bin_PROGRAMS = ntpdate
+EXTRA_PROGRAMS = ntptimeset
ntptimeset_SOURCES = ntptimeset.c ntptime_config.c
INCLUDES = -I$(top_srcdir)/include
# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a @LIBRSAREF@
+LDADD = version.o ../libntp/libntp.a
DISTCLEANFILES = .version version.c stamp-v
noinst_HEADERS = ntpdate.h
#EXTRA_DIST = ntpdate.mak
@@ -15,6 +17,6 @@ $(PROGRAMS): $(LDADD)
../libntp/libntp.a:
cd ../libntp && $(MAKE)
-version.o: $(ntpdate_OBJECTS) ../libntp/libntp.a @LIBRSAREF@ Makefile
+version.o: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdate
$(COMPILE) -c version.c
diff --git a/contrib/ntp/ntpdate/Makefile.in b/contrib/ntp/ntpdate/Makefile.in
index f215cde925e3..391f494a01e5 100644
--- a/contrib/ntp/ntpdate/Makefile.in
+++ b/contrib/ntp/ntpdate/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,36 +94,84 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
-bin_PROGRAMS = ntpdate ntptimeset
+#bin_PROGRAMS = ntpdate ntptimeset
+bin_PROGRAMS = ntpdate
+EXTRA_PROGRAMS = ntptimeset
ntptimeset_SOURCES = ntptimeset.c ntptime_config.c
INCLUDES = -I$(top_srcdir)/include
# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a @LIBRSAREF@
+LDADD = version.o ../libntp/libntp.a
DISTCLEANFILES = .version version.c stamp-v
noinst_HEADERS = ntpdate.h
#EXTRA_DIST = ntpdate.mak
ETAGS_ARGS = Makefile.am
subdir = ntpdate
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
-bin_PROGRAMS = ntpdate$(EXEEXT) ntptimeset$(EXEEXT)
+EXTRA_PROGRAMS = ntptimeset$(EXEEXT)
+bin_PROGRAMS = ntpdate$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
ntpdate_SOURCES = ntpdate.c
@@ -140,15 +186,12 @@ ntptimeset_LDADD = $(LDADD)
ntptimeset_DEPENDENCIES = version.o ../libntp/libntp.a
ntptimeset_LDFLAGS =
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/ntpdate$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntptime_config$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntptimeset$U.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ntpdate$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntptime_config$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntptimeset$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
@@ -156,7 +199,8 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = ntpdate.c $(ntptimeset_SOURCES)
HEADERS = $(noinst_HEADERS)
-DIST_COMMON = README $(noinst_HEADERS) Makefile.am Makefile.in
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
+ Makefile.am
SOURCES = ntpdate.c $(ntptimeset_SOURCES)
all: all-am
@@ -167,9 +211,8 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu ntpdate/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@@ -177,16 +220,16 @@ install-binPROGRAMS: $(bin_PROGRAMS)
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
- f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
@@ -211,84 +254,122 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntpdate$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntptime_config$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntptimeset$U.Po@am__quote@
+ -test "$U" = "" || rm -f *_.c
-distclean-depend:
- -rm -rf $(DEPDIR)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdate$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntptime_config$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntptimeset$U.Po@am__quote@
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
ntpdate_.c: ntpdate.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpdate.c; then echo $(srcdir)/ntpdate.c; else echo ntpdate.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntpdate_.c || rm -f ntpdate_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpdate.c; then echo $(srcdir)/ntpdate.c; else echo ntpdate.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntptime_config_.c: ntptime_config.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntptime_config.c; then echo $(srcdir)/ntptime_config.c; else echo ntptime_config.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntptime_config_.c || rm -f ntptime_config_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntptime_config.c; then echo $(srcdir)/ntptime_config.c; else echo ntptime_config.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntptimeset_.c: ntptimeset.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntptimeset.c; then echo $(srcdir)/ntptimeset.c; else echo ntptimeset.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntptimeset_.c || rm -f ntptimeset_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntptimeset.c; then echo $(srcdir)/ntptimeset.c; else echo ntptimeset.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntpdate_.$(OBJEXT) ntptime_config_.$(OBJEXT) ntptimeset_.$(OBJEXT) : \
$(ANSI2KNR)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -301,7 +382,6 @@ all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -313,6 +393,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -320,7 +401,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@@ -331,9 +412,11 @@ clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -354,6 +437,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -361,18 +446,26 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic distclean distclean-compile distclean-depend \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic ctags distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am info \
info-am install install-am install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am
+ mostlyclean-generic mostlyclean-kr pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
$(PROGRAMS): $(LDADD)
@@ -380,7 +473,7 @@ $(PROGRAMS): $(LDADD)
../libntp/libntp.a:
cd ../libntp && $(MAKE)
-version.o: $(ntpdate_OBJECTS) ../libntp/libntp.a @LIBRSAREF@ Makefile
+version.o: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdate
$(COMPILE) -c version.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/ntp/ntpdate/ntpdate.c b/contrib/ntp/ntpdate/ntpdate.c
index 24e2bc841cfd..398d19466038 100644
--- a/contrib/ntp/ntpdate/ntpdate.c
+++ b/contrib/ntp/ntpdate/ntpdate.c
@@ -46,6 +46,12 @@
# include <sys/resource.h>
#endif /* HAVE_SYS_RESOURCE_H */
+#include <arpa/inet.h>
+
+#ifdef __QNXNTO__
+# include "adjtime.h"
+#endif
+
#ifdef SYS_VXWORKS
# include "ioLib.h"
# include "sockLib.h"
@@ -57,10 +63,17 @@ struct timeval timeout = {0,0};
struct timeval timeout = {60,0};
#endif
+#ifdef HAVE_NETINFO
+#include <netinfo/ni.h>
+#endif
+
#include "recvbuff.h"
#ifdef SYS_WINNT
-# define TARGET_RESOLUTION 1 /* Try for 1-millisecond accuracy
+#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#define EPFNOSUPPORT WSAEPFNOSUPPORT
+#define TARGET_RESOLUTION 1 /* Try for 1-millisecond accuracy
on Windows NT timers. */
#pragma comment(lib, "winmm")
#endif /* SYS_WINNT */
@@ -98,12 +111,18 @@ volatile int debug = 0;
/*
* File descriptor masks etc. for call to select
*/
-int fd;
+
+int ai_fam_templ;
+int nbsock;
+SOCKET fd[MAX_AF]; /* support up to 2 sockets */
+int fd_family[MAX_AF]; /* to remember the socket family */
#ifdef HAVE_POLL_H
-struct pollfd fdmask;
+struct pollfd fdmask[MAX_AF];
#else
fd_set fdmask;
+int maxfd;
#endif
+int polltest = 0;
/*
* Initializing flag. All async routines watch this and only do their
@@ -184,6 +203,7 @@ int always_step = 0;
int never_step = 0;
int ntpdatemain P((int, char **));
+
static void transmit P((struct server *));
static void receive P((struct recvbuf *));
static void server_data P((struct server *, s_fp, l_fp *, u_fp));
@@ -191,20 +211,19 @@ static void clock_filter P((struct server *));
static struct server *clock_select P((void));
static int clock_adjust P((void));
static void addserver P((char *));
-static struct server *findserver P((struct sockaddr_in *));
+static struct server *findserver P((struct sockaddr_storage *));
void timer P((void));
static void init_alarm P((void));
#ifndef SYS_WINNT
static RETSIGTYPE alarming P((int));
#endif /* SYS_WINNT */
static void init_io P((void));
-static void sendpkt P((struct sockaddr_in *, struct pkt *, int));
+static void sendpkt P((struct sockaddr_storage *, struct pkt *, int));
void input_handler P((void));
static int l_adj_systime P((l_fp *));
static int l_step_systime P((l_fp *));
-static int getnetnum P((const char *, u_int32 *));
static void printserver P((struct server *, FILE *));
#ifdef SYS_WINNT
@@ -305,6 +324,8 @@ ntpdatemain (
l_fp tmp;
int errflg;
int c;
+ int nfound;
+
#ifdef HAVE_NETINFO
ni_namelist *netinfoservers;
#endif
@@ -313,7 +334,7 @@ ntpdatemain (
wVersionRequested = MAKEWORD(1,1);
if (WSAStartup(wVersionRequested, &wsaData)) {
- msyslog(LOG_ERR, "No useable winsock.dll: %m");
+ netsyslog(LOG_ERR, "No useable winsock.dll: %m");
exit(1);
}
@@ -336,9 +357,15 @@ ntpdatemain (
/*
* Decode argument list
*/
- while ((c = ntp_getopt(argc, argv, "a:bBde:k:o:p:qr:st:uv")) != EOF)
+ while ((c = ntp_getopt(argc, argv, "46a:bBde:k:o:p:qr:st:uv")) != EOF)
switch (c)
{
+ case '4':
+ ai_fam_templ = AF_INET;
+ break;
+ case '6':
+ ai_fam_templ = AF_INET6;
+ break;
case 'a':
c = atoi(ntp_optarg);
sys_authenticate = 1;
@@ -428,8 +455,8 @@ ntpdatemain (
if (errflg) {
(void) fprintf(stderr,
- "usage: %s [-bBdqsuv] [-a key#] [-e delay] [-k file] [-p samples] [-o version#] [-r rate] [-t timeo] server ...\n",
- progname);
+ "usage: %s [-46bBdqsuv] [-a key#] [-e delay] [-k file] [-p samples] [-o version#] [-r rate] [-t timeo] server ...\n",
+ progname);
exit(2);
}
@@ -538,17 +565,20 @@ ntpdatemain (
}
#endif /* SYS_WINNT */
- initializing = 0;
+
+ initializing = 0;
was_alarmed = 0;
rbuflist = (struct recvbuf *)0;
+
while (complete_servers < sys_numservers) {
#ifdef HAVE_POLL_H
- struct pollfd rdfdes;
+ struct pollfd* rdfdes;
+ rdfdes = fdmask;
#else
fd_set rdfdes;
+ rdfdes = fdmask;
#endif
- int nfound;
if (alarm_flag) { /* alarmed? */
was_alarmed = 1;
@@ -560,11 +590,11 @@ ntpdatemain (
/*
* Nothing to do. Wait for something.
*/
- rdfdes = fdmask;
#ifdef HAVE_POLL_H
- nfound = poll(&rdfdes, 1, timeout.tv_sec * 1000);
+ nfound = poll(rdfdes, (unsigned int)nbsock, timeout.tv_sec * 1000);
+
#else
- nfound = select(fd+1, &rdfdes, (fd_set *)0,
+ nfound = select(maxfd, &rdfdes, (fd_set *)0,
(fd_set *)0, &timeout);
#endif
if (nfound > 0)
@@ -579,7 +609,7 @@ ntpdatemain (
#ifndef SYS_WINNT
if (errno != EINTR)
#endif
- msyslog(LOG_ERR,
+ netsyslog(LOG_ERR,
#ifdef HAVE_POLL_H
"poll() error: %m"
#else
@@ -588,7 +618,7 @@ ntpdatemain (
);
} else {
#ifndef SYS_VXWORKS
- msyslog(LOG_DEBUG,
+ netsyslog(LOG_DEBUG,
#ifdef HAVE_POLL_H
"poll(): nfound = %d, error: %m",
#else
@@ -639,6 +669,7 @@ ntpdatemain (
close (fd);
timer_delete(ntpdate_timerid);
#endif
+
return clock_adjust();
}
@@ -656,7 +687,7 @@ transmit(
struct pkt xpkt;
if (debug)
- printf("transmit(%s)\n", ntoa(&server->srcadr));
+ printf("transmit(%s)\n", stoa(&(server->srcadr)));
if (server->filter_nextpt < server->xmtcnt) {
l_fp ts;
@@ -711,14 +742,14 @@ transmit(
if (debug > 1)
printf("transmit auth to %s\n",
- ntoa(&(server->srcadr)));
+ stoa(&(server->srcadr)));
} else {
get_systime(&(server->xmt));
HTONL_FP(&server->xmt, &xpkt.xmt);
sendpkt(&(server->srcadr), &xpkt, LEN_PKT_NOMAC);
if (debug > 1)
- printf("transmit to %s\n", ntoa(&(server->srcadr)));
+ printf("transmit to %s\n", stoa(&(server->srcadr)));
}
/*
@@ -748,7 +779,7 @@ receive(
int is_authentic;
if (debug)
- printf("receive(%s)\n", ntoa(&rbufp->recv_srcadr));
+ printf("receive(%s)\n", stoa(&rbufp->recv_srcadr));
/*
* Check to see if the packet basically looks like something
* intended for us.
@@ -911,7 +942,7 @@ server_data(
u_fp e
)
{
- register int i;
+ u_short i;
i = server->filter_nextpt;
if (i < NTP_SHIFT) {
@@ -919,7 +950,7 @@ server_data(
server->filter_offset[i] = *c;
server->filter_soffset[i] = LFPTOFP(c);
server->filter_error[i] = e;
- server->filter_nextpt = i + 1;
+ server->filter_nextpt = (u_short)(i + 1);
}
}
@@ -1254,14 +1285,14 @@ clock_adjust(void)
if (dostep) {
if (simple_query || l_step_systime(&server->offset)) {
msyslog(LOG_NOTICE, "step time server %s offset %s sec",
- ntoa(&server->srcadr),
+ stoa(&server->srcadr),
lfptoa(&server->offset, 6));
}
} else {
#if !defined SYS_WINNT && !defined SYS_CYGWIN32
if (simple_query || l_adj_systime(&server->offset)) {
msyslog(LOG_NOTICE, "adjust time server %s offset %s sec",
- ntoa(&server->srcadr),
+ stoa(&server->srcadr),
lfptoa(&server->offset, 6));
}
#else
@@ -1293,20 +1324,39 @@ addserver(
)
{
register struct server *server;
- u_int32 netnum;
-
- if (!getnetnum(serv, &netnum)) {
+ /* Address infos structure to store result of getaddrinfo */
+ struct addrinfo *addrResult;
+ /* Address infos structure to store hints for getaddrinfo */
+ struct addrinfo hints;
+ /* Error variable for getaddrinfo */
+ int error;
+ /* Service name */
+ char service[5];
+ strcpy(service, "ntp");
+
+ /* Get host address. Looking for UDP datagram connection. */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = ai_fam_templ;
+ hints.ai_socktype = SOCK_DGRAM;
+
+ printf("Looking for host %s and service %s\n", serv, service);
+
+ error = getaddrinfo(serv, service, &hints, &addrResult);
+ if (error != 0) {
+ fprintf(stderr, "Error : %s\n", gai_strerror(error));
msyslog(LOG_ERR, "can't find host %s\n", serv);
return;
}
+ else {
+ fprintf(stderr, "host found : %s\n", stohost((struct sockaddr_storage*)addrResult->ai_addr));
+ }
server = (struct server *)emalloc(sizeof(struct server));
memset((char *)server, 0, sizeof(struct server));
- server->srcadr.sin_family = AF_INET;
- server->srcadr.sin_addr.s_addr = netnum;
- server->srcadr.sin_port = htons(NTP_PORT);
-
+ /* For now we only get the first returned server of the addrinfo list */
+ memset(&(server->srcadr), 0, sizeof(struct sockaddr_storage));
+ memcpy(&(server->srcadr), addrResult->ai_addr, addrResult->ai_addrlen);
server->event_time = ++sys_numservers;
if (sys_servers == NULL)
sys_servers = server;
@@ -1322,47 +1372,56 @@ addserver(
/*
* findserver - find a server in the list given its address
+ * ***(For now it isn't totally AF-Independant, to check later..)
*/
static struct server *
findserver(
- struct sockaddr_in *addr
+ struct sockaddr_storage *addr
)
{
- register u_int32 netnum;
struct server *server;
struct server *mc_server;
mc_server = NULL;
- if (htons(addr->sin_port) != NTP_PORT)
+ if (htons(((struct sockaddr_in*)addr)->sin_port) != NTP_PORT)
return 0;
- netnum = addr->sin_addr.s_addr;
for (server = sys_servers; server != NULL;
server = server->next_server) {
- register u_int32 servnum;
- servnum = server->srcadr.sin_addr.s_addr;
- if (netnum == servnum)
+ if (memcmp(addr, &server->srcadr, SOCKLEN(addr))==0)
return server;
- if (IN_MULTICAST(ntohl(servnum)))
+ /* Multicast compatibility to verify here... I'm not sure it's working */
+ if(addr->ss_family == AF_INET) {
+ if (IN_MULTICAST(ntohl(((struct sockaddr_in*)addr)->sin_addr.s_addr)))
+ mc_server = server;
+ }
+ else {
+#ifdef AF_INET6
+ if (IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6*)(&server->srcadr))->sin6_addr))
mc_server = server;
+#else
+ return 0;
+#endif
+ }
}
if (mc_server != NULL) {
+
struct server *sp;
if (mc_server->event_time != 0) {
mc_server->event_time = 0;
complete_servers++;
}
+
server = (struct server *)emalloc(sizeof(struct server));
memset((char *)server, 0, sizeof(struct server));
- server->srcadr.sin_family = AF_INET;
- server->srcadr.sin_addr.s_addr = netnum;
- server->srcadr.sin_port = htons(NTP_PORT);
+ memcpy(&server->srcadr, &addr, sizeof(struct sockaddr_storage));
server->event_time = ++sys_numservers;
+
for (sp = sys_servers; sp->next_server != NULL;
sp = sp->next_server) ;
sp->next_server = server;
@@ -1485,6 +1544,7 @@ init_alarm(void)
itimer.it_interval.tv_sec = itimer.it_value.tv_sec = 0;
itimer.it_interval.tv_usec = 1000000/TIMER_HZ;
itimer.it_value.tv_usec = 1000000/(TIMER_HZ<<1);
+
setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0);
# endif
#if defined SYS_CYGWIN32
@@ -1582,51 +1642,96 @@ init_alarm(void)
static void
init_io(void)
{
+ struct addrinfo *res, *ressave;
+ struct addrinfo hints;
+ char service[5];
+ int optval = 1;
+
/*
* Init buffer free list and stat counters
*/
init_recvbuff(sys_numservers + 2);
+
/*
* Open the socket
*/
+ strcpy(service, "ntp");
+
+ /*
+ * Init hints addrinfo structure
+ */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_flags = AI_PASSIVE;
+ hints.ai_socktype = SOCK_DGRAM;
+
+ if(getaddrinfo(NULL, service, &hints, &res) != 0) {
+ msyslog(LOG_ERR, "getaddrinfo() failed: %m");
+ exit(1);
+ /*NOTREACHED*/
+ }
+
+ /* Remember the address of the addrinfo structure chain */
+ ressave = res;
+
+ /*
+ * For each structure returned, open and bind socket
+ */
+ for(nbsock = 0; (nbsock < MAX_AF) && res ; res = res->ai_next) {
/* create a datagram (UDP) socket */
- if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
- msyslog(LOG_ERR, "socket() failed: %m");
+ if ((fd[nbsock] = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) < 0) {
+ if (errno == EPROTONOSUPPORT || errno == EAFNOSUPPORT ||
+ errno == EPFNOSUPPORT)
+ continue;
+ netsyslog(LOG_ERR, "socket() failed: %m");
exit(1);
/*NOTREACHED*/
}
+ /* set socket to reuse address */
+ if (setsockopt(fd[nbsock], SOL_SOCKET, SO_REUSEADDR, (void*) &optval, sizeof(optval)) < 0) {
+ netsyslog(LOG_ERR, "setsockopt() SO_REUSEADDR failed: %m");
+ exit(1);
+ /*NOTREACHED*/
+ }
+#ifdef IPV6_V6ONLY
+ /* Restricts AF_INET6 socket to IPv6 communications (see RFC 2553bis-03) */
+ if (res->ai_family == AF_INET6)
+ if (setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)) < 0) {
+ netsyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m");
+ exit(1);
+ /*NOTREACHED*/
+ }
+#endif
+
+ /* Remember the socket family in fd_family structure */
+ fd_family[nbsock] = res->ai_family;
/*
* bind the socket to the NTP port
*/
if (!debug && !simple_query && !unpriv_port) {
- struct sockaddr_in addr;
-
- memset((char *)&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
- addr.sin_addr.s_addr = htonl(INADDR_ANY);
- if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
+ if (bind(fd[nbsock], res->ai_addr, SOCKLEN(res->ai_addr)) < 0) {
#ifndef SYS_WINNT
if (errno == EADDRINUSE)
#else
if (WSAGetLastError() == WSAEADDRINUSE)
#endif /* SYS_WINNT */
- msyslog(LOG_ERR,
+ netsyslog(LOG_ERR,
"the NTP socket is in use, exiting");
else
- msyslog(LOG_ERR, "bind() fails: %m");
+ netsyslog(LOG_ERR, "bind() fails: %m");
exit(1);
}
}
#ifdef HAVE_POLL_H
- fdmask.fd = fd;
- fdmask.events = POLLIN;
+ fdmask[nbsock].fd = fd[nbsock];
+ fdmask[nbsock].events = POLLIN;
#else
- FD_ZERO(&fdmask);
- FD_SET(fd, &fdmask);
+ FD_SET(fd[nbsock], &fdmask);
+ if ((SOCKET) maxfd < fd[nbsock]+1) {
+ maxfd = fd[nbsock]+1;
+ }
#endif
/*
@@ -1637,22 +1742,22 @@ init_io(void)
{
int on = TRUE;
- if (ioctl(fd,FIONBIO, &on) == ERROR) {
- msyslog(LOG_ERR, "ioctl(FIONBIO) fails: %m");
+ if (ioctl(fd[nbsock],FIONBIO, &on) == ERROR) {
+ netsyslog(LOG_ERR, "ioctl(FIONBIO) fails: %m");
exit(1);
}
}
# else /* not SYS_VXWORKS */
# if defined(O_NONBLOCK)
- if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
- msyslog(LOG_ERR, "fcntl(FNDELAY|FASYNC) fails: %m");
+ if (fcntl(fd[nbsock], F_SETFL, O_NONBLOCK) < 0) {
+ netsyslog(LOG_ERR, "fcntl(FNDELAY|FASYNC) fails: %m");
exit(1);
/*NOTREACHED*/
}
# else /* not O_NONBLOCK */
# if defined(FNDELAY)
- if (fcntl(fd, F_SETFL, FNDELAY) < 0) {
- msyslog(LOG_ERR, "fcntl(FNDELAY|FASYNC) fails: %m");
+ if (fcntl(fd[nbsock], F_SETFL, FNDELAY) < 0) {
+ netsyslog(LOG_ERR, "fcntl(FNDELAY|FASYNC) fails: %m");
exit(1);
/*NOTREACHED*/
}
@@ -1662,32 +1767,51 @@ init_io(void)
# endif /* not O_NONBLOCK */
# endif /* SYS_VXWORKS */
#else /* SYS_WINNT */
- if (ioctlsocket(fd, FIONBIO, (u_long *) &on) == SOCKET_ERROR) {
- msyslog(LOG_ERR, "ioctlsocket(FIONBIO) fails: %m");
+ if (ioctlsocket(fd[nbsock], FIONBIO, (u_long *) &on) == SOCKET_ERROR) {
+ netsyslog(LOG_ERR, "ioctlsocket(FIONBIO) fails: %m");
exit(1);
}
#endif /* SYS_WINNT */
+ nbsock++;
+ }
+ freeaddrinfo(ressave);
}
-
/*
* sendpkt - send a packet to the specified destination
*/
static void
sendpkt(
- struct sockaddr_in *dest,
+ struct sockaddr_storage *dest,
struct pkt *pkt,
int len
)
{
+ int i;
int cc;
+ SOCKET sock = 0;
#ifdef SYS_WINNT
DWORD err;
#endif /* SYS_WINNT */
- cc = sendto(fd, (char *)pkt, (size_t)len, 0, (struct sockaddr *)dest,
- sizeof(struct sockaddr_in));
+ /* Find a local family compatible socket to send ntp packet to ntp server */
+ for(i = 0; (i < MAX_AF); i++) {
+ if(dest->ss_family == fd_family[i]) {
+ sock = fd[i];
+ break;
+ }
+ }
+
+ if ( sock == 0 ) {
+ netsyslog(LOG_ERR, "cannot find family compatible socket to send ntp packet");
+ exit(1);
+ /*NOTREACHED*/
+ }
+
+ cc = sendto(sock, (char *)pkt, len, 0, (struct sockaddr *)dest,
+ SOCKLEN(dest));
+
#ifndef SYS_WINNT
if (cc == -1) {
if (errno != EWOULDBLOCK && errno != ENOBUFS)
@@ -1696,7 +1820,7 @@ sendpkt(
err = WSAGetLastError();
if (err != WSAEWOULDBLOCK && err != WSAENOBUFS)
#endif /* SYS_WINNT */
- msyslog(LOG_ERR, "sendto(%s): %m", ntoa(dest));
+ netsyslog(LOG_ERR, "sendto(%s): %m", stohost(dest));
}
}
@@ -1712,22 +1836,49 @@ input_handler(void)
struct timeval tvzero;
int fromlen;
l_fp ts;
+ int i;
#ifdef HAVE_POLL_H
- struct pollfd fds;
+ struct pollfd fds[MAX_AF];
#else
fd_set fds;
#endif
+ int fdc = 0;
/*
* Do a poll to see if we have data
*/
for (;;) {
- fds = fdmask;
tvzero.tv_sec = tvzero.tv_usec = 0;
#ifdef HAVE_POLL_H
- n = poll(&fds, 1, tvzero.tv_sec * 1000);
+ memcpy(fds, fdmask, sizeof(fdmask));
+ n = poll(fds, (unsigned int)nbsock, tvzero.tv_sec * 1000);
+
+ /*
+ * Determine which socket received data
+ */
+
+ for(i=0; i < nbsock; i++) {
+ if(fds[i].revents & POLLIN) {
+ fdc = fd[i];
+ break;
+ }
+ }
+
#else
- n = select(fd+1, &fds, (fd_set *)0, (fd_set *)0, &tvzero);
+ fds = fdmask;
+ n = select(maxfd, &fds, (fd_set *)0, (fd_set *)0, &tvzero);
+
+ /*
+ * Determine which socket received data
+ */
+
+ for(i=0; i < maxfd; i++) {
+ if(FD_ISSET(fd[i], &fds)) {
+ fdc = fd[i];
+ break;
+ }
+ }
+
#endif
/*
@@ -1739,7 +1890,7 @@ input_handler(void)
return;
else if (n == -1) {
if (errno != EINTR)
- msyslog(LOG_ERR,
+ netsyslog(LOG_ERR,
#ifdef HAVE_POLL_H
"poll() error: %m"
#else
@@ -1758,23 +1909,24 @@ input_handler(void)
if (initializing || free_recvbuffs() == 0) {
char buf[100];
+
#ifndef SYS_WINNT
- (void) read(fd, buf, sizeof buf);
+ (void) read(fdc, buf, sizeof buf);
#else
/* NT's _read does not operate on nonblocking sockets
* either recvfrom or ReadFile() has to be used here.
* ReadFile is used in [ntpd]ntp_intres() and ntpdc,
* just to be different use recvfrom() here
*/
- recvfrom(fd, buf, sizeof(buf), 0, (struct sockaddr *)0, NULL);
+ recvfrom(fdc, buf, sizeof(buf), 0, (struct sockaddr *)0, NULL);
#endif /* SYS_WINNT */
continue;
}
rb = get_free_recv_buffer();
- fromlen = sizeof(struct sockaddr_in);
- rb->recv_length = recvfrom(fd, (char *)&rb->recv_pkt,
+ fromlen = sizeof(struct sockaddr_storage);
+ rb->recv_length = recvfrom(fdc, (char *)&rb->recv_pkt,
sizeof(rb->recv_pkt), 0,
(struct sockaddr *)&rb->recv_srcadr, &fromlen);
if (rb->recv_length == -1) {
@@ -1908,25 +2060,6 @@ l_step_systime(
#endif /* SLEWALWAYS */
}
-/*
- * getnetnum - given a host name, return its net number
- */
-static int
-getnetnum(
- const char *host,
- u_int32 *num
- )
-{
- struct hostent *hp;
-
- if (decodenetnum(host, num)) {
- return 1;
- } else if ((hp = gethostbyname(host)) != 0) {
- memmove((char *)num, hp->h_addr, sizeof(u_int32));
- return (1);
- }
- return (0);
-}
/* XXX ELIMINATE printserver similar in ntptrace.c, ntpdate.c */
/*
@@ -1944,13 +2077,13 @@ printserver(
if (!debug) {
(void) fprintf(fp, "server %s, stratum %d, offset %s, delay %s\n",
- ntoa(&pp->srcadr), pp->stratum,
+ stoa(&pp->srcadr), pp->stratum,
lfptoa(&pp->offset, 6), fptoa((s_fp)pp->delay, 5));
return;
}
(void) fprintf(fp, "server %s, port %d\n",
- ntoa(&pp->srcadr), ntohs(pp->srcadr.sin_port));
+ stoa(&pp->srcadr), ntohs(((struct sockaddr_in*)&(pp->srcadr))->sin_port));
(void) fprintf(fp, "stratum %d, precision %d, leap %c%c, trust %03o\n",
pp->stratum, pp->precision,
@@ -1963,7 +2096,7 @@ printserver(
memmove(junk, (char *)&pp->refid, 4);
str = junk;
} else {
- str = numtoa(pp->refid);
+ str = stoa(&pp->srcadr);
}
(void) fprintf(fp,
"refid [%s], delay %s, dispersion %s\n",
diff --git a/contrib/ntp/ntpdate/ntpdate.h b/contrib/ntp/ntpdate/ntpdate.h
index 5ead20f9e48a..f3531b3f2434 100644
--- a/contrib/ntp/ntpdate/ntpdate.h
+++ b/contrib/ntp/ntpdate/ntpdate.h
@@ -15,7 +15,7 @@ extern void loadservers P((char *cfgpath));
*/
struct server {
struct server *next_server; /* next server in build list */
- struct sockaddr_in srcadr; /* address of remote host */
+ struct sockaddr_storage srcadr; /* address of remote host */
u_char version; /* version to use */
u_char leap; /* leap indicator */
u_char stratum; /* stratum of remote server */
@@ -97,3 +97,8 @@ struct server {
#define DEFMAXPERIOD 60 /* maximum time to wait */
#define DEFMINSERVERS 3 /* minimum responding servers */
#define DEFMINVALID 1 /* mimimum servers with valid time */
+
+/*
+ * Define the max number of sockets we can open
+ */
+#define MAX_AF 2
diff --git a/contrib/ntp/ntpdc/Makefile.am b/contrib/ntp/ntpdc/Makefile.am
index ba0626f3ad41..f7a4d2afce5c 100644
--- a/contrib/ntp/ntpdc/Makefile.am
+++ b/contrib/ntp/ntpdc/Makefile.am
@@ -1,21 +1,45 @@
#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
-bin_PROGRAMS = ntpdc
-INCLUDES = -I$(top_srcdir)/include
+bin_PROGRAMS= ntpdc
+EXTRA_PROGRAMS= ntpdc-layout
+EXTRA_DATA= check-layout
+BUILT_SOURCES= maybe-layout
+INCLUDES= -I$(top_srcdir)/include
# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a @LIBRSAREF@
-DISTCLEANFILES = .version version.c
-noinst_HEADERS = ntpdc.h
-#EXTRA_DIST = ntpdc.mak
-ETAGS_ARGS = Makefile.am
+ntpdc_LDADD= version.o ../libntp/libntp.a @READLINE_LIBS@
+# ntpdc-layout doesn't need any additional libraries at all
+ntpdc_layout_LDADD=
+DISTCLEANFILES= .version version.c
+CLEANFILES= check-layout layout.here nl.c ntpdc-layout
+noinst_HEADERS= ntpdc.h
+EXTRA_DIST= nl_in.c nl.pl layout.std
+ETAGS_ARGS= Makefile.am
ntpdc_SOURCES = ntpdc.c ntpdc_ops.c
+maybe-layout:
+ @case "${PATH_PERL}" in \
+ /*) ${MAKE} check-layout ;; \
+ esac
+
+ntpdc-layout.o: nl.c
+
+layout.here: ntpdc-layout
+ ./ntpdc-layout > $@
+
+check-layout: ntpdc-layout layout.std layout.here
+ cmp $(srcdir)/layout.std layout.here && echo stamp > $@
+
$(PROGRAMS): $(LDADD)
../libntp/libntp.a:
cd ../libntp && $(MAKE)
-version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a @LIBRSAREF@ Makefile
+version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdc
$(COMPILE) -c version.c
+
+# I ran nl_in.c (attached, to be installed into ntpdc) through
+# $(CC) -E nl_in.c | nl.pl > nl.c
+nl.c: nl_in.c nl.pl
+ $(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
diff --git a/contrib/ntp/ntpdc/Makefile.in b/contrib/ntp/ntpdc/Makefile.in
index 4c722e31a069..8ad0e0565649 100644
--- a/contrib/ntp/ntpdc/Makefile.in
+++ b/contrib/ntp/ntpdc/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,63 +94,119 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
bin_PROGRAMS = ntpdc
+EXTRA_PROGRAMS = ntpdc-layout
+EXTRA_DATA = check-layout
+BUILT_SOURCES = maybe-layout
INCLUDES = -I$(top_srcdir)/include
# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a @LIBRSAREF@
+ntpdc_LDADD = version.o ../libntp/libntp.a @READLINE_LIBS@
+# ntpdc-layout doesn't need any additional libraries at all
+ntpdc_layout_LDADD =
DISTCLEANFILES = .version version.c
+CLEANFILES = check-layout layout.here nl.c ntpdc-layout
noinst_HEADERS = ntpdc.h
-#EXTRA_DIST = ntpdc.mak
+EXTRA_DIST = nl_in.c nl.pl layout.std
ETAGS_ARGS = Makefile.am
ntpdc_SOURCES = ntpdc.c ntpdc_ops.c
subdir = ntpdc
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = nl.pl
+EXTRA_PROGRAMS = ntpdc-layout$(EXEEXT)
bin_PROGRAMS = ntpdc$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
am_ntpdc_OBJECTS = ntpdc$U.$(OBJEXT) ntpdc_ops$U.$(OBJEXT)
ntpdc_OBJECTS = $(am_ntpdc_OBJECTS)
-ntpdc_LDADD = $(LDADD)
ntpdc_DEPENDENCIES = version.o ../libntp/libntp.a
ntpdc_LDFLAGS =
+ntpdc_layout_SOURCES = ntpdc-layout.c
+ntpdc_layout_OBJECTS = ntpdc-layout$U.$(OBJEXT)
+ntpdc_layout_DEPENDENCIES =
+ntpdc_layout_LDFLAGS =
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/ntpdc$U.Po $(DEPDIR)/ntpdc_ops$U.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ntpdc$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntpdc-layout$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntpdc_ops$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(ntpdc_SOURCES)
+DIST_SOURCES = $(ntpdc_SOURCES) ntpdc-layout.c
HEADERS = $(noinst_HEADERS)
-DIST_COMMON = README $(noinst_HEADERS) Makefile.am Makefile.in
-SOURCES = $(ntpdc_SOURCES)
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
+ Makefile.am nl.pl.in
+SOURCES = $(ntpdc_SOURCES) ntpdc-layout.c
-all: all-am
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
@@ -160,9 +214,10 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu ntpdc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+nl.pl: $(top_builddir)/config.status nl.pl.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@@ -170,16 +225,16 @@ install-binPROGRAMS: $(bin_PROGRAMS)
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
- f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
@@ -189,6 +244,9 @@ clean-binPROGRAMS:
ntpdc$(EXEEXT): $(ntpdc_OBJECTS) $(ntpdc_DEPENDENCIES)
@rm -f ntpdc$(EXEEXT)
$(LINK) $(ntpdc_LDFLAGS) $(ntpdc_OBJECTS) $(ntpdc_LDADD) $(LIBS)
+ntpdc-layout$(EXEEXT): $(ntpdc_layout_OBJECTS) $(ntpdc_layout_DEPENDENCIES)
+ @rm -f ntpdc-layout$(EXEEXT)
+ $(LINK) $(ntpdc_layout_LDFLAGS) $(ntpdc_layout_OBJECTS) $(ntpdc_layout_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
@@ -201,80 +259,122 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntpdc$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntpdc_ops$U.Po@am__quote@
+ -test "$U" = "" || rm -f *_.c
-distclean-depend:
- -rm -rf $(DEPDIR)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc-layout$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc_ops$U.Po@am__quote@
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
ntpdc_.c: ntpdc.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpdc.c; then echo $(srcdir)/ntpdc.c; else echo ntpdc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntpdc_.c || rm -f ntpdc_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpdc.c; then echo $(srcdir)/ntpdc.c; else echo ntpdc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+ntpdc-layout_.c: ntpdc-layout.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpdc-layout.c; then echo $(srcdir)/ntpdc-layout.c; else echo ntpdc-layout.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntpdc_ops_.c: ntpdc_ops.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpdc_ops.c; then echo $(srcdir)/ntpdc_ops.c; else echo ntpdc_ops.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntpdc_ops_.c || rm -f ntpdc_ops_.c
-ntpdc_.$(OBJEXT) ntpdc_ops_.$(OBJEXT) : $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpdc_ops.c; then echo $(srcdir)/ntpdc_ops.c; else echo ntpdc_ops.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+ntpdc_.$(OBJEXT) ntpdc-layout_.$(OBJEXT) ntpdc_ops_.$(OBJEXT) : \
+$(ANSI2KNR)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -282,13 +382,14 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
-check: check-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
-
-install: install-am
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -299,27 +400,32 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -340,6 +446,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -347,28 +455,54 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic distclean distclean-compile distclean-depend \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic ctags distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am info \
info-am install install-am install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am
+ mostlyclean-generic mostlyclean-kr pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
+maybe-layout:
+ @case "${PATH_PERL}" in \
+ /*) ${MAKE} check-layout ;; \
+ esac
+
+ntpdc-layout.o: nl.c
+
+layout.here: ntpdc-layout
+ ./ntpdc-layout > $@
+
+check-layout: ntpdc-layout layout.std layout.here
+ cmp $(srcdir)/layout.std layout.here && echo stamp > $@
+
$(PROGRAMS): $(LDADD)
../libntp/libntp.a:
cd ../libntp && $(MAKE)
-version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a @LIBRSAREF@ Makefile
+version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdc
$(COMPILE) -c version.c
+
+# I ran nl_in.c (attached, to be installed into ntpdc) through
+# $(CC) -E nl_in.c | nl.pl > nl.c
+nl.c: nl_in.c nl.pl
+ $(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/ntp/ntpdc/layout.std b/contrib/ntp/ntpdc/layout.std
new file mode 100644
index 000000000000..0a67b73e6325
--- /dev/null
+++ b/contrib/ntp/ntpdc/layout.std
@@ -0,0 +1,417 @@
+sizeof(struct req_pkt) = 212
+offsetof(rm_vn_mode) = 0
+offsetof(auth_seq) = 1
+offsetof(implementation) = 2
+offsetof(request) = 3
+offsetof(err_nitems) = 4
+offsetof(mbz_itemsize) = 6
+offsetof(data) = 8
+offsetof(tstamp) = 184
+offsetof(keyid) = 192
+offsetof(mac) = 196
+
+sizeof(struct req_pkt_tail) = 28
+offsetof(tstamp) = 0
+offsetof(keyid) = 8
+offsetof(mac) = 12
+
+sizeof(struct resp_pkt) = 508
+offsetof(rm_vn_mode) = 0
+offsetof(auth_seq) = 1
+offsetof(implementation) = 2
+offsetof(request) = 3
+offsetof(err_nitems) = 4
+offsetof(mbz_itemsize) = 6
+offsetof(data) = 8
+
+sizeof(struct info_peer_list) = 32
+offsetof(addr) = 0
+offsetof(port) = 4
+offsetof(hmode) = 6
+offsetof(flags) = 7
+offsetof(v6_flag) = 8
+offsetof(unused1) = 12
+offsetof(addr6) = 16
+
+sizeof(struct info_peer_summary) = 72
+offsetof(dstadr) = 0
+offsetof(srcadr) = 4
+offsetof(srcport) = 8
+offsetof(stratum) = 10
+offsetof(hpoll) = 11
+offsetof(ppoll) = 12
+offsetof(reach) = 13
+offsetof(flags) = 14
+offsetof(hmode) = 15
+offsetof(delay) = 16
+offsetof(offset) = 20
+offsetof(dispersion) = 28
+offsetof(v6_flag) = 32
+offsetof(unused1) = 36
+offsetof(dstadr6) = 40
+offsetof(srcadr6) = 56
+
+sizeof(struct info_peer) = 280
+offsetof(dstadr) = 0
+offsetof(srcadr) = 4
+offsetof(srcport) = 8
+offsetof(flags) = 10
+offsetof(leap) = 11
+offsetof(hmode) = 12
+offsetof(pmode) = 13
+offsetof(stratum) = 14
+offsetof(ppoll) = 15
+offsetof(hpoll) = 16
+offsetof(precision) = 17
+offsetof(version) = 18
+offsetof(unused8) = 19
+offsetof(reach) = 20
+offsetof(unreach) = 21
+offsetof(flash) = 22
+offsetof(ttl) = 23
+offsetof(flash2) = 24
+offsetof(associd) = 26
+offsetof(keyid) = 28
+offsetof(pkeyid) = 32
+offsetof(refid) = 36
+offsetof(timer) = 40
+offsetof(rootdelay) = 44
+offsetof(rootdispersion) = 48
+offsetof(reftime) = 52
+offsetof(org) = 60
+offsetof(rec) = 68
+offsetof(xmt) = 76
+offsetof(filtdelay) = 84
+offsetof(filtoffset) = 116
+offsetof(order) = 180
+offsetof(delay) = 188
+offsetof(dispersion) = 192
+offsetof(offset) = 196
+offsetof(selectdisp) = 204
+offsetof(unused1) = 208
+offsetof(unused2) = 212
+offsetof(unused3) = 216
+offsetof(unused4) = 220
+offsetof(unused5) = 224
+offsetof(unused6) = 228
+offsetof(unused7) = 232
+offsetof(estbdelay) = 236
+offsetof(v6_flag) = 240
+offsetof(unused9) = 244
+offsetof(dstadr6) = 248
+offsetof(srcadr6) = 264
+
+sizeof(struct info_peer_stats) = 120
+offsetof(dstadr) = 0
+offsetof(srcadr) = 4
+offsetof(srcport) = 8
+offsetof(flags) = 10
+offsetof(timereset) = 12
+offsetof(timereceived) = 16
+offsetof(timetosend) = 20
+offsetof(timereachable) = 24
+offsetof(sent) = 28
+offsetof(unused1) = 32
+offsetof(processed) = 36
+offsetof(unused2) = 40
+offsetof(badauth) = 44
+offsetof(bogusorg) = 48
+offsetof(oldpkt) = 52
+offsetof(unused3) = 56
+offsetof(unused4) = 60
+offsetof(seldisp) = 64
+offsetof(selbroken) = 68
+offsetof(unused5) = 72
+offsetof(candidate) = 76
+offsetof(unused6) = 77
+offsetof(unused7) = 78
+offsetof(unused8) = 79
+offsetof(v6_flag) = 80
+offsetof(unused9) = 84
+offsetof(dstadr6) = 88
+offsetof(srcadr6) = 104
+
+sizeof(struct info_loop) = 24
+offsetof(last_offset) = 0
+offsetof(drift_comp) = 8
+offsetof(compliance) = 16
+offsetof(watchdog_timer) = 20
+
+sizeof(struct info_sys) = 80
+offsetof(peer) = 0
+offsetof(peer_mode) = 4
+offsetof(leap) = 5
+offsetof(stratum) = 6
+offsetof(precision) = 7
+offsetof(rootdelay) = 8
+offsetof(rootdispersion) = 12
+offsetof(refid) = 16
+offsetof(reftime) = 20
+offsetof(poll) = 28
+offsetof(flags) = 32
+offsetof(unused1) = 33
+offsetof(unused2) = 34
+offsetof(unused3) = 35
+offsetof(bdelay) = 36
+offsetof(frequency) = 40
+offsetof(authdelay) = 44
+offsetof(stability) = 52
+offsetof(v6_flag) = 56
+offsetof(unused4) = 60
+offsetof(peer6) = 64
+
+sizeof(struct info_sys_stats) = 44
+offsetof(timeup) = 0
+offsetof(timereset) = 4
+offsetof(denied) = 8
+offsetof(oldversionpkt) = 12
+offsetof(newversionpkt) = 16
+offsetof(unknownversion) = 20
+offsetof(badlength) = 24
+offsetof(processed) = 28
+offsetof(badauth) = 32
+offsetof(received) = 36
+offsetof(limitrejected) = 40
+
+sizeof(struct old_info_sys_stats) = 40
+offsetof(timeup) = 0
+offsetof(timereset) = 4
+offsetof(denied) = 8
+offsetof(oldversionpkt) = 12
+offsetof(newversionpkt) = 16
+offsetof(unknownversion) = 20
+offsetof(badlength) = 24
+offsetof(processed) = 28
+offsetof(badauth) = 32
+offsetof(wanderhold) = 36
+
+sizeof(struct info_mem_stats) = 148
+offsetof(timereset) = 0
+offsetof(totalpeermem) = 4
+offsetof(freepeermem) = 6
+offsetof(findpeer_calls) = 8
+offsetof(allocations) = 12
+offsetof(demobilizations) = 16
+offsetof(hashcount) = 20
+
+sizeof(struct info_io_stats) = 40
+offsetof(timereset) = 0
+offsetof(totalrecvbufs) = 4
+offsetof(freerecvbufs) = 6
+offsetof(fullrecvbufs) = 8
+offsetof(lowwater) = 10
+offsetof(dropped) = 12
+offsetof(ignored) = 16
+offsetof(received) = 20
+offsetof(sent) = 24
+offsetof(notsent) = 28
+offsetof(interrupts) = 32
+offsetof(int_received) = 36
+
+sizeof(struct info_timer_stats) = 16
+offsetof(timereset) = 0
+offsetof(alarms) = 4
+offsetof(overflows) = 8
+offsetof(xmtcalls) = 12
+
+sizeof(struct old_conf_peer) = 16
+offsetof(peeraddr) = 0
+offsetof(hmode) = 4
+offsetof(version) = 5
+offsetof(minpoll) = 6
+offsetof(maxpoll) = 7
+offsetof(flags) = 8
+offsetof(ttl) = 9
+offsetof(unused) = 10
+offsetof(keyid) = 12
+
+sizeof(struct conf_peer) = 168
+offsetof(peeraddr) = 0
+offsetof(hmode) = 4
+offsetof(version) = 5
+offsetof(minpoll) = 6
+offsetof(maxpoll) = 7
+offsetof(flags) = 8
+offsetof(ttl) = 9
+offsetof(unused1) = 10
+offsetof(keyid) = 12
+offsetof(keystr) = 16
+offsetof(v6_flag) = 144
+offsetof(unused2) = 148
+offsetof(peeraddr6) = 152
+
+sizeof(struct conf_unpeer) = 24
+offsetof(peeraddr) = 0
+offsetof(v6_flag) = 4
+offsetof(peeraddr6) = 8
+
+sizeof(struct conf_sys_flags) = 4
+offsetof(flags) = 0
+
+sizeof(struct info_restrict) = 56
+offsetof(addr) = 0
+offsetof(mask) = 4
+offsetof(count) = 8
+offsetof(flags) = 12
+offsetof(mflags) = 14
+offsetof(v6_flag) = 16
+offsetof(unused1) = 20
+offsetof(addr6) = 24
+offsetof(mask6) = 40
+
+sizeof(struct conf_restrict) = 48
+offsetof(addr) = 0
+offsetof(mask) = 4
+offsetof(flags) = 8
+offsetof(mflags) = 10
+offsetof(v6_flag) = 12
+offsetof(addr6) = 16
+offsetof(mask6) = 32
+
+sizeof(struct info_monitor_1) = 72
+offsetof(lasttime) = 0
+offsetof(firsttime) = 4
+offsetof(lastdrop) = 8
+offsetof(count) = 12
+offsetof(addr) = 16
+offsetof(daddr) = 20
+offsetof(flags) = 24
+offsetof(port) = 28
+offsetof(mode) = 30
+offsetof(version) = 31
+offsetof(v6_flag) = 32
+offsetof(unused1) = 36
+offsetof(addr6) = 40
+offsetof(daddr6) = 56
+
+sizeof(struct info_monitor) = 48
+offsetof(lasttime) = 0
+offsetof(firsttime) = 4
+offsetof(lastdrop) = 8
+offsetof(count) = 12
+offsetof(addr) = 16
+offsetof(port) = 20
+offsetof(mode) = 22
+offsetof(version) = 23
+offsetof(v6_flag) = 24
+offsetof(unused1) = 28
+offsetof(addr6) = 32
+
+sizeof(struct old_info_monitor) = 40
+offsetof(lasttime) = 0
+offsetof(firsttime) = 4
+offsetof(count) = 8
+offsetof(addr) = 12
+offsetof(port) = 16
+offsetof(mode) = 18
+offsetof(version) = 19
+offsetof(v6_flag) = 20
+offsetof(addr6) = 24
+
+sizeof(struct reset_flags) = 4
+offsetof(flags) = 0
+
+sizeof(struct info_auth) = 36
+offsetof(timereset) = 0
+offsetof(numkeys) = 4
+offsetof(numfreekeys) = 8
+offsetof(keylookups) = 12
+offsetof(keynotfound) = 16
+offsetof(encryptions) = 20
+offsetof(decryptions) = 24
+offsetof(expired) = 28
+offsetof(keyuncached) = 32
+
+sizeof(struct info_trap) = 64
+offsetof(local_address) = 0
+offsetof(trap_address) = 4
+offsetof(trap_port) = 8
+offsetof(sequence) = 10
+offsetof(settime) = 12
+offsetof(origtime) = 16
+offsetof(resets) = 20
+offsetof(flags) = 24
+offsetof(v6_flag) = 28
+offsetof(local_address6) = 32
+offsetof(trap_address6) = 48
+
+sizeof(struct conf_trap) = 48
+offsetof(local_address) = 0
+offsetof(trap_address) = 4
+offsetof(trap_port) = 8
+offsetof(unused) = 10
+offsetof(v6_flag) = 12
+offsetof(local_address6) = 16
+offsetof(trap_address6) = 32
+
+sizeof(struct info_control) = 60
+offsetof(ctltimereset) = 0
+offsetof(numctlreq) = 4
+offsetof(numctlbadpkts) = 8
+offsetof(numctlresponses) = 12
+offsetof(numctlfrags) = 16
+offsetof(numctlerrors) = 20
+offsetof(numctltooshort) = 24
+offsetof(numctlinputresp) = 28
+offsetof(numctlinputfrag) = 32
+offsetof(numctlinputerr) = 36
+offsetof(numctlbadoffset) = 40
+offsetof(numctlbadversion) = 44
+offsetof(numctldatatooshort) = 48
+offsetof(numctlbadop) = 52
+offsetof(numasyncmsgs) = 56
+
+sizeof(struct info_clock) = 52
+offsetof(clockadr) = 0
+offsetof(type) = 4
+offsetof(flags) = 5
+offsetof(lastevent) = 6
+offsetof(currentstatus) = 7
+offsetof(polls) = 8
+offsetof(noresponse) = 12
+offsetof(badformat) = 16
+offsetof(baddata) = 20
+offsetof(timestarted) = 24
+offsetof(fudgetime1) = 28
+offsetof(fudgetime2) = 36
+offsetof(fudgeval1) = 44
+offsetof(fudgeval2) = 48
+
+sizeof(struct conf_fudge) = 20
+offsetof(clockadr) = 0
+offsetof(which) = 4
+offsetof(fudgetime) = 8
+offsetof(fudgeval_flags) = 16
+
+sizeof(struct info_clkbug) = 332
+offsetof(clockadr) = 0
+offsetof(nvalues) = 4
+offsetof(ntimes) = 5
+offsetof(svalues) = 6
+offsetof(stimes) = 8
+offsetof(values) = 12
+offsetof(times) = 76
+
+sizeof(struct info_kernel) = 60
+offsetof(offset) = 0
+offsetof(freq) = 4
+offsetof(maxerror) = 8
+offsetof(esterror) = 12
+offsetof(status) = 16
+offsetof(shift) = 18
+offsetof(constant) = 20
+offsetof(precision) = 24
+offsetof(tolerance) = 28
+offsetof(ppsfreq) = 32
+offsetof(jitter) = 36
+offsetof(stabil) = 40
+offsetof(jitcnt) = 44
+offsetof(calcnt) = 48
+offsetof(errcnt) = 52
+offsetof(stbcnt) = 56
+
+sizeof(struct info_dns_assoc) = 32
+offsetof(peeraddr) = 0
+offsetof(associd) = 4
+offsetof(hostname) = 6
+
diff --git a/contrib/ntp/ntpdc/nl.pl b/contrib/ntp/ntpdc/nl.pl
new file mode 100755
index 000000000000..6974fe2996b5
--- /dev/null
+++ b/contrib/ntp/ntpdc/nl.pl
@@ -0,0 +1,37 @@
+#! /usr/local/bin/perl -w
+
+$found = 0;
+$last = 0;
+$debug = 0;
+
+while (<>) {
+ next if /^#/;
+ next if /^\s*$/;
+ if (/^struct req_pkt/) {
+ $found = 1;
+ }
+ if (/^struct info_dns_assoc/) {
+ $last = 1;
+ }
+ if ($found) {
+ if (/^(struct\s*\w*)\s*{\s*$/) {
+ $type = $1;
+ print STDERR "type = '$type'\n" if $debug;
+ printf " printf(\"sizeof($type) = %%d\\n\", \n\t (int) sizeof($type));\n";
+ next;
+ }
+ if (/\s*\w+\s*(\w*)(\[.*\])?\s*;\s*$/) {
+ $field = $1;
+ print STDERR "\tfield = '$field'\n" if $debug;
+ printf " printf(\"offsetof($field) = %%d\\n\", \n\t (int) offsetof($type, $field));\n";
+ next;
+ }
+ if (/^};$/) {
+ printf " printf(\"\\n\");\n\n";
+ $found = 0 if $last;
+ next;
+ }
+ print STDERR "Unmatched line: $_";
+ exit 1;
+ }
+}
diff --git a/contrib/ntp/ntpdc/nl.pl.in b/contrib/ntp/ntpdc/nl.pl.in
new file mode 100644
index 000000000000..dfa79c26abf2
--- /dev/null
+++ b/contrib/ntp/ntpdc/nl.pl.in
@@ -0,0 +1,37 @@
+#! @PATH_PERL@ -w
+
+$found = 0;
+$last = 0;
+$debug = 0;
+
+while (<>) {
+ next if /^#/;
+ next if /^\s*$/;
+ if (/^struct req_pkt/) {
+ $found = 1;
+ }
+ if (/^struct info_dns_assoc/) {
+ $last = 1;
+ }
+ if ($found) {
+ if (/^(struct\s*\w*)\s*{\s*$/) {
+ $type = $1;
+ print STDERR "type = '$type'\n" if $debug;
+ printf " printf(\"sizeof($type) = %%d\\n\", \n\t (int) sizeof($type));\n";
+ next;
+ }
+ if (/\s*\w+\s*(\w*)(\[.*\])?\s*;\s*$/) {
+ $field = $1;
+ print STDERR "\tfield = '$field'\n" if $debug;
+ printf " printf(\"offsetof($field) = %%d\\n\", \n\t (int) offsetof($type, $field));\n";
+ next;
+ }
+ if (/^};$/) {
+ printf " printf(\"\\n\");\n\n";
+ $found = 0 if $last;
+ next;
+ }
+ print STDERR "Unmatched line: $_";
+ exit 1;
+ }
+}
diff --git a/contrib/ntp/ntpdc/nl_in.c b/contrib/ntp/ntpdc/nl_in.c
new file mode 100644
index 000000000000..3df8c7880b28
--- /dev/null
+++ b/contrib/ntp/ntpdc/nl_in.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#include "ntpdc.h"
+#include "ntp_request.h"
diff --git a/contrib/ntp/ntpdc/ntpdc-layout.c b/contrib/ntp/ntpdc/ntpdc-layout.c
new file mode 100644
index 000000000000..b05fbf3848e7
--- /dev/null
+++ b/contrib/ntp/ntpdc/ntpdc-layout.c
@@ -0,0 +1,21 @@
+/*
+ * ntpdc-layout - print layout of NTP mode 7 request/response packets
+ */
+
+#include <stdio.h>
+#include <stddef.h>
+
+#include "ntpdc.h"
+#include "ntp_stdlib.h"
+
+#if defined(IMPL_XNTPD_OLD) && IMPL_XNTPD != 3
+#error Unexpected IMPL_XNTPD
+#endif
+
+int
+main(void)
+{
+#include "nl.c"
+
+ return (EXIT_SUCCESS);
+}
diff --git a/contrib/ntp/ntpdc/ntpdc.c b/contrib/ntp/ntpdc/ntpdc.c
index 6086dae24bfb..aa4f188a603a 100644
--- a/contrib/ntp/ntpdc/ntpdc.c
+++ b/contrib/ntp/ntpdc/ntpdc.c
@@ -8,6 +8,10 @@
#include "ntp_select.h"
#include "ntp_io.h"
#include "ntp_stdlib.h"
+/* Don't include ISC's version of IPv6 variables and structures */
+#define ISC_IPV6_H 1
+#include "isc/net.h"
+#include "isc/result.h"
#include <ctype.h>
#include <signal.h>
@@ -20,10 +24,10 @@
# define closesocket close
#endif /* SYS_WINNT */
-#ifdef HAVE_LIBREADLINE
+#if defined(HAVE_LIBREADLINE) || defined (HAVE_LIBEDIT)
# include <readline/readline.h>
# include <readline/history.h>
-#endif /* HAVE_LIBREADLINE */
+#endif /* HAVE_LIBREADLINE || HAVE_LIBEDIT */
#ifdef SYS_VXWORKS
/* vxWorks needs mode flag -casey*/
@@ -45,12 +49,11 @@ static const char * prompt = "ntpdc> "; /* prompt to ask him about */
static u_long info_auth_keyid;
/*
- * Type of key md5 or des
+ * Type of key md5
*/
-#define KEY_TYPE_DES 3
#define KEY_TYPE_MD5 4
-static int info_auth_keytype = KEY_TYPE_MD5; /* MD5*/
+static int info_auth_keytype = KEY_TYPE_MD5; /* MD5 */
u_long current_time; /* needed by authkeys; not used */
int ntpdcmain P((int, char **));
@@ -60,7 +63,7 @@ int ntpdcmain P((int, char **));
static int openhost P((const char *));
static int sendpkt P((char *, int));
static void growpktdata P((void));
-static int getresponse P((int, int, int *, int *, char **));
+static int getresponse P((int, int, int *, int *, char **, int));
static int sendrequest P((int, int, int, int, int, char *));
static void getcmds P((void));
static RETSIGTYPE abortcmd P((int));
@@ -68,7 +71,7 @@ static void docmd P((const char *));
static void tokenize P((const char *, char **, int *));
static int findcmd P((char *, struct xcmd *, struct xcmd *, struct xcmd **));
static int getarg P((char *, int, arg_v *));
-static int getnetnum P((const char *, u_int32 *, char *));
+static int getnetnum P((const char *, struct sockaddr_storage *, char *, int));
static void help P((struct parse *, FILE *));
#ifdef QSORT_USES_VOID_P
static int helpsort P((const void *, const void *));
@@ -108,8 +111,8 @@ static struct xcmd builtins[] = {
{ "delay", my_delay, { OPT|INT, NO, NO, NO },
{ "msec", "", "", "" },
"set the delay added to encryption time stamps" },
- { "host", host, { OPT|NTP_STR, NO, NO, NO },
- { "hostname", "", "", "" },
+ { "host", host, { OPT|NTP_STR, OPT|NTP_STR, NO, NO },
+ { "-4|-6", "hostname", "", "" },
"specify the host whose NTP server we talk to" },
{ "passwd", passwd, { OPT|NTP_STR, NO, NO, NO },
{ "", "", "", "" },
@@ -151,7 +154,9 @@ static struct xcmd builtins[] = {
#define MAXCMDS 100 /* maximum commands on cmd line */
#define MAXHOSTS 200 /* maximum hosts on cmd line */
#define MAXLINE 512 /* maximum line length */
-#define MAXTOKENS (1+MAXARGS+2) /* maximum number of usable tokens */
+#define MAXTOKENS (1+1+MAXARGS+2) /* maximum number of usable tokens */
+ /* command + -4|-6 + MAXARGS + */
+ /* redirection */
/*
* Some variables used and manipulated locally
@@ -160,20 +165,19 @@ static struct timeval tvout = { DEFTIMEOUT, 0 }; /* time out for reads */
static struct timeval tvsout = { DEFSTIMEOUT, 0 }; /* secondary time out */
static l_fp delay_time; /* delay time */
static char currenthost[LENHOSTNAME]; /* current host name */
-static struct sockaddr_in hostaddr = { 0 }; /* host address */
-static int showhostnames = 1; /* show host names by default */
+int showhostnames = 1; /* show host names by default */
-static int sockfd; /* fd socket is openned on */
+static int ai_fam_templ; /* address family */
+static int ai_fam_default; /* default address family */
+static SOCKET sockfd; /* fd socket is opened on */
static int havehost = 0; /* set to 1 when host open */
-struct servent *server_entry = NULL; /* server entry for ntp */
+int s_port = 0;
#if defined (SYS_WINNT) || defined (SYS_VXWORKS)
char password[9];
#endif /* SYS_WINNT || SYS_VXWORKS */
#ifdef SYS_WINNT
-WORD wVersionRequested;
-WSADATA wsaData;
DWORD NumberOfBytesWritten;
HANDLE TimerThreadHandle = NULL; /* 1998/06/03 - Used in ntplib/machines.c */
@@ -194,6 +198,7 @@ static int pktdatasize;
/*
* These are used to help the magic with old and new versions of ntpd.
*/
+int impl_ver = IMPL_XNTPD;
static int req_pkt_size = REQ_LEN_NOMAC;
/*
@@ -268,7 +273,6 @@ void clear_globals(void)
showhostnames = 0; /* show host names by default */
ntp_optind = 0;
ntp_optarg = 0;
- server_entry = NULL; /* server entry for ntp */
havehost = 0; /* set to 1 when host open */
numcmds = 0;
numhosts = 0;
@@ -297,9 +301,29 @@ ntpdcmain(
taskPrioritySet(taskIdSelf(), 100 );
#endif
+#ifdef SYS_WINNT
+ if (!Win32InitSockets())
+ {
+ fprintf(stderr, "No useable winsock.dll:");
+ exit(1);
+ }
+#endif /* SYS_WINNT */
+
+ /* Check to see if we have IPv6. Otherwise force the -4 flag */
+ if (isc_net_probeipv6() != ISC_R_SUCCESS) {
+ ai_fam_default = AF_INET;
+ }
+
progname = argv[0];
- while ((c = ntp_getopt(argc, argv, "c:dilnps")) != EOF)
+ ai_fam_templ = ai_fam_default;
+ while ((c = ntp_getopt(argc, argv, "46c:dilnps")) != EOF)
switch (c) {
+ case '4':
+ ai_fam_templ = AF_INET;
+ break;
+ case '6':
+ ai_fam_templ = AF_INET6;
+ break;
case 'c':
ADDCMD(ntp_optarg);
break;
@@ -327,7 +351,7 @@ ntpdcmain(
}
if (errflg) {
(void) fprintf(stderr,
- "usage: %s [-dilnps] [-c cmd] host ...\n",
+ "usage: %s [-46dilnps] [-c cmd] host ...\n",
progname);
exit(2);
}
@@ -358,14 +382,6 @@ ntpdcmain(
}
pktdatasize = INITDATASIZE;
-#ifdef SYS_WINNT
- wVersionRequested = MAKEWORD(1,1);
- if (WSAStartup(wVersionRequested, &wsaData)) {
- fprintf(stderr, "No useable winsock.dll");
- exit(1);
- }
-#endif /* SYS_WINNT */
-
if (numcmds == 0) {
(void) openhost(chosts[0]);
getcmds();
@@ -397,29 +413,68 @@ openhost(
const char *hname
)
{
- u_int32 netnum;
char temphost[LENHOSTNAME];
+ int a_info, i;
+ struct addrinfo hints, *ai = NULL;
+ register const char *cp;
+ char name[LENHOSTNAME];
+ char service[5];
- if (server_entry == NULL) {
- server_entry = getservbyname("ntp", "udp");
- if (server_entry == NULL) {
-#ifdef VMS /* UCX getservbyname() doesn't work [yet], but we do know better */
- server_entry = (struct servent *)
- malloc(sizeof(struct servent));
- server_entry->s_port = htons(NTP_PORT);
-#else
- (void) fprintf(stderr, "%s: ntp/udp: unknown service\n",
- progname);
- exit(1);
-#endif /* VMS & UCX */
- }
- if (debug > 2)
- printf("Got ntp/udp service entry\n");
+ /*
+ * We need to get by the [] if they were entered
+ */
+
+ cp = hname;
+
+ if (*cp == '[') {
+ cp++;
+ for(i = 0; *cp != ']'; cp++, i++)
+ name[i] = *cp;
+ name[i] = '\0';
+ hname = name;
+ }
+
+ /*
+ * First try to resolve it as an ip address and if that fails,
+ * do a fullblown (dns) lookup. That way we only use the dns
+ * when it is needed and work around some implementations that
+ * will return an "IPv4-mapped IPv6 address" address if you
+ * give it an IPv4 address to lookup.
+ */
+ strcpy(service, "ntp");
+ memset((char *)&hints, 0, sizeof(struct addrinfo));
+ hints.ai_family = ai_fam_templ;
+ hints.ai_protocol = IPPROTO_UDP;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_flags = AI_NUMERICHOST;
+
+ a_info = getaddrinfo(hname, service, &hints, &ai);
+ if (a_info == EAI_NONAME || a_info == EAI_NODATA) {
+ hints.ai_flags = AI_CANONNAME;
+#ifdef AI_ADDRCONFIG
+ hints.ai_flags |= AI_ADDRCONFIG;
+#endif
+ a_info = getaddrinfo(hname, service, &hints, &ai);
+ }
+ /* Some older implementations don't like AI_ADDRCONFIG. */
+ if (a_info == EAI_BADFLAGS) {
+ hints.ai_flags = AI_CANONNAME;
+ a_info = getaddrinfo(hname, service, &hints, &ai);
+ }
+ if (a_info != 0) {
+ (void) fprintf(stderr, "%s\n", gai_strerror(a_info));
+ return 0;
+ }
+
+ if (ai->ai_canonname == NULL) {
+ strncpy(temphost, stoa((struct sockaddr_storage *)ai->ai_addr),
+ LENHOSTNAME);
+ temphost[LENHOSTNAME-1] = '\0';
+ } else {
+ strncpy(temphost, ai->ai_canonname, LENHOSTNAME);
+ temphost[LENHOSTNAME-1] = '\0';
}
- if (!getnetnum(hname, &netnum, temphost))
- return 0;
-
if (debug > 2)
printf("Opening host %s\n", temphost);
@@ -430,14 +485,18 @@ openhost(
havehost = 0;
}
(void) strcpy(currenthost, temphost);
-
- hostaddr.sin_family = AF_INET;
-#ifndef SYS_VXWORKS
- hostaddr.sin_port = server_entry->s_port;
-#else
- hostaddr.sin_port = htons(SERVER_PORT_NUM);
-#endif
- hostaddr.sin_addr.s_addr = netnum;
+
+ /* port maps to the same in both families */
+ s_port = ((struct sockaddr_in6 *)ai->ai_addr)->sin6_port;
+#ifdef SYS_VXWORKS
+ ((struct sockaddr_in6 *)&hostaddr)->sin6_port = htons(SERVER_PORT_NUM);
+ if (ai->ai_family == AF_INET)
+ *(struct sockaddr_in *)&hostaddr=
+ *((struct sockaddr_in *)ai->ai_addr);
+ else
+ *(struct sockaddr_in6 *)&hostaddr=
+ *((struct sockaddr_in6 *)ai->ai_addr);
+#endif /* SYS_VXWORKS */
#ifdef SYS_WINNT
{
@@ -449,14 +508,14 @@ openhost(
exit(1);
}
}
-
- sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+
+ sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
if (sockfd == INVALID_SOCKET) {
error("socket", "", "");
exit(-1);
}
#else
- sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+ sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
if (sockfd == -1)
error("socket", "", "");
#endif /* SYS_WINNT */
@@ -474,12 +533,19 @@ openhost(
# endif
#endif
- if (connect(sockfd, (struct sockaddr *)&hostaddr,
+#ifdef SYS_VXWORKS
+ if (connect(sockfd, (struct sockaddr *)&hostaddr,
sizeof(hostaddr)) == -1)
+#else
+ if (connect(sockfd, (struct sockaddr *)ai->ai_addr,
+ ai->ai_addrlen) == -1)
+#endif /* SYS_VXWORKS */
error("connect", "", "");
-
+ if (a_info)
+ freeaddrinfo(ai);
havehost = 1;
req_pkt_size = REQ_LEN_NOMAC;
+ impl_ver = IMPL_XNTPD;
return 1;
}
@@ -527,15 +593,18 @@ getresponse(
int reqcode,
int *ritems,
int *rsize,
- char **rdata
+ char **rdata,
+ int esize
)
{
struct resp_pkt rpkt;
struct timeval tvo;
int items;
+ int i;
int size;
int datasize;
char *datap;
+ char *tmp_data;
char haveseq[MAXSEQ+1];
int firstpkt;
int lastseq;
@@ -543,6 +612,7 @@ getresponse(
int seq;
fd_set fds;
int n;
+ int pad;
/*
* This is pretty tricky. We may get between 1 and many packets
@@ -666,13 +736,15 @@ getresponse(
return (int)INFO_ERR(rpkt.err_nitems);
}
-
/*
* Collect items and size. Make sure they make sense.
*/
items = INFO_NITEMS(rpkt.err_nitems);
size = INFO_ITEMSIZE(rpkt.mbz_itemsize);
-
+ if (esize > size)
+ pad = esize - size;
+ else
+ pad = 0;
if ((datasize = items*size) > (n-RESP_HEADER_SIZE)) {
if (debug)
printf(
@@ -685,15 +757,14 @@ getresponse(
* If this isn't our first packet, make sure the size matches
* the other ones.
*/
- if (!firstpkt && size != *rsize) {
+ if (!firstpkt && esize != *rsize) {
if (debug)
printf("Received itemsize %d, previous %d\n",
size, *rsize);
goto again;
}
-
/*
- * If we've received this before, toss it
+ * If we've received this before, +toss it
*/
seq = INFO_SEQ(rpkt.auth_seq);
if (haveseq[seq]) {
@@ -717,17 +788,28 @@ getresponse(
/*
* So far, so good. Copy this data into the output array.
*/
- if ((datap + datasize) > (pktdata + pktdatasize)) {
+ if ((datap + datasize + (pad * items)) > (pktdata + pktdatasize)) {
int offset = datap - pktdata;
growpktdata();
*rdata = pktdata; /* might have been realloced ! */
datap = pktdata + offset;
}
- memmove(datap, (char *)rpkt.data, (unsigned)datasize);
- datap += datasize;
+ /*
+ * We now move the pointer along according to size and number of
+ * items. This is so we can play nice with older implementations
+ */
+
+ tmp_data = (char *)rpkt.data;
+ for(i = 0; i <items; i++){
+ memmove(datap, tmp_data, (unsigned)size);
+ tmp_data += size;
+ memset(datap + size, 0, pad);
+ datap += size + pad;
+ }
+
if (firstpkt) {
firstpkt = 0;
- *rsize = size;
+ *rsize = size + pad;
}
*ritems += items;
@@ -796,8 +878,7 @@ sendrequest(
info_auth_keyid = maclen;
}
if (!authistrusted(info_auth_keyid)) {
- pass = getpass((info_auth_keytype == KEY_TYPE_DES)
- ? "DES Password: " : "MD5 Password: ");
+ pass = getpass("MD5 Password: ");
if (*pass == '\0') {
(void) fprintf(stderr,
"Invalid password\n");
@@ -837,7 +918,8 @@ doquery(
int *ritems,
int *rsize,
char **rdata,
- int quiet_mask
+ int quiet_mask,
+ int esize
)
{
int res;
@@ -882,7 +964,7 @@ again:
/*
* Get the response. If we got a standard error, print a message
*/
- res = getresponse(implcode, reqcode, ritems, rsize, rdata);
+ res = getresponse(implcode, reqcode, ritems, rsize, rdata, esize);
/*
* Try to be compatible with older implementations of ntpd.
@@ -894,9 +976,17 @@ again:
switch(req_pkt_size) {
case REQ_LEN_NOMAC:
+ req_pkt_size = 160;
+ break;
+ case 160:
req_pkt_size = 48;
break;
}
+ if (impl_ver == IMPL_XNTPD) {
+ fprintf(stderr,
+ "***Warning changing to older implementation\n");
+ return INFO_ERR_IMPL;
+ }
fprintf(stderr,
"***Warning changing the request packet size from %d to %d\n",
@@ -908,6 +998,9 @@ again:
if ((res > 0) && (((1 << res) & quiet_mask) == 0)) {
switch(res) {
case INFO_ERR_IMPL:
+ /* Give us a chance to try the older implementation. */
+ if (implcode == IMPL_XNTPD)
+ break;
(void) fprintf(stderr,
"***Server implementation incompatable with our own\n");
break;
@@ -949,7 +1042,7 @@ again:
static void
getcmds(void)
{
-#ifdef HAVE_LIBREADLINE
+#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
char *line;
for (;;) {
@@ -958,7 +1051,7 @@ getcmds(void)
docmd(line);
free(line);
}
-#else /* not HAVE_LIBREADLINE */
+#else /* not (HAVE_LIBREADLINE || HAVE_LIBEDIT) */
char line[MAXLINE];
for (;;) {
@@ -975,10 +1068,11 @@ getcmds(void)
docmd(line);
}
-#endif /* not HAVE_LIBREADLINE */
+#endif /* not HAVE_LIBREADLINE || HAVE_LIBEDIT */
}
+#ifndef SYS_WINNT /* Under NT cannot handle SIGINT, WIN32 spawns a handler */
/*
* abortcmd - catch interrupts and abort the current command
*/
@@ -994,7 +1088,7 @@ abortcmd(
(void) fflush(stderr);
if (jump) longjmp(interrupt_buf, 1);
}
-
+#endif /* SYS_WINNT */
/*
* docmd - decode the command line and execute a command
@@ -1007,9 +1101,11 @@ docmd(
char *tokens[1+MAXARGS+2];
struct parse pcmd;
int ntok;
- static int i;
+ int i, ti;
+ int rval;
struct xcmd *xcmd;
+ ai_fam_templ = ai_fam_default;
/*
* Tokenize the command line. If nothing on it, return.
*/
@@ -1037,22 +1133,29 @@ docmd(
*/
pcmd.keyword = tokens[0];
pcmd.nargs = 0;
- for (i = 0; i < MAXARGS && xcmd->arg[i] != NO; i++) {
- if ((i+1) >= ntok) {
+ ti = 1;
+ for (i = 0; i < MAXARGS && xcmd->arg[i] != NO;) {
+ if ((i+ti) >= ntok) {
if (!(xcmd->arg[i] & OPT)) {
printusage(xcmd, stderr);
return;
}
break;
}
- if ((xcmd->arg[i] & OPT) && (*tokens[i+1] == '>'))
- break;
- if (!getarg(tokens[i+1], (int)xcmd->arg[i], &pcmd.argval[i]))
- return;
+ if ((xcmd->arg[i] & OPT) && (*tokens[i+ti] == '>'))
+ break;
+ rval = getarg(tokens[i+ti], (int)xcmd->arg[i], &pcmd.argval[i]);
+ if (rval == -1) {
+ ti++;
+ continue;
+ }
+ if (rval == 0)
+ return;
pcmd.nargs++;
+ i++;
}
- i++;
+ i += ti;
if (i < ntok && *tokens[i] == '>') {
char *fname;
@@ -1071,10 +1174,8 @@ docmd(
perror("");
return;
}
- i = 1; /* flag we need a close */
} else {
current_output = stdout;
- i = 0; /* flag no close */
}
if (interactive && setjmp(interrupt_buf)) {
@@ -1083,7 +1184,9 @@ docmd(
jump = 1;
(xcmd->handler)(&pcmd, current_output);
jump = 0;
- if (i) (void) fclose(current_output);
+ if (current_output != stdout)
+ (void) fclose(current_output);
+ current_output = NULL;
}
}
@@ -1187,8 +1290,12 @@ findcmd(
}
- /*
+/*
* getarg - interpret an argument token
+ *
+ * return: 0 - failure
+ * 1 - success
+ * -1 - skip to next token
*/
static int
getarg(
@@ -1206,7 +1313,14 @@ getarg(
argp->string = str;
break;
case ADD:
- if (!getnetnum(str, &(argp->netnum), (char *)0)) {
+ if (!strcmp("-6", str)) {
+ ai_fam_templ = AF_INET6;
+ return -1;
+ } else if (!strcmp("-4", str)) {
+ ai_fam_templ = AF_INET;
+ return -1;
+ }
+ if (!getnetnum(str, &(argp->netnum), (char *)0, 0)) {
return 0;
}
break;
@@ -1240,6 +1354,17 @@ getarg(
argp->ival = -argp->ival;
}
break;
+ case IP_VERSION:
+ if (!strcmp("-6", str))
+ argp->ival = 6 ;
+ else if (!strcmp("-4", str))
+ argp->ival = 4 ;
+ else {
+ (void) fprintf(stderr,
+ "***Version must be either 4 or 6\n");
+ return 0;
+ }
+ break;
}
return 1;
@@ -1253,24 +1378,36 @@ getarg(
static int
getnetnum(
const char *hname,
- u_int32 *num,
- char *fullhost
+ struct sockaddr_storage *num,
+ char *fullhost,
+ int af
)
{
- struct hostent *hp;
-
+ int err;
+ int sockaddr_len;
+ struct addrinfo hints, *ai = NULL;
+
+ sockaddr_len = (af == AF_INET)
+ ? sizeof(struct sockaddr_in)
+ : sizeof(struct sockaddr_in6);
+ memset((char *)&hints, 0, sizeof(struct addrinfo));
+ hints.ai_flags = AI_CANONNAME;
+#ifdef AI_ADDRCONFIG
+ hints.ai_flags |= AI_ADDRCONFIG;
+#endif
+
+ /* decodenetnum only works with addresses */
if (decodenetnum(hname, num)) {
if (fullhost != 0) {
- (void) sprintf(fullhost,
- "%u.%u.%u.%u", (u_int)((htonl(*num)>>24)&0xff),
- (u_int)((htonl(*num)>>16)&0xff), (u_int)((htonl(*num)>>8)&0xff),
- (u_int)(htonl(*num)&0xff));
+ getnameinfo((struct sockaddr *)num, sockaddr_len,
+ fullhost, sizeof(fullhost), NULL, 0,
+ NI_NUMERICHOST);
}
return 1;
- } else if ((hp = gethostbyname(hname)) != 0) {
- memmove((char *)num, hp->h_addr, sizeof(u_int32));
+ } else if ((err = getaddrinfo(hname, "ntp", &hints, &ai)) == 0) {
+ memmove((char *)num, ai->ai_addr, ai->ai_addrlen);
if (fullhost != 0)
- (void) strcpy(fullhost, hp->h_name);
+ (void) strcpy(fullhost, ai->ai_canonname);
return 1;
} else {
(void) fprintf(stderr, "***Can't find host %s\n", hname);
@@ -1285,14 +1422,15 @@ getnetnum(
*/
char *
nntohost(
- u_int32 netnum
+ struct sockaddr_storage *netnum
)
{
if (!showhostnames)
- return numtoa(netnum);
- if ((ntohl(netnum) & REFCLOCK_MASK) == REFCLOCK_ADDR)
- return refnumtoa(netnum);
- return numtohost(netnum);
+ return stoa(netnum);
+
+ if ((netnum->ss_family == AF_INET) && ISREFCLOCKADR(netnum))
+ return refnumtoa(netnum);
+ return socktohost(netnum);
}
@@ -1380,8 +1518,8 @@ helpsort(
const void *t2
)
{
- const char **name1 = (const char **)t1;
- const char **name2 = (const char **)t2;
+ char const * const * name1 = (char const * const *)t1;
+ char const * const * name2 = (char const * const *)t2;
return strcmp(*name1, *name2);
}
@@ -1406,10 +1544,15 @@ printusage(
FILE *fp
)
{
- register int i;
+ int i, opt46;
+ opt46 = 0;
(void) fprintf(fp, "usage: %s", xcp->keyword);
for (i = 0; i < MAXARGS && xcp->arg[i] != NO; i++) {
+ if (opt46 == 0 && (xcp->arg[i] & ~OPT) == ADD) {
+ (void) fprintf(fp, " [ -4|-6 ]");
+ opt46 = 1;
+ }
if (xcp->arg[i] & OPT)
(void) fprintf(fp, " [ %s ]", xcp->desc[i]);
else
@@ -1484,12 +1627,33 @@ host(
FILE *fp
)
{
+ int i;
+
if (pcmd->nargs == 0) {
if (havehost)
(void) fprintf(fp, "current host is %s\n", currenthost);
else
(void) fprintf(fp, "no current host\n");
- } else if (openhost(pcmd->argval[0].string)) {
+ return;
+ }
+
+ i = 0;
+ if (pcmd->nargs == 2) {
+ if (!strcmp("-4", pcmd->argval[i].string))
+ ai_fam_templ = AF_INET;
+ else if (!strcmp("-6", pcmd->argval[i].string))
+ ai_fam_templ = AF_INET6;
+ else {
+ if (havehost)
+ (void) fprintf(fp,
+ "current host remains %s\n", currenthost);
+ else
+ (void) fprintf(fp, "still no current host\n");
+ return;
+ }
+ i = 1;
+ }
+ if (openhost(pcmd->argval[i].string)) {
(void) fprintf(fp, "current host set to %s\n", currenthost);
} else {
if (havehost)
@@ -1532,7 +1696,7 @@ keytype(
{
if (pcmd->nargs == 0)
fprintf(fp, "keytype is %s\n",
- (info_auth_keytype == KEY_TYPE_MD5) ? "MD5" : "DES");
+ (info_auth_keytype == KEY_TYPE_MD5) ? "MD5" : "???");
else
switch (*(pcmd->argval[0].string)) {
case 'm':
@@ -1540,13 +1704,8 @@ keytype(
info_auth_keytype = KEY_TYPE_MD5;
break;
- case 'd':
- case 'D':
- info_auth_keytype = KEY_TYPE_DES;
- break;
-
default:
- fprintf(fp, "keytype must be 'md5' or 'des'\n");
+ fprintf(fp, "keytype must be 'md5'\n");
}
}
@@ -1576,10 +1735,7 @@ passwd(
(u_char *)pcmd->argval[0].string);
authtrust(info_auth_keyid, 1);
} else {
- pass = getpass((info_auth_keytype == KEY_TYPE_DES)
- ? "DES Password: "
- : "MD5 Password: "
- );
+ pass = getpass("MD5 Password: ");
if (*pass == '\0')
(void) fprintf(fp, "Password unchanged\n");
else {
@@ -1729,7 +1885,7 @@ getkeyid(
fprintf(stderr, "%s", keyprompt); fflush(stderr);
for (p=pbuf; (c = getc(fi))!='\n' && c!=EOF;) {
if (p < &pbuf[18])
- *p++ = c;
+ *p++ = (char) c;
}
*p = '\0';
if (fi != stdin)
diff --git a/contrib/ntp/ntpdc/ntpdc.h b/contrib/ntp/ntpdc/ntpdc.h
index 8b35d4fff7e0..589529fb1c1d 100644
--- a/contrib/ntp/ntpdc/ntpdc.h
+++ b/contrib/ntp/ntpdc/ntpdc.h
@@ -22,6 +22,7 @@
#define UINT 0x2 /* unsigned integer */
#define INT 0x3 /* signed integer */
#define ADD 0x4 /* IP network address */
+#define IP_VERSION 0x5 /* IP version */
/*
* Arguments are returned in a union
@@ -30,7 +31,7 @@ typedef union {
char *string;
long ival;
u_long uval;
- u_int32 netnum;
+ struct sockaddr_storage netnum;
} arg_v;
/*
@@ -55,5 +56,9 @@ struct xcmd {
const char *comment;
};
-extern int doquery P((int, int, int, int, int, char *, int *, int *, char **, int));
-extern char * nntohost P((u_int32));
+extern int impl_ver;
+extern int showhostnames;
+extern int s_port;
+
+extern int doquery P((int, int, int, int, int, char *, int *, int *, char **, int, int));
+extern char * nntohost P((struct sockaddr_storage *));
diff --git a/contrib/ntp/ntpdc/ntpdc_ops.c b/contrib/ntp/ntpdc/ntpdc_ops.c
index b1634017c9ef..9fa3bd738aad 100644
--- a/contrib/ntp/ntpdc/ntpdc_ops.c
+++ b/contrib/ntp/ntpdc/ntpdc_ops.c
@@ -1,5 +1,5 @@
/*
- * ntpdc_ops.c - subroutines which are called to perform operations by ntpdc
+ * ntpdc_ops.c - subroutines which are called to perform operations by xntpdc
*/
#ifdef HAVE_CONFIG_H
@@ -7,6 +7,7 @@
#endif
#include <stdio.h>
+#include <stddef.h>
#include "ntpdc.h"
#include "ntp_control.h"
@@ -83,16 +84,16 @@ static void kerninfo P((struct parse *, FILE *));
* Commands we understand. Ntpdc imports this.
*/
struct xcmd opcmds[] = {
- { "listpeers", peerlist, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display list of peers the server knows about" },
- { "peers", peers, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display peer summary information" },
- { "dmpeers", dmpeers, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display peer summary info the way Dave Mills likes it" },
- { "showpeer", showpeer, { ADD, OPT|ADD, OPT|ADD, OPT|ADD },
+ { "listpeers", peerlist, { OPT|IP_VERSION, NO, NO, NO },
+ { "-4|-6", "", "", "" },
+ "display list of peers the server knows about [IP Version]" },
+ { "peers", peers, { OPT|IP_VERSION, NO, NO, NO },
+ { "-4|-6", "", "", "" },
+ "display peer summary information [IP Version]" },
+ { "dmpeers", dmpeers, { OPT|IP_VERSION, NO, NO, NO },
+ { "-4|-6", "", "", "" },
+ "display peer summary info the way Dave Mills likes it (IP Version)" },
+ { "showpeer", showpeer, { ADD, OPT|ADD, OPT|ADD, OPT|ADD},
{ "peer_address", "peer2_addr", "peer3_addr", "peer4_addr" },
"display detailed information for one or more peers" },
{ "pstats", peerstats, { ADD, OPT|ADD, OPT|ADD, OPT|ADD },
@@ -137,8 +138,8 @@ struct xcmd opcmds[] = {
{ "disable", sys_clear, { NTP_STR, OPT|NTP_STR, OPT|NTP_STR, OPT|NTP_STR },
{ "auth|bclient|monitor|pll|kernel|stats", "...", "...", "..." },
"clear a system flag (auth, bclient, monitor, pll, kernel, stats)" },
- { "reslist", reslist, { NO, NO, NO, NO },
- { "", "", "", "" },
+ { "reslist", reslist, {OPT|IP_VERSION, NO, NO, NO },
+ { "-4|-6", "", "", "" },
"display the server's restrict list" },
{ "restrict", new_restrict, { ADD, ADD, NTP_STR, OPT|NTP_STR },
{ "address", "mask",
@@ -209,13 +210,6 @@ struct xcmd opcmds[] = {
{ "", "", "", "" }, "" }
};
-
-/*
- * Imported from ntpdc.c
- */
-extern int showhostnames;
-extern struct servent *server_entry;
-
/*
* For quick string comparisons
*/
@@ -292,25 +286,49 @@ peerlist(
)
{
struct info_peer_list *plist;
+ struct sockaddr_storage paddr;
int items;
int itemsize;
int res;
- res = doquery(IMPL_XNTPD, REQ_PEER_LIST, 0, 0, 0, (char *)NULL, &items,
- &itemsize, (char **)&plist, 0);
+again:
+ res = doquery(impl_ver, REQ_PEER_LIST, 0, 0, 0, (char *)NULL, &items,
+ &itemsize, (void *)&plist, 0,
+ sizeof(struct info_peer_list));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
if (!checkitems(items, fp))
return;
- if (!checkitemsize(itemsize, sizeof(struct info_peer_list)))
+ if (!checkitemsize(itemsize, sizeof(struct info_peer_list)) &&
+ !checkitemsize(itemsize, v4sizeof(struct info_peer_list)))
return;
while (items > 0) {
- (void) fprintf(fp, "%-9s %s\n", modetoa(plist->hmode),
- nntohost(plist->address));
+ memset((char *)&paddr, 0, sizeof(paddr));
+ if (plist->v6_flag != 0) {
+ GET_INADDR6(paddr) = plist->addr6;
+ paddr.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(paddr) = plist->addr;
+ paddr.ss_family = AF_INET;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ paddr.ss_len = SOCKLEN(&paddr);
+#endif
+ if ((pcmd->nargs == 0) ||
+ ((pcmd->argval->ival == 6) && (plist->v6_flag != 0)) ||
+ ((pcmd->argval->ival == 4) && (plist->v6_flag == 0)))
+ (void) fprintf(fp, "%-9s %s\n",
+ modetoa(plist->hmode),
+ nntohost(&paddr));
plist++;
items--;
}
@@ -354,6 +372,8 @@ dopeers(
)
{
struct info_peer_summary *plist;
+ struct sockaddr_storage dstadr;
+ struct sockaddr_storage srcadr;
int items;
int itemsize;
int ntp_poll;
@@ -361,17 +381,25 @@ dopeers(
int c;
l_fp tempts;
- res = doquery(IMPL_XNTPD, REQ_PEER_LIST_SUM, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&plist, 0);
+again:
+ res = doquery(impl_ver, REQ_PEER_LIST_SUM, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&plist, 0,
+ sizeof(struct info_peer_summary));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
if (!checkitems(items, fp))
return;
- if (!checkitemsize(itemsize, sizeof(struct info_peer_summary)))
- return;
+ if (!checkitemsize(itemsize, sizeof(struct info_peer_summary)) &&
+ !checkitemsize(itemsize, v4sizeof(struct info_peer_summary)))
+ return;
(void) fprintf(fp,
" remote local st poll reach delay offset disp\n");
@@ -406,15 +434,33 @@ dopeers(
NTOHL_FP(&(plist->offset), &tempts);
ntp_poll = 1<<max(min3(plist->ppoll, plist->hpoll, NTP_MAXPOLL),
NTP_MINPOLL);
- (void) fprintf(fp,
- "%c%-15.15s %-15.15s %2d %4d %3o %7.7s %9.9s %7.7s\n",
- c, nntohost(plist->srcadr),
- numtoa(plist->dstadr),
- plist->stratum, ntp_poll, plist->reach,
- fptoa(NTOHS_FP(plist->delay), 5),
- lfptoa(&tempts, 6),
- ufptoa(NTOHS_FP(plist->dispersion), 5));
-
+ memset((char *)&dstadr, 0, sizeof(dstadr));
+ memset((char *)&srcadr, 0, sizeof(srcadr));
+ if (plist->v6_flag != 0) {
+ GET_INADDR6(dstadr) = plist->dstadr6;
+ GET_INADDR6(srcadr) = plist->srcadr6;
+ srcadr.ss_family = AF_INET6;
+ dstadr.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(dstadr) = plist->dstadr;
+ GET_INADDR(srcadr) = plist->srcadr;
+ srcadr.ss_family = AF_INET;
+ dstadr.ss_family = AF_INET;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ srcadr.ss_len = SOCKLEN(&srcadr);
+ dstadr.ss_len = SOCKLEN(&dstadr);
+#endif
+ if ((pcmd->nargs == 0) ||
+ ((pcmd->argval->ival == 6) && (plist->v6_flag != 0)) ||
+ ((pcmd->argval->ival == 4) && (plist->v6_flag == 0)))
+ (void) fprintf(fp,
+ "%c%-15.15s %-15.15s %2d %4d %3o %7.7s %9.9s %7.7s\n",
+ c, nntohost(&srcadr), stoa(&dstadr),
+ plist->stratum, ntp_poll, plist->reach,
+ fptoa(NTOHS_FP(plist->delay), 5),
+ lfptoa(&tempts, 6),
+ ufptoa(NTOHS_FP(plist->dispersion), 5));
plist++;
items--;
}
@@ -449,10 +495,27 @@ printpeer(
register int i;
const char *str;
l_fp tempts;
-
+ struct sockaddr_storage srcadr, dstadr;
+
+ memset((char *)&srcadr, 0, sizeof(srcadr));
+ memset((char *)&dstadr, 0, sizeof(dstadr));
+ if (pp->v6_flag != 0) {
+ srcadr.ss_family = AF_INET6;
+ dstadr.ss_family = AF_INET6;
+ GET_INADDR6(srcadr) = pp->srcadr6;
+ GET_INADDR6(dstadr) = pp->dstadr6;
+ } else {
+ srcadr.ss_family = AF_INET;
+ dstadr.ss_family = AF_INET;
+ GET_INADDR(srcadr) = pp->srcadr;
+ GET_INADDR(dstadr) = pp->dstadr;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ srcadr.ss_len = SOCKLEN(&srcadr);
+ dstadr.ss_len = SOCKLEN(&dstadr);
+#endif
(void) fprintf(fp, "remote %s, local %s\n",
- numtoa(pp->srcadr), numtoa(pp->dstadr));
-
+ stoa(&srcadr), stoa(&dstadr));
(void) fprintf(fp, "hmode %s, pmode %s, stratum %d, precision %d\n",
modetoa(pp->hmode), modetoa(pp->pmode),
pp->stratum, pp->precision);
@@ -570,29 +633,55 @@ showpeer(
{
struct info_peer *pp;
/* 4 is the maximum number of peers which will fit in a packet */
- struct info_peer_list plist[min(MAXARGS, 4)];
+ struct info_peer_list *pl, plist[min(MAXARGS, 4)];
int qitems;
int items;
int itemsize;
int res;
-
- for (qitems = 0; qitems < min(pcmd->nargs, 4); qitems++) {
- plist[qitems].address = pcmd->argval[qitems].netnum;
- plist[qitems].port = server_entry->s_port;
- plist[qitems].hmode = plist[qitems].flags = 0;
+ int sendsize;
+
+again:
+ if (impl_ver == IMPL_XNTPD)
+ sendsize = sizeof(struct info_peer_list);
+ else
+ sendsize = v4sizeof(struct info_peer_list);
+
+ for (qitems = 0, pl = plist; qitems < min(pcmd->nargs, 4); qitems++) {
+ if (pcmd->argval[qitems].netnum.ss_family == AF_INET) {
+ pl->addr = GET_INADDR(pcmd->argval[qitems].netnum);
+ if (impl_ver == IMPL_XNTPD)
+ pl->v6_flag = 0;
+ } else {
+ if (impl_ver == IMPL_XNTPD_OLD) {
+ fprintf(stderr,
+ "***Server doesn't understand IPv6 addresses\n");
+ return;
+ }
+ pl->addr6 = GET_INADDR6(pcmd->argval[qitems].netnum);
+ pl->v6_flag = 1;
+ }
+ pl->port = (u_short)s_port;
+ pl->hmode = pl->flags = 0;
+ pl = (struct info_peer_list *)((char *)pl + sendsize);
}
- res = doquery(IMPL_XNTPD, REQ_PEER_INFO, 0, qitems,
- sizeof(struct info_peer_list), (char *)plist, &items,
- &itemsize, (char **)&pp, 0);
+ res = doquery(impl_ver, REQ_PEER_INFO, 0, qitems,
+ sendsize, (char *)plist, &items,
+ &itemsize, (void *)&pp, 0, sizeof(struct info_peer));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
if (!checkitems(items, fp))
return;
- if (!checkitemsize(itemsize, sizeof(struct info_peer)))
+ if (!checkitemsize(itemsize, sizeof(struct info_peer)) &&
+ !checkitemsize(itemsize, v4sizeof(struct info_peer)))
return;
while (items-- > 0) {
@@ -615,36 +704,82 @@ peerstats(
{
struct info_peer_stats *pp;
/* 4 is the maximum number of peers which will fit in a packet */
- struct info_peer_list plist[min(MAXARGS, 4)];
+ struct info_peer_list *pl, plist[min(MAXARGS, 4)];
+ struct sockaddr_storage src, dst;
int qitems;
int items;
int itemsize;
int res;
-
- for (qitems = 0; qitems < min(pcmd->nargs, 4); qitems++) {
- plist[qitems].address = pcmd->argval[qitems].netnum;
- plist[qitems].port = server_entry->s_port;
- plist[qitems].hmode = plist[qitems].flags = 0;
+ int sendsize;
+
+again:
+ if (impl_ver == IMPL_XNTPD)
+ sendsize = sizeof(struct info_peer_list);
+ else
+ sendsize = v4sizeof(struct info_peer_list);
+
+ memset((char *)plist, 0, sizeof(struct info_peer_list) * min(MAXARGS, 4));
+ for (qitems = 0, pl = plist; qitems < min(pcmd->nargs, 4); qitems++) {
+ if (pcmd->argval[qitems].netnum.ss_family == AF_INET) {
+ pl->addr = GET_INADDR(pcmd->argval[qitems].netnum);
+ if (impl_ver == IMPL_XNTPD)
+ pl->v6_flag = 0;
+ } else {
+ if (impl_ver == IMPL_XNTPD_OLD) {
+ fprintf(stderr,
+ "***Server doesn't understand IPv6 addresses\n");
+ return;
+ }
+ pl->addr6 = GET_INADDR6(pcmd->argval[qitems].netnum);
+ pl->v6_flag = 1;
+ }
+ pl->port = (u_short)s_port;
+ pl->hmode = plist[qitems].flags = 0;
+ pl = (struct info_peer_list *)((char *)pl + sendsize);
}
- res = doquery(IMPL_XNTPD, REQ_PEER_STATS, 0, qitems,
- sizeof(struct info_peer_list), (char *)plist, &items,
- &itemsize, (char **)&pp, 0);
+ res = doquery(impl_ver, REQ_PEER_STATS, 0, qitems,
+ sendsize, (char *)plist, &items,
+ &itemsize, (void *)&pp, 0,
+ sizeof(struct info_peer_stats));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
if (!checkitems(items, fp))
return;
- if (!checkitemsize(itemsize, sizeof(struct info_peer_stats)))
+ if (!checkitemsize(itemsize, sizeof(struct info_peer_stats)) &&
+ !checkitemsize(itemsize, v4sizeof(struct info_peer_stats)))
return;
while (items-- > 0) {
+ memset((char *)&src, 0, sizeof(src));
+ memset((char *)&dst, 0, sizeof(dst));
+ if (pp->v6_flag != 0) {
+ GET_INADDR6(src) = pp->srcadr6;
+ GET_INADDR6(dst) = pp->dstadr6;
+ src.ss_family = AF_INET6;
+ dst.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(src) = pp->srcadr;
+ GET_INADDR(dst) = pp->dstadr;
+ src.ss_family = AF_INET;
+ dst.ss_family = AF_INET;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ src.ss_len = SOCKLEN(&src);
+ dst.ss_len = SOCKLEN(&dst);
+#endif
(void) fprintf(fp, "remote host: %s\n",
- nntohost(pp->srcadr));
+ nntohost(&src));
(void) fprintf(fp, "local interface: %s\n",
- numtoa(pp->dstadr));
+ stoa(&dst));
(void) fprintf(fp, "time last received: %lds\n",
(long)ntohl(pp->timereceived));
(void) fprintf(fp, "time until next send: %lds\n",
@@ -701,9 +836,16 @@ loopinfo(
}
}
- res = doquery(IMPL_XNTPD, REQ_LOOP_INFO, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&il, 0);
+again:
+ res = doquery(impl_ver, REQ_LOOP_INFO, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&il, 0,
+ sizeof(struct info_loop));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
@@ -751,24 +893,44 @@ sysinfo(
)
{
struct info_sys *is;
+ struct sockaddr_storage peeraddr;
int items;
int itemsize;
int res;
l_fp tempts;
- res = doquery(IMPL_XNTPD, REQ_SYS_INFO, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&is, 0);
+again:
+ res = doquery(impl_ver, REQ_SYS_INFO, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&is, 0,
+ sizeof(struct info_sys));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
if (!check1item(items, fp))
return;
- if (!checkitemsize(itemsize, sizeof(struct info_sys)))
+ if (!checkitemsize(itemsize, sizeof(struct info_sys)) &&
+ !checkitemsize(itemsize, v4sizeof(struct info_sys)))
return;
- (void) fprintf(fp, "system peer: %s\n", nntohost(is->peer));
+ memset((char *)&peeraddr, 0, sizeof(peeraddr));
+ if (is->v6_flag != 0) {
+ GET_INADDR6(peeraddr) = is->peer6;
+ peeraddr.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(peeraddr) = is->peer;
+ peeraddr.ss_family = AF_INET;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ peeraddr.ss_len = SOCKLEN(&peeraddr);
+#endif
+ (void) fprintf(fp, "system peer: %s\n", nntohost(&peeraddr));
(void) fprintf(fp, "system peer mode: %s\n", modetoa(is->peer_mode));
(void) fprintf(fp, "leap indicator: %c%c\n",
is->leap & 0x2 ? '1' : '0',
@@ -834,9 +996,16 @@ sysstats(
int itemsize;
int res;
- res = doquery(IMPL_XNTPD, REQ_SYS_STATS, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&ss, 0);
+again:
+ res = doquery(impl_ver, REQ_SYS_STATS, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&ss, 0,
+ sizeof(struct info_sys_stats));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
@@ -849,30 +1018,31 @@ sysstats(
checkitemsize(itemsize, sizeof(struct info_sys_stats));
return;
}
-
- (void) fprintf(fp, "system uptime: %ld\n",
- (u_long)ntohl(ss->timeup));
- (void) fprintf(fp, "time since reset: %ld\n",
- (u_long)ntohl(ss->timereset));
- (void) fprintf(fp, "bad stratum in packet: %ld\n",
- (u_long)ntohl(ss->badstratum));
- (void) fprintf(fp, "old version packets: %ld\n",
- (u_long)ntohl(ss->oldversionpkt));
- (void) fprintf(fp, "new version packets: %ld\n",
- (u_long)ntohl(ss->newversionpkt));
- (void) fprintf(fp, "unknown version number: %ld\n",
- (u_long)ntohl(ss->unknownversion));
- (void) fprintf(fp, "bad packet format: %ld\n",
- (u_long)ntohl(ss->badlength));
- (void) fprintf(fp, "packets processed: %ld\n",
- (u_long)ntohl(ss->processed));
- (void) fprintf(fp, "bad authentication: %ld\n",
- (u_long)ntohl(ss->badauth));
+ fprintf(fp, "time since restart: %ld\n",
+ (u_long)ntohl(ss->timeup));
+ fprintf(fp, "time since reset: %ld\n",
+ (u_long)ntohl(ss->timereset));
+ fprintf(fp, "packets received: %ld\n",
+ (u_long)ntohl(ss->received));
+ fprintf(fp, "packets processed: %ld\n",
+ (u_long)ntohl(ss->processed));
+ fprintf(fp, "current version: %ld\n",
+ (u_long)ntohl(ss->newversionpkt));
+ fprintf(fp, "previous version: %ld\n",
+ (u_long)ntohl(ss->oldversionpkt));
+ fprintf(fp, "bad version: %ld\n",
+ (u_long)ntohl(ss->unknownversion));
+ fprintf(fp, "access denied: %ld\n",
+ (u_long)ntohl(ss->denied));
+ fprintf(fp, "bad length or format: %ld\n",
+ (u_long)ntohl(ss->badlength));
+ fprintf(fp, "bad authentication: %ld\n",
+ (u_long)ntohl(ss->badauth));
if (itemsize != sizeof(struct info_sys_stats))
return;
- (void) fprintf(fp, "packets rejected: %ld\n",
- (u_long)ntohl(ss->limitrejected));
+ fprintf(fp, "rate exceeded: %ld\n",
+ (u_long)ntohl(ss->limitrejected));
}
@@ -892,9 +1062,16 @@ iostats(
int itemsize;
int res;
- res = doquery(IMPL_XNTPD, REQ_IO_STATS, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&io, 0);
+again:
+ res = doquery(impl_ver, REQ_IO_STATS, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&io, 0,
+ sizeof(struct info_io_stats));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
@@ -947,9 +1124,16 @@ memstats(
int itemsize;
int res;
- res = doquery(IMPL_XNTPD, REQ_MEM_STATS, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&mem, 0);
+again:
+ res = doquery(impl_ver, REQ_MEM_STATS, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&mem, 0,
+ sizeof(struct info_mem_stats));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
@@ -999,9 +1183,16 @@ timerstats(
int itemsize;
int res;
- res = doquery(IMPL_XNTPD, REQ_TIMER_STATS, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&tim, 0);
+again:
+ res = doquery(impl_ver, REQ_TIMER_STATS, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&tim, 0,
+ sizeof(struct info_timer_stats));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
@@ -1093,7 +1284,9 @@ doconfig(
u_int flags;
u_char cmode;
int res;
+ int sendsize;
+again:
keyid = 0;
version = NTP_OLDVERSION + 1;
flags = 0;
@@ -1101,6 +1294,11 @@ doconfig(
cmode = 0;
minpoll = NTP_MINDPOLL;
+ if (impl_ver == IMPL_XNTPD)
+ sendsize = sizeof(struct conf_peer);
+ else
+ sendsize = v4sizeof(struct conf_peer);
+
items = pcmd->nargs;
if (refc) {
@@ -1159,9 +1357,21 @@ doconfig(
if (res)
return;
- memset((void *)&cpeer, 0, sizeof cpeer);
+ memset((void *)&cpeer, 0, sizeof(cpeer));
- cpeer.peeraddr = pcmd->argval[0].netnum;
+ if (pcmd->argval[0].netnum.ss_family == AF_INET) {
+ cpeer.peeraddr = GET_INADDR(pcmd->argval[0].netnum);
+ if (impl_ver == IMPL_XNTPD)
+ cpeer.v6_flag = 0;
+ } else {
+ if (impl_ver == IMPL_XNTPD_OLD) {
+ fprintf(stderr,
+ "***Server doesn't understand IPv6 addresses\n");
+ return;
+ }
+ cpeer.peeraddr6 = GET_INADDR6(pcmd->argval[0].netnum);
+ cpeer.v6_flag = 1;
+ }
cpeer.hmode = (u_char) mode;
cpeer.keyid = keyid;
cpeer.version = (u_char) version;
@@ -1170,16 +1380,22 @@ doconfig(
cpeer.flags = (u_char)flags;
cpeer.ttl = cmode;
- res = doquery(IMPL_XNTPD, REQ_CONFIG, 1, 1,
- sizeof(struct conf_peer), (char *)&cpeer, &items,
- &itemsize, &dummy, 0);
+ res = doquery(impl_ver, REQ_CONFIG, 1, 1,
+ sendsize, (char *)&cpeer, &items,
+ &itemsize, &dummy, 0, sizeof(struct conf_peer));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res == INFO_ERR_FMT) {
(void) fprintf(fp,
"***Retrying command with old conf_peer size\n");
- res = doquery(IMPL_XNTPD, REQ_CONFIG, 1, 1,
+ res = doquery(impl_ver, REQ_CONFIG, 1, 1,
sizeof(struct old_conf_peer), (char *)&cpeer,
- &items, &itemsize, &dummy, 0);
+ &items, &itemsize, &dummy, 0,
+ sizeof(struct conf_peer));
}
if (res == 0)
(void) fprintf(fp, "done!\n");
@@ -1197,21 +1413,47 @@ unconfig(
)
{
/* 8 is the maximum number of peers which will fit in a packet */
- struct conf_unpeer plist[min(MAXARGS, 8)];
+ struct conf_unpeer *pl, plist[min(MAXARGS, 8)];
int qitems;
int items;
int itemsize;
char *dummy;
int res;
-
- for (qitems = 0; qitems < min(pcmd->nargs, 8); qitems++) {
- plist[qitems].peeraddr = pcmd->argval[qitems].netnum;
+ int sendsize;
+
+again:
+ if (impl_ver == IMPL_XNTPD)
+ sendsize = sizeof(struct conf_unpeer);
+ else
+ sendsize = v4sizeof(struct conf_unpeer);
+
+ for (qitems = 0, pl = plist; qitems < min(pcmd->nargs, 8); qitems++) {
+ if (pcmd->argval[0].netnum.ss_family == AF_INET) {
+ pl->peeraddr = GET_INADDR(pcmd->argval[qitems].netnum);
+ if (impl_ver == IMPL_XNTPD)
+ pl->v6_flag = 0;
+ } else {
+ if (impl_ver == IMPL_XNTPD_OLD) {
+ fprintf(stderr,
+ "***Server doesn't understand IPv6 addresses\n");
+ return;
+ }
+ pl->peeraddr6 =
+ GET_INADDR6(pcmd->argval[qitems].netnum);
+ pl->v6_flag = 1;
+ }
+ pl = (struct conf_unpeer *)((char *)pl + sendsize);
}
- res = doquery(IMPL_XNTPD, REQ_UNCONFIG, 1, qitems,
- sizeof(struct conf_unpeer), (char *)plist, &items,
- &itemsize, &dummy, 0);
+ res = doquery(impl_ver, REQ_UNCONFIG, 1, qitems,
+ sendsize, (char *)plist, &items,
+ &itemsize, &dummy, 0, sizeof(struct conf_unpeer));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res == 0)
(void) fprintf(fp, "done!\n");
}
@@ -1289,10 +1531,16 @@ doset(
if (res || sys.flags == 0)
return;
- res = doquery(IMPL_XNTPD, req, 1, 1,
+again:
+ res = doquery(impl_ver, req, 1, 1,
sizeof(struct conf_sys_flags), (char *)&sys, &items,
- &itemsize, &dummy, 0);
+ &itemsize, &dummy, 0, sizeof(struct conf_sys_flags));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res == 0)
(void) fprintf(fp, "done!\n");
}
@@ -1318,6 +1566,7 @@ static struct resflags resflags[] = {
{ "limited", RES_LIMITED },
{ "version", RES_VERSION },
{ "kod", RES_DEMOBILIZE },
+ { "timeout", RES_TIMEOUT },
{ "", 0 }
};
@@ -1340,9 +1589,12 @@ reslist(
)
{
struct info_restrict *rl;
+ struct sockaddr_storage resaddr;
+ struct sockaddr_storage maskaddr;
int items;
int itemsize;
int res;
+ int skip;
char *addr;
char *mask;
struct resflags *rf;
@@ -1352,28 +1604,62 @@ reslist(
char flagstr[300];
static const char *comma = ", ";
- res = doquery(IMPL_XNTPD, REQ_GET_RESTRICT, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&rl, 0);
+again:
+ res = doquery(impl_ver, REQ_GET_RESTRICT, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&rl, 0,
+ sizeof(struct info_restrict));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
if (!checkitems(items, fp))
return;
- if (!checkitemsize(itemsize, sizeof(struct info_restrict)))
+ if (!checkitemsize(itemsize, sizeof(struct info_restrict)) &&
+ !checkitemsize(itemsize, v4sizeof(struct info_restrict)))
return;
(void) fprintf(fp,
- " address mask count flags\n");
+ " address mask count flags\n");
(void) fprintf(fp,
"=====================================================================\n");
+
while (items > 0) {
- if ((rl->mask == (u_int32)0xffffffff))
- addr = nntohost(rl->addr);
- else
- addr = numtoa( rl->addr );
- mask = numtoa(rl->mask);
+ memset((char *)&resaddr, 0, sizeof(resaddr));
+ memset((char *)&maskaddr, 0, sizeof(maskaddr));
+ if (rl->v6_flag != 0) {
+ GET_INADDR6(resaddr) = rl->addr6;
+ GET_INADDR6(maskaddr) = rl->mask6;
+ resaddr.ss_family = AF_INET6;
+ maskaddr.ss_family = AF_INET6;
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ resaddr.ss_len = SOCKLEN(&resaddr);
+#endif
+ addr = nntohost(&resaddr);
+ } else {
+ GET_INADDR(resaddr) = rl->addr;
+ GET_INADDR(maskaddr) = rl->mask;
+ resaddr.ss_family = AF_INET;
+ maskaddr.ss_family = AF_INET;
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ resaddr.ss_len = SOCKLEN(&resaddr);
+#endif
+ if ((rl->mask == (u_int32)0xffffffff))
+ addr = nntohost(&resaddr);
+ else
+ addr = stoa(&resaddr);
+ }
+ mask = stoa(&maskaddr);
+ skip = 1;
+ if ((pcmd->nargs == 0) ||
+ ((pcmd->argval->ival == 6) && (rl->v6_flag != 0)) ||
+ ((pcmd->argval->ival == 4) && (rl->v6_flag == 0)))
+ skip = 0;
count = ntohl(rl->count);
flags = ntohs(rl->flags);
mflags = ntohs(rl->mflags);
@@ -1405,8 +1691,9 @@ reslist(
if (flagstr[0] == '\0')
(void) strcpy(flagstr, "none");
- (void) fprintf(fp, "%-15.15s %-15.15s %9ld %s\n",
- addr, mask, (u_long)count, flagstr);
+ if (!skip)
+ (void) fprintf(fp, "%-15.15s %-15.15s %9ld %s\n",
+ addr, mask, (u_long)count, flagstr);
rl++;
items--;
}
@@ -1472,9 +1759,35 @@ do_restrict(
int i;
int res;
int err;
+ int sendsize;
- cres.addr = pcmd->argval[0].netnum;
- cres.mask = pcmd->argval[1].netnum;
+ /* Initialize cres */
+ cres.addr = 0;
+ cres.mask = 0;
+ cres.flags = 0;
+ cres.mflags = 0;
+ cres.v6_flag = 0;
+
+again:
+ if (impl_ver == IMPL_XNTPD)
+ sendsize = sizeof(struct conf_restrict);
+ else
+ sendsize = v4sizeof(struct conf_restrict);
+
+ if (pcmd->argval[0].netnum.ss_family == AF_INET) {
+ cres.addr = GET_INADDR(pcmd->argval[0].netnum);
+ cres.mask = GET_INADDR(pcmd->argval[1].netnum);
+ if (impl_ver == IMPL_XNTPD)
+ cres.v6_flag = 0;
+ } else {
+ if (impl_ver == IMPL_XNTPD_OLD) {
+ fprintf(stderr,
+ "***Server doesn't understand IPv6 addresses\n");
+ return;
+ }
+ cres.addr6 = GET_INADDR6(pcmd->argval[0].netnum);
+ cres.v6_flag = 1;
+ }
cres.flags = 0;
cres.mflags = 0;
err = 0;
@@ -1507,30 +1820,39 @@ do_restrict(
* Make sure mask for default address is zero. Otherwise,
* make sure mask bits are contiguous.
*/
- if (cres.addr == 0) {
- cres.mask = 0;
- } else {
- num = ntohl(cres.mask);
- for (bit = 0x80000000; bit != 0; bit >>= 1)
- if ((num & bit) == 0)
- break;
- for ( ; bit != 0; bit >>= 1)
- if ((num & bit) != 0)
- break;
- if (bit != 0) {
- (void) fprintf(fp, "Invalid mask %s\n",
- numtoa(cres.mask));
- err++;
+ if (pcmd->argval[0].netnum.ss_family == AF_INET) {
+ if (cres.addr == 0) {
+ cres.mask = 0;
+ } else {
+ num = ntohl(cres.mask);
+ for (bit = 0x80000000; bit != 0; bit >>= 1)
+ if ((num & bit) == 0)
+ break;
+ for ( ; bit != 0; bit >>= 1)
+ if ((num & bit) != 0)
+ break;
+ if (bit != 0) {
+ (void) fprintf(fp, "Invalid mask %s\n",
+ numtoa(cres.mask));
+ err++;
+ }
}
+ } else {
+ /* XXX IPv6 sanity checking stuff */
}
if (err)
return;
- res = doquery(IMPL_XNTPD, req_code, 1, 1,
- sizeof(struct conf_restrict), (char *)&cres, &items,
- &itemsize, &dummy, 0);
+ res = doquery(impl_ver, req_code, 1, 1,
+ sendsize, (char *)&cres, &items,
+ &itemsize, &dummy, 0, sizeof(struct conf_restrict));
+ 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;
@@ -1548,7 +1870,8 @@ monlist(
)
{
char *struct_star;
- struct in_addr addr;
+ struct sockaddr_storage addr;
+ struct sockaddr_storage dstadr;
int items;
int itemsize;
int res;
@@ -1558,15 +1881,23 @@ monlist(
version = pcmd->argval[0].ival;
}
- res = doquery(IMPL_XNTPD,
+again:
+ res = doquery(impl_ver,
(version == 1 || version == -1) ? REQ_MON_GETLIST_1 :
REQ_MON_GETLIST, 0, 0, 0, (char *)NULL,
&items, &itemsize, &struct_star,
- (version < 0) ? (1 << INFO_ERR_REQ) : 0);
+ (version < 0) ? (1 << INFO_ERR_REQ) : 0,
+ sizeof(struct info_monitor_1));
+
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
if (res == INFO_ERR_REQ && version < 0)
- res = doquery(IMPL_XNTPD, REQ_MON_GETLIST, 0, 0, 0, (char *)NULL,
- &items, &itemsize, &struct_star, 0);
+ res = doquery(impl_ver, REQ_MON_GETLIST, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, &struct_star, 0,
+ sizeof(struct info_monitor));
if (res != 0 && items == 0)
return;
@@ -1574,48 +1905,82 @@ monlist(
if (!checkitems(items, fp))
return;
- if (itemsize == sizeof(struct info_monitor_1)) {
+ if (itemsize == sizeof(struct info_monitor_1) ||
+ itemsize == v4sizeof(struct info_monitor_1)) {
struct info_monitor_1 *ml = (struct info_monitor_1 *) struct_star;
(void) fprintf(fp,
- "remote address port local address count m ver drop last first\n");
+ "remote address port local address count m ver code avgint lstint\n");
(void) fprintf(fp,
"===============================================================================\n");
while (items > 0) {
- addr.s_addr = ml->daddr;
- (void) fprintf(fp,
- "%-22.22s %5d %-15s %8ld %1d %1d %6lu %6lu %7lu\n",
- nntohost(ml->addr),
- ntohs(ml->port),
- inet_ntoa(addr),
- (u_long)ntohl(ml->count),
- ml->mode,
- ml->version,
- (u_long)ntohl(ml->lastdrop),
- (u_long)ntohl(ml->lasttime),
- (u_long)ntohl(ml->firsttime));
+ memset((char *)&addr, 0, sizeof(addr));
+ memset((char *)&dstadr, 0, sizeof(dstadr));
+ if (ml->v6_flag != 0) {
+ GET_INADDR6(addr) = ml->addr6;
+ addr.ss_family = AF_INET6;
+ GET_INADDR6(dstadr) = ml->daddr6;
+ dstadr.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(addr) = ml->addr;
+ addr.ss_family = AF_INET;
+ GET_INADDR(dstadr) = ml->daddr;
+ dstadr.ss_family = AF_INET;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ addr.ss_len = SOCKLEN(&addr);
+ dstadr.ss_len = SOCKLEN(&dstadr);
+#endif
+ if ((pcmd->nargs == 0) ||
+ ((pcmd->argval->ival == 6) && (ml->v6_flag != 0)) ||
+ ((pcmd->argval->ival == 4) && (ml->v6_flag == 0)))
+ (void) fprintf(fp,
+ "%-22.22s %5d %-15s %8ld %1d %1d %6lx %6lu %7lu\n",
+ nntohost(&addr),
+ ntohs(ml->port),
+ stoa(&dstadr),
+ (u_long)ntohl(ml->count),
+ ml->mode,
+ ml->version,
+ (u_long)ntohl(ml->lastdrop),
+ (u_long)ntohl(ml->lasttime),
+ (u_long)ntohl(ml->firsttime));
ml++;
items--;
}
- } else if (itemsize == sizeof(struct info_monitor)) {
+ } else if (itemsize == sizeof(struct info_monitor) ||
+ itemsize == v4sizeof(struct info_monitor)) {
struct info_monitor *ml = (struct info_monitor *) struct_star;
(void) fprintf(fp,
- " address port count mode ver lastdrop lasttime firsttime\n");
+ " address port count mode ver code avgint lstint\n");
(void) fprintf(fp,
"===============================================================================\n");
while (items > 0) {
- addr.s_addr = ml->lastdrop;
- (void) fprintf(fp,
- "%-25.25s %5d %9ld %4d %2d %9lu %9lu %9lu\n",
- nntohost(ml->addr),
- ntohs(ml->port),
- (u_long)ntohl(ml->count),
- ml->mode,
- ml->version,
- (u_long)ntohl(ml->lastdrop),
- (u_long)ntohl(ml->lasttime),
- (u_long)ntohl(ml->firsttime));
+ memset((char *)&dstadr, 0, sizeof(dstadr));
+ if (ml->v6_flag != 0) {
+ GET_INADDR6(dstadr) = ml->addr6;
+ dstadr.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(dstadr) = ml->addr;
+ dstadr.ss_family = AF_INET;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ dstadr.ss_len = SOCKLEN(&dstadr);
+#endif
+ if ((pcmd->nargs == 0) ||
+ ((pcmd->argval->ival == 6) && (ml->v6_flag != 0)) ||
+ ((pcmd->argval->ival == 4) && (ml->v6_flag == 0)))
+ (void) fprintf(fp,
+ "%-25.25s %5d %9ld %4d %2d %9lx %9lu %9lu\n",
+ nntohost(&dstadr),
+ ntohs(ml->port),
+ (u_long)ntohl(ml->count),
+ ml->mode,
+ ml->version,
+ (u_long)ntohl(ml->lastdrop),
+ (u_long)ntohl(ml->lasttime),
+ (u_long)ntohl(ml->firsttime));
ml++;
items--;
}
@@ -1626,8 +1991,19 @@ monlist(
(void) fprintf(fp,
"======================================================================\n");
while (items > 0) {
+ memset((char *)&dstadr, 0, sizeof(dstadr));
+ if (oml->v6_flag != 0) {
+ GET_INADDR6(dstadr) = oml->addr6;
+ dstadr.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(dstadr) = oml->addr;
+ dstadr.ss_family = AF_INET;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ dstadr.ss_len = SOCKLEN(&dstadr);
+#endif
(void) fprintf(fp, "%-20.20s %5d %9ld %4d %3d %9lu %9lu\n",
- nntohost(oml->addr),
+ nntohost(&dstadr),
ntohs(oml->port),
(u_long)ntohl(oml->count),
oml->mode,
@@ -1698,10 +2074,16 @@ reset(
return;
}
- res = doquery(IMPL_XNTPD, REQ_RESET_STATS, 1, 1,
+again:
+ res = doquery(impl_ver, REQ_RESET_STATS, 1, 1,
sizeof(struct reset_flags), (char *)&rflags, &items,
- &itemsize, &dummy, 0);
+ &itemsize, &dummy, 0, sizeof(struct reset_flags));
+ 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;
@@ -1719,21 +2101,47 @@ preset(
)
{
/* 8 is the maximum number of peers which will fit in a packet */
- struct conf_unpeer plist[min(MAXARGS, 8)];
+ struct conf_unpeer *pl, plist[min(MAXARGS, 8)];
int qitems;
int items;
int itemsize;
char *dummy;
int res;
-
- for (qitems = 0; qitems < min(pcmd->nargs, 8); qitems++) {
- plist[qitems].peeraddr = pcmd->argval[qitems].netnum;
+ int sendsize;
+
+again:
+ if (impl_ver == IMPL_XNTPD)
+ sendsize = sizeof(struct conf_unpeer);
+ else
+ sendsize = v4sizeof(struct conf_unpeer);
+
+ for (qitems = 0, pl = plist; qitems < min(pcmd->nargs, 8); qitems++) {
+ if (pcmd->argval[qitems].netnum.ss_family == AF_INET) {
+ pl->peeraddr = GET_INADDR(pcmd->argval[qitems].netnum);
+ if (impl_ver == IMPL_XNTPD)
+ pl->v6_flag = 0;
+ } else {
+ if (impl_ver == IMPL_XNTPD_OLD) {
+ fprintf(stderr,
+ "***Server doesn't understand IPv6 addresses\n");
+ return;
+ }
+ pl->peeraddr6 =
+ GET_INADDR6(pcmd->argval[qitems].netnum);
+ pl->v6_flag = 1;
+ }
+ pl = (struct conf_unpeer *)((char *)pl + sendsize);
}
- res = doquery(IMPL_XNTPD, REQ_RESET_PEER, 1, qitems,
- sizeof(struct conf_unpeer), (char *)plist, &items,
- &itemsize, &dummy, 0);
+ res = doquery(impl_ver, REQ_RESET_PEER, 1, qitems,
+ sendsize, (char *)plist, &items,
+ &itemsize, &dummy, 0, sizeof(struct conf_unpeer));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res == 0)
(void) fprintf(fp, "done!\n");
}
@@ -1754,9 +2162,15 @@ readkeys(
char *dummy;
int res;
- res = doquery(IMPL_XNTPD, REQ_REREAD_KEYS, 1, 0, 0, (char *)0,
- &items, &itemsize, &dummy, 0);
+again:
+ res = doquery(impl_ver, REQ_REREAD_KEYS, 1, 0, 0, (char *)0,
+ &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;
@@ -1812,9 +2226,16 @@ do_trustkey(
keyids[ritems++] = pcmd->argval[i].uval;
}
- res = doquery(IMPL_XNTPD, req, 1, ritems, sizeof(u_long),
- (char *)keyids, &items, &itemsize, &dummy, 0);
+again:
+ res = doquery(impl_ver, req, 1, ritems, sizeof(u_long),
+ (char *)keyids, &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;
@@ -1837,9 +2258,16 @@ authinfo(
int itemsize;
int res;
- res = doquery(IMPL_XNTPD, REQ_AUTHINFO, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&ia, 0);
+again:
+ res = doquery(impl_ver, REQ_AUTHINFO, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&ia, 0,
+ sizeof(struct info_auth));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
@@ -1883,32 +2311,58 @@ traps(
{
int i;
struct info_trap *it;
+ struct sockaddr_storage trap_addr, local_addr;
int items;
int itemsize;
int res;
- res = doquery(IMPL_XNTPD, REQ_TRAPS, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&it, 0);
+again:
+ res = doquery(impl_ver, REQ_TRAPS, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&it, 0,
+ sizeof(struct info_trap));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
if (!checkitems(items, fp))
return;
- if (!checkitemsize(itemsize, sizeof(struct info_trap)))
+ if (!checkitemsize(itemsize, sizeof(struct info_trap)) &&
+ !checkitemsize(itemsize, v4sizeof(struct info_trap)))
return;
for (i = 0; i < items; i++ ) {
if (i != 0)
(void) fprintf(fp, "\n");
+ memset((char *)&trap_addr, 0, sizeof(trap_addr));
+ memset((char *)&local_addr, 0, sizeof(local_addr));
+ if (it->v6_flag != 0) {
+ GET_INADDR6(trap_addr) = it->trap_address6;
+ GET_INADDR6(local_addr) = it->local_address6;
+ trap_addr.ss_family = AF_INET6;
+ local_addr.ss_family = AF_INET6;
+ } else {
+ GET_INADDR(trap_addr) = it->trap_address;
+ GET_INADDR(local_addr) = it->local_address;
+ trap_addr.ss_family = AF_INET;
+ local_addr.ss_family = AF_INET;
+ }
+#ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+ trap_addr.ss_len = SOCKLEN(&trap_addr);
+ local_addr.ss_len = SOCKLEN(&local_addr);
+#endif
(void) fprintf(fp, "address %s, port %d\n",
- numtoa(it->trap_address), ntohs(it->trap_port));
+ stoa(&trap_addr),
+ ntohs(it->trap_port));
(void) fprintf(fp, "interface: %s, ",
- (it->local_address == 0)
- ? "wildcard"
- : numtoa(it->local_address));
-
+ (it->local_address == 0)
+ ? "wildcard"
+ : stoa(&local_addr));
if (ntohl(it->flags) & TRAP_CONFIGURED)
(void) fprintf(fp, "configured\n");
else if (ntohl(it->flags) & TRAP_NONPRIO)
@@ -1967,8 +2421,27 @@ do_addclr_trap(
int itemsize;
char *dummy;
int res;
-
- ctrap.trap_address = pcmd->argval[0].netnum;
+ int sendsize;
+
+again:
+ if (impl_ver == IMPL_XNTPD)
+ sendsize = sizeof(struct conf_trap);
+ else
+ sendsize = v4sizeof(struct conf_trap);
+
+ if (pcmd->argval[0].netnum.ss_family == AF_INET) {
+ ctrap.trap_address = GET_INADDR(pcmd->argval[0].netnum);
+ if (impl_ver == IMPL_XNTPD)
+ ctrap.v6_flag = 0;
+ } else {
+ if (impl_ver == IMPL_XNTPD_OLD) {
+ fprintf(stderr,
+ "***Server doesn't understand IPv6 addresses\n");
+ return;
+ }
+ ctrap.trap_address6 = GET_INADDR6(pcmd->argval[0].netnum);
+ ctrap.v6_flag = 1;
+ }
ctrap.local_address = 0;
ctrap.trap_port = htons(TRAPPORT);
ctrap.unused = 0;
@@ -1976,13 +2449,29 @@ do_addclr_trap(
if (pcmd->nargs > 1) {
ctrap.trap_port
= htons((u_short)(pcmd->argval[1].uval & 0xffff));
- if (pcmd->nargs > 2)
- ctrap.local_address = pcmd->argval[2].netnum;
+ if (pcmd->nargs > 2) {
+ if (pcmd->argval[2].netnum.ss_family !=
+ pcmd->argval[0].netnum.ss_family) {
+ fprintf(stderr,
+ "***Cannot mix IPv4 and IPv6 addresses\n");
+ return;
+ }
+ if (pcmd->argval[2].netnum.ss_family == AF_INET)
+ ctrap.local_address = GET_INADDR(pcmd->argval[2].netnum);
+ else
+ ctrap.local_address6 = GET_INADDR6(pcmd->argval[2].netnum);
+ }
}
- res = doquery(IMPL_XNTPD, req, 1, 1, sizeof(struct conf_trap),
- (char *)&ctrap, &items, &itemsize, &dummy, 0);
+ res = doquery(impl_ver, req, 1, 1, sendsize,
+ (char *)&ctrap, &items, &itemsize, &dummy, 0,
+ sizeof(struct conf_trap));
+ 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;
@@ -2036,9 +2525,16 @@ do_changekey(
key = htonl((u_int32)pcmd->argval[0].uval);
- res = doquery(IMPL_XNTPD, req, 1, 1, sizeof(u_int32),
- (char *)&key, &items, &itemsize, &dummy, 0);
+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;
@@ -2061,9 +2557,16 @@ ctlstats(
int itemsize;
int res;
- res = doquery(IMPL_XNTPD, REQ_GET_CTLSTATS, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&ic, 0);
+again:
+ res = doquery(impl_ver, REQ_GET_CTLSTATS, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&ic, 0,
+ sizeof(struct info_control));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
@@ -2127,12 +2630,18 @@ clockstat(
u_long ltemp;
for (qitems = 0; qitems < min(pcmd->nargs, 8); qitems++)
- clist[qitems] = pcmd->argval[qitems].netnum;
+ clist[qitems] = GET_INADDR(pcmd->argval[qitems].netnum);
- res = doquery(IMPL_XNTPD, REQ_GET_CLOCKINFO, 0, qitems,
+again:
+ res = doquery(impl_ver, REQ_GET_CLOCKINFO, 0, qitems,
sizeof(u_int32), (char *)clist, &items,
- &itemsize, (char **)&cl, 0);
+ &itemsize, (void *)&cl, 0, sizeof(struct info_clock));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
@@ -2211,7 +2720,7 @@ fudge(
err = 0;
memset((char *)&fudgedata, 0, sizeof fudgedata);
- fudgedata.clockadr = pcmd->argval[0].netnum;
+ fudgedata.clockadr = GET_INADDR(pcmd->argval[0].netnum);
if (STREQ(pcmd->argval[1].string, "time1")) {
fudgedata.which = htonl(FUDGE_TIME1);
@@ -2255,10 +2764,15 @@ fudge(
return;
}
-
- res = doquery(IMPL_XNTPD, REQ_SET_CLKFUDGE, 1, 1,
+again:
+ res = doquery(impl_ver, REQ_SET_CLKFUDGE, 1, 1,
sizeof(struct conf_fudge), (char *)&fudgedata, &items,
- &itemsize, &dummy, 0);
+ &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");
@@ -2289,12 +2803,18 @@ clkbug(
l_fp ts;
for (qitems = 0; qitems < min(pcmd->nargs, 8); qitems++)
- clist[qitems] = pcmd->argval[qitems].netnum;
+ clist[qitems] = GET_INADDR(pcmd->argval[qitems].netnum);
- res = doquery(IMPL_XNTPD, REQ_GET_CLKBUGINFO, 0, qitems,
+again:
+ res = doquery(impl_ver, REQ_GET_CLKBUGINFO, 0, qitems,
sizeof(u_int32), (char *)clist, &items,
- &itemsize, (char **)&cl, 0);
+ &itemsize, (void *)&cl, 0, sizeof(struct info_clkbug));
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
@@ -2373,8 +2893,16 @@ kerninfo(
unsigned status;
double tscale = 1e-6;
- res = doquery(IMPL_XNTPD, REQ_GET_KERNEL, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (char **)&ik, 0);
+again:
+ res = doquery(impl_ver, REQ_GET_KERNEL, 0, 0, 0, (char *)NULL,
+ &items, &itemsize, (void *)&ik, 0,
+ sizeof(struct info_kernel));
+
+ if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
+ impl_ver = IMPL_XNTPD_OLD;
+ goto again;
+ }
+
if (res != 0 && items == 0)
return;
if (!check1item(items, fp))
diff --git a/contrib/ntp/ntpq/Makefile.am b/contrib/ntp/ntpq/Makefile.am
index 918df9c8ec95..0bd05fc9cf0a 100644
--- a/contrib/ntp/ntpq/Makefile.am
+++ b/contrib/ntp/ntpq/Makefile.am
@@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = ../util/ansi2knr
bin_PROGRAMS = ntpq
INCLUDES = -I$(top_srcdir)/include
# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a @LIBRSAREF@
+ntpq_LDADD = version.o ../libntp/libntp.a @READLINE_LIBS@
DISTCLEANFILES = .version version.c
noinst_HEADERS = ntpq.h
#EXTRA_DIST = ntpq.mak
@@ -16,6 +16,6 @@ $(PROGRAMS): $(LDADD)
../libntp/libntp.a:
cd ../libntp && $(MAKE)
-version.o: $(ntpq_OBJECTS) ../libntp/libntp.a @LIBRSAREF@ Makefile
+version.o: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpq
$(COMPILE) -c version.c
diff --git a/contrib/ntp/ntpq/Makefile.in b/contrib/ntp/ntpq/Makefile.in
index 8391249636a0..7ddf4d3709bb 100644
--- a/contrib/ntp/ntpq/Makefile.in
+++ b/contrib/ntp/ntpq/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,26 +94,70 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
bin_PROGRAMS = ntpq
INCLUDES = -I$(top_srcdir)/include
# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a @LIBRSAREF@
+ntpq_LDADD = version.o ../libntp/libntp.a @READLINE_LIBS@
DISTCLEANFILES = .version version.c
noinst_HEADERS = ntpq.h
#EXTRA_DIST = ntpq.mak
@@ -123,6 +165,7 @@ ETAGS_ARGS = Makefile.am
ntpq_SOURCES = ntpq.c ntpq_ops.c
subdir = ntpq
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -131,17 +174,13 @@ PROGRAMS = $(bin_PROGRAMS)
am_ntpq_OBJECTS = ntpq$U.$(OBJEXT) ntpq_ops$U.$(OBJEXT)
ntpq_OBJECTS = $(am_ntpq_OBJECTS)
-ntpq_LDADD = $(LDADD)
ntpq_DEPENDENCIES = version.o ../libntp/libntp.a
ntpq_LDFLAGS =
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/ntpq$U.Po $(DEPDIR)/ntpq_ops$U.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ntpq$U.Po ./$(DEPDIR)/ntpq_ops$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
@@ -149,7 +188,8 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(ntpq_SOURCES)
HEADERS = $(noinst_HEADERS)
-DIST_COMMON = README $(noinst_HEADERS) Makefile.am Makefile.in
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
+ Makefile.am
SOURCES = $(ntpq_SOURCES)
all: all-am
@@ -160,9 +200,8 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu ntpq/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@@ -170,16 +209,16 @@ install-binPROGRAMS: $(bin_PROGRAMS)
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
- f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
@@ -201,80 +240,118 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntpq$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntpq_ops$U.Po@am__quote@
+ -test "$U" = "" || rm -f *_.c
-distclean-depend:
- -rm -rf $(DEPDIR)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpq$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpq_ops$U.Po@am__quote@
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
ntpq_.c: ntpq.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpq.c; then echo $(srcdir)/ntpq.c; else echo ntpq.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntpq_.c || rm -f ntpq_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpq.c; then echo $(srcdir)/ntpq.c; else echo ntpq.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntpq_ops_.c: ntpq_ops.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpq_ops.c; then echo $(srcdir)/ntpq_ops.c; else echo ntpq_ops.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntpq_ops_.c || rm -f ntpq_ops_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpq_ops.c; then echo $(srcdir)/ntpq_ops.c; else echo ntpq_ops.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntpq_.$(OBJEXT) ntpq_ops_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -287,7 +364,6 @@ all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -299,6 +375,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -306,7 +383,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@@ -317,9 +394,11 @@ clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -340,6 +419,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -347,18 +428,26 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic distclean distclean-compile distclean-depend \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic ctags distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am info \
info-am install install-am install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am
+ mostlyclean-generic mostlyclean-kr pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
$(PROGRAMS): $(LDADD)
@@ -366,7 +455,7 @@ $(PROGRAMS): $(LDADD)
../libntp/libntp.a:
cd ../libntp && $(MAKE)
-version.o: $(ntpq_OBJECTS) ../libntp/libntp.a @LIBRSAREF@ Makefile
+version.o: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpq
$(COMPILE) -c version.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/ntp/ntpq/ntpq.c b/contrib/ntp/ntpq/ntpq.c
index 34404b25b3ab..bc12725eec08 100644
--- a/contrib/ntp/ntpq/ntpq.c
+++ b/contrib/ntp/ntpq/ntpq.c
@@ -10,10 +10,16 @@
#include "ntp_io.h"
#include "ntp_select.h"
#include "ntp_stdlib.h"
+/* Don't include ISC's version of IPv6 variables and structures */
+#define ISC_IPV6_H 1
+#include "isc/net.h"
+#include "isc/result.h"
#include <ctype.h>
#include <signal.h>
#include <setjmp.h>
+#include <sys/types.h>
+#include <sys/time.h>
#include <netdb.h>
#ifdef SYS_WINNT
# include <io.h>
@@ -21,10 +27,10 @@
#define closesocket close
#endif /* SYS_WINNT */
-#ifdef HAVE_LIBREADLINE
+#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
# include <readline/readline.h>
# include <readline/history.h>
-#endif /* HAVE_LIBREADLINE */
+#endif /* HAVE_LIBREADLINE || HAVE_LIBEDIT */
#ifdef SYS_VXWORKS
/* vxWorks needs mode flag -casey*/
@@ -43,12 +49,11 @@ const char *prompt = "ntpq> "; /* prompt to ask him about */
/*
* Keyid used for authenticated requests. Obtained on the fly.
*/
-u_long info_auth_keyid = NTP_MAXKEY;
+u_long info_auth_keyid = 0;
/*
- * Type of key md5 or des
+ * Type of key md5
*/
-#define KEY_TYPE_DES 3
#define KEY_TYPE_MD5 4
static int info_auth_keytype = KEY_TYPE_MD5; /* MD5 */
@@ -166,7 +171,6 @@ struct ctl_var peer_var[] = {
{ CP_FILTERROR, AR, "filtdisp" }, /* 34 */
{ CP_FLASH, FX, "flash" }, /* 35 */
{ CP_TTL, UI, "ttl" }, /* 36 */
- { CP_TTLMAX, UI, "ttlmax" }, /* 37 */
/*
* These are duplicate entries so that we can
* process deviant version of the ntp protocol.
@@ -292,8 +296,8 @@ struct xcmd builtins[] = {
{ "delay", auth_delay, { OPT|INT, NO, NO, NO },
{ "msec", "", "", "" },
"set the delay added to encryption time stamps" },
- { "host", host, { OPT|STR, NO, NO, NO },
- { "hostname", "", "", "" },
+ { "host", host, { OPT|STR, OPT|STR, NO, NO },
+ { "-4|-6", "hostname", "", "" },
"specify the host whose NTP server we talk to" },
{ "poll", ntp_poll, { OPT|UINT, OPT|STR, NO, NO },
{ "n", "verbose", "", "" },
@@ -345,7 +349,7 @@ struct xcmd builtins[] = {
#define DEFTIMEOUT (5) /* 5 second time out */
#define DEFSTIMEOUT (2) /* 2 second time out after first */
#define DEFDELAY 0x51EB852 /* 20 milliseconds, l_fp fraction */
-#define DEFHOST "127.0.0.1" /* default host name */
+#define DEFHOST "localhost" /* default host name */
#define LENHOSTNAME 256 /* host name is 256 characters long */
#define MAXCMDS 100 /* maximum commands on cmd line */
#define MAXHOSTS 200 /* maximum hosts on cmd line */
@@ -365,13 +369,14 @@ char currenthost[LENHOSTNAME]; /* current host name */
struct sockaddr_in hostaddr = { 0 }; /* host address */
int showhostnames = 1; /* show host names by default */
-int sockfd; /* fd socket is opened on */
+int ai_fam_templ; /* address family */
+int ai_fam_default; /* default address family */
+SOCKET sockfd; /* fd socket is opened on */
int havehost = 0; /* set to 1 when host open */
+int s_port = 0;
struct servent *server_entry = NULL; /* server entry for ntp */
#ifdef SYS_WINNT
-WORD wVersionRequested;
-WSADATA wsaData;
DWORD NumberOfBytesWritten;
HANDLE TimerThreadHandle = NULL; /* 1998/06/03 - Used in ntplib/machines.c */
@@ -496,9 +501,29 @@ ntpqmain(
delay_time.l_ui = 0;
delay_time.l_uf = DEFDELAY;
+#ifdef SYS_WINNT
+ if (!Win32InitSockets())
+ {
+ fprintf(stderr, "No useable winsock.dll:");
+ exit(1);
+ }
+#endif /* SYS_WINNT */
+
+ /* Check to see if we have IPv6. Otherwise force the -4 flag */
+ if (isc_net_probeipv6() != ISC_R_SUCCESS) {
+ ai_fam_default = AF_INET;
+ }
+
progname = argv[0];
- while ((c = ntp_getopt(argc, argv, "c:dinp")) != EOF)
+ ai_fam_templ = ai_fam_default;
+ while ((c = ntp_getopt(argc, argv, "46c:dinp")) != EOF)
switch (c) {
+ case '4':
+ ai_fam_templ = AF_INET;
+ break;
+ case '6':
+ ai_fam_templ = AF_INET6;
+ break;
case 'c':
ADDCMD(ntp_optarg);
break;
@@ -520,7 +545,7 @@ ntpqmain(
}
if (errflg) {
(void) fprintf(stderr,
- "usage: %s [-dinp] [-c cmd] host ...\n",
+ "usage: %s [-46dinp] [-c cmd] host ...\n",
progname);
exit(2);
}
@@ -541,14 +566,6 @@ ntpqmain(
(void) signal_no_reset(SIGINT, abortcmd);
#endif /* SYS_WINNT */
-#ifdef SYS_WINNT
- wVersionRequested = MAKEWORD(1,1);
- if (WSAStartup(wVersionRequested, &wsaData)) {
- fprintf(stderr, "No useable winsock.dll");
- exit(1);
- }
-#endif /* SYS_WINNT */
-
if (numcmds == 0) {
(void) openhost(chosts[0]);
getcmds();
@@ -577,29 +594,69 @@ openhost(
const char *hname
)
{
- u_int32 netnum;
char temphost[LENHOSTNAME];
+ int a_info, i;
+ struct addrinfo hints, *ai = NULL;
+ register const char *cp;
+ char name[LENHOSTNAME];
+ char service[5];
- if (server_entry == NULL) {
- server_entry = getservbyname("ntp", "udp");
- if (server_entry == NULL) {
-#ifdef VMS /* UCX getservbyname() doesn't work [yet], but we do know better */
- server_entry = (struct servent *)
- malloc(sizeof(struct servent));
- server_entry->s_port = htons(NTP_PORT);
-#else
- (void) fprintf(stderr, "%s: ntp/udp: unknown service\n",
- progname);
- exit(1);
-#endif /* VMS & UCX */
- }
- if (debug > 2)
- printf("Got ntp/udp service entry\n");
+ /*
+ * We need to get by the [] if they were entered
+ */
+
+ cp = hname;
+
+ if(*cp == '[') {
+ cp++;
+ for(i = 0; *cp != ']'; cp++, i++)
+ name[i] = *cp;
+ name[i] = '\0';
+ hname = name;
+ }
+
+ /*
+ * First try to resolve it as an ip address and if that fails,
+ * do a fullblown (dns) lookup. That way we only use the dns
+ * when it is needed and work around some implementations that
+ * will return an "IPv4-mapped IPv6 address" address if you
+ * give it an IPv4 address to lookup.
+ */
+ strcpy(service, "ntp");
+ memset((char *)&hints, 0, sizeof(struct addrinfo));
+ hints.ai_family = ai_fam_templ;
+ hints.ai_protocol = IPPROTO_UDP;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_flags = AI_NUMERICHOST;
+
+ a_info = getaddrinfo(hname, service, &hints, &ai);
+ if (a_info == EAI_NONAME || a_info == EAI_NODATA) {
+ hints.ai_flags = AI_CANONNAME;
+#ifdef AI_ADDRCONFIG
+ hints.ai_flags |= AI_ADDRCONFIG;
+#endif
+ a_info = getaddrinfo(hname, service, &hints, &ai);
+ }
+ /* Some older implementations don't like AI_ADDRCONFIG. */
+ if (a_info == EAI_BADFLAGS) {
+ hints.ai_flags = AI_CANONNAME;
+ a_info = getaddrinfo(hname, service, &hints, &ai);
+ }
+ if (a_info != 0) {
+ (void) fprintf(stderr, "%s\n", gai_strerror(a_info));
+ return 0;
+ }
+
+ if (ai->ai_canonname == NULL) {
+ strncpy(temphost, stoa((struct sockaddr_storage *)ai->ai_addr),
+ LENHOSTNAME);
+ temphost[LENHOSTNAME-1] = '\0';
+
+ } else {
+ strncpy(temphost, ai->ai_canonname, LENHOSTNAME);
+ temphost[LENHOSTNAME-1] = '\0';
}
- if (!getnetnum(hname, &netnum, temphost))
- return 0;
-
if (debug > 2)
printf("Opening host %s\n", temphost);
@@ -611,13 +668,17 @@ openhost(
}
(void) strcpy(currenthost, temphost);
- hostaddr.sin_family = AF_INET;
-#ifndef SYS_VXWORKS
- hostaddr.sin_port = server_entry->s_port;
-#else
- hostaddr.sin_port = htons(SERVER_PORT_NUM);
-#endif
- hostaddr.sin_addr.s_addr = netnum;
+ /* port maps to the same location in both families */
+ s_port = ((struct sockaddr_in6 *)ai->ai_addr)->sin6_port;
+#ifdef SYS_VXWORKS
+ ((struct sockaddr_in6 *)&hostaddr)->sin6_port = htons(SERVER_PORT_NUM);
+ if (ai->ai_family == AF_INET)
+ *(struct sockaddr_in *)&hostaddr=
+ *((struct sockaddr_in *)ai->ai_addr);
+ else
+ *(struct sockaddr_in6 *)&hostaddr=
+ *((struct sockaddr_in6 *)ai->ai_addr);
+#endif /* SYS_VXWORKS */
#ifdef SYS_WINNT
{
@@ -629,18 +690,12 @@ openhost(
exit(1);
}
}
+#endif /* SYS_WINNT */
-
- sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+ sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
if (sockfd == INVALID_SOCKET) {
error("socket", "", "");
- exit(-1);
}
-#else
- sockfd = socket(AF_INET, SOCK_DGRAM, 0);
- if (sockfd == -1)
- error("socket", "", "");
-#endif /* SYS_WINNT */
#ifdef NEED_RCVBUF_SLOP
@@ -653,10 +708,16 @@ openhost(
# endif
#endif
+#ifdef SYS_VXWORKS
if (connect(sockfd, (struct sockaddr *)&hostaddr,
sizeof(hostaddr)) == -1)
+#else
+ if (connect(sockfd, (struct sockaddr *)ai->ai_addr,
+ ai->ai_addrlen) == -1)
+#endif /* SYS_VXWORKS */
error("connect", "", "");
-
+ if (a_info == 0)
+ freeaddrinfo(ai);
havehost = 1;
return 1;
}
@@ -1069,7 +1130,7 @@ sendrequest(
* Fill in the packet
*/
qpkt.li_vn_mode = PKT_LI_VN_MODE(0, pktversion, MODE_CONTROL);
- qpkt.r_m_e_op = (u_char)opcode & CTL_OP_MASK;
+ qpkt.r_m_e_op = (u_char)(opcode & CTL_OP_MASK);
qpkt.sequence = htons(sequence);
qpkt.status = 0;
qpkt.associd = htons((u_short)associd);
@@ -1115,23 +1176,22 @@ sendrequest(
* Get the keyid and the password if we don't have one.
*/
if (info_auth_keyid == 0) {
- maclen = getkeyid("Keyid: ");
- if (maclen == 0) {
+ int u_keyid = getkeyid("Keyid: ");
+ if (u_keyid == 0 || u_keyid > NTP_MAXKEY) {
(void) fprintf(stderr,
"Invalid key identifier\n");
return 1;
}
+ info_auth_keyid = u_keyid;
}
if (!authistrusted(info_auth_keyid)) {
- pass = getpass((info_auth_keytype == KEY_TYPE_DES)
- ? "DES Password: " : "MD5 Password: ");
+ pass = getpass("MD5 Password: ");
if (*pass == '\0') {
(void) fprintf(stderr,
"Invalid password\n");
return (1);
}
}
- info_auth_keyid = maclen;
authusekey(info_auth_keyid, info_auth_keytype, (const u_char *)pass);
authtrust(info_auth_keyid, 1);
@@ -1264,7 +1324,7 @@ doquery(
static void
getcmds(void)
{
-#ifdef HAVE_LIBREADLINE
+#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
char *line;
for (;;) {
@@ -1273,7 +1333,7 @@ getcmds(void)
docmd(line);
free(line);
}
-#else /* not HAVE_LIBREADLINE */
+#else /* not (HAVE_LIBREADLINE || HAVE_LIBEDIT) */
char line[MAXLINE];
for (;;) {
@@ -1290,10 +1350,10 @@ getcmds(void)
docmd(line);
}
-#endif /* not HAVE_LIBREADLINE */
+#endif /* not (HAVE_LIBREADLINE || HAVE_LIBEDIT) */
}
-
+#ifndef SYS_WINNT /* Under NT cannot handle SIGINT, WIN32 spawns a handler */
/*
* abortcmd - catch interrupts and abort the current command
*/
@@ -1308,7 +1368,7 @@ abortcmd(
(void) fflush(stderr);
if (jump) longjmp(interrupt_buf, 1);
}
-
+#endif /* SYS_WINNT */
/*
* docmd - decode the command line and execute a command
@@ -1521,7 +1581,7 @@ getarg(
argp->string = str;
break;
case ADD:
- if (!getnetnum(str, &(argp->netnum), (char *)0)) {
+ if (!getnetnum(str, &(argp->netnum), (char *)0, 0)) {
return 0;
}
break;
@@ -1538,10 +1598,14 @@ getarg(
return 0;
}
if (isneg > numassoc) {
- (void) fprintf(stderr,
- "***Association for `%s' unknown (max &%d)\n",
- str, numassoc);
- return 0;
+ if (numassoc == 0) {
+ (void) fprintf(stderr,
+ "***Association for `%s' unknown (max &%d)\n",
+ str, numassoc);
+ return 0;
+ } else {
+ isneg = numassoc;
+ }
}
argp->uval = assoc_cache[isneg-1].assid;
break;
@@ -1573,6 +1637,17 @@ getarg(
argp->ival = -argp->ival;
}
break;
+ case IP_VERSION:
+ if (!strcmp("-6", str))
+ argp->ival = 6 ;
+ else if (!strcmp("-4", str))
+ argp->ival = 4 ;
+ else {
+ (void) fprintf(stderr,
+ "***Version must be either 4 or 6\n");
+ return 0;
+ }
+ break;
}
return 1;
@@ -1586,25 +1661,37 @@ getarg(
int
getnetnum(
const char *hname,
- u_int32 *num,
- char *fullhost
+ struct sockaddr_storage *num,
+ char *fullhost,
+ int af
)
{
- struct hostent *hp;
-
+ int err;
+ int sockaddr_len;
+ struct addrinfo hints, *ai = NULL;
+
+ sockaddr_len = (af == AF_INET)
+ ? sizeof(struct sockaddr_in)
+ : sizeof(struct sockaddr_in6);
+ memset((char *)&hints, 0, sizeof(struct addrinfo));
+ hints.ai_flags = AI_CANONNAME;
+#ifdef AI_ADDRCONFIG
+ hints.ai_flags |= AI_ADDRCONFIG;
+#endif
+
+ /* decodenetnum works with addresses only */
if (decodenetnum(hname, num)) {
if (fullhost != 0) {
- (void) sprintf(fullhost, "%lu.%lu.%lu.%lu",
- (u_long)((htonl(*num) >> 24) & 0xff),
- (u_long)((htonl(*num) >> 16) & 0xff),
- (u_long)((htonl(*num) >> 8) & 0xff),
- (u_long)(htonl(*num) & 0xff));
+ getnameinfo((struct sockaddr *)num, sockaddr_len,
+ fullhost, sizeof(fullhost), NULL, 0,
+ NI_NUMERICHOST);
+
}
return 1;
- } else if ((hp = gethostbyname(hname)) != 0) {
- memmove((char *)num, hp->h_addr, sizeof(u_int32));
- if (fullhost != 0)
- (void) strcpy(fullhost, hp->h_name);
+ } else if ((err = getaddrinfo(hname, "ntp", &hints, &ai)) == 0) {
+ memmove((char *)num, ai->ai_addr, ai->ai_addrlen);
+ if (ai->ai_canonname != 0)
+ (void) strcpy(fullhost, ai->ai_canonname);
return 1;
} else {
(void) fprintf(stderr, "***Can't find host %s\n", hname);
@@ -1619,14 +1706,14 @@ getnetnum(
*/
char *
nntohost(
- u_int32 netnum
+ struct sockaddr_storage *netnum
)
{
if (!showhostnames)
- return numtoa(netnum);
- if ((ntohl(netnum) & REFCLOCK_MASK) == REFCLOCK_ADDR)
- return refnumtoa(netnum);
- return numtohost(netnum);
+ return stoa(netnum);
+ if ((netnum->ss_family == AF_INET) && ISREFCLOCKADR(netnum))
+ return refnumtoa(netnum);
+ return socktohost(netnum);
}
@@ -1671,10 +1758,10 @@ rtdatetolfp(
return 0;
}
- cal.monthday = *cp++ - '0'; /* ascii dependent */
+ cal.monthday = (u_char) (*cp++ - '0'); /* ascii dependent */
if (isdigit((int)*cp)) {
- cal.monthday = (cal.monthday << 3) + (cal.monthday << 1);
- cal.monthday += *cp++ - '0';
+ cal.monthday = (u_char)((cal.monthday << 3) + (cal.monthday << 1));
+ cal.monthday = (u_char)(cal.monthday + *cp++ - '0');
}
if (*cp++ != '-')
@@ -1689,25 +1776,25 @@ rtdatetolfp(
break;
if (i == 12)
return 0;
- cal.month = i + 1;
+ cal.month = (u_char)(i + 1);
if (*cp++ != '-')
return 0;
if (!isdigit((int)*cp))
return 0;
- cal.year = *cp++ - '0';
+ cal.year = (u_short)(*cp++ - '0');
if (isdigit((int)*cp)) {
- cal.year = (cal.year << 3) + (cal.year << 1);
- cal.year += *cp++ - '0';
+ cal.year = (u_short)((cal.year << 3) + (cal.year << 1));
+ cal.year = (u_short)(*cp++ - '0');
}
if (isdigit((int)*cp)) {
- cal.year = (cal.year << 3) + (cal.year << 1);
- cal.year += *cp++ - '0';
+ cal.year = (u_short)((cal.year << 3) + (cal.year << 1));
+ cal.year = (u_short)(cal.year + *cp++ - '0');
}
if (isdigit((int)*cp)) {
- cal.year = (cal.year << 3) + (cal.year << 1);
- cal.year += *cp++ - '0';
+ cal.year = (u_short)((cal.year << 3) + (cal.year << 1));
+ cal.year = (u_short)(cal.year + *cp++ - '0');
}
/*
@@ -1720,26 +1807,26 @@ rtdatetolfp(
if (*cp++ != ' ' || !isdigit((int)*cp))
return 0;
- cal.hour = *cp++ - '0';
+ cal.hour = (u_char)(*cp++ - '0');
if (isdigit((int)*cp)) {
- cal.hour = (cal.hour << 3) + (cal.hour << 1);
- cal.hour += *cp++ - '0';
+ cal.hour = (u_char)((cal.hour << 3) + (cal.hour << 1));
+ cal.hour = (u_char)(cal.hour + *cp++ - '0');
}
if (*cp++ != ':' || !isdigit((int)*cp))
return 0;
- cal.minute = *cp++ - '0';
+ cal.minute = (u_char)(*cp++ - '0');
if (isdigit((int)*cp)) {
- cal.minute = (cal.minute << 3) + (cal.minute << 1);
- cal.minute += *cp++ - '0';
+ cal.minute = (u_char)((cal.minute << 3) + (cal.minute << 1));
+ cal.minute = (u_char)(cal.minute + *cp++ - '0');
}
if (*cp++ != ':' || !isdigit((int)*cp))
return 0;
- cal.second = *cp++ - '0';
+ cal.second = (u_char)(*cp++ - '0');
if (isdigit((int)*cp)) {
- cal.second = (cal.second << 3) + (cal.second << 1);
- cal.second += *cp++ - '0';
+ cal.second = (u_char)((cal.second << 3) + (cal.second << 1));
+ cal.second = (u_char)(cal.second + *cp++ - '0');
}
/*
@@ -1828,8 +1915,8 @@ decodeint(
{
if (*str == '0') {
if (*(str+1) == 'x' || *(str+1) == 'X')
- return hextoint(str+2, (u_long *)&val);
- return octtoint(str, (u_long *)&val);
+ return hextoint(str+2, (void *)&val);
+ return octtoint(str, (void *)&val);
}
return atoint(str, val);
}
@@ -1975,8 +2062,8 @@ helpsort(
const void *t2
)
{
- const char **name1 = (const char **)t1;
- const char **name2 = (const char **)t2;
+ char const * const * name1 = (char const * const *)t1;
+ char const * const * name2 = (char const * const *)t2;
return strcmp(*name1, *name2);
}
@@ -2079,12 +2166,34 @@ host(
FILE *fp
)
{
+ int i;
+
if (pcmd->nargs == 0) {
if (havehost)
(void) fprintf(fp, "current host is %s\n", currenthost);
else
(void) fprintf(fp, "no current host\n");
- } else if (openhost(pcmd->argval[0].string)) {
+ return;
+ }
+
+ i = 0;
+ ai_fam_templ = ai_fam_default;
+ if (pcmd->nargs == 2) {
+ if (!strcmp("-4", pcmd->argval[i].string))
+ ai_fam_templ = AF_INET;
+ else if (!strcmp("-6", pcmd->argval[i].string))
+ ai_fam_templ = AF_INET6;
+ else {
+ if (havehost)
+ (void) fprintf(fp,
+ "current host remains %s\n", currenthost);
+ else
+ (void) fprintf(fp, "still no current host\n");
+ return;
+ }
+ i = 1;
+ }
+ if (openhost(pcmd->argval[i].string)) {
(void) fprintf(fp, "current host set to %s\n", currenthost);
numassoc = 0;
} else {
@@ -2121,11 +2230,14 @@ keyid(
)
{
if (pcmd->nargs == 0) {
- if (info_auth_keyid > NTP_MAXKEY)
+ if (info_auth_keyid == 0)
(void) fprintf(fp, "no keyid defined\n");
else
(void) fprintf(fp, "keyid is %lu\n", (u_long)info_auth_keyid);
} else {
+ /* allow zero so that keyid can be cleared. */
+ if(pcmd->argval[0].uval > NTP_MAXKEY)
+ (void) fprintf(fp, "Invalid key identifier\n");
info_auth_keyid = pcmd->argval[0].uval;
}
}
@@ -2141,7 +2253,7 @@ keytype(
{
if (pcmd->nargs == 0)
fprintf(fp, "keytype is %s\n",
- (info_auth_keytype == KEY_TYPE_MD5) ? "MD5" : "DES");
+ (info_auth_keytype == KEY_TYPE_MD5) ? "MD5" : "???");
else
switch (*(pcmd->argval[0].string)) {
case 'm':
@@ -2149,13 +2261,8 @@ keytype(
info_auth_keytype = KEY_TYPE_MD5;
break;
- case 'd':
- case 'D':
- info_auth_keytype = KEY_TYPE_DES;
- break;
-
default:
- fprintf(fp, "keytype must be 'md5' or 'des'\n");
+ fprintf(fp, "keytype must be 'md5'\n");
}
}
@@ -2173,21 +2280,21 @@ passwd(
{
char *pass;
- if (info_auth_keyid > NTP_MAXKEY) {
- info_auth_keyid = getkeyid("Keyid: ");
- if (info_auth_keyid > NTP_MAXKEY) {
- (void)fprintf(fp, "Keyid must be defined\n");
+ if (info_auth_keyid == 0) {
+ int u_keyid = getkeyid("Keyid: ");
+ if (u_keyid == 0 || u_keyid > NTP_MAXKEY) {
+ (void)fprintf(fp, "Invalid key identifier\n");
return;
}
+ info_auth_keyid = u_keyid;
}
- pass = getpass((info_auth_keytype == KEY_TYPE_DES)
- ? "DES Password: "
- : "MD5 Password: "
- );
+ pass = getpass("MD5 Password: ");
if (*pass == '\0')
(void) fprintf(fp, "Password unchanged\n");
- else
+ else {
authusekey(info_auth_keyid, info_auth_keytype, (u_char *)pass);
+ authtrust(info_auth_keyid, 1);
+ }
}
@@ -2412,7 +2519,7 @@ getkeyid(
fprintf(stderr, "%s", keyprompt); fflush(stderr);
for (p=pbuf; (c = getc(fi))!='\n' && c!=EOF;) {
if (p < &pbuf[18])
- *p++ = c;
+ *p++ = (char)c;
}
*p = '\0';
if (fi != stdin)
@@ -2460,7 +2567,7 @@ atoascii(
if (c < ' ') {
*ocp++ = '^';
- *ocp++ = c + '@';
+ *ocp++ = (u_char)(c + '@');
} else if (c == 0177) {
*ocp++ = '^';
*ocp++ = '?';
@@ -2885,12 +2992,12 @@ cookedprint(
register int varid;
char *name;
char *value;
- int output_raw;
+ char output_raw;
int fmt;
struct ctl_var *varlist;
l_fp lfp;
long ival;
- u_int32 hval;
+ struct sockaddr_storage hval;
u_long uval;
l_fp lfparr[8];
int narr;
@@ -2969,10 +3076,11 @@ cookedprint(
case NA:
if (!decodenetnum(value, &hval))
output_raw = '?';
- else if (fmt == HA)
- output(fp, name, nntohost(hval));
- else
- output(fp, name, numtoa(hval));
+ else if (fmt == HA){
+ output(fp, name, nntohost(&hval));
+ } else {
+ output(fp, name, stoa(&hval));
+ }
break;
case ST:
@@ -2980,9 +3088,14 @@ cookedprint(
break;
case RF:
- if (decodenetnum(value, &hval))
- output(fp, name, nntohost(hval));
- else if ((int)strlen(value) <= 4)
+ if (decodenetnum(value, &hval)) {
+ if ((hval.ss_family == AF_INET) &&
+ ISREFCLOCKADR(&hval))
+ output(fp, name,
+ refnumtoa(&hval));
+ else
+ output(fp, name, stoa(&hval));
+ } else if ((int)strlen(value) <= 4)
output(fp, name, value);
else
output_raw = '?';
diff --git a/contrib/ntp/ntpq/ntpq.h b/contrib/ntp/ntpq/ntpq.h
index 8739cd4772d8..1bb102847f57 100644
--- a/contrib/ntp/ntpq/ntpq.h
+++ b/contrib/ntp/ntpq/ntpq.h
@@ -22,6 +22,7 @@
#define UINT 0x2 /* unsigned integer */
#define INT 0x3 /* signed integer */
#define ADD 0x4 /* IP network address */
+#define IP_VERSION 0x5 /* IP address family */
/*
* Arguments are returned in a union
@@ -30,7 +31,7 @@ typedef union {
char *string;
long ival;
u_long uval;
- u_int32 netnum;
+ struct sockaddr_storage netnum;
} arg_v;
/*
@@ -76,10 +77,10 @@ struct ctl_var {
};
extern void asciize P((int, char *, FILE *));
-extern int getnetnum P((const char *, u_int32 *, char *));
+extern int getnetnum P((const char *, struct sockaddr_storage *, char *, int));
extern void sortassoc P((void));
extern int doquery P((int, int, int, int, char *, u_short *, int *, char **));
-extern char * nntohost P((u_int32));
+extern char * nntohost P((struct sockaddr_storage *));
extern int decodets P((char *, l_fp *));
extern int decodeuint P((char *, u_long *));
extern int nextvar P((int *, char **, char **, char **));
diff --git a/contrib/ntp/ntpq/ntpq_ops.c b/contrib/ntp/ntpq/ntpq_ops.c
index c90750304066..c4936313eb58 100644
--- a/contrib/ntp/ntpq/ntpq_ops.c
+++ b/contrib/ntp/ntpq/ntpq_ops.c
@@ -1,15 +1,16 @@
/*
- * ntpdc_ops.c - subroutines which are called to perform operations by ntpdc
+ * ntpq_ops.c - subroutines which are called to perform operations by ntpq
*/
#include <stdio.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <netdb.h>
#include "ntpq.h"
#include "ntp_stdlib.h"
-#include <ctype.h>
-#include <netdb.h>
-
extern char * chosts[];
extern char currenthost[];
extern int numhosts;
@@ -55,12 +56,12 @@ static void radiostatus P((struct parse *, FILE *));
static void pstatus P((struct parse *, FILE *));
static long when P((l_fp *, l_fp *, l_fp *));
static char * prettyinterval P((char *, long));
-static int doprintpeers P((struct varlist *, int, int, int, char *, FILE *));
-static int dogetpeers P((struct varlist *, int, FILE *));
-static void dopeers P((int, FILE *));
+static int doprintpeers P((struct varlist *, int, int, int, char *, FILE *, int));
+static int dogetpeers P((struct varlist *, int, FILE *, int));
+static void dopeers P((int, FILE *, int));
static void peers P((struct parse *, FILE *));
static void lpeers P((struct parse *, FILE *));
-static void doopeers P((int, FILE *));
+static void doopeers P((int, FILE *, int));
static void opeers P((struct parse *, FILE *));
static void lopeers P((struct parse *, FILE *));
@@ -138,20 +139,20 @@ struct xcmd opcmds[] = {
{ "pstatus", pstatus, { UINT, NO, NO, NO },
{ "assocID", "", "", "" },
"print status information returned for a peer" },
- { "peers", peers, { NO, NO, NO, NO },
- { "", "", "", "" },
- "obtain and print a list of the server's peers" },
- { "lpeers", lpeers, { NO, NO, NO, NO },
- { "", "", "", "" },
- "obtain and print a list of all peers and clients" },
- { "opeers", opeers, { NO, NO, NO, NO },
- { "", "", "", "" },
- "print peer list the old way, with dstadr shown rather than refid" },
- { "lopeers", lopeers, { NO, NO, NO, NO },
- { "", "", "", "" },
- "obtain and print a list of all peers and clients showing dstadr" },
+ { "peers", peers, { OPT|IP_VERSION, NO, NO, NO },
+ { "-4|-6", "", "", "" },
+ "obtain and print a list of the server's peers [IP version]" },
+ { "lpeers", lpeers, { OPT|IP_VERSION, NO, NO, NO },
+ { "-4|-6", "", "", "" },
+ "obtain and print a list of all peers and clients [IP version]" },
+ { "opeers", opeers, { OPT|IP_VERSION, NO, NO, NO },
+ { "-4|-6", "", "", "" },
+ "print peer list the old way, with dstadr shown rather than refid [IP version]" },
+ { "lopeers", lopeers, { OPT|IP_VERSION, NO, NO, NO },
+ { "-4|-6", "", "", "" },
+ "obtain and print a list of all peers and clients showing dstadr [IP version]" },
{ 0, 0, { NO, NO, NO, NO },
- { "", "", "", "" }, "" }
+ { "-4|-6", "", "", "" }, "" }
};
@@ -864,7 +865,7 @@ dogetassoc(
u_short rstatus;
res = doquery(CTL_OP_READSTAT, 0, 0, 0, (char *)0, &rstatus,
- &dsize, (char **)&datap);
+ &dsize, (void *)&datap);
if (res != 0)
return 0;
@@ -931,7 +932,7 @@ printassoc(
(void) fprintf(fp,
"===========================================================\n");
for (i = 0; i < numassoc; i++) {
- statval = CTL_PEER_STATVAL(assoc_cache[i].status);
+ statval = (u_char) CTL_PEER_STATVAL(assoc_cache[i].status);
if (!showall && !(statval & (CTL_PST_CONFIG|CTL_PST_REACH)))
continue;
event = CTL_PEER_EVENT(assoc_cache[i].status);
@@ -1231,6 +1232,38 @@ prettyinterval(
return buf;
}
+static char
+decodeaddrtype(
+ struct sockaddr_storage *sock
+ )
+{
+ char ch = '-';
+ u_int32 dummy;
+ struct sockaddr_in6 *sin6;
+
+ switch(sock->ss_family) {
+ case AF_INET:
+ dummy = ((struct sockaddr_in *)sock)->sin_addr.s_addr;
+ dummy = ntohl(dummy);
+ ch = (char)(((dummy&0xf0000000)==0xe0000000) ? 'm' :
+ ((dummy&0x000000ff)==0x000000ff) ? 'b' :
+ ((dummy&0xffffffff)==0x7f000001) ? 'l' :
+ ((dummy&0xffffffe0)==0x00000000) ? '-' :
+ 'u');
+ break;
+ case AF_INET6:
+ sin6 = (struct sockaddr_in6 *)sock;
+ if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))
+ ch = 'm';
+ else
+ ch = 'u';
+ break;
+ default:
+ ch = '-';
+ break;
+ }
+ return ch;
+}
/*
* A list of variables required by the peers command
@@ -1295,22 +1328,23 @@ doprintpeers(
int rstatus,
int datalen,
char *data,
- FILE *fp
+ FILE *fp,
+ int af
)
{
char *name;
- char *value;
+ char *value = NULL;
int i;
int c;
- u_int32 srcadr;
- u_int32 dstadr;
- u_long srcport;
- const char *dstadr_refid = "0.0.0.0";
- u_long stratum;
- long ppoll;
- long hpoll;
- u_long reach;
+ struct sockaddr_storage srcadr;
+ struct sockaddr_storage dstadr;
+ u_long srcport = 0;
+ char *dstadr_refid = "0.0.0.0";
+ u_long stratum = 0;
+ long ppoll = 0;
+ long hpoll = 0;
+ u_long reach = 0;
l_fp estoffset;
l_fp estdelay;
l_fp estjitter;
@@ -1323,12 +1357,22 @@ doprintpeers(
char type = '?';
char refid_string[10];
char whenbuf[8], pollbuf[8];
+ char clock_name[LENHOSTNAME];
memset((char *)havevar, 0, sizeof(havevar));
get_systime(&ts);
+
+ memset((char *)&srcadr, 0, sizeof(struct sockaddr_storage));
+ memset((char *)&dstadr, 0, sizeof(struct sockaddr_storage));
+
+ /* Initialize by zeroing out estimate variables */
+ memset((char *)&estoffset, 0, sizeof(l_fp));
+ memset((char *)&estdelay, 0, sizeof(l_fp));
+ memset((char *)&estjitter, 0, sizeof(l_fp));
+ memset((char *)&estdisp, 0, sizeof(l_fp));
while (nextvar(&datalen, &data, &name, &value)) {
- u_int32 dummy;
+ struct sockaddr_storage dum_store;
i = findvar(name, peer_var);
if (i == 0)
@@ -1339,18 +1383,12 @@ doprintpeers(
havevar[HAVE_SRCADR] = 1;
break;
case CP_DSTADR:
- if (decodenetnum(value, &dummy)) {
- dummy = ntohl(dummy);
- type = ((dummy&0xf0000000)==0xe0000000) ? 'm' :
- ((dummy&0x000000ff)==0x000000ff) ? 'b' :
- ((dummy&0xffffffff)==0x7f000001) ? 'l' :
- ((dummy&0xffffffe0)==0x00000000) ? '-' :
- 'u';
- }
+ if (decodenetnum(value, &dum_store))
+ type = decodeaddrtype(&dum_store);
if (pvl == opeervarlist) {
if (decodenetnum(value, &dstadr)) {
havevar[HAVE_DSTADR] = 1;
- dstadr_refid = numtoa(dstadr);
+ dstadr_refid = stoa(&dstadr);
}
}
break;
@@ -1360,10 +1398,15 @@ doprintpeers(
if (*value == '\0') {
dstadr_refid = "0.0.0.0";
} else if (decodenetnum(value, &dstadr)) {
- if (dstadr == 0)
+ if (SOCKNUL(&dstadr))
dstadr_refid = "0.0.0.0";
+ else if ((dstadr.ss_family == AF_INET)
+ && ISREFCLOCKADR(&dstadr))
+ dstadr_refid =
+ refnumtoa(&dstadr);
else
- dstadr_refid = nntohost(dstadr);
+ dstadr_refid =
+ stoa(&dstadr);
} else if ((int)strlen(value) <= 4) {
refid_string[0] = '.';
(void) strcpy(&refid_string[1], value);
@@ -1449,15 +1492,21 @@ doprintpeers(
c = flash2[CTL_PEER_STATVAL(rstatus) & 0x3];
if (numhosts > 1)
(void) fprintf(fp, "%-*s ", maxhostlen, currenthost);
- (void) fprintf(fp,
- "%c%-15.15s %-15.15s %2ld %c %4.4s %4.4s %3lo %7.7s %8.7s %7.7s\n",
- c, nntohost(srcadr), dstadr_refid, stratum, type,
- prettyinterval(whenbuf, when(&ts, &rec, &reftime)),
- prettyinterval(pollbuf, (int)poll_sec), reach,
- lfptoms(&estdelay, 3), lfptoms(&estoffset, 3),
- havevar[HAVE_JITTER] ? lfptoms(&estjitter, 3) :
- lfptoms(&estdisp, 3));
- return (1);
+ if (af == 0 || srcadr.ss_family == af){
+ strcpy(clock_name, nntohost(&srcadr));
+
+ (void) fprintf(fp,
+ "%c%-15.15s %-15.15s %2ld %c %4.4s %4.4s %3lo %7.7s %8.7s %7.7s\n",
+ c, clock_name, dstadr_refid, stratum, type,
+ prettyinterval(whenbuf, when(&ts, &rec, &reftime)),
+ prettyinterval(pollbuf, (int)poll_sec), reach,
+ lfptoms(&estdelay, 3), lfptoms(&estoffset, 3),
+ havevar[HAVE_JITTER] ? lfptoms(&estjitter, 3) :
+ lfptoms(&estdisp, 3));
+ return (1);
+ }
+ else
+ return(1);
}
#undef HAVE_SRCADR
@@ -1485,7 +1534,8 @@ static int
dogetpeers(
struct varlist *pvl,
int associd,
- FILE *fp
+ FILE *fp,
+ int af
)
{
char *datap;
@@ -1514,8 +1564,7 @@ dogetpeers(
return 0;
}
-
- return doprintpeers(pvl, associd, (int)rstatus, dsize, datap, fp);
+ return doprintpeers(pvl, associd, (int)rstatus, dsize, datap, fp, af);
}
@@ -1525,27 +1574,26 @@ dogetpeers(
static void
dopeers(
int showall,
- FILE *fp
+ FILE *fp,
+ int af
)
{
register int i;
char fullname[LENHOSTNAME];
- u_int32 netnum;
+ struct sockaddr_storage netnum;
if (!dogetassoc(fp))
return;
- maxhostlen = 0;
- if (numhosts > 1) {
- for (i = 0; i < numhosts; ++i)
- { if(getnetnum(chosts[i],&netnum,fullname))
+ for (i = 0; i < numhosts; ++i) {
+ if (getnetnum(chosts[i], &netnum, fullname, af))
if ((int)strlen(fullname) > maxhostlen)
- maxhostlen = strlen(fullname);
- }
- (void) fprintf(fp, "%-*.*s ", maxhostlen, maxhostlen, "host");
+ maxhostlen = strlen(fullname);
}
- fprintf(fp,
- " remote refid st t when poll reach delay offset jitter\n");
+ if (numhosts > 1)
+ (void) fprintf(fp, "%-*.*s ", maxhostlen, maxhostlen, "host");
+ (void) fprintf(fp,
+ " remote refid st t when poll reach delay offset jitter\n");
if (numhosts > 1)
for (i = 0; i <= maxhostlen; ++i)
(void) fprintf(fp, "=");
@@ -1557,7 +1605,7 @@ dopeers(
!(CTL_PEER_STATVAL(assoc_cache[i].status)
& (CTL_PST_CONFIG|CTL_PST_REACH)))
continue;
- if (!dogetpeers(peervarlist, (int)assoc_cache[i].assid, fp)) {
+ if (!dogetpeers(peervarlist, (int)assoc_cache[i].assid, fp, af)) {
return;
}
}
@@ -1575,7 +1623,15 @@ peers(
FILE *fp
)
{
- dopeers(0, fp);
+ int af = 0;
+
+ if (pcmd->nargs == 1) {
+ if (pcmd->argval->ival == 6)
+ af = AF_INET6;
+ else
+ af = AF_INET;
+ }
+ dopeers(0, fp, af);
}
@@ -1589,7 +1645,15 @@ lpeers(
FILE *fp
)
{
- dopeers(1, fp);
+ int af = 0;
+
+ if (pcmd->nargs == 1) {
+ if (pcmd->argval->ival == 6)
+ af = AF_INET6;
+ else
+ af = AF_INET;
+ }
+ dopeers(1, fp, af);
}
@@ -1599,7 +1663,8 @@ lpeers(
static void
doopeers(
int showall,
- FILE *fp
+ FILE *fp,
+ int af
)
{
register int i;
@@ -1610,8 +1675,6 @@ doopeers(
(void) fprintf(fp,
" remote local st t when poll reach delay offset disp\n");
(void) fprintf(fp,
- " (s) (s) (ms) (ms) (ms)\n");
- (void) fprintf(fp,
"==============================================================================\n");
for (i = 0; i < numassoc; i++) {
@@ -1619,7 +1682,7 @@ doopeers(
!(CTL_PEER_STATVAL(assoc_cache[i].status)
& (CTL_PST_CONFIG|CTL_PST_REACH)))
continue;
- if (!dogetpeers(opeervarlist, (int)assoc_cache[i].assid, fp)) {
+ if (!dogetpeers(opeervarlist, (int)assoc_cache[i].assid, fp, af)) {
return;
}
}
@@ -1637,7 +1700,15 @@ opeers(
FILE *fp
)
{
- doopeers(0, fp);
+ int af = 0;
+
+ if (pcmd->nargs == 1) {
+ if (pcmd->argval->ival == 6)
+ af = AF_INET6;
+ else
+ af = AF_INET;
+ }
+ doopeers(0, fp, af);
}
@@ -1651,5 +1722,13 @@ lopeers(
FILE *fp
)
{
- doopeers(1, fp);
+ int af = 0;
+
+ if (pcmd->nargs == 1) {
+ if (pcmd->argval->ival == 6)
+ af = AF_INET6;
+ else
+ af = AF_INET;
+ }
+ doopeers(1, fp, af);
}
diff --git a/contrib/ntp/parseutil/Makefile.am b/contrib/ntp/parseutil/Makefile.am
index 2904f15e37e2..01f6bd264e47 100644
--- a/contrib/ntp/parseutil/Makefile.am
+++ b/contrib/ntp/parseutil/Makefile.am
@@ -7,5 +7,7 @@ ETAGS_ARGS = Makefile.am
DISTCLEANFILES = $(EXTRA_PROGRAMS)
#EXTRA_DIST= TAGS
-check-local: dcfd
- ./dcfd -Y
+check-local: @DCFD@
+ case "$(noinst_PROGRAMS)" in \
+ *dcfd*) ./dcfd -Y ;; \
+ esac
diff --git a/contrib/ntp/parseutil/Makefile.in b/contrib/ntp/parseutil/Makefile.in
index bc0f0398476b..fbaded69249f 100644
--- a/contrib/ntp/parseutil/Makefile.in
+++ b/contrib/ntp/parseutil/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,21 +94,65 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
noinst_PROGRAMS = @TESTDCF@ @DCFD@
EXTRA_PROGRAMS = testdcf dcfd
@@ -118,6 +160,7 @@ INCLUDES = -I$(top_srcdir)/include
ETAGS_ARGS = Makefile.am
DISTCLEANFILES = $(EXTRA_PROGRAMS)
subdir = parseutil
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -136,19 +179,16 @@ testdcf_LDADD = $(LDADD)
testdcf_DEPENDENCIES =
testdcf_LDFLAGS =
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/dcfd$U.Po $(DEPDIR)/testdcf$U.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dcfd$U.Po ./$(DEPDIR)/testdcf$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = dcfd.c testdcf.c
-DIST_COMMON = README Makefile.am Makefile.in
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
SOURCES = dcfd.c testdcf.c
all: all-am
@@ -159,9 +199,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu parseutil/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
@@ -183,80 +221,118 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dcfd$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/testdcf$U.Po@am__quote@
+ -test "$U" = "" || rm -f *_.c
-distclean-depend:
- -rm -rf $(DEPDIR)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcfd$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdcf$U.Po@am__quote@
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
dcfd_.c: dcfd.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcfd.c; then echo $(srcdir)/dcfd.c; else echo dcfd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dcfd_.c || rm -f dcfd_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcfd.c; then echo $(srcdir)/dcfd.c; else echo dcfd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
testdcf_.c: testdcf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/testdcf.c; then echo $(srcdir)/testdcf.c; else echo testdcf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > testdcf_.c || rm -f testdcf_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/testdcf.c; then echo $(srcdir)/testdcf.c; else echo testdcf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
dcfd_.$(OBJEXT) testdcf_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -269,7 +345,6 @@ check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -281,6 +356,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -288,7 +364,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@@ -299,9 +375,11 @@ clean: clean-am
clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -322,6 +400,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -329,23 +409,33 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-info-am
-.PHONY: GTAGS all all-am check check-am check-local clean clean-generic \
- clean-noinstPROGRAMS distclean distclean-compile \
- distclean-depend distclean-generic distclean-tags distdir dvi \
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+ clean-generic clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
- uninstall-info-am
+ mostlyclean-generic mostlyclean-kr pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-info-am
#EXTRA_DIST= TAGS
-check-local: dcfd
- ./dcfd -Y
+check-local: @DCFD@
+ case "$(noinst_PROGRAMS)" in \
+ *dcfd*) ./dcfd -Y ;; \
+ esac
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/ntp/parseutil/dcfd.c b/contrib/ntp/parseutil/dcfd.c
index 0ee465de0596..28fede716882 100644
--- a/contrib/ntp/parseutil/dcfd.c
+++ b/contrib/ntp/parseutil/dcfd.c
@@ -177,7 +177,7 @@ static char skip_adjust = 1; /* discard first adjustment (bad samples) */
*/
#define DCFB_ANNOUNCE 0x0001 /* switch time zone warning (DST switch) */
#define DCFB_DST 0x0002 /* DST in effect */
-#define DCFB_LEAP 0x0004 /* LEAP warning (1 hour prior to occurence) */
+#define DCFB_LEAP 0x0004 /* LEAP warning (1 hour prior to occurrence) */
#define DCFB_ALTERNATE 0x0008 /* alternate antenna used */
struct clocktime /* clock time broken up from time code */
@@ -1564,7 +1564,7 @@ main(
}
/*
- * loose terminal if in daemon operation
+ * lose terminal if in daemon operation
*/
if (!interactive)
detach();
@@ -1800,8 +1800,8 @@ main(
/*
* output interpreted DCF77 data
*/
- PRINTF(offsets ? "%s, %2d:%02d:%02d, %d.%02d.%02d, <%s%s%s%s> (%c%d.%06ds)" :
- "%s, %2d:%02d:%02d, %d.%02d.%02d, <%s%s%s%s>",
+ PRINTF(offsets ? "%s, %2ld:%02ld:%02d, %ld.%02ld.%02ld, <%s%s%s%s> (%c%ld.%06lds)" :
+ "%s, %2ld:%02ld:%02d, %ld.%02ld.%02ld, <%s%s%s%s>",
wday[clock_time.wday],
clock_time.hour, clock_time.minute, i, clock_time.day, clock_time.month,
clock_time.year,
diff --git a/contrib/ntp/parseutil/testdcf.c b/contrib/ntp/parseutil/testdcf.c
index afdc89db6a74..e3b71f319a37 100644
--- a/contrib/ntp/parseutil/testdcf.c
+++ b/contrib/ntp/parseutil/testdcf.c
@@ -28,7 +28,7 @@
*/
#define DCFB_ANNOUNCE 0x0001 /* switch time zone warning (DST switch) */
#define DCFB_DST 0x0002 /* DST in effect */
-#define DCFB_LEAP 0x0004 /* LEAP warning (1 hour prior to occurence) */
+#define DCFB_LEAP 0x0004 /* LEAP warning (1 hour prior to occurrence) */
#define DCFB_ALTERNATE 0x0008 /* alternate antenna used */
struct clocktime /* clock time broken up from time code */
diff --git a/contrib/ntp/scripts/Makefile.am b/contrib/ntp/scripts/Makefile.am
index b970602547dd..dc41963ea198 100644
--- a/contrib/ntp/scripts/Makefile.am
+++ b/contrib/ntp/scripts/Makefile.am
@@ -1,4 +1,4 @@
-bin_SCRIPTS = ntp-wait
+bin_SCRIPTS = ntp-wait ntptrace
noinst_SCRIPTS = calc_tickadj checktime freq_adj mkver ntpsweep ntpver plot_summary summary
EXTRA_DIST = fixautomakedepsmagic hpadjtime.sh monitoring ntp-close \
ntp-groper ntp-restart ntp-status rc1 rc2 stats support
diff --git a/contrib/ntp/scripts/Makefile.in b/contrib/ntp/scripts/Makefile.in
index 110c090804a7..ff2c46bb1e97 100644
--- a/contrib/ntp/scripts/Makefile.in
+++ b/contrib/ntp/scripts/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,80 +14,79 @@
@SET_MAKE@
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -94,37 +94,80 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
-
-bin_SCRIPTS = ntp-wait
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+bin_SCRIPTS = ntp-wait ntptrace
noinst_SCRIPTS = calc_tickadj checktime freq_adj mkver ntpsweep ntpver plot_summary summary
EXTRA_DIST = fixautomakedepsmagic hpadjtime.sh monitoring ntp-close \
ntp-groper ntp-restart ntp-status rc1 rc2 stats support
subdir = scripts
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = calc_tickadj checktime freq_adj mkver ntp-wait \
- ntpsweep ntpver plot_summary summary
+ ntpsweep ntptrace ntpver plot_summary summary
SCRIPTS = $(bin_SCRIPTS) $(noinst_SCRIPTS)
DIST_SOURCES =
-DIST_COMMON = README Makefile.am Makefile.in calc_tickadj.in \
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am calc_tickadj.in \
checktime.in freq_adj.in mkver.in ntp-wait.in ntpsweep.in \
- ntpver.in plot_summary.in summary.in
+ ntptrace.in ntpver.in plot_summary.in summary.in
all: all-am
.SUFFIXES:
@@ -132,45 +175,44 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu scripts/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
calc_tickadj: $(top_builddir)/config.status calc_tickadj.in
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
checktime: $(top_builddir)/config.status checktime.in
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
freq_adj: $(top_builddir)/config.status freq_adj.in
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mkver: $(top_builddir)/config.status mkver.in
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
ntp-wait: $(top_builddir)/config.status ntp-wait.in
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
ntpsweep: $(top_builddir)/config.status ntpsweep.in
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+ntptrace: $(top_builddir)/config.status ntptrace.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
ntpver: $(top_builddir)/config.status ntpver.in
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
plot_summary: $(top_builddir)/config.status plot_summary.in
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
summary: $(top_builddir)/config.status summary.in
- cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
- f="`echo $$p|sed '$(transform)'`"; \
- if test -f $$p; then \
- echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f; \
- elif test -f $(srcdir)/$$p; then \
- echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f; \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
+ $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
- f="`echo $$p|sed '$(transform)'`"; \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
@@ -178,6 +220,8 @@ uninstall-info-am:
tags: TAGS
TAGS:
+ctags: CTAGS
+CTAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -185,15 +229,26 @@ top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -206,7 +261,6 @@ all-am: Makefile $(SCRIPTS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -218,6 +272,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -225,7 +280,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -235,6 +290,7 @@ clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
+ -rm -f Makefile
distclean-am: clean-am distclean-generic
@@ -257,6 +313,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -264,6 +321,14 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-binSCRIPTS uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
@@ -272,8 +337,8 @@ uninstall-am: uninstall-binSCRIPTS uninstall-info-am
install-exec install-exec-am install-info install-info-am \
install-man install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic uninstall uninstall-am \
- uninstall-binSCRIPTS uninstall-info-am
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+ uninstall-am uninstall-binSCRIPTS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/ntp/scripts/ntptrace.in b/contrib/ntp/scripts/ntptrace.in
new file mode 100755
index 000000000000..8545b2cb008c
--- /dev/null
+++ b/contrib/ntp/scripts/ntptrace.in
@@ -0,0 +1,60 @@
+#! @PATH_PERL@ -w
+
+# John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org
+
+use Socket;
+use Getopt::Std;
+use vars qw($opt_n);
+
+$ntpq = "ntpq";
+
+getopts('n');
+
+$dodns = 1;
+$dodns = 0 if (defined($opt_n));
+
+$host = shift;
+$host ||= "127.0.0.1";
+
+for (;;) {
+ $stratum = 255;
+ $cmd = "$ntpq -n -c rv $host";
+ open(PH, $cmd . "|") || die "failed to start command $cmd: $!";
+ while (<PH>) {
+ $stratum = $1 if (/stratum=(\d+)/);
+ $peer = $1 if (/peer=(\d+)/);
+ # Very old servers report phase and not offset.
+ $offset = $1 if (/(?:offset|phase)=([^\s,]+)/);
+ $rootdelay = $1 if (/rootdelay=([^\s,]+)/);
+ $refid = $1 if (/refid=([^\s,]+)/);
+ }
+ close(PH) || die "$cmd failed";
+ last if ($stratum == 255);
+ $offset /= 1000;
+ $rootdelay /= 1000;
+ $dhost = $host;
+ # Only do lookups of IPv4 addresses. The standard lookup functions
+ # of perl only do IPv4 and I don't know if we should require extras.
+ if ($dodns && $host =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/) {
+ $iaddr = inet_aton($host);
+ $name = (gethostbyaddr($iaddr, AF_INET))[0];
+ $dhost = $name if (defined($name));
+ }
+ printf("%s: stratum %d, offset %f, root distance %f",
+ $dhost, $stratum, $offset, $rootdelay);
+ printf(", refid '%s'", $refid) if ($stratum == 1);
+ printf("\n");
+ last if ($stratum == 0 || $stratum == 1 || $stratum == 16);
+ last if ($refid =~ /^127\.127\.\d{1,3}\.\d{1,3}$/);
+
+ $cmd = "$ntpq -n -c \"pstat $peer\" $host";
+ open(PH, $cmd . "|") || die "failed to start command $cmd: $!";
+ $thost = "";
+ while (<PH>) {
+ $thost = $1, last if (/srcadr=(\S+),/);
+ }
+ close(PH) || die "$cmd failed";
+ last if ($thost eq "");
+ $host = $thost;
+}
+
diff --git a/contrib/ntp/sntp/Makefile.am b/contrib/ntp/sntp/Makefile.am
new file mode 100644
index 000000000000..ccb62d83b03d
--- /dev/null
+++ b/contrib/ntp/sntp/Makefile.am
@@ -0,0 +1,38 @@
+# Makefile for sntp
+# N.M. Maclaren, October 2000.
+
+# Take a look at README for the various preprocessor symbols, but they are
+# extremely unlikely to be needed on newer systems. You may prefer to change
+# LOCKNAME and SAVENAME to use /var/run (or even /tmp) rather than /etc. Note
+# that not all of the following system settings have been tested recently.
+
+AUTOMAKE_OPTIONS = foreign
+
+# Compiling this sort of ANSI C under SunOS 4.1 is a mug's game, because Sun's
+# Unix headers make GNU C vomit even in compatibility mode, but the following
+# will compile main.c and unix.c. At least two people have got it to work.
+# CC = gcc -ansi
+# CFLAGS = -O -DNONBLOCK_BROKEN
+# LDFLAGS =
+# LIBS = -lm
+
+# The following settings can be used under Linux. While adjtime is present,
+# it is completely broken (i.e. it will work only if xntp is running), so it
+# is a good idea to add -DADJTIME_MISSING.
+# CC = cc -DADJTIME_MISSING
+# CFLAGS = -O
+# LDFLAGS =
+# LIBS = -lm
+
+bin_PROGRAMS = sntp
+sntp_SOURCES = \
+ header.h \
+ internet.c \
+ internet.h \
+ kludges.h \
+ main.c \
+ socket.c \
+ timing.c \
+ unix.c \
+ $(EMPTY)
+
diff --git a/contrib/ntp/sntp/Makefile.in b/contrib/ntp/sntp/Makefile.in
new file mode 100644
index 000000000000..597dd978ecfe
--- /dev/null
+++ b/contrib/ntp/sntp/Makefile.in
@@ -0,0 +1,534 @@
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Makefile for sntp
+# N.M. Maclaren, October 2000.
+
+# Take a look at README for the various preprocessor symbols, but they are
+# extremely unlikely to be needed on newer systems. You may prefer to change
+# LOCKNAME and SAVENAME to use /var/run (or even /tmp) rather than /etc. Note
+# that not all of the following system settings have been tested recently.
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+
+AUTOMAKE_OPTIONS = foreign
+
+
+# Compiling this sort of ANSI C under SunOS 4.1 is a mug's game, because Sun's
+# Unix headers make GNU C vomit even in compatibility mode, but the following
+# will compile main.c and unix.c. At least two people have got it to work.
+# CC = gcc -ansi
+# CFLAGS = -O -DNONBLOCK_BROKEN
+# LDFLAGS =
+# LIBS = -lm
+
+# The following settings can be used under Linux. While adjtime is present,
+# it is completely broken (i.e. it will work only if xntp is running), so it
+# is a good idea to add -DADJTIME_MISSING.
+# CC = cc -DADJTIME_MISSING
+# CFLAGS = -O
+# LDFLAGS =
+# LIBS = -lm
+bin_PROGRAMS = sntp
+sntp_SOURCES = \
+ header.h \
+ internet.c \
+ internet.h \
+ kludges.h \
+ main.c \
+ socket.c \
+ timing.c \
+ unix.c \
+ $(EMPTY)
+
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = sntp$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_sntp_OBJECTS = internet.$(OBJEXT) main.$(OBJEXT) socket.$(OBJEXT) \
+ timing.$(OBJEXT) unix.$(OBJEXT) $(am__objects_1)
+sntp_OBJECTS = $(am_sntp_OBJECTS)
+sntp_LDADD = $(LDADD)
+sntp_DEPENDENCIES =
+sntp_LDFLAGS =
+
+DEFAULT_INCLUDES = -I. -I$(srcdir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/internet.Po ./$(DEPDIR)/main.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/socket.Po ./$(DEPDIR)/timing.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/unix.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(sntp_SOURCES)
+DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure \
+ Makefile.am aclocal.m4 config.guess config.sub configure \
+ configure.ac depcomp install-sh missing mkinstalldirs
+SOURCES = $(sntp_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4): configure.ac
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+sntp$(EXEEXT): $(sntp_OBJECTS) $(sntp_DEPENDENCIES)
+ @rm -f sntp$(EXEEXT)
+ $(LINK) $(sntp_LDFLAGS) $(sntp_OBJECTS) $(sntp_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/internet.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timing.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+distdir = $(PACKAGE)-$(VERSION)
+
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ $(am__remove_distdir)
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
+ && rm -f $(distdir).tar.gz \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=/g;p;x;p;x'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic ctags dist dist-all dist-gzip distcheck distclean \
+ distclean-compile distclean-generic distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am info \
+ info-am install install-am install-binPROGRAMS install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/ntp/sntp/README b/contrib/ntp/sntp/README
new file mode 100644
index 000000000000..10932f0219dc
--- /dev/null
+++ b/contrib/ntp/sntp/README
@@ -0,0 +1,535 @@
+MSNTP (Simple Network Time Protocol Utility) - Version 1.6
+----------------------------------------------------------
+
+Please read the file Copyright first. Also note that the file RFC2030.TXT is
+David Mills's copyright and not the author's - it is just a copy of the RFC
+that is available from so many Internet archives.
+
+RFC 1305 (Network Time Protocol - NTP) is an attempt to provide globally
+consistent timestamps in an extremely hostile environment; it is fiendishly
+complicated and an impressive piece of virtuosity. RFC 2030 (Simple Network
+Time Protocol - SNTP) which supersedes RFC 1769 describes a subset of this that
+will give excellent accuracy in most environments encountered in practice; it
+uses only the obvious algorithms that have been used since time immemorial.
+
+WARNING: the text version of RFC 1305 is incomplete, and omits the tables that
+are in the Postscript version. Unfortunately, these contain the only copy of
+some critical information.
+
+The canonical NTP code for Unix is the xntp suite, and is as complicated as
+would be expected from reading RFC 1305. While its code is moderately clean by
+Unix and C standards, version 3-5.86 is over 80,000 lines and unavoidably
+system-dependent. A worse problem is that it is so badly fouled up by its
+configuration mechanism that ab initio porting could be several weeks' work,
+even if the new system has all the necessary facilities and is bug free!
+
+
+SNTP Servers - Some Little-Known Facts
+--------------------------------------
+
+RFC 2030 states that SNTP clients should be used only at the lowest level,
+which is good practice. It then states that SNTP servers should be used only
+at stratum 1 (i.e. top level), which is bizarre! A far saner use of them would
+be for the very lowest level of server, exporting solely to local clients that
+do not themselves act as servers to ANY system (e.g. on a Netware server,
+exporting only to the PCs that it manages).
+
+If the NTP network were being run as a directed acyclic graph (i.e. using SNTP
+rather than full NTP), with a diameter of D links and a maximum error per link
+of E, the maximum synchronisation error would be D*E. Reasonable figures for D
+and E are 5 and 0.1 seconds, so this would be adequate for most uses. Note
+that the fact that the graph is acyclic is critical, which is one reason why
+SNTP client/servers must NEVER be embedded WITHIN an NTP network.
+
+The other reason is that inserting SNTP client/servers at a low stratum (but
+not the root) of an NTP network could easily break NTP! See RFC 1305 for why,
+but don't expect the answer to stand out at you. It would be easy to extend
+MSNTP to a full-function client/server application, thus making it into a true
+alternative to xntp, but this incompatibility is why it MUST NOT be done.
+
+The above does not mean that the SNTP approach is unsatisfactory, but only that
+it is incompatible with full NTP. The author would favour a complete SNTP
+network using the SNTP approach, and the statistical error reduction used in
+MSNTP, but it actually addresses a slightly different problem from that
+addressed by NTP. TANSTAAFL.
+
+FINAL WARNING: do NOT use this program to serve NTP requests from outside the
+systems that you manage. If you do this, and manage to break the time
+synchronisation on other people's systems, you will be regarded very
+unfavourably. Actually, this should be possible only if their NTP client is
+completely broken, because MSNTP does its damnedest to declare its packets as
+the lowest form of NTP timestamp.
+
+
+
+MSNTP and its Assumptions
+-------------------------
+
+MSNTP is intended to be a straightforward SNTP daemon/utility that is easy to
+build on any reasonable Unix platform (and most near-Unix ones), whether or not
+it has ever been ported to them before. It is intended to answer the following
+requirements, either by challenge and response or the less reliable broadcast
+method:
+
+ A simple command to run on Unix systems that will check the time
+ and optionally drift compared with a known, local and reliable NTP
+ time server. No privilege is required just to read the time and
+ estimate the drift.
+
+ A client for Unix systems that will synchronise the time from a known,
+ local and reliable NTP time server. This is probably the most common
+ one, and the need that caused the program to be written.
+
+ A server for Unix systems that are synchronised other than by NTP
+ methods and that need to synchronise other systems by NTP. This is
+ the classroom of PCs with a central server scenario. It is NOT
+ intended to work as a peer with true NTP servers, and won't.
+
+ A simple method by which two or more Unix systems can keep themselves
+ synchronised using what is becoming a standard protocol. Yes, I know
+ that there are half-a-dozen other such methods.
+
+ A base for building non-Unix SNTP clients. Some 3/4 of the code
+ (including all of the complicated algorithms and NTP packet handling)
+ should work, unchanged, on any system with an ANSI/ISO C compiler.
+
+There are full tracing facilities and a lot of paranoia in the code to check
+for bad packets (more than in xntp) which may need relaxing in the light of
+experience. Unfortunately, RFC 1305 does not include a precise description of
+the data protocol, despite its length, and there are some internal
+inconsistencies and differences between it and RFC 2030 and xntp3-5's
+behaviour.
+
+WARNING: MSNTP has not been tested in conjunction with xntp broadcasts or xntp
+clients, as the ability to do so was not available to the author. It is very
+unlikely that it won't work, but you should check. Much of the paranoid code
+is only partially tested, too, because it is dealing with cases that are very
+hard to provoke.
+
+It assumes that the local network is tolerably secure and that any accessible
+NTP or SNTP servers are trustworthy. It also makes no attempt to check that
+it has been installed and is being used correctly (e.g. at an appropriate
+priority) or that the changes it makes have the desired effect. When you first
+use it, you should both run it in display mode and use the date command as a
+cross-check.
+
+Furthermore, it does not attempt to solve all of the problems addressed by the
+NTP protocol and you should NOT use it if any of those problems are likely to
+cause you serious trouble. If they are, bite the bullet and implement xntp, or
+buy a fancy time-server.
+
+
+Building SNTP
+-------------
+
+The contents of the distribution are:
+
+README - this file
+Copyright - the copyright notice and conditions of use
+Makefile - the makefile, with comments for several systems
+header.h - the main header (almost entirely portable)
+kludges.h - dirty kludges for difficult systems
+internet.h - a very small header for internet.c and socket.c
+main.c - most of the source (almost entirely portable)
+unix.c - just for isatty, sleep and locking
+internet.c - Internet host and service name lookup
+socket.c - the Berkeley socket code
+msntp.1 - the man page
+RFC2030.TXT - the SNTPv4 specification
+
+All you SHOULD need to do is to uncomment the settings in file Makefile for
+your system or to add new ones. But real life is not always so simple. As
+POSIX does not yet define sub-second timers, Internet addressing facilities,
+sockets etc., the code has to rely on the facilities described in the
+ill-defined and non-standard 'X/Open' documents and the almost totally
+unspecified 'BSD' extensions.
+
+Most hacks should be limited to the compiler options (e.g. setting flags like
+_XOPEN_SOURCE), but perverse systems may need additions to kludges.h - please
+report them to the author. See Makefile and kludges.h for documentation on
+the standard hacks - there only 6, and most are only for obsolete systems.
+But, generally, using the generic set of C options usually works with no
+further ado.
+
+
+Sick, Bizarre or non-Unix Systems
+---------------------------------
+
+A very few Unix systems and almost all non-Unix systems may need changes to the
+code, such as:
+
+ If the system doesn't have Berkeley sockets, you will need to replace
+ socket.c and possibly modify internet.h and internet.c. All of the
+ systems for which the author needs this have Berkeley sockets.
+
+ NTP is supposedly an Internet protocol, but is not Internet specific.
+ For other types of network, you will need to replace internet.c and
+ probably modify internet.h.
+
+ If the system doesn't have gettimeofday or settimeofday, you will
+ need to modify timing.c. If it doesn't have adjtime (e.g. HP-UX
+ on PA-RISC before 10.0), you can set -DADJTIME_MISSING and the code
+ will compile but the -a option will always give an error.
+
+ If the system has totally broken signal handling, the program will
+ hang or crash if it can't reach its name server or responses time
+ out. You may be able to improve matters by hacking internet.c and
+ socket.c, but don't bet on it.
+
+ If the the program won't be able to create files in /etc when
+ updating the clock, you can use another lock file or even set
+ -DLOCKFILE=NULL, which will disable the locking code entirely. On
+ systems that have it, using /var/run would be better than /etc.
+
+ If the the program hangs when flushing outstanding packets (which
+ you can tell by setting -W), it may help to set -DNONBLOCK_BROKEN.
+ This seems needed only for obsolete systems, like Ultrix.
+
+ If the system isn't Unix, even vaguely, you will probably need to
+ modify all of the above, and unix.c as well.
+
+ Note that adjtime is commonly sick, but you don't need to change the
+ code - just use the -r option whan making large corrections (see below
+ for more details).
+
+Any changes needed to header.h or main.c are bugs. They may be bugs in the
+code or in the compiler or libraries, but they are bugs. Please prod the
+people responsible and tell the author, who may be able to bypass them cleanly
+even if they aren't bugs in his code. The code also makes the following
+assumptions, which would be quite hard to remove:
+
+ 8-bit bytes. Strictly, neither ANSI/ISO C nor POSIX require these,
+ and there were some very early versions of Unix on systems with other
+ byte sizes. But, without a defined sub-byte facility in C, ....
+
+ At least 32-bit ints. Well, actually, this wouldn't be too hard to
+ remove. But most Unix programs make this assumption, and I have very
+ little interest in the more rudimentary versions of MS-DOS etc.
+
+ An ANSI/ISO C compiler. It didn't seem worth writing dual-language
+ code in 1996. Tough luck if you haven't got one.
+
+ Tolerably efficient floating-point arithmetic, with at least 13 digits
+ (decimal), preferably 15, in the mantissa of doubles. Ditto. If you
+ want to port this to a toaster, please accept my insincerest sympathies
+ and don't bother me.
+
+ A trustworthy local network. It does not check for DNS, Ethernet,
+ packet or other spoofing, and assumes that any accessible NTP or SNTP
+ servers are properly synchronised.
+
+
+Warnings about Installation and Use
+-----------------------------------
+
+Anyone attempting to fiddle with the clock on their system should already know
+how to write system administration scripts, install daemons and so on. There
+are a few warnings:
+
+ Don't use the broadcast modes unless you really have to, as the
+ client-server modes are far more reliable. The broadcast modes were
+ implemented more for virtuosity (a.k.a. SNTP conformance) than use.
+ In particular, the error estimates are mere guesses, and may be low
+ or even very low. And even reading broadcasts needs privilege.
+
+ The program is not intended to be installed setuid or setgid, and
+ doing so is asking for trouble. Its ownerships and access modes are
+ not important. It need not be run by root for merely displaying the
+ time (even in daemon mode).
+
+ The program does not need to run at a high priority (low in Unix
+ terms!) even when being used to set the clock or as a server, except
+ when the '-r' option is used. However, doing so may improve its
+ accuracy.
+
+ Unlike NTP, the SNTP protocol contains no protection against
+ client-server loops. If you set one up, your systems will spin
+ themselves off into a disconnected vortex of unreality!
+
+ It will get very confused if another process changes the local time
+ while it is running. There is some locking code in unix.c to prevent
+ this program doing this to itself, but it will protect only against
+ some errors. However, the remaining failures should be harmless.
+
+ Don't run it as a server unless you REALLY know what you are doing.
+ It should be used as a server only on a system that is properly
+ synchronised, by fair means or foul. If it isn't, you will simply
+ perpetrate misinformation. And remember that broadcasts are most
+ unpopular with overloaded administrators of overloaded networks.
+
+ Watch out for multi-server broadcasts and systems with multiple ports
+ onto the same Ethernet; there is some code to protect against this,
+ but it is still easy to get confused.
+
+ Don't put the lock file onto an automounted partition or delete it by
+ hand, unless you really want to start two daemons at the same time.
+ Both will probably fail horribly if you do this.
+
+ The daemon save file is checked fairly carefully, but should be in a
+ reasonably safe directory, unless you want hackers to cause trouble.
+ /tmp is safe enough on most systems, but not all - /etc is better.
+
+
+Installing and Using the Program
+--------------------------------
+
+Start by copying the executable and man page to where you want them. If you
+want only to display the time and as a replacement for the rdate or date
+commands, the installation is finished!
+
+You can use it as a simple unprivileged command to check the time, quite
+independently of whether it is running as a time-updating daemon or server, or
+whether you are running xntp. You can run it in daemon mode without updating
+the clock, to check for drift, but it may fail if the clock is changed under
+its feet. Unfortunately, you cannot listen to broadcasts without privilege.
+
+If it is used with the -a option to keep the time synchronised, it is best to
+run it as one of root's cron jobs - for many systems, running it once a day
+should be adequate, but it will depend on the reliability of the local clock.
+The author runs it this way with -a and -x - see below.
+
+If it is used with the -r option to set the time (instead of the rdate or date
+commands), it should be used interactively and either on a lightly loaded
+system or at a high priority. You should then check the result by running it
+in display mode.
+
+You are advised NOT to run it with the -r option in a cron job, though this is
+not locked out. If you have to (for example under HP-UX before 10.0), be sure
+to run it as the highest priority that will not cause other system problems and
+set the maximum automatic change to as low a value as you can get away with.
+
+WARNING: adjtime is more than a bit sick on many systems, and will ignore large
+corrections, usually without any form of hint that it has done so. It is often
+(even usually) necessary to reset the clock to approximately the right time
+using the -r option before using the -a and -x options to keep it correct.
+
+It can be started as a time-updating daemon with the -a and -x options (or -r
+and -x if you must), and will perform some limited drift correction. In this
+case, start it from any suitable system initialisation script and leave it
+running. Note that it will stop if it thinks that the time difference or drift
+has got out of control, and you will need to reset the time and restart it by
+hand.
+
+In daemon mode, it will survive its time server or network disappearing for a
+while, but will eventually fail, and will fail immediately if the network call
+returns an unexpected error. If this is a problem, you can start it (say,
+hourly or nightly) from cron, and it will fail if it is already running
+(provided that you haven't disabled or deleted the lock file).
+
+If it is used as a server, it should be started from any suitable system
+initialisation script, just like any other daemon. It must be started after
+the networking, of course. To run it in both server modes, start one copy with
+the -B option and one with the -S option.
+
+
+Simple Examples of Use
+----------------------
+
+Many people use it solely to check the time of their system, especially as a
+cross-check on xntpd. You do not need privilege and it will not cause trouble
+to the local network, so you can use it on someone else's system! You can
+specify one server or several. For example:
+
+ msntp ntp.server.local ntp.server.neighbour
+
+You can use it to check how your system is drifting, but it isn't very good at
+this if the system is drifting very badly (in which case use the previous
+technique and dc) or if you are running xntp. You do not need privilege and it
+will not cause trouble to the local network. For example:
+
+ msntp -x 120 -f /tmp/msntp.state ntp.server.local
+
+More generally, it is used to synchronise the clock, in which case you DO need
+root privilege. It can be used in many ways, but the author favours running it
+in daemon mode, started from a cron job, which will restart after power cuts
+with no attention, and send a mail message (if cron is configured to do that)
+when it fails badly. For example, the author uses a root crontab entry on one
+system of:
+
+ 15 0 * * * /bin/nice --10 /usr/local/bin/msntp -a -x 480 ntp.server.local
+
+If you have a home computer, it can be set up to resynchronise each time you
+dial up. For example, the author uses a /etc/ppp/ip-up.d/msntp file on his
+home Linux system of:
+
+ #!/bin/sh
+ sleep 60
+ /bin/nice --10 /usr/local/sbin/msntp -r -P 60 ntp.server.local
+
+-a would be better, but adjtime is broken in Linux.
+
+
+Debugging or Hacking the Program
+--------------------------------
+
+Almost everybody who does this is likely to need to modify only the system
+interfaces. While they are messy, they are pretty simple and have a simple
+specification. This is documented in comments in the source. This is
+described above.
+
+The main program SHOULD need no attention, though it may need the odd tweak to
+bypass compiler problems - please report these, if you encounter any. If
+something looks odd while it is running, start by setting the -v option (lower
+case), as for investigating network problems, and checking any diagnostics that
+appear. Note that most of it can be checked in display mode without harming
+your system.
+
+The client will sometimes give up, complaining about inconsistent timestamps or
+similar. This can be caused by the server being rebooted and similar glitches
+to the time - unfortunately, there is no reliable way to tell an ignorable
+fluctuation from a server up the spout. If this happens annoyingly often,
+the -V option may help tie down the problem. In actual use, it is simplest
+just to restart the client in a cron job!
+
+If it needs more than this, then you will need to debug the source seriously.
+Start by putting an icepack on your head and pouring yourself a large whisky!
+While it is commented, it is not well commented, and much of the code interacts
+in complex and horrible ways. This isn't so much because it lacks 'structure'
+as because one part needs to make assumptions about the numerical properties of
+another.
+
+The -W option (upper case) will print out a complete trace of everything it
+does, and this should be enough to tie down the problem. It does distort the
+timing a bit, but not usually too badly. However, wading through that amount
+of gibberish (let alone looking at the source) is not a pleasant task. If you
+are pretty sure that you have a bug, you may tell the author, and he may ask
+for a copy of the output - but he will reply rudely if you send thousands of
+lines of tracing to him by Email!
+
+Note that there are a fair number of circumstances where its error recovery
+could be better, but is left as it is to keep the code simple. Most of these
+should be pretty rare.
+
+
+Changes in Version 1.2
+----------------------
+
+The main change was the addition of the daemon mode for drift correction (i.e.
+the -x option). The daemon code is complex and has a lot of special-casing for
+strange circumstances, not all of which are testable in practice.
+
+A lot of the code was reordered while doing this. The output was slightly
+different - considerably different with -V.
+
+The error estimation for broadcasts was modified, and should bear more relation
+to reality. It remains a guess, as there is no way to get decent error error
+estimates under such circumstances.
+
+The -B option is now in minutes, and has a different permissible range and
+default value.
+
+The argument consistency checking for broadcasts was tightened up a bit, and a
+few other internal checks added. These should not affect any reasonable
+requirement.
+
+A couple of new functions were added to the portability base, but they don't
+use any non-standard new facilities. However, the specification of the
+functions has changed slightly.
+
+
+Changes in Version 1.3
+----------------------
+
+The main change was the addition of the restarting facility for daemon mode
+(i.e. the -f option), which is pretty straightforward.
+
+There were also a lot of minor changes to the paranoia code in daemon mode, to
+try to separate out the case of a demented server from network and other
+'ignorable' problems. These are not entirely successful.
+
+
+Changes in Version 1.4 and 1.5
+------------------------------
+
+There turned out to be a couple of places where the author misunderstood the
+specification of NTP, which affect only its use in server mode. The main
+change is to use stratum 15 instead of stratum 0.
+
+And there were some more relaxations of the paranoia code, to allow for more
+erratic servers, plus a kludge to improve restarting in daemon mode after a
+period of down time has unsynchronised the clock. There is also an
+incompatible change to the debugging options to add a new level - the old -V
+option is now -W, and -V is an intermediate one for debugging daemon mode - but
+they are both hacker's facilities, and not for normal use.
+
+Version 1.5 adds some very minor fixes.
+
+
+Changes in Version 1.6
+----------------------
+
+The first change is support for multiple server addresses - it uses these in a
+round-robin fashion. This may be useful when you have access to several
+servers, all of which are a bit iffy. This means that the restart file format
+is incompatible with msntp 1.5.
+
+It has also been modified to reset itself automatically after detecting an
+inconsistency in its server's timestamps, because the author got sick of the
+failures. It writes a comment to syslog (uniquely) in such cases.
+
+The ability to query a daemon save file was added.
+
+Related to the above, the -E argument has been redefined to mean an error bound
+on various internal times (which is what it had become, anyway) and a -P option
+introduced to be what the -E argument was documented to be.
+
+The lock and save file handling have been changed to allow defaults to be set
+at installation time, and to be overridable at run-time. To disable these
+at either stage, simply set the file names to the null string.
+
+And there have been the usual changes for portability, as standards have been
+modified and/or introduced.
+
+
+Future Versions
+---------------
+
+There are unlikely to be any, except probably one to fix bugs in version 1.6.
+
+I attempted to put support for intermittent connexions (e.g. dial-up) into the
+daemon mode, but doing so needs so much code reorganisation that it isn't worth
+it. What needs doing for that is to separate the socket handling from the
+timekeeping, so that they can be run asynchronously (either in separate
+processes or threads), and to look up a network name and open a socket only
+when prodded (and to close it immediately thereafter). So just running it
+with the -r option is the current best solution.
+
+I also attempted to put support for the "Unix 2000" interfaces into the code.
+Ha, ha. Not merely do very few systems define socklen_t (needed for IPv6
+support), but "Unix 2000" neither addresses the leap second problem nor even
+provides an adjtime replacement! Some function like the latter is critical,
+not so much because of the gradual change, but because of its atomicity;
+without it, msntp really needs to be made non-interruptible, and that brings in
+a ghastly number of system-dependencies.
+
+Realistically, it needs a complete rewrite before adding any more function.
+And, worse, the Unix 'standards' need fixing, too.
+
+
+
+Miscellaneous
+-------------
+
+Thanks are due to Douglas M. Wells of Connection Technologies for helping the
+author with several IP-related conventions, to Sam Nelson of Stirling
+University for testing it on some very strange systems, and to David Mills for
+clarifying what the NTP specification really is.
+
+Thanks are also due to several other people with locating bugs, finding
+appropriate options for the Makefile and passing on extension code and
+suggestions. As I am sure to leave someone out, I shall not name anyone else.
+
+Version 1.0 - October 1996.
+Version 1.1 - November 1996 - mainly portability improvements.
+Version 1.2 - January 1997 - mainly drift handling, but much reorganisation.
+Version 1.3 - February 1997 - daemon save file, and some robustness changes.
+Version 1.4 - May 1997 - relatively minor fixes, more diagnostic levels etc.
+Version 1.5 - December 1997 - some very minor fixes
+Version 1.6 - October 2000 - quite a few miscellaneous changes
+
+
+Nick Maclaren,
+University of Cambridge Computer Laboratory,
+New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
+Email: nmm1@cam.ac.uk
+Tel.: +44 1223 334761 Fax: +44 1223 334679
diff --git a/contrib/ntp/sntp/aclocal.m4 b/contrib/ntp/sntp/aclocal.m4
new file mode 100644
index 000000000000..fb76c3da2cd9
--- /dev/null
+++ b/contrib/ntp/sntp/aclocal.m4
@@ -0,0 +1,835 @@
+# generated automatically by aclocal 1.7.7 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 10
+
+AC_PREREQ([2.54])
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.7.7])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# serial 5 -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
diff --git a/contrib/ntp/sntp/config.guess b/contrib/ntp/sntp/config.guess
new file mode 100755
index 000000000000..0e30d56e94e0
--- /dev/null
+++ b/contrib/ntp/sntp/config.guess
@@ -0,0 +1,1407 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-07-02'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha*:OpenVMS:*:*)
+ echo alpha-hp-vms
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit 0;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit 0 ;;
+ DRS?6000:UNIX_SV:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7 && exit 0 ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c \
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && exit 0
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit 0 ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ *:UNICOS/mp:*:*)
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
+ # Determine whether the default compiler uses glibc.
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #if __GLIBC__ >= 2
+ LIBC=gnu
+ #else
+ LIBC=
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ # GNU/FreeBSD systems have a "k" prefix to indicate we are using
+ # FreeBSD's kernel, but not the complete OS.
+ case ${LIBC} in gnu) kernel_only='k' ;; esac
+ echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit 0 ;;
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ exit 0 ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit 0 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit 0 ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0 ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0 ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit 0 ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #ifdef __INTEL_COMPILER
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i*86:*:5:[78]*)
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit 0 ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit 0 ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Darwin:*:*)
+ case `uname -p` in
+ *86) UNAME_PROCESSOR=i686 ;;
+ powerpc) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit 0 ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit 0 ;;
+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit 0 ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit 0 ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/contrib/ntp/sntp/config.sub b/contrib/ntp/sntp/config.sub
new file mode 100755
index 000000000000..c8a01bed986d
--- /dev/null
+++ b/contrib/ntp/sntp/config.sub
@@ -0,0 +1,1504 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-07-04'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit 0;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k \
+ | m32r | m68000 | m68k | m88k | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | msp430 \
+ | ns16k | ns32k \
+ | openrisc | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* \
+ | m32r-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | msp430-* \
+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nv1)
+ basic_machine=nv1-cray
+ os=-unicosmp
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ or32 | or32-*)
+ basic_machine=or32-unknown
+ os=-coff
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparc | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/contrib/ntp/sntp/configure b/contrib/ntp/sntp/configure
new file mode 100755
index 000000000000..33f5fe8b5631
--- /dev/null
+++ b/contrib/ntp/sntp/configure
@@ -0,0 +1,5916 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.57.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="main.c"
+ac_unique_file="header.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.7"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=msntp
+ VERSION=1.6
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+# Checks for libraries.
+
+# Checks for header files.
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in arpa/inet.h fcntl.h float.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h syslog.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+ return 0;
+if (sizeof (size_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_size_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_size_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6
+if test $ac_cv_type_size_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_time=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
+if test "${ac_cv_struct_tm+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm *tp; tp->tm_sec;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_struct_tm=time.h
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_struct_tm=sys/time.h
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+echo "${ECHO_T}$ac_cv_struct_tm" >&6
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5
+echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6
+if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int
+main ()
+{
+ struct sockaddr_storage s; s.ss_family = 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_ss_family_in_struct_ss="yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_ss_family_in_struct_ss="no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5
+echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6
+if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SS_FAMILY_IN_SS 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5
+echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6
+if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int
+main ()
+{
+ struct sockaddr_storage s; s.__ss_family = 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have___ss_family_in_struct_ss="yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have___ss_family_in_struct_ss="no"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5
+echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6
+if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___SS_FAMILY_IN_SS 1
+_ACEOF
+
+fi
+
+case "$ac_cv_have_ss_family_in_struct_ss$ac_cv_have___ss_family_in_struct_ss" in
+ noyes)
+ cat >>confdefs.h <<_ACEOF
+#define ss_family __ss_family
+_ACEOF
+
+ cat >>confdefs.h <<_ACEOF
+#define ss_len __ss_len
+_ACEOF
+
+ ;;
+esac
+
+# Checks for library functions.
+echo "$as_me:$LINENO: checking for working memcmp" >&5
+echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
+if test "${ac_cv_func_memcmp_working+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_memcmp_working=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ /* Some versions of memcmp are not 8-bit clean. */
+ char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+ if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
+ exit (1);
+
+ /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
+ or more and with at least one buffer not starting on a 4-byte boundary.
+ William Lewis provided this test program. */
+ {
+ char foo[21];
+ char bar[21];
+ int i;
+ for (i = 0; i < 4; i++)
+ {
+ char *a = foo + i;
+ char *b = bar + i;
+ strcpy (a, "--------01111111");
+ strcpy (b, "--------10000000");
+ if (memcmp (a, b, 16) >= 0)
+ exit (1);
+ }
+ exit (0);
+ }
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_memcmp_working=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_memcmp_working=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
+echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
+test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+
+echo "$as_me:$LINENO: checking for function prototypes" >&5
+echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
+if test "$ac_cv_prog_cc_stdc" != no; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define PROTOTYPES 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define __PROTOTYPES 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+echo "$as_me:$LINENO: checking whether setvbuf arguments are reversed" >&5
+echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
+if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_func_setvbuf_reversed=no
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+# if PROTOTYPES
+ int (setvbuf) (FILE *, int, char *, size_t);
+# endif
+int
+main ()
+{
+char buf; return setvbuf (stdout, _IOLBF, &buf, 1);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+# if PROTOTYPES
+ int (setvbuf) (FILE *, int, char *, size_t);
+# endif
+int
+main ()
+{
+char buf; return setvbuf (stdout, &buf, _IOLBF, 1);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # It compiles and links either way, so it must not be declared
+ # with a prototype and most likely this is a K&R C compiler.
+ # Try running it.
+ if test "$cross_compiling" = yes; then
+ : # Assume setvbuf is not reversed when cross-compiling.
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+/* This call has the arguments reversed.
+ A reversed system may check and see that the address of buf
+ is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
+ char buf;
+ if (setvbuf (stdout, _IOLBF, &buf, 1) != 0)
+ exit (1);
+ putchar ('\r');
+ exit (0); /* Non-reversed systems SEGV here. */
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setvbuf_reversed=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+rm -f core core.* *.core
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ ac_cv_func_setvbuf_reversed=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setvbuf_reversed" >&5
+echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
+if test $ac_cv_func_setvbuf_reversed = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define SETVBUF_REVERSED 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
+if test "${ac_cv_type_signal+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+# undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_signal=void
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_signal=int
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+echo "${ECHO_T}$ac_cv_type_signal" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+
+for ac_func in alarm
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+echo "$as_me:$LINENO: checking for gethostent" >&5
+echo $ECHO_N "checking for gethostent... $ECHO_C" >&6
+if test "${ac_cv_func_gethostent+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostent (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostent ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gethostent) || defined (__stub___gethostent)
+choke me
+#else
+char (*f) () = gethostent;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gethostent;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gethostent=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gethostent=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostent" >&5
+echo "${ECHO_T}$ac_cv_func_gethostent" >&6
+if test $ac_cv_func_gethostent = yes; then
+ :
+else
+
+echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5
+echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostent+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl -lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostent ();
+int
+main ()
+{
+gethostent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_gethostent=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostent=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostent" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostent" >&6
+if test $ac_cv_lib_nsl_gethostent = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
+_ACEOF
+
+ LIBS="-lnsl $LIBS"
+
+fi
+
+fi
+
+
+
+
+for ac_func in gettimeofday inet_ntoa memset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in socket
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
+echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_socket+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char socket ();
+int
+main ()
+{
+socket ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_socket=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_socket=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
+if test $ac_cv_lib_socket_socket = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSOCKET 1
+_ACEOF
+
+ LIBS="-lsocket $LIBS"
+
+fi
+
+fi
+done
+
+
+for ac_func in sqrt
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
+echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_sqrt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sqrt ();
+int
+main ()
+{
+sqrt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_sqrt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_sqrt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
+echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
+if test $ac_cv_lib_m_sqrt = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+fi
+done
+
+
+for ac_func in strrchr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+case "$host" in
+ *-*-linux*)
+ CFLAGS="$CFLAGS -DADJTIME_MISSING"
+ ;;
+ *-*-sunos*)
+ CFLAGS="$CFLAGS -DNONBLOCK_BROKEN"
+ ;;
+esac
+
+ ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.57,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/contrib/ntp/sntp/configure.ac b/contrib/ntp/sntp/configure.ac
new file mode 100644
index 000000000000..b954168196d2
--- /dev/null
+++ b/contrib/ntp/sntp/configure.ac
@@ -0,0 +1,82 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT(main.c)
+AM_INIT_AUTOMAKE([msntp],[1.6])
+AC_CONFIG_SRCDIR([header.h])
+AC_CANONICAL_SYSTEM
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h syslog.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_STRUCT_TM
+
+AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
+ ac_cv_have_ss_family_in_struct_ss, [
+ AC_TRY_COMPILE(
+ [
+#include <sys/types.h>
+#include <sys/socket.h>
+ ],
+ [ struct sockaddr_storage s; s.ss_family = 1; ],
+ [ ac_cv_have_ss_family_in_struct_ss="yes" ],
+ [ ac_cv_have_ss_family_in_struct_ss="no" ],
+ )
+])
+if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
+ AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have ss_family?])
+fi
+
+AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
+ ac_cv_have___ss_family_in_struct_ss, [
+ AC_TRY_COMPILE(
+ [
+#include <sys/types.h>
+#include <sys/socket.h>
+ ],
+ [ struct sockaddr_storage s; s.__ss_family = 1; ],
+ [ ac_cv_have___ss_family_in_struct_ss="yes" ],
+ [ ac_cv_have___ss_family_in_struct_ss="no" ]
+ )
+])
+if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
+ AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have __ss_family?])
+fi
+
+case "$ac_cv_have_ss_family_in_struct_ss$ac_cv_have___ss_family_in_struct_ss" in
+ noyes)
+ AC_DEFINE_UNQUOTED(ss_family, __ss_family, [])
+ AC_DEFINE_UNQUOTED(ss_len, __ss_len, [])
+ ;;
+esac
+
+# Checks for library functions.
+AC_FUNC_MEMCMP
+AC_FUNC_SETVBUF_REVERSED
+AC_TYPE_SIGNAL
+AC_CHECK_FUNCS([alarm])
+AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket))
+AC_CHECK_FUNCS([gettimeofday inet_ntoa memset])
+AC_CHECK_FUNCS(socket, , AC_CHECK_LIB(socket, socket))
+AC_CHECK_FUNCS(sqrt, , AC_CHECK_LIB(m, sqrt))
+AC_CHECK_FUNCS([strrchr])
+
+case "$host" in
+ *-*-linux*)
+ CFLAGS="$CFLAGS -DADJTIME_MISSING"
+ ;;
+ *-*-sunos*)
+ CFLAGS="$CFLAGS -DNONBLOCK_BROKEN"
+ ;;
+esac
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/contrib/ntp/sntp/depcomp b/contrib/ntp/sntp/depcomp
new file mode 100755
index 000000000000..aea3d00785da
--- /dev/null
+++ b/contrib/ntp/sntp/depcomp
@@ -0,0 +1,472 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+ base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+ dir=`echo "$object" | sed 's,/.*$,/,'`
+ if test "$dir" = "$object"; then
+ dir=
+ fi
+ # FIXME: should be _deps on DOS.
+ depfile="$dir.deps/$base"
+fi
+
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> $depfile
+ echo >> $depfile
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> $depfile
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. This file always lives in the current directory.
+ # Also, the AIX compiler puts `$object:' at the start of each line;
+ # $object doesn't have directory information.
+ stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+ tmpdepfile="$stripped.u"
+ outname="$stripped.o"
+ if test "$libtool" = yes; then
+ "$@" -Wc,-M
+ else
+ "$@" -M
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+ sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ tmpdepfile1="$dir.libs/$base.lo.d"
+ tmpdepfile2="$dir.libs/$base.d"
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1="$dir$base.o.d"
+ tmpdepfile2="$dir$base.d"
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile1"; then
+ tmpdepfile="$tmpdepfile1"
+ else
+ tmpdepfile="$tmpdepfile2"
+ fi
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a space and a tab in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no
+ for arg in "$@"; do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix="`echo $object | sed 's/^.*\././'`"
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ "$@" || exit $?
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/contrib/ntp/sntp/header.h b/contrib/ntp/sntp/header.h
new file mode 100644
index 000000000000..f107b1d3c7fe
--- /dev/null
+++ b/contrib/ntp/sntp/header.h
@@ -0,0 +1,89 @@
+/* Copyright (C) 1996 N.M. Maclaren
+ Copyright (C) 1996 The University of Cambridge
+
+This includes all of the 'safe' headers and definitions used across modules.
+No changes should be needed for any system that is even remotely like Unix. */
+
+
+
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+
+
+#define VERSION "1.6" /* Just the version string */
+#define MAX_SOCKETS 10 /* Maximum number of addresses */
+
+#ifndef LOCKNAME
+ #define LOCKNAME "/etc/msntp.pid" /* Stores the pid */
+#endif
+#ifndef SAVENAME
+ #define SAVENAME "/etc/msntp.state" /* Stores the recovery state */
+#endif
+
+
+
+/* Defined in main.c */
+
+#define op_client 1 /* Behave as a challenge client */
+#define op_server 2 /* Behave as a response server */
+#define op_listen 3 /* Behave as a listening client */
+#define op_broadcast 4 /* Behave as a broadcast server */
+
+extern const char *argv0;
+
+extern int verbose, operation;
+
+extern const char *lockname;
+
+extern void fatal (int syserr, const char *message, const char *insert);
+
+
+
+/* Defined in unix.c */
+
+extern void do_nothing (int seconds);
+
+extern int ftty (FILE *file);
+
+extern void set_lock (int lock);
+
+extern void log_message (const char *message);
+
+
+
+/* Defined in internet.c */
+
+/* extern void find_address (struct in_addr *address, int *port, char *hostname,
+ int timespan); */
+
+#define PREF_FAM_INET 1
+#define PREF_FAM_INET6 2
+extern void preferred_family(int);
+
+
+/* Defined in socket.c */
+
+extern void open_socket (int which, char *hostnames, int timespan);
+
+extern void write_socket (int which, void *packet, int length);
+
+extern int read_socket (int which, void *packet, int length, int waiting);
+
+extern int flush_socket (int which);
+
+extern void close_socket (int which);
+
+
+
+/* Defined in timing.c */
+
+extern double current_time (double offset);
+
+extern time_t convert_time (double value, int *millisecs);
+
+extern void adjust_time (double difference, int immediate, double ignore);
diff --git a/contrib/ntp/sntp/install-sh b/contrib/ntp/sntp/install-sh
new file mode 100755
index 000000000000..6ce63b9f76bc
--- /dev/null
+++ b/contrib/ntp/sntp/install-sh
@@ -0,0 +1,294 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+#
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd=$cpprog
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "$0: no input file specified" >&2
+ exit 1
+else
+ :
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d "$dst" ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=$mkdirprog
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f "$src" ] || [ -d "$src" ]
+ then
+ :
+ else
+ echo "$0: $src does not exist" >&2
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "$0: no destination specified" >&2
+ exit 1
+ else
+ :
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d "$dst" ]
+ then
+ dst=$dst/`basename "$src"`
+ else
+ :
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+ '
+IFS="${IFS-$defaultIFS}"
+
+oIFS=$IFS
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp=$pathcomp$1
+ shift
+
+ if [ ! -d "$pathcomp" ] ;
+ then
+ $mkdirprog "$pathcomp"
+ else
+ :
+ fi
+
+ pathcomp=$pathcomp/
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd "$dst" &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename "$dst"`
+ else
+ dstfile=`basename "$dst" $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename "$dst"`
+ else
+ :
+ fi
+
+# Make a couple of temp file names in the proper directory.
+
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+# Trap to clean up temp files at exit.
+
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd "$src" "$dsttmp" &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# Now remove or move aside any old file at destination location. We try this
+# two ways since rm can't unlink itself on some systems and the destination
+# file might be busy for other reasons. In this case, the final cleanup
+# might fail but the new file should still install successfully.
+
+{
+ if [ -f "$dstdir/$dstfile" ]
+ then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+ $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+ {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+} &&
+
+# Now rename the file to the real destination.
+
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+
+fi &&
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+
+{
+ (exit 0); exit
+}
diff --git a/contrib/ntp/sntp/internet.c b/contrib/ntp/sntp/internet.c
new file mode 100644
index 000000000000..2d23e501ff42
--- /dev/null
+++ b/contrib/ntp/sntp/internet.c
@@ -0,0 +1,221 @@
+/* Copyright (C) 1996 N.M. Maclaren
+ Copyright (C) 1996 The University of Cambridge
+
+This includes all of the code needed to handle Internet addressing. It is way
+outside current POSIX, unfortunately. It should be easy to convert to a system
+that uses another mechanism. The signal handling is not necessary for its
+function, but is an attempt to avoid the program hanging when the name server
+is inaccessible. */
+
+
+
+#include "header.h"
+#include "internet.h"
+
+#include <netdb.h>
+#include <arpa/inet.h>
+
+#define INTERNET
+#include "kludges.h"
+#undef INTERNET
+
+
+/* Used to force dns resolving to ipv4 or ipv6 addresses. */
+static int pref_family;
+
+/* There needs to be some disgusting grobble for handling timeouts, which is
+identical to the grobble in socket.c. */
+
+static jmp_buf jump_buffer;
+
+static void jump_handler (int sig) {
+ longjmp(jump_buffer,1);
+}
+
+static void clear_alarm (void) {
+ int k;
+
+ k = errno;
+ alarm(0);
+ errno = 0;
+ if (signal(SIGALRM,SIG_DFL) == SIG_ERR)
+ fatal(1,"unable to reset signal handler",NULL);
+ errno = k;
+}
+
+void preferred_family(int fam) {
+ switch(fam) {
+ case PREF_FAM_INET:
+ pref_family = AF_INET;
+ break;
+#ifdef HAVE_IPV6
+ case PREF_FAM_INET6:
+ pref_family = AF_INET6;
+ break;
+#endif
+ default:
+ fatal(0,"unable to set the preferred family", NULL);
+ break;
+ }
+}
+
+#ifdef HAVE_IPV6
+
+void find_address (struct sockaddr_storage *address,
+ struct sockaddr_storage *anywhere, struct sockaddr_storage *everywhere,
+ int *port, char *hostname, int timespan) {
+
+/* Locate the specified NTP server and return its Internet address and port
+number. */
+
+ int family, rval;
+ struct addrinfo hints;
+ struct addrinfo *res;
+ struct sockaddr_in *sin;
+ struct sockaddr_in6 *sin6;
+
+ res = NULL;
+ memset(address, 0, sizeof(struct sockaddr_storage));
+ memset(anywhere, 0, sizeof(struct sockaddr_storage));
+ memset(everywhere, 0, sizeof(struct sockaddr_storage));
+
+ if (setjmp(jump_buffer))
+ fatal(0,"unable to set up access to NTP server %s",hostname);
+ errno = 0;
+ if (signal(SIGALRM,jump_handler) == SIG_ERR)
+ fatal(1,"unable to set up signal handler",NULL);
+ alarm((unsigned int)timespan);
+
+/* Look up the Internet name or IP number. */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_family = pref_family;
+ rval = getaddrinfo(hostname, "ntp", &hints, &res);
+ if (rval != 0)
+ fatal(0, "getaddrinfo failed with %s", gai_strerror(rval));
+
+/* Now clear the timer and check the result. */
+
+ clear_alarm();
+ /* There can be more than one address in the list, but for now only
+ use the first. */
+ memcpy(address, res->ai_addr, res->ai_addrlen);
+ family = res->ai_family;
+ freeaddrinfo(res);
+
+ switch(family) {
+ case AF_INET:
+ hints.ai_family = AF_INET;
+ hints.ai_flags = AI_PASSIVE;
+ rval = getaddrinfo(NULL, "ntp", &hints, &res);
+ if (rval != 0)
+ fatal(0, "getaddrinfo failed with %s", gai_strerror(rval));
+ memcpy(anywhere, res->ai_addr, res->ai_addrlen);
+ freeaddrinfo(res);
+ rval = getaddrinfo("255.255.255.255", "ntp", &hints, &res);
+ if (rval != 0)
+ fatal(0, "getaddrinfo failed with %s", gai_strerror(rval));
+ memcpy(everywhere, res->ai_addr, res->ai_addrlen);
+ freeaddrinfo(res);
+ break;
+ case AF_INET6:
+ hints.ai_family = AF_INET6;
+ hints.ai_flags = AI_PASSIVE;
+ rval = getaddrinfo(NULL, "ntp", &hints, &res);
+ if (rval != 0)
+ fatal(0, "getaddrinfo failed with %s", gai_strerror(rval));
+ memcpy(anywhere, res->ai_addr, res->ai_addrlen);
+ freeaddrinfo(res);
+ /* IPv6 do not have broadcast, give it loopback. */
+ hints.ai_flags = 0;
+ rval = getaddrinfo(NULL, "ntp", &hints, &res);
+ if (rval != 0)
+ fatal(0, "getaddrinfo failed with %s", gai_strerror(rval));
+ memcpy(everywhere, res->ai_addr, res->ai_addrlen);
+ freeaddrinfo(res);
+ break;
+ }
+}
+
+#else
+
+void find_address (struct in_addr *address, struct in_addr *anywhere,
+ struct in_addr *everywhere, int *port, char *hostname, int timespan) {
+
+/* Locate the specified NTP server and return its Internet address and port
+number. */
+
+ unsigned long ipaddr;
+ struct in_addr nowhere[1];
+ struct hostent *host;
+ struct servent *service;
+
+/* Set up the reserved Internet addresses, attempting not to assume that
+addresses are 32 bits. */
+
+ local_to_address(nowhere,INADDR_LOOPBACK);
+ local_to_address(anywhere,INADDR_ANY);
+ local_to_address(everywhere,INADDR_BROADCAST);
+
+/* Check the address, if any. This assumes that the DNS is reliable, or is at
+least checked by someone else. But it doesn't assume that it is accessible, so
+it needs to set up a timeout. */
+
+ if (hostname == NULL)
+ *address = *anywhere;
+ else {
+ if (setjmp(jump_buffer))
+ fatal(0,"unable to set up access to NTP server %s",hostname);
+ errno = 0;
+ if (signal(SIGALRM,jump_handler) == SIG_ERR)
+ fatal(1,"unable to set up signal handler",NULL);
+ alarm((unsigned int)timespan);
+
+/* Look up the Internet name or IP number. */
+
+ if (! isdigit(hostname[0])) {
+ errno = 0;
+ host = gethostbyname(hostname);
+ } else {
+ if ((ipaddr = inet_addr(hostname)) == (unsigned long)-1)
+ fatal(0,"invalid IP number %s",hostname);
+ network_to_address(address,ipaddr);
+ errno = 0;
+ host = gethostbyaddr((void *)address,sizeof(struct in_addr),
+ AF_INET);
+ }
+
+/* Now clear the timer and check the result. */
+
+ clear_alarm();
+ if (host == NULL) fatal(1,"unable to locate IP address/number",NULL);
+ if (host->h_length != sizeof(struct in_addr))
+ fatal(0,"the address does not seem to be an Internet one",NULL);
+ *address = *((struct in_addr **)host->h_addr_list)[0];
+ if (memcmp(address,nowhere,sizeof(struct in_addr)) == 0 ||
+ memcmp(address,anywhere,sizeof(struct in_addr)) == 0 ||
+ memcmp(address,everywhere,sizeof(struct in_addr)) == 0)
+ fatal(0,"reserved IP numbers cannot be used",NULL);
+ if (verbose)
+ fprintf(stderr,
+ "%s: using NTP server %s (%s)\n",
+ argv0,host->h_name,inet_ntoa(*address));
+ }
+
+/* Find out the port number (usually from /etc/services), and leave it in
+network format. This is assumed not to be obtained from a network service!
+Note that a port number is not assumed to be 16 bits. */
+
+ if ((service = getservbyname("ntp","udp")) != NULL) {
+ *port = service->s_port;
+ if (verbose > 2)
+ fprintf(stderr,"Using port %d for NTP\n",port_to_integer(*port));
+ } else {
+ *port = NTP_PORT;
+ if (verbose)
+ fprintf(stderr,
+ "%s: assuming port %d for NTP - check /etc/services\n",
+ argv0,port_to_integer(*port));
+ }
+}
+#endif
diff --git a/contrib/ntp/sntp/internet.h b/contrib/ntp/sntp/internet.h
new file mode 100644
index 000000000000..993dce6a7624
--- /dev/null
+++ b/contrib/ntp/sntp/internet.h
@@ -0,0 +1,47 @@
+/* Copyright (C) 1996 N.M. Maclaren
+ Copyright (C) 1996 The University of Cambridge
+
+This includes all of the 'Internet' headers and definitions used across
+modules, including those for handling timeouts. No changes should be needed
+for any version of Unix with Internet (IP version 5) addressing, but would be
+for other addressing domains. It needs <sys/socket.h> only because AF_INET is
+needed by gethostbyaddr and is defined there rather than in <netdb.h>, for some
+damn-fool reason. */
+
+
+
+#include <setjmp.h>
+#include <signal.h>
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+
+
+
+/* It is most unclear whether these should be here or in kludges.h, as they are
+kludges to keep 32-bit address dependencies out of the main body of internet.c,
+to allow for the much heralded arrival of IP version 6. It will be interesting
+to see whether the universal availability of 64-bit integers arrives first. */
+
+#define local_to_address(x,y) ((x)->s_addr = htonl((unsigned long)y))
+#define network_to_address(x,y) ((x)->s_addr = (y))
+
+#define NTP_PORT htons((unsigned short)123) /* If not in /etc/services */
+#define port_to_integer(x) (ntohs((unsigned short)(x)))
+
+
+#if defined(_SS_MAXSIZE) || defined(_SS_SIZE)
+#define HAVE_IPV6
+#endif
+
+/* Defined in internet.c */
+#ifdef HAVE_IPV6
+extern void find_address (struct sockaddr_storage *address,
+ struct sockaddr_storage *anywhere, struct sockaddr_storage *everwhere,
+ int *port, char *hostname, int timespan);
+#else
+extern void find_address (struct in_addr *address, struct in_addr *anywhere,
+ struct in_addr *everwhere, int *port, char *hostname, int timespan);
+#endif
diff --git a/contrib/ntp/sntp/kludges.h b/contrib/ntp/sntp/kludges.h
new file mode 100644
index 000000000000..dc78c8d7d81c
--- /dev/null
+++ b/contrib/ntp/sntp/kludges.h
@@ -0,0 +1,62 @@
+/* Copyright (C) 1996, 2000 N.M. Maclaren
+ Copyright (C) 1996, 2000 The University of Cambridge
+
+This includes all of the kludges necessary for certain broken systems. It is
+called after all other headers. All of the modules set a flag to say which
+they are, but none of the current kludges critically need that information. */
+
+
+
+/* stdlib.h is broken under SunOS4. */
+
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
+#endif
+
+
+
+/* stdio.h is also broken under SunOS4. */
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+
+
+
+/* netinet/in.h sometimes omits INADDR_LOOPBACK, or makes it conditional on
+peculiar preprocessor symbols. */
+
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK 0x7f000001ul
+#endif
+
+
+
+/* HP-UX up to version 9.x does not have adjtime, so make it fail. This needs
+a flag setting in Makefile. */
+
+#ifdef ADJTIME_MISSING
+#define adjtime(x,y) 1
+#endif
+
+
+
+/* O_NONBLOCK doesn't work under Ultrix 4.3. This needs a flag setting in
+Makefile. */
+
+#ifdef NONBLOCK_BROKEN
+#ifdef O_NONBLOCK
+#undef O_NONBLOCK
+#endif
+#define O_NONBLOCK O_NDELAY
+#endif
+
+
+
+/* Some older systems use EWOULDBLOCK rather than EAGAIN, but don't assume that
+it is defined. The differences are not relevant to this program. */
+
+#ifndef EWOULDBLOCK
+#define EWOULDBLOCK EAGAIN
+#endif
diff --git a/contrib/ntp/sntp/main.c b/contrib/ntp/sntp/main.c
new file mode 100644
index 000000000000..13e527ce6575
--- /dev/null
+++ b/contrib/ntp/sntp/main.c
@@ -0,0 +1,1789 @@
+/* Copyright (C) 1996, 1997, 2000 N.M. Maclaren
+ Copyright (C) 1996, 1997, 2000 The University of Cambridge
+
+This is a complete SNTP implementation, which was easier to write than to port
+xntp to a new version of Unix with any hope of maintaining it thereafter. It
+supports the full SNTP (RFC 2030) client- and server-side challenge-response
+and broadcast protocols. It should achieve nearly optimal accuracy with very
+few transactions, provided only that a client has access to a trusted server
+and that communications are not INVARIABLY slow. As this is the environment in
+which 90-99% of all NTP systems are run ....
+
+The specification of this program is:
+
+ msntp [ --help | -h | -? ] [ -v | -V | -W ]
+ [ -B [ period ] | -S | -q [ -f savefile ] |
+ [ { -r | -a } [ -P prompt ] [ -l lockfile ] ]
+ [ -c count ] [ -e minerr ][ -E maxerr ]
+ [ -d delay | -x [ separation ] [ -f savefile ] ]
+ [ -4 | -6 ] [ address(es) ] ]
+
+ --help, -h and -? all print the syntax of the command.
+
+ -v indicates that diagnostic messages should be written to standard error,
+and -V requests more output for investigating apparently inconsistent
+timestamps. -W requests very verbose debugging output, and will interfere with
+the timing when writing to the terminal (because of line buffered output from
+C); it is useful only when debugging the source. Note that the times produced
+by -V and -W are the corrections needed, and not the error in the local clock.
+
+ -B indicates that it should behave as a server, broadcasting time packets
+at intervals of 'period' minutes. Acceptable values of 'period' are from 1 to
+1440 (a day) and the default is 60. Naturally, this will work only if the
+user has enough privilege.
+
+ -S indicates that it should behave as a server, responding to time requests
+from clients. Naturally, this will work only if the user has enough privilege.
+
+ -q indicates that it will query a savefile that is being maintained by
+it being run in daemon mode.
+
+ The default is that it should behave as a client, and the following options
+are then relevant:
+
+ -r indicates that the system clock should be reset by 'settimeofday'.
+Naturally, this will work only if the user has enough privilege.
+
+ -a indicates that the system clock should be reset by 'adjtime'.
+Naturally, this will work only if the user has enough privilege.
+
+ -x indicates that the program should run as a daemon (i.e. forever), and
+allow for clock drift.
+
+ -4 or -6 force dns resolving to ipv4 or ipv6 addresses.
+
+ The default is to write the current date and time to the standard output in
+a format like '1996 Oct 15 20:17:25.123 + 4.567 +/- 0.089 secs', indicating the
+estimated true (local) time and the error in the local clock. In daemon mode,
+it will add drift information in a format like ' + 1.3 +/- 0.1 ppm', and
+display this at roughly 'separation' intervals.
+
+ 'minerr' is the maximum ignorable variation between the clocks. Acceptable
+values are from 0.001 to 1, and the default is 0.1 if 'address' is specified
+and 0.5 otherwise.
+
+ 'maxerr' is the maximum value of various delays that are deemed acceptable.
+Acceptable values are from 1 to 60, and the default is 5. It should sometimes
+be increased if there are problems with the network, NTP server or system
+clock, but take care.
+
+ 'prompt' is the maximum clock change that will be made automatically.
+Acceptable values are from 1 to 3600, and the default is 30. If the program is
+being run interactively, larger values will cause a prompt. The value may also
+be 'no', and the change will be made without prompting.
+
+ 'count' is the maximum number of NTP packets to require. Acceptable values
+are from 1 to 25 if 'address' is specified and '-x' is not, and from 5 to 25
+otherwise; the default is 5. If the maximum isn't enough, you need a better
+consistency algorithm than this program uses. Don't increase it.
+
+ 'delay' is a rough limit on the total running time in seconds. Acceptable
+values are from 1 to 3600, and the default is 15 if 'address' is specified and
+300 otherwise.
+
+ 'separation' is the time to wait between calls to the server in minutes if
+'address' is specified, and the minimum time between broadcast packets if not.
+Acceptable values are from 1 to 1440 (a day), and the default is 300.
+
+ 'lockfile' may be used in an update mode to ensure that there is only
+one copy of msntp running at once. The default is installation-dependent,
+but will usually be /etc/msntp.pid.
+
+ 'savefile' may be used in daemon mode to store a record of previous
+packets, which may speed up recalculating the drift after msntp has to be
+restarted (e.g. because of network or server outages). The default is
+installation-dependent, but will usually be /etc/msntp.state. Note that
+there is no locking of this file, and using it twice may cause chaos.
+
+ 'address' is the DNS name or IP number of a host to poll; if no name is
+given, the program waits for broadcasts. Note that a single component numeric
+address is not allowed.
+
+For sanity, it is also required that 'minerr' < 'maxerr' < 'delay' (if
+listening for broadcasts, 'delay/count' and, in daemon mode, 'separation') and,
+for sordid Unixish reasons, that 2*'count' < 'delay'. The last could be fixed,
+but isn't worth it. Note that none of the above values are closely linked to
+the limits described in the NTP protocol (RFC 1305). Do not increase the
+compiled-in bounds excessively, or the code will fail.
+
+The algorithm used to decide whether to accept a correction is whether it would
+seem to improve matters. Unlike the 'xntp' suite, little attempt is made to
+handle really knotted scenarios, and diagnostics are written to standard error.
+In non-daemon client mode, it is intended to be run as a command or in a 'cron'
+job. Unlike 'ntpdate', its default mode is simply to display the clock error.
+
+It assumes that floating-point arithmetic is tolerably efficient, which is true
+for even the cheapest personal computer nowadays. If, however, you want to
+port this to a toaster, you may have problems!
+
+In its terminating modes, its return code is EXIT_SUCCESS if the operation was
+completed successfully and EXIT_FAILURE otherwise.
+
+In server or daemon mode, it runs for ever and stops with a return code
+EXIT_FAILURE only after a severe error. Commonly, two server processes will be
+run, one with each of the -B and -S options. In daemon mode, it will fail if
+the server is inaccessible for a long time or seriously sick, and will need
+manual restarting.
+
+
+WARNING: this program has reached its 'hack count' and needs restructuring,
+badly. Perhaps the worst code is in run_daemon(). You are advised not to
+fiddle unless you really have to. */
+
+
+
+#include "header.h"
+
+#include <limits.h>
+#include <float.h>
+#include <math.h>
+
+#define MAIN
+#include "kludges.h"
+#undef MAIN
+
+
+
+/* NTP definitions. Note that these assume 8-bit bytes - sigh. There is
+little point in parameterising everything, as it is neither feasible nor
+useful. It would be very useful if more fields could be defined as
+unspecified. The NTP packet-handling routines contain a lot of extra
+assumptions. */
+
+#define JAN_1970 2208988800.0 /* 1970 - 1900 in seconds */
+#define NTP_SCALE 4294967296.0 /* 2^32, of course! */
+
+#define NTP_PACKET_MIN 48 /* Without authentication */
+#define NTP_PACKET_MAX 68 /* With authentication (ignored) */
+#define NTP_DISP_FIELD 8 /* Offset of dispersion field */
+#define NTP_REFERENCE 16 /* Offset of reference timestamp */
+#define NTP_ORIGINATE 24 /* Offset of originate timestamp */
+#define NTP_RECEIVE 32 /* Offset of receive timestamp */
+#define NTP_TRANSMIT 40 /* Offset of transmit timestamp */
+
+#define NTP_LI_FUDGE 0 /* The current 'status' */
+#define NTP_VERSION 3 /* The current version */
+#define NTP_VERSION_MAX 4 /* The maximum valid version */
+#define NTP_STRATUM 15 /* The current stratum as a server */
+#define NTP_STRATUM_MAX 15 /* The maximum valid stratum */
+#define NTP_POLLING 8 /* The current 'polling interval' */
+#define NTP_PRECISION 0 /* The current 'precision' - 1 sec. */
+
+#define NTP_ACTIVE 1 /* NTP symmetric active request */
+#define NTP_PASSIVE 2 /* NTP symmetric passive response */
+#define NTP_CLIENT 3 /* NTP client request */
+#define NTP_SERVER 4 /* NTP server response */
+#define NTP_BROADCAST 5 /* NTP server broadcast */
+
+#define NTP_INSANITY 3600.0 /* Errors beyond this are hopeless */
+#define RESET_MIN 15 /* Minimum period between resets */
+#define ABSCISSA 3.0 /* Scale factor for standard errors */
+
+
+
+/* Local definitions and global variables (mostly options). These are all of
+the quantities that control the main actions of the program. The first three
+are the only ones that are exported to other modules. */
+
+const char *argv0 = NULL; /* For diagnostics only - not NULL */
+int verbose = 0, /* Default = 0, -v = 1, -V = 2, -W = 3 */
+ operation = 0; /* Defined in header.h - see action */
+const char *lockname = NULL; /* The name of the lock file */
+
+#define COUNT_MAX 25 /* Do NOT increase this! */
+#define WEEBLE_FACTOR 1.2 /* See run_server() and run_daemon() */
+#define ETHERNET_MAX 5 /* See run_daemon() and run_client() */
+
+#define action_display 1 /* Just display the result */
+#define action_reset 2 /* Reset using 'settimeofday' */
+#define action_adjust 3 /* Reset using 'adjtime' */
+#define action_broadcast 4 /* Behave as a server, broadcasting */
+#define action_server 5 /* Behave as a server for clients */
+#define action_query 6 /* Query a daemon savefile */
+
+#define save_read_only 1 /* Read the saved state only */
+#define save_read_check 2 /* Read and check it */
+#define save_write 3 /* Write the saved state */
+#define save_clear 4 /* Clear the saved state */
+
+static const char version[] = VERSION; /* For reverse engineering :-) */
+static int action = 0, /* Defined above - see operation */
+ period = 0, /* -B value in seconds (broadcast) */
+ count = 0, /* -c value in seconds */
+ delay = 0, /* -d or -x value in seconds */
+ attempts = 0, /* Packets transmitted up to 2*count */
+ waiting = 0, /* -d/-c except for in daemon mode */
+ locked = 0; /* set_lock(1) has been called */
+static double outgoing[2*COUNT_MAX], /* Transmission timestamps */
+ minerr = 0.0, /* -e value in seconds */
+ maxerr = 0.0, /* -E value in seconds */
+ prompt = 0.0, /* -p value in seconds */
+ dispersion = 0.0; /* The source dispersion in seconds */
+static FILE *savefile = NULL; /* Holds the data to restart from */
+
+
+
+/* The unpacked NTP data structure, with all the fields even remotely relevant
+to SNTP. */
+
+typedef struct NTP_DATA {
+ unsigned char status, version, mode, stratum, polling, precision;
+ double dispersion, reference, originate, receive, transmit, current;
+} ntp_data;
+
+
+
+/* The following structure is used to keep a record of packets in daemon mode;
+it contains only the information that is actually used for the drift and error
+calculations. */
+
+typedef struct {
+ double dispersion, weight, when, offset, error;
+} data_record;
+
+
+
+void fatal (int syserr, const char *message, const char *insert) {
+
+/* Issue a diagnostic and stop. Be a little paranoid about recursion. */
+
+ int k = errno;
+ static int called = 0;
+
+ if (message != NULL) {
+ fprintf(stderr,"%s: ",argv0);
+ fprintf(stderr,message,insert);
+ fprintf(stderr,"\n");
+ }
+ errno = k;
+ if (syserr) perror(argv0);
+ if (! called) {
+ called = 1;
+ if (savefile != NULL && fclose(savefile))
+ fatal(1,"unable to close the daemon save file",NULL);
+ if (locked) set_lock(0);
+ }
+ exit(EXIT_FAILURE);
+}
+
+
+
+void syntax (int halt) {
+
+/* The standard, unfriendly Unix error message. Some errors are diagnosed more
+helpfully. This is called before any files or sockets are opened. */
+
+ fprintf(stderr,"Syntax: %s [ --help | -h | -? ] [ -v | -V | -W ] \n",argv0);
+ fprintf(stderr," [ -B period | -S | -q [ -f savefile ] |\n");
+ fprintf(stderr," [ { -r | -a } [ -P prompt ] [ -l lockfile ] ]\n");
+ fprintf(stderr," [ -c count ] [ -e minerr ] [ -E maxerr ]\n");
+ fprintf(stderr," [ -d delay | -x [ separation ] ");
+ fprintf(stderr,"[ -f savefile ] ]\n");
+ fprintf(stderr," [ -4 | -6 ] [ address(es) ] ]\n");
+ if (halt) exit(EXIT_FAILURE);
+}
+
+
+
+void display_data (ntp_data *data) {
+
+/* This formats the essential NTP data, as a debugging aid. */
+
+ fprintf(stderr,"sta=%d ver=%d mod=%d str=%d pol=%d dis=%.6f ref=%.6f\n",
+ data->status,data->version,data->mode,data->stratum,data->polling,
+ data->dispersion,data->reference);
+ fprintf(stderr,"ori=%.6f rec=%.6f\n",data->originate,data->receive);
+ fprintf(stderr,"tra=%.6f cur=%.6f\n",data->transmit,data->current);
+}
+
+
+
+void display_packet (unsigned char *packet, int length) {
+
+/* This formats a possible packet very roughly, as a debugging aid. */
+
+ int i;
+
+ if (length < NTP_PACKET_MIN || length > NTP_PACKET_MAX) return;
+ for (i = 0; i < length; ++i) {
+ if (i != 0 && i%32 == 0)
+ fprintf(stderr,"\n");
+ else if (i != 0 && i%4 == 0)
+ fprintf(stderr," ");
+ fprintf(stderr,"%.2x",packet[i]);
+ }
+ fprintf(stderr,"\n");
+}
+
+
+
+void pack_ntp (unsigned char *packet, int length, ntp_data *data) {
+
+/* Pack the essential data into an NTP packet, bypassing struct layout and
+endian problems. Note that it ignores fields irrelevant to SNTP. */
+
+ int i, k;
+ double d;
+
+ memset(packet,0,(size_t)length);
+ packet[0] = (data->status<<6)|(data->version<<3)|data->mode;
+ packet[1] = data->stratum;
+ packet[2] = data->polling;
+ packet[3] = data->precision;
+ d = data->originate/NTP_SCALE;
+ for (i = 0; i < 8; ++i) {
+ if ((k = (int)(d *= 256.0)) >= 256) k = 255;
+ packet[NTP_ORIGINATE+i] = k;
+ d -= k;
+ }
+ d = data->receive/NTP_SCALE;
+ for (i = 0; i < 8; ++i) {
+ if ((k = (int)(d *= 256.0)) >= 256) k = 255;
+ packet[NTP_RECEIVE+i] = k;
+ d -= k;
+ }
+ d = data->transmit/NTP_SCALE;
+ for (i = 0; i < 8; ++i) {
+ if ((k = (int)(d *= 256.0)) >= 256) k = 255;
+ packet[NTP_TRANSMIT+i] = k;
+ d -= k;
+ }
+}
+
+
+
+void unpack_ntp (ntp_data *data, unsigned char *packet, int length) {
+
+/* Unpack the essential data from an NTP packet, bypassing struct layout and
+endian problems. Note that it ignores fields irrelevant to SNTP. */
+
+ int i;
+ double d;
+
+ data->current = current_time(JAN_1970); /* Best to come first */
+ data->status = (packet[0] >> 6);
+ data->version = (packet[0] >> 3)&0x07;
+ data->mode = packet[0]&0x07;
+ data->stratum = packet[1];
+ data->polling = packet[2];
+ data->precision = packet[3];
+ d = 0.0;
+ for (i = 0; i < 4; ++i) d = 256.0*d+packet[NTP_DISP_FIELD+i];
+ data->dispersion = d/65536.0;
+ d = 0.0;
+ for (i = 0; i < 8; ++i) d = 256.0*d+packet[NTP_REFERENCE+i];
+ data->reference = d/NTP_SCALE;
+ d = 0.0;
+ for (i = 0; i < 8; ++i) d = 256.0*d+packet[NTP_ORIGINATE+i];
+ data->originate = d/NTP_SCALE;
+ d = 0.0;
+ for (i = 0; i < 8; ++i) d = 256.0*d+packet[NTP_RECEIVE+i];
+ data->receive = d/NTP_SCALE;
+ d = 0.0;
+ for (i = 0; i < 8; ++i) d = 256.0*d+packet[NTP_TRANSMIT+i];
+ data->transmit = d/NTP_SCALE;
+}
+
+
+
+void make_packet (ntp_data *data, int mode) {
+
+/* Create an outgoing NTP packet, either from scratch or starting from a
+request from a client. Note that it implements the NTP specification, even
+when this is clearly misguided, except possibly for the setting of LI. It
+would be easy enough to add a sanity flag, but I am not in the business of
+designing an alternative protocol (however much better it might be). */
+
+ data->status = NTP_LI_FUDGE<<6;
+ data->stratum = NTP_STRATUM;
+ data->reference = data->dispersion = 0.0;
+ if (mode == NTP_SERVER) {
+ data->mode = (data->mode == NTP_CLIENT ? NTP_SERVER : NTP_PASSIVE);
+ data->originate = data->transmit;
+ data->receive = data->current;
+ } else {
+ data->version = NTP_VERSION;
+ data->mode = mode;
+ data->polling = NTP_POLLING;
+ data->precision = NTP_PRECISION;
+ data->receive = data->originate = 0.0;
+ }
+ data->current = data->transmit = current_time(JAN_1970);
+}
+
+
+
+int read_packet (int which, ntp_data *data, double *off, double *err) {
+
+/* Check the packet and work out the offset and optionally the error. Note
+that this contains more checking than xntp does. This returns 0 for success, 1
+for failure and 2 for an ignored broadcast packet (a kludge for servers). Note
+that it must not change its arguments if it fails. */
+
+ unsigned char receive[NTP_PACKET_MAX+1];
+ double delay1, delay2, x, y;
+ int response = 0, failed, length, i, k;
+
+/* Read the packet and deal with diagnostics. */
+
+ if ((length = read_socket(which,receive,NTP_PACKET_MAX+1,waiting)) <= 0)
+ return 1;
+ if (length < NTP_PACKET_MIN || length > NTP_PACKET_MAX) {
+ if (verbose)
+ fprintf(stderr,"%s: bad length %d for NTP packet on socket %d\n",
+ argv0,length,which);
+ return 1;
+ }
+ if (verbose > 2) {
+ fprintf(stderr,"Incoming packet on socket %d:\n",which);
+ display_packet(receive,length);
+ }
+ unpack_ntp(data,receive,length);
+ if (verbose > 2) display_data(data);
+
+/* Start by checking that the packet looks reasonable. Be a little paranoid,
+but allow for version 1 semantics and sick clients. */
+
+ if (operation == op_server) {
+ if (data->mode == NTP_BROADCAST) return 2;
+ failed = (data->mode != NTP_CLIENT && data->mode != NTP_ACTIVE);
+ } else if (operation == op_listen)
+ failed = (data->mode != NTP_BROADCAST);
+ else {
+ failed = (data->mode != NTP_SERVER && data->mode != NTP_PASSIVE);
+ response = 1;
+ }
+ if (failed || data->status != 0 || data->version < 1 ||
+ data->version > NTP_VERSION_MAX ||
+ data->stratum > NTP_STRATUM_MAX) {
+ if (verbose)
+ fprintf(stderr,
+ "%s: totally spurious NTP packet rejected on socket %d\n",
+ argv0,which);
+ return 1;
+ }
+
+/* Note that the conventions are very poorly defined in the NTP protocol, so we
+have to guess. Any full NTP server perpetrating completely unsynchronised
+packets is an abomination, anyway, so reject it. */
+
+ delay1 = data->transmit-data->receive;
+ delay2 = data->current-data->originate;
+ failed = ((data->stratum != 0 && data->stratum != NTP_STRATUM_MAX &&
+ data->reference == 0.0) ||
+ (operation != op_server && data->transmit == 0.0));
+ if (response &&
+ (data->originate == 0.0 || data->receive == 0.0 ||
+ (data->reference != 0.0 && data->receive < data->reference) ||
+ delay1 < 0.0 || delay1 > NTP_INSANITY || delay2 < 0.0 ||
+ data->dispersion > NTP_INSANITY))
+ failed = 1;
+ if (failed) {
+ if (verbose)
+ fprintf(stderr,
+ "%s: incomprehensible NTP packet rejected on socket %d\n",
+ argv0,which);
+ return 1;
+ }
+
+/* If it is a response, check that it corresponds to one of our requests and
+has got here in a reasonable length of time. */
+
+ if (response) {
+ k = 0;
+ for (i = 0; i < attempts; ++i)
+ if (data->originate == outgoing[i]) {
+ outgoing[i] = 0.0;
+ ++k;
+ }
+ if (k != 1 || delay2 > NTP_INSANITY) {
+ if (verbose)
+ fprintf(stderr,
+ "%s: bad response from NTP server rejected on socket %d\n",
+ argv0,which);
+ return 1;
+ }
+ }
+
+/* Now return the time information. If it is a server response, it contains
+enough information that we can be almost certain that we have not been fooled
+too badly. Heaven help us with broadcasts - make a wild kludge here, and see
+elsewhere for other kludges. */
+
+ if (dispersion < data->dispersion) dispersion = data->dispersion;
+ if (operation == op_listen || operation == op_server) {
+ *off = data->transmit-data->current;
+ *err = NTP_INSANITY;
+ } else {
+ x = data->receive-data->originate;
+ y = (data->transmit == 0.0 ? 0.0 : data->transmit-data->current);
+ *off = 0.5*(x+y);
+ *err = x-y;
+ x = data->current-data->originate;
+ if (0.5*x > *err) *err = 0.5*x;
+ }
+ return 0;
+}
+
+
+
+void format_time (char *text, int length, double offset, double error,
+ double drift, double drifterr) {
+
+/* Format the current time into a string, with the extra information as
+requested. Note that the rest of the program uses the correction needed, which
+is what is printed for diagnostics, but this formats the error in the local
+system for display to users. So the results from this are the negation of
+those printed by the verbose options. */
+
+ int milli, len;
+ time_t now;
+ struct tm *gmt;
+ static const char *months[] = {
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+ };
+
+/* Work out and format the current local time. Note that some semi-ANSI
+systems do not set the return value from (s)printf. */
+
+ now = convert_time(current_time(offset),&milli);
+ errno = 0;
+ if ((gmt = localtime(&now)) == NULL)
+ fatal(1,"unable to work out local time",NULL);
+ len = 24;
+ if (length <= len) fatal(0,"internal error calling format_time",NULL);
+ errno = 0;
+ sprintf(text,"%.4d %s %.2d %.2d:%.2d:%.2d.%.3d",
+ gmt->tm_year+1900,months[gmt->tm_mon],gmt->tm_mday,
+ gmt->tm_hour,gmt->tm_min,gmt->tm_sec,milli);
+ if (strlen(text) != len)
+ fatal(1,"unable to format current local time",NULL);
+
+/* Append the information about the offset, if requested. */
+
+ if (error >= 0.0) {
+ if (length < len+30)
+ fatal(0,"internal error calling format_time",NULL);
+ errno = 0;
+ sprintf(&text[len]," %c %.3f +/- %.3f secs",(offset > 0.0 ? '-' : '+'),
+ (offset > 0.0 ? offset : -offset),dispersion+error);
+ if (strlen(&text[len]) < 22)
+ fatal(1,"unable to format clock correction",NULL);
+ }
+
+/* Append the information about the drift, if requested. */
+
+ if (drifterr >= 0.0) {
+ len = strlen(text);
+ if (length < len+25)
+ fatal(0,"internal error calling format_time",NULL);
+ errno = 0;
+ sprintf(&text[len]," %c %.1f +/- %.1f ppm",
+ (drift > 0.0 ? '-' : '+'),1.0e6*fabs(drift),
+ 1.0e6*drifterr);
+ if (strlen(&text[len]) < 17)
+ fatal(1,"unable to format clock correction",NULL);
+ }
+
+/* It would be better to check for field overflow, but it is a lot of code to
+trap extremely implausible scenarios. This will usually stop chaos from
+spreading. */
+
+ if (strlen(text) >= length)
+ fatal(0,"internal error calling format_time",NULL);
+}
+
+
+
+double reset_clock (double offset, double error, int daemon) {
+
+/* Reset the clock, if appropriate, and return the correction actually used.
+This contains most of the checking for whether changes are worthwhile, except
+in daemon mode. */
+
+ double absoff = (offset < 0 ? -offset : offset);
+ char text[50];
+
+/* If the correction is large, ask for confirmation before proceeding. */
+
+ if (absoff > prompt) {
+ if (! daemon && ftty(stdin) && ftty(stdout)) {
+ printf("The time correction is %.3f +/- %.3f+%.3f seconds\n",
+ offset,dispersion,error);
+ printf("Do you want to correct the time anyway? ");
+ fflush(stdout);
+ if (toupper(getchar()) != 'Y') {
+ printf("OK - quitting\n");
+ fatal(0,NULL,NULL);
+ }
+ } else {
+ sprintf(text,"%.3f +/- %.3f+%.3f",offset,dispersion,error);
+ fatal(0,"time correction too large: %s seconds",text);
+ }
+ }
+
+/* See if the correction is reasonably reliable and worth making. */
+
+ if (absoff < (daemon ? 0.5 : 1.0)*minerr) {
+ if (daemon ? verbose > 1 : verbose)
+ fprintf(stderr,"%s: correction %.3f +/- %.3f+%.3f secs - ignored\n",
+ argv0,offset,dispersion,error);
+ return 0.0;
+ } else if (absoff < 2.0*error) {
+ if (daemon ? verbose > 1 : verbose)
+ fprintf(stderr,
+ "%s: correction %.3f +/- %.3f+%.3f secs - suppressed\n",
+ argv0,offset,dispersion,error);
+ return 0.0;
+ }
+
+/* Make the correction. Provide some protection against the previous
+correction not having completed, but it will rarely help much. */
+
+ adjust_time(offset,(action == action_reset ? 1 : 0),
+ (daemon ? 2.0*minerr : 0.0));
+ if (daemon ? verbose > 1 : verbose) {
+ format_time(text,50,0.0,-1.0,0.0,-1.0);
+ fprintf(stderr,
+ "%s: time changed by %.3f secs to %s +/- %.3f+%.3f\n",
+ argv0,offset,text,dispersion,error);
+ }
+ return offset;
+}
+
+
+
+void run_server (void) {
+
+/* Set up a socket, and either broadcast at intervals or wait for requests.
+It is quite tricky to get this to fail, and it will usually indicate that the
+local system is sick. */
+
+ unsigned char transmit[NTP_PACKET_MIN];
+ ntp_data data;
+ double started = current_time(JAN_1970), successes = 0.0, failures = 0.0,
+ broadcasts = 0.0, weeble = 1.0, x, y;
+ int i, j;
+
+ open_socket(0,NULL,delay);
+ while (1) {
+
+/* In server mode, provide some tracing of normal running (but not too much,
+except when debugging!) */
+
+ if (operation == op_server) {
+ x = current_time(JAN_1970)-started;
+ if (verbose && x/3600.0+successes+failures >= weeble) {
+ weeble *= WEEBLE_FACTOR;
+ x -= 3600.0*(i = (int)(x/3600.0));
+ x -= 60.0*(j = (int)(x/60.0));
+ if (i > 0)
+ fprintf(stderr,"%s: after %d hours %d mins ",argv0,i,j);
+ else if (j > 0)
+ fprintf(stderr,"%s: after %d mins %.0f secs ",argv0,j,x);
+ else
+ fprintf(stderr,"%s: after %.1f secs ",argv0,x);
+ fprintf(stderr,"%.0f acc. %.0f rej. %.0f b'cast\n",
+ successes,failures,broadcasts);
+ }
+
+/* Respond to incoming requests or plaster broadcasts over the net. Note that
+we could skip almost all of the decoding, but it provides a healthy amount of
+error detection. We could print some information on incoming packets, but the
+code is not structured to do this very helpfully. */
+
+ i = read_packet(0,&data,&x,&y);
+ if (i == 2) {
+ ++broadcasts;
+ continue;
+ } else if (i != 0) {
+ ++failures;
+ continue;
+ } else {
+ ++successes;
+ make_packet(&data,NTP_SERVER);
+ }
+ } else {
+ do_nothing(period);
+ make_packet(&data,NTP_BROADCAST);
+ }
+ if (verbose > 2) {
+ fprintf(stderr,"Outgoing packet:\n");
+ display_data(&data);
+ }
+ pack_ntp(transmit,NTP_PACKET_MIN,&data);
+ if (verbose > 2) display_packet(transmit,NTP_PACKET_MIN);
+ write_socket(0,transmit,NTP_PACKET_MIN);
+ }
+}
+
+
+
+double estimate_stats (int *a_total, int *a_index, data_record *record,
+ double correction, double *a_disp, double *a_when, double *a_offset,
+ double *a_error, double *a_drift, double *a_drifterr, int *a_wait,
+ int update) {
+
+/* This updates the running statistics and returns the best estimate of what to
+do now. It returns the timestamp relevant to the correction. If broadcasts
+are rare and the drift is large, it will fail - you should then use a better
+synchronisation method. It will also fail if something goes severely wrong
+(e.g. if the local clock is reset by another process or the transmission errors
+are beyond reason).
+
+There is a kludge for synchronisation loss during down time. If it detects
+this, it will update only the history data and return zero; this is then
+handled specially in run_daemon(). While it could correct the offset, this
+might not always be the right thing to do. */
+
+ double weight, disp, when, offset, error, drift, drifterr,
+ now, e, w, x, y, z;
+ int total = *a_total, index = *a_index, wait = *a_wait, i;
+ char text[50];
+
+/* Correct the previous data and store a new entry in the circular buffer. */
+
+ for (i = 0; i < total; ++i) {
+ record[i].when += correction;
+ record[i].offset -= correction;
+ }
+ if (update) {
+ record[index].dispersion = *a_disp;
+ record[index].when = *a_when;
+ record[index].offset = *a_offset;
+ if (verbose > 1)
+ fprintf(stderr,"%s: corr=%.3f when=%.3f disp=%.3f off=%.3f",
+ argv0,correction,*a_when,*a_disp,*a_offset); /* See below */
+ if (operation == op_listen) {
+ if (verbose > 1) fprintf(stderr,"\n");
+ record[index].error = minerr;
+ record[index].weight = 1.0;
+ } else {
+ if (verbose > 1) fprintf(stderr," err=%.3f\n",*a_error);
+ record[index].error = x = *a_error;
+ record[index].weight = 1.0/(x > minerr ? x*x : minerr*minerr);
+ }
+ if (++index >= count) index = 0;
+ *a_index = index;
+ if (++total > count) total = count;
+ *a_total = total;
+ if (verbose > 2)
+ fprintf(stderr,"corr=%.6f tot=%d ind=%d\n",correction,total,index);
+ }
+
+/* If there is insufficient data yet, use the latest estimates and return
+forthwith. Note that this will not work for broadcasts, but they will be
+disabled in run_daemon(). */
+
+ if ((operation == op_listen && total < count && update) || total < 3) {
+ *a_drift = 0.0;
+ *a_drifterr = -1.0;
+ *a_wait = delay;
+ return *a_when;
+ }
+
+/* Work out the average time, offset, error etc. Note that the dispersion is
+not subject to the central limit theorem. Unfortunately, the variation in the
+source's dispersion is our only indication of how consistent its clock is. */
+
+ disp = weight = when = offset = y = 0.0;
+ for (i = 0; i < total; ++i) {
+ weight += w = record[i].weight;
+ when += w*record[i].when;
+ offset += w*record[i].offset;
+ y += w*record[i].dispersion;
+ if (disp < record[i].dispersion)
+ disp = record[i].dispersion;
+ }
+ when /= weight;
+ offset /= weight;
+ y /= weight;
+ if (verbose > 2)
+ fprintf(stderr,"disp=%.6f wgt=%.3f when=%.6f off=%.6f\n",
+ disp,weight,when,offset);
+
+/* If there is enough data, estimate the drift and errors by regression. Note
+that it is essential to calculate the mean square error, not the mean error. */
+
+ error = drift = x = z = 0.0;
+ for (i = 0; i < total; ++i) {
+ w = record[i].weight/weight;
+ x += w*(record[i].when-when)*(record[i].when-when);
+ drift += w*(record[i].when-when)*(record[i].offset-offset);
+ z += w*(record[i].offset-offset)*(record[i].offset-offset);
+ error += w*record[i].error*record[i].error+
+ 2.0*w*(record[i].dispersion-y)*(record[i].dispersion-y);
+ }
+ if (verbose > 2)
+ fprintf(stderr,"X2=%.3f XY=%.6f Y2=%.9f E2=%.9f ",x,drift,z,error);
+
+/* When calculating the errors, add some paranoia mainly to check for coding
+errors and complete lunacy, attempting to retry if at all possible. Because
+glitches at this point are so common, log a reset even in non-verbose mode.
+There will be more thorough checks later. Note that we cannot usefully check
+the error for broadcasts. */
+
+ z -= drift*drift/x;
+ if (verbose > 2) fprintf(stderr,"S2=%.9f\n",z);
+ if (! update) {
+ if (z > 1.0e6)
+ fatal(0,"stored data too unreliable for time estimation",NULL);
+ } else if (operation == op_client) {
+ e = error+disp*disp+minerr*minerr;
+ if (z > e) {
+ if (verbose || z >= maxerr*maxerr)
+ fprintf(stderr,
+ "%s: excessively high error %.3f > %.3f > %.3f\n",
+ argv0,sqrt(z),sqrt(e),sqrt(error));
+ if (total <= 1)
+ return 0.0;
+ else if (z < maxerr*maxerr) {
+ sprintf(text,"resetting on error %.3g > %.3g",
+ sqrt(z),sqrt(e));
+ log_message(text);
+ return 0.0;
+ } else
+ fatal(0,"incompatible (i.e. erroneous) timestamps",NULL);
+ } else if (z > error && verbose)
+ fprintf(stderr,
+ "%s: anomalously high error %.3f > %.3f, but < %.3f\n",
+ argv0,sqrt(z),sqrt(error),sqrt(e));
+ } else {
+ if (z > maxerr*maxerr)
+ fatal(0,"broadcasts too unreliable for time estimation",NULL);
+ }
+ drift /= x;
+ drifterr = ABSCISSA*sqrt(z/(x*total));
+ error = (operation == op_listen ? minerr : 0.0)+ABSCISSA*sqrt(z/total);
+ if (verbose > 2)
+ fprintf(stderr,"err=%.6f drift=%.6f+/-%.6f\n",error,drift,drifterr);
+ if (error+drifterr*delay > NTP_INSANITY)
+ fatal(0,"unable to get a reasonable drift estimate",NULL);
+
+/* Estimate the optimal short-loop period, checking it carefully. Remember to
+check that this whole process is likely to be accurate enough and that the
+delay function may be inaccurate. */
+
+ wait = delay;
+ x = (drift < 0.0 ? -drift : drift);
+ if (x*delay < 0.5*minerr) {
+ if (verbose > 2) fprintf(stderr,"Drift too small to correct\n");
+ } else if (x < 2.0*drifterr) {
+ if (verbose > 2)
+ fprintf(stderr,"Drift correction suppressed\n");
+ } else {
+ if ((z = drifterr*delay) < 0.5*minerr) z = 0.5*minerr;
+ wait = (x < z/delay ? delay : (int)(z/x+0.5));
+ wait = (int)(delay/(int)(delay/(double)wait+0.999)+0.999);
+ if (wait > delay)
+ fatal(0,"internal error in drift calculation",NULL);
+ if (update && (drift*wait > maxerr || wait < RESET_MIN)) {
+ sprintf(text,"%.6f+/-%.6f",drift,drifterr);
+ fatal(0,"drift correction too large: %s",text);
+ }
+ }
+ if (wait < *a_wait/2) wait = *a_wait/2;
+ if (wait > *a_wait*2) wait = *a_wait*2;
+
+/* Now work out what the correction should be, as distinct from what it should
+have been, remembering that older times are less certain. */
+
+ now = current_time(JAN_1970);
+ x = now-when;
+ offset += x*drift;
+ error += x*drifterr;
+ for (i = 0; i < total; ++i) {
+ x = now-record[i].when;
+ z = record[i].error+x*drifterr;
+ if (z < error) {
+ when = record[i].when;
+ offset = record[i].offset+x*drift;
+ error = z;
+ }
+ }
+ if (verbose > 2)
+ fprintf(stderr,"now=%.6f when=%.6f off=%.6f err=%.6f wait=%d\n",
+ now,when,offset,error,wait);
+
+/* Finally, return the result. */
+
+ *a_disp = disp;
+ *a_when = when;
+ *a_offset = offset;
+ *a_error = error;
+ *a_drift = drift;
+ *a_drifterr = drifterr;
+ *a_wait = wait;
+ return now;
+}
+
+
+
+double correct_drift (double *a_when, double *a_offset, double drift) {
+
+/* Correct for the drift since the last time it was done, provided that a long
+enough time has elapsed. And do remember to kludge up the time and
+discrepancy, when appropriate. */
+
+ double d, x;
+
+ d = current_time(JAN_1970)-*a_when;
+ *a_when += d;
+ x = *a_offset+d*drift;
+ if (verbose > 2)
+ fprintf(stderr,"Correction %.6f @ %.6f off=%.6f ",x,*a_when,*a_offset);
+ if (d >= waiting && (x < 0.0 ? -x : x) >= 0.5*minerr) {
+ if (verbose > 2) fprintf(stderr,"performed\n");
+ adjust_time(x,(action == action_reset ? 1 : 0),0.5*minerr);
+ *a_offset = 0.0;
+ return x;
+ } else {
+ if (verbose > 2) fprintf(stderr,"ignored\n");
+ *a_offset = x;
+ return 0.0;
+ }
+}
+
+
+
+void handle_saving (int operation, int *total, int *index, int *cycle,
+ data_record *record, double *previous, double *when, double *correction) {
+
+/* This handles the saving and restoring of the state to a file. While it is
+subject to spoofing, this is not a major security problem. But, out of general
+paranoia, check everything in sight when restoring. Note that this function
+has no external effect if something goes wrong. */
+
+ struct {
+ data_record record[COUNT_MAX];
+ double previous, when, correction;
+ int operation, delay, count, total, index, cycle, waiting;
+ } buffer;
+ double x, y;
+ int i, j;
+
+ if (savefile == NULL) return;
+
+/* Read the restart file and print its data in diagnostic mode. Note that some
+care is necessary to avoid introducing a security exposure - but we trust the
+C library not to trash the stack on bad numbers! */
+
+ if (operation == save_read_only || operation == save_read_check) {
+ if (fread(&buffer,sizeof(buffer),1,savefile) != 1 || ferror(savefile)) {
+ if (ferror(savefile))
+ fatal(1,"unable to read record from daemon save file",NULL);
+ else if (verbose)
+ fprintf(stderr,"%s: bad daemon restart information\n",argv0);
+ return;
+ }
+ if (verbose > 2) {
+ fprintf(stderr,"Reading prev=%.6f when=%.6f corr=%.6f\n",
+ buffer.previous,buffer.when,buffer.correction);
+ fprintf(stderr,"op=%d dly=%d cnt=%d tot=%d ind=%d cyc=%d wait=%d\n",
+ buffer.operation,buffer.delay,buffer.count,buffer.total,
+ buffer.index,buffer.cycle,buffer.waiting);
+ if (buffer.total < COUNT_MAX)
+ for (i = 0; i < buffer.total; ++i)
+ fprintf(stderr,
+ "disp=%.6f wgt=%.3f when=%.6f off=%.6f err=%.6f\n",
+ buffer.record[i].dispersion,buffer.record[i].weight,
+ buffer.record[i].when,buffer.record[i].offset,
+ buffer.record[i].error);
+ }
+
+
+/* Start checking the data for sanity. */
+
+ if (buffer.operation == 0 && buffer.delay == 0 && buffer.count == 0) {
+ if (operation < 0)
+ fatal(0,"the daemon save file has been cleared",NULL);
+ if (verbose)
+ fprintf(stderr,"%s: restarting from a cleared file\n",argv0);
+ return;
+ }
+ if (operation == save_read_check) {
+ if (buffer.operation != operation || buffer.delay != delay ||
+ buffer.count != count) {
+ if (verbose)
+ fprintf(stderr,"%s: different parameters for restart\n",
+ argv0);
+ return;
+ }
+ if (buffer.total < 1 || buffer.total > count || buffer.index < 0 ||
+ buffer.index >= count || buffer.cycle < 0 ||
+ buffer.cycle >= count || buffer.correction < -maxerr ||
+ buffer.correction > maxerr || buffer.waiting < RESET_MIN ||
+ buffer.waiting > delay || buffer.previous > buffer.when ||
+ buffer.previous < buffer.when-count*delay ||
+ buffer.when >= *when) {
+ if (verbose)
+ fprintf(stderr,"%s: corrupted restart information\n",argv0);
+ return;
+ }
+
+/* Checking the record is even more tedious. */
+
+ x = *when;
+ y = 0.0;
+ for (i = 0; i < buffer.total; ++i) {
+ if (buffer.record[i].dispersion < 0.0 ||
+ buffer.record[i].dispersion > maxerr ||
+ buffer.record[i].weight <= 0.0 ||
+ buffer.record[i].weight > 1.001/(minerr*minerr) ||
+ buffer.record[i].offset < -count*maxerr ||
+ buffer.record[i].offset > count*maxerr ||
+ buffer.record[i].error < 0.0 ||
+ buffer.record[i].error > maxerr) {
+ if (verbose)
+ fprintf(stderr,"%s: corrupted restart record\n",argv0);
+ return;
+ }
+ if (buffer.record[i].when < x) x = buffer.record[i].when;
+ if (buffer.record[i].when > y) y = buffer.record[i].when;
+ }
+
+/* Check for consistency and, finally, whether this is too old. */
+
+ if (y > buffer.when || y-x < (buffer.total-1)*delay ||
+ y-x > (buffer.total-1)*count*delay) {
+ if (verbose)
+ fprintf(stderr,"%s: corrupted restart times\n",argv0);
+ return;
+ }
+ if (buffer.when < *when-count*delay) {
+ if (verbose)
+ fprintf(stderr,"%s: restart information too old\n",argv0);
+ return;
+ }
+ }
+
+/* If we get here, just copy the data back. */
+
+ memcpy(record,buffer.record,sizeof(buffer.record));
+ *previous = buffer.previous;
+ *when = buffer.when;
+ *correction = buffer.correction;
+ *total = buffer.total;
+ *index = buffer.index;
+ *cycle = buffer.cycle;
+ waiting = buffer.waiting;
+ memset(&buffer,0,sizeof(buffer));
+
+/* Print out the data if requested. */
+
+ if (verbose > 1) {
+ fprintf(stderr,"%s: prev=%.3f when=%.3f corr=%.3f\n",
+ argv0,*previous,*when,*correction);
+ for (i = 0; i < *total; ++i) {
+ if ((j = i+*index-*total) < 0) j += *total;
+ fprintf(stderr,"%s: when=%.3f disp=%.3f off=%.3f",
+ argv0,record[j].when,record[j].dispersion,record[j].offset);
+ if (operation == op_client)
+ fprintf(stderr," err=%.3f\n",record[j].error);
+ else
+ fprintf(stderr,"\n");
+ }
+ }
+
+/* All errors on output are fatal. */
+
+ } else if (operation == save_write) {
+ memcpy(buffer.record,record,sizeof(buffer.record));
+ buffer.previous = *previous;
+ buffer.when = *when;
+ buffer.correction = *correction;
+ buffer.operation = operation;
+ buffer.delay = delay;
+ buffer.count = count;
+ buffer.total = *total;
+ buffer.index = *index;
+ buffer.cycle = *cycle;
+ buffer.waiting = waiting;
+ if (fseek(savefile,0l,SEEK_SET) != 0 ||
+ fwrite(&buffer,sizeof(buffer),1,savefile) != 1 ||
+ fflush(savefile) != 0 || ferror(savefile))
+ fatal(1,"unable to write record to daemon save file",NULL);
+ if (verbose > 2) {
+ fprintf(stderr,"Writing prev=%.6f when=%.6f corr=%.6f\n",
+ *previous,*when,*correction);
+ fprintf(stderr,"op=%d dly=%d cnt=%d tot=%d ind=%d cyc=%d wait=%d\n",
+ operation,delay,count,*total,*index,*cycle,waiting);
+ if (*total < COUNT_MAX)
+ for (i = 0; i < *total; ++i)
+ fprintf(stderr,
+ "disp=%.6f wgt=%.3f when=%.6f off=%.6f err=%.6f\n",
+ record[i].dispersion,record[i].weight,
+ record[i].when,record[i].offset,record[i].error);
+ }
+
+/* Clearing the save file is similar. */
+
+ } else if (operation == save_clear) {
+ if (fseek(savefile,0l,SEEK_SET) != 0 ||
+ fwrite(&buffer,sizeof(buffer),1,savefile) != 1 ||
+ fflush(savefile) != 0 || ferror(savefile))
+ fatal(1,"unable to clear daemon save file",NULL);
+ } else
+ fatal(0,"internal error in handle_saving",NULL);
+}
+
+
+
+void query_savefile (void) {
+
+/* This queries a daemon save file. */
+
+ double previous, when, correction = 0.0, offset = 0.0, error = -1.0,
+ drift = 0.0, drifterr = -1.0;
+ data_record record[COUNT_MAX];
+ int total = 0, index = 0, cycle = 0;
+ char text[100];
+
+/* This is a few lines stripped out of run_daemon() and slightly hacked. */
+
+ previous = when = current_time(JAN_1970);
+ if (verbose > 2) {
+ format_time(text,50,0.0,-1.0,0.0,-1.0);
+ fprintf(stderr,"Started=%.6f %s\n",when,text);
+ }
+ handle_saving(save_read_only,&total,&index,&cycle,record,&previous,&when,
+ &correction);
+ estimate_stats(&total,&index,record,correction,&dispersion,
+ &when,&offset,&error,&drift,&drifterr,&waiting,0);
+ format_time(text,100,offset,error,drift,drifterr);
+ printf("%s\n",text);
+ if (fclose(savefile)) fatal(1,"unable to close daemon save file",NULL);
+ if (verbose > 2) fprintf(stderr,"Stopped normally\n");
+ exit(EXIT_SUCCESS);
+}
+
+
+
+void run_daemon (char *hostnames[], int nhosts, int initial) {
+
+/* This does not adjust the time between calls to the server, but it does
+adjust the time between clock resets. This function will survive short periods
+of server inaccessibility or network glitches, but not long ones, and will then
+need restarting manually.
+
+It is far too complex for a single function, but could really only be
+simplified by making most of its variables global or by a similarly horrible
+trick. Oh, for nested scopes as in Algol 68! */
+
+ double history[COUNT_MAX], started, previous, when, correction = 0.0,
+ weeble = 1.0, accepts = 0.0, rejects = 0.0, flushes = 0.0,
+ replicates = 0.0, skips = 0.0, offset = 0.0, error = -1.0,
+ drift = 0.0, drifterr = -1.0, maxoff = 0.0, x;
+ data_record record[COUNT_MAX];
+ int total = 0, index = 0, item = 0, rej_level = 0, rep_level = 0,
+ cycle = 0, retry = 1, i, j, k;
+ unsigned char transmit[NTP_PACKET_MIN];
+ ntp_data data;
+ char text[100];
+
+/* After initialising, restore from a previous run if possible. Note that
+only a few of the variables are actually needed to control the operation and
+the rest are mainly for diagnostics. */
+
+ started = previous = when = current_time(JAN_1970);
+ if (verbose > 2) {
+ format_time(text,50,0.0,-1.0,0.0,-1.0);
+ fprintf(stderr,"Started=%.6f %s\n",when,text);
+ }
+ if (initial) {
+ handle_saving(save_read_check,&total,&index,&cycle,record,
+ &previous,&when,&correction);
+ cycle = (nhosts > 0 ? cycle%nhosts : 0);
+ if (total > 0 && started-previous < delay) {
+ if (verbose > 2) fprintf(stderr,"Last packet too recent\n");
+ retry = 0;
+ }
+ if (verbose > 2)
+ fprintf(stderr,"prev=%.6f when=%.6f retry=%d\n",
+ previous,when,retry);
+ for (i = 0; i < nhosts; ++i) open_socket(i,hostnames[i],delay);
+ if (action != action_display) {
+ set_lock(1);
+ locked = 1;
+ }
+ }
+ dispersion = 0.0;
+ attempts = 0;
+ for (i = 0; i < count; ++i) history[i] = 0.0;
+ while (1) {
+
+/* Print out a reasonable amount of diagnostics, rather like a server. Note
+that it may take a little time, but shouldn't affect the estimates much. Then
+check that we aren't in a failing loop. */
+
+ if (verbose > 2) fprintf(stderr,"item=%d rej=%d\n",item,rej_level);
+ x = current_time(JAN_1970)-started;
+ if (verbose &&
+ x/3600.0+accepts+rejects+flushes+replicates+skips >= weeble) {
+ weeble *= WEEBLE_FACTOR;
+ x -= 3600.0*(i = (int)(x/3600.0));
+ x -= 60.0*(j = (int)(x/60.0));
+ if (i > 0)
+ fprintf(stderr,"%s: after %d hours %d mins ",argv0,i,j);
+ else if (j > 0)
+ fprintf(stderr,"%s: after %d mins %.0f secs ",argv0,j,x);
+ else
+ fprintf(stderr,"%s: after %.1f secs ",argv0,x);
+ fprintf(stderr,"acc. %.0f rej. %.0f flush %.0f",
+ accepts,rejects,flushes);
+ if (operation == op_listen)
+ fprintf(stderr," rep. %.0f skip %.0f",replicates,skips);
+ fprintf(stderr," max.off. %.3f corr. %.3f\n",maxoff,correction);
+ format_time(text,100,offset,error,drift,drifterr);
+ fprintf(stderr,"%s: %s\n",argv0,text);
+ maxoff = 0.0;
+ }
+ if (current_time(JAN_1970)-previous > count*delay) {
+ if (verbose)
+ fprintf(stderr,"%s: no packets in too long a period\n",argv0);
+ return;
+ }
+
+/* Listen for the next broadcast packet. This allows up to ETHERNET_MAX
+replications per packet, for systems with multiple addresses for receiving
+broadcasts; the only reason for a limit is to protect against broken NTP
+servers always returning the same time. */
+
+ if (operation == op_listen) {
+ flushes += flush_socket(0);
+ if (read_packet(0,&data,&offset,&error)) {
+ ++rejects;
+ if (++rej_level > count)
+ fatal(0,"too many bad or lost packets",NULL);
+ if (action != action_display && drifterr >= 0.0) {
+ correction += correct_drift(&when,&offset,drift);
+ handle_saving(save_write,&total,&index,&cycle,record,
+ &previous,&when,&correction);
+ }
+ continue;
+ }
+ if ((rej_level -= (count < 5 ? count : 5)) < 0) rej_level = 0;
+ x = data.transmit;
+ for (i = 0; i < count; ++i)
+ if (x == history[i]) {
+ ++replicates;
+ if (++rep_level > ETHERNET_MAX)
+ fatal(0,"too many replicated packets",NULL);
+ goto continue1;
+ }
+ rep_level = 0;
+ history[item] = x;
+ if (++item >= count) item = 0;
+
+/* Accept a packet only after a long enough period has elapsed. */
+
+ when = data.current;
+ if (! retry && when < previous+delay) {
+ if (verbose > 2) fprintf(stderr,"Skipping too recent packet\n");
+ ++skips;
+ continue;
+ }
+ retry = 0;
+ if (verbose > 2)
+ fprintf(stderr,"Offset=%.6f @ %.6f disp=%.6f\n",
+ offset,when,dispersion);
+
+/* Handle the client/server model. It keeps a record of transmitted times,
+mainly out of paranoia. The waiting time is kludged up to attempt to provide
+reasonable resilience against both lost packets and dead servers. But it
+won't handle much of either, and will stop after a while, needing manual
+restarting. Running it under cron is the best approach. */
+
+ } else {
+ if (! retry) {
+ if (verbose > 2) fprintf(stderr,"Sleeping for %d\n",waiting);
+ do_nothing(waiting);
+ }
+ make_packet(&data,NTP_CLIENT);
+ outgoing[item] = data.transmit;
+ if (++item >= 2*count) item = 0;
+ if (attempts < 2*count) ++attempts;
+ if (verbose > 2) {
+ fprintf(stderr,"Outgoing packet on socket %d:\n",cycle);
+ display_data(&data);
+ }
+ pack_ntp(transmit,NTP_PACKET_MIN,&data);
+ if (verbose > 2) display_packet(transmit,NTP_PACKET_MIN);
+ flushes += flush_socket(cycle);
+ write_socket(cycle,transmit,NTP_PACKET_MIN);
+
+/* Read the packet and check that it is an appropriate response. Because this
+is rather more numerically sensitive than simple resynchronisation, reject all
+very inaccurate packets. Be careful if you modify this, because the error
+handling is rather nasty to avoid replicating code. */
+
+ k = read_packet(cycle,&data,&offset,&error);
+ if (++cycle >= nhosts) cycle = 0;
+ if (! k)
+ when = (data.originate+data.current)/2.0;
+ else if (action != action_display && drifterr >= 0.0) {
+ correction += correct_drift(&when,&offset,drift);
+ handle_saving(save_write,&total,&index,&cycle,record,
+ &previous,&when,&correction);
+ }
+ if (! k && ! retry && when < previous+delay-2) {
+ if (verbose)
+ fprintf(stderr,"%s: packets out of order on socket %d\n",
+ argv0,cycle);
+ k = 1;
+ }
+ if (! k && data.current-data.originate > maxerr) {
+ if (verbose)
+ fprintf(stderr,
+ "%s: very slow response rejected on socket %d\n",
+ argv0,cycle);
+ k = 1;
+ }
+
+/* Count the number of rejected packets and fail if there are too many. */
+
+ if (k) {
+ ++rejects;
+ if (++rej_level > count)
+ fatal(0,"too many bad or lost packets",NULL);
+ else {
+ retry = 1;
+ continue;
+ }
+ } else
+ retry = 0;
+ if ((rej_level -= (count < 5 ? count : 5)) < 0) rej_level = 0;
+ if (verbose > 2)
+ fprintf(stderr,"Offset=%.6f+/-%.6f @ %.6f disp=%.6f\n",
+ offset,error,when,dispersion);
+ }
+
+/* Calculate the statistics, and display the results or make the initial
+correction. Note that estimate_stats() will return zero if a timestamp
+indicates synchronisation loss (usually due to down time or a change of server,
+somewhere upstream), and that the recovery operation is unstructured, so great
+care should be taken when modifying it. Also, we want to clear the saved state
+is the statistics are bad. */
+
+ handle_saving(save_clear,&total,&index,&cycle,record,&previous,&when,
+ &correction);
+ ++accepts;
+ dispersion = data.dispersion;
+ previous = when =
+ estimate_stats(&total,&index,record,correction,&dispersion,
+ &when,&offset,&error,&drift,&drifterr,&waiting,1);
+ if (verbose > 2) {
+ fprintf(stderr,"tot=%d ind=%d dis=%.3f when=%.3f off=%.3f ",
+ total,index,dispersion,when,offset);
+ fprintf(stderr,"err=%.3f wait=%d\n",error,waiting);
+ }
+ if (when == 0.0) return;
+ x = (maxoff < 0.0 ? -maxoff : maxoff);
+ if ((offset < 0.0 ? -offset : offset) > x) maxoff = offset;
+ correction = 0.0;
+ if (operation == op_client || accepts >= count) {
+ if (action == action_display) {
+ format_time(text,100,offset,error,drift,drifterr);
+ printf("%s\n",text);
+ } else {
+ x = reset_clock(offset,error,1);
+ correction += x;
+ offset -= x;
+ }
+ } else
+ waiting = delay;
+ handle_saving(save_write,&total,&index,&cycle,record,&previous,&when,
+ &correction);
+
+/* Now correct the clock for a while, before getting another packet and
+updating the statistics. */
+
+ while (when < previous+delay-waiting) {
+ do_nothing(waiting);
+ if (action == action_display)
+ when += waiting;
+ else {
+ correction += correct_drift(&when,&offset,drift);
+ handle_saving(save_write,&total,&index,&cycle,record,
+ &previous,&when,&correction);
+ }
+ }
+continue1: ;
+ }
+}
+
+
+
+void run_client (char *hostnames[], int nhosts) {
+
+/* Get enough responses to do something with; or not, as the case may be. Note
+that it allows for half of the packets to be bad, so may make up to twice as
+many attempts as specified by the -c value. The deadline checking is merely
+paranoia, to protect against broken signal handling - it cannot easily be
+triggered if the signal handling works. */
+
+ double history[COUNT_MAX], guesses[COUNT_MAX], offset, error, deadline,
+ a, b, x, y;
+ int accepts = 0, rejects = 0, flushes = 0, replicates = 0, cycle = 0, k;
+ unsigned char transmit[NTP_PACKET_MIN];
+ ntp_data data;
+ char text[100];
+
+ if (verbose > 2) {
+ format_time(text,50,0.0,-1.0,0.0,-1.0);
+ fprintf(stderr,"Started=%.6f %s\n",current_time(JAN_1970),text);
+ }
+ for (k = 0; k < nhosts; ++k) open_socket(k,hostnames[k],delay);
+ if (action != action_display) {
+ set_lock(1);
+ locked = 1;
+ }
+ attempts = 0;
+ deadline = current_time(JAN_1970)+delay;
+
+/* Listen to broadcast packets and select the best (i.e. earliest). This will
+be sensitive to a bad NTP broadcaster, but I believe such things are very rare
+in practice. In any case, if you have one, it is probably the only one on your
+subnet, so you are knackered! This allows up to ETHERNET_MAX replications per
+packet, for systems with multiple addresses for receiving broadcasts; the only
+reason for a limit is to protect against broken NTP servers always returning
+the same time. */
+
+ if (operation == op_listen) {
+ while (accepts < count) {
+ if (current_time(JAN_1970) > deadline)
+ fatal(0,"not enough valid broadcasts received in time",NULL);
+ flushes += flush_socket(0);
+ if (read_packet(0,&data,&x,&y)) {
+ if (++rejects > count)
+ fatal(0,"too many bad or lost packets",NULL);
+ else
+ continue;
+ } else {
+ a = data.transmit;
+ for (k = 0; k < accepts; ++k)
+ if (a == history[k]) {
+ if (++replicates > ETHERNET_MAX*count)
+ fatal(0,"too many replicated packets",NULL);
+ goto continue1;
+ }
+ history[accepts] = a;
+ guesses[accepts++] = x;
+ }
+ if (verbose > 2)
+ fprintf(stderr,"Offset=%.6f disp=%.6f\n",x,dispersion);
+ else if (verbose > 1)
+ fprintf(stderr,"%s: offset=%.3f disp=%.3f\n",
+ argv0,x,dispersion);
+
+/* Note that bubblesort IS a good method for this amount of data. */
+
+ for (k = accepts-2; k >= 0; --k)
+ if (guesses[k] < guesses[k+1])
+ break;
+ else {
+ x = guesses[k];
+ guesses[k] = guesses[k+1];
+ guesses[k+1] = x;
+ }
+continue1: ;
+ }
+ offset = guesses[0];
+ error = minerr+guesses[count <= 5 ? count-1 : 5]-offset;
+ if (verbose > 2)
+ fprintf(stderr,"accepts=%d rejects=%d flushes=%d replicates=%d\n",
+ accepts,rejects,flushes,replicates);
+
+/* Handle the client/server model. It keeps a record of transmitted times,
+mainly out of paranoia. */
+
+ } else {
+ offset = 0.0;
+ error = NTP_INSANITY;
+ while (accepts < count && attempts < 2*count) {
+ if (current_time(JAN_1970) > deadline)
+ fatal(0,"not enough valid responses received in time",NULL);
+ make_packet(&data,NTP_CLIENT);
+ outgoing[attempts++] = data.transmit;
+ if (verbose > 2) {
+ fprintf(stderr,"Outgoing packet on socket %d:\n",cycle);
+ display_data(&data);
+ }
+ pack_ntp(transmit,NTP_PACKET_MIN,&data);
+ if (verbose > 2) display_packet(transmit,NTP_PACKET_MIN);
+ flushes += flush_socket(cycle);
+ write_socket(cycle,transmit,NTP_PACKET_MIN);
+ if (read_packet(cycle,&data,&x,&y)) {
+ if (++rejects > count)
+ fatal(0,"too many bad or lost packets",NULL);
+ else
+ continue;
+ } else
+ ++accepts;
+ if (++cycle >= nhosts) cycle = 0;
+
+/* Work out the most accurate time, and check that it isn't more accurate than
+the results warrant. */
+
+ if (verbose > 2)
+ fprintf(stderr,"Offset=%.6f+/-%.6f disp=%.6f\n",x,y,dispersion);
+ else if (verbose > 1)
+ fprintf(stderr,"%s: offset=%.3f+/-%.3f disp=%.3f\n",
+ argv0,x,y,dispersion);
+ if ((a = x-offset) < 0.0) a = -a;
+ if (accepts <= 1) a = 0.0;
+ b = error+y;
+ if (y < error) {
+ offset = x;
+ error = y;
+ }
+ if (verbose > 2)
+ fprintf(stderr,"best=%.6f+/-%.6f\n",offset,error);
+ if (a > b) {
+ sprintf(text,"%d",cycle);
+ fatal(0,"inconsistent times got from NTP server on socket %s",
+ text);
+ }
+ if (error <= minerr) break;
+ }
+ if (verbose > 2)
+ fprintf(stderr,"accepts=%d rejects=%d flushes=%d\n",
+ accepts,rejects,flushes);
+ }
+
+/* Tidy up the socket, issues diagnostics and perform the action. */
+
+ for (k = 0; k < nhosts; ++k) close_socket(k);
+ if (accepts == 0) fatal(0,"no acceptable packets received",NULL);
+ if (error > NTP_INSANITY)
+ fatal(0,"unable to get a reasonable time estimate",NULL);
+ if (verbose > 2)
+ fprintf(stderr,"Correction: %.6f +/- %.6f disp=%.6f\n",
+ offset,error,dispersion);
+ if (action == action_display) {
+ format_time(text,75,offset,error,0.0,-1.0);
+ printf("%s\n",text);
+ } else
+ (void)reset_clock(offset,error,0);
+ if (locked) set_lock(0);
+ if (verbose > 2) fprintf(stderr,"Stopped normally\n");
+ exit(EXIT_SUCCESS);
+}
+
+
+
+int main (int argc, char *argv[]) {
+
+/* This is the entry point and all that. It decodes the arguments and calls
+one of the specialised routines to do the work. */
+
+ char *hostnames[MAX_SOCKETS], *savename = NULL;
+ int daemon = 0, nhosts = 0, help = 0, args = argc-1, k;
+ char c;
+
+ if (argv[0] == NULL || argv[0][0] == '\0')
+ argv0 = "msntp";
+ else if ((argv0 = strrchr(argv[0],'/')) != NULL)
+ ++argv0;
+ else
+ argv0 = argv[0];
+ setvbuf(stdout,NULL,_IOLBF,BUFSIZ);
+ setvbuf(stderr,NULL,_IOLBF,BUFSIZ);
+ if (INT_MAX < 2147483647) fatal(0,"msntp requires >= 32-bit ints",NULL);
+ if (DBL_EPSILON > 1.0e-13)
+ fatal(0,"msntp requires doubles with eps <= 1.0e-13",NULL);
+ for (k = 0; k < MAX_SOCKETS; ++k) hostnames[k] = NULL;
+
+/* Decode the arguments. */
+
+ while (argc > 1) {
+ k = 1;
+ if (strcmp(argv[1],"-4") == 0)
+ preferred_family(PREF_FAM_INET);
+ else if (strcmp(argv[1],"-6") == 0)
+ preferred_family(PREF_FAM_INET6);
+ else if (strcmp(argv[1],"-B") == 0 && action == 0) {
+ action = action_broadcast;
+ if (argc > 2) {
+ if (sscanf(argv[2],"%d%c",&period,&c) != 1) syntax(1);
+ if (period < 1 || period > 1440)
+ fatal(0,"%s option value out of range","-B");
+ period *= 60;
+ k = 2;
+ } else
+ period = 60*60;
+ } else if (strcmp(argv[1],"-S") == 0 && action == 0)
+ action = action_server;
+ else if (strcmp(argv[1],"-q") == 0 && action == 0)
+ action = action_query;
+ else if (strcmp(argv[1],"-r") == 0 && action == 0)
+ action = action_reset;
+ else if (strcmp(argv[1],"-a") == 0 && action == 0)
+ action = action_adjust;
+ else if (strcmp(argv[1],"-l") == 0 && lockname == NULL && argc > 2) {
+ lockname = argv[2];
+ k = 2;
+ } else if ((strcmp(argv[1],"-x") == 0) &&
+ daemon == 0) {
+ if (argc > 2 && sscanf(argv[2],"%d%c",&daemon,&c) == 1) {
+ if (daemon < 1 || daemon > 1440)
+ fatal(0,"%s option value out of range",argv[1]);
+ k = 2;
+ } else
+ daemon = 300;
+ } else if (strcmp(argv[1],"-f") == 0 && savename == NULL && argc > 2) {
+ savename = argv[2];
+ k = 2;
+ } else if ((strcmp(argv[1],"--help") == 0 ||
+ strcmp(argv[1],"-h") == 0 || strcmp(argv[1],"-?") == 0) &&
+ help == 0)
+ help = 1;
+ else if (strcmp(argv[1],"-v") == 0 && verbose == 0)
+ verbose = 1;
+ else if (strcmp(argv[1],"-V") == 0 && verbose == 0)
+ verbose = 2;
+ else if (strcmp(argv[1],"-W") == 0 && verbose == 0)
+ verbose = 3;
+ else if (strcmp(argv[1],"-e") == 0 && minerr == 0.0 && argc > 2) {
+ if (sscanf(argv[2],"%lf%c",&minerr,&c) != 1) syntax(1);
+ if (minerr <= 0.000999999 || minerr > 1.0)
+ fatal(0,"%s option value out of range","-e");
+ k = 2;
+ } else if (strcmp(argv[1],"-E") == 0 && maxerr == 0.0 && argc > 2) {
+ if (sscanf(argv[2],"%lf%c",&maxerr,&c) != 1) syntax(1);
+ if (maxerr < 1.0 || maxerr > 60.0)
+ fatal(0,"%s option value out of range","-E");
+ k = 2;
+ } else if (strcmp(argv[1],"-P") == 0 && prompt == 0.0 && argc > 2) {
+ if (strcmp(argv[2],"no") == 0)
+ prompt = (double)INT_MAX;
+ else {
+ if (sscanf(argv[2],"%lf%c",&prompt,&c) != 1) syntax(1);
+ if (prompt < 1.0 || prompt > 3600.0)
+ fatal(0,"%s option value out of range","-p");
+ }
+ k = 2;
+ } else if (strcmp(argv[1],"-d") == 0 && delay == 0 && argc > 2) {
+ if (sscanf(argv[2],"%d%c",&delay,&c) != 1) syntax(1);
+ if (delay < 1 || delay > 3600)
+ fatal(0,"%s option value out of range","-d");
+ k = 2;
+ } else if (strcmp(argv[1],"-c") == 0 && count == 0 && argc > 2) {
+ if (sscanf(argv[2],"%d%c",&count,&c) != 1) syntax(1);
+ if (count < 1 || count > COUNT_MAX)
+ fatal(0,"%s option value out of range","-c");
+ k = 2;
+ } else
+ break;
+ argc -= k;
+ argv += k;
+ }
+
+/* Check the arguments for consistency and set the defaults. */
+
+ if (action == action_broadcast || action == action_server) {
+ operation = (action == action_server ? op_server : op_broadcast);
+ if (argc != 1 || minerr != 0.0 || maxerr != 0.0 || count != 0 ||
+ delay != 0 || daemon != 0 || prompt != 0.0 ||
+ lockname != NULL || savename != NULL)
+ syntax(1);
+ } else if (action == action_query) {
+ if (argc != 1 || minerr != 0.0 || maxerr != 0.0 || count != 0 ||
+ delay != 0 || daemon != 0 || prompt != 0.0 || lockname != NULL)
+ syntax(1);
+ } else {
+ if (argc < 1 || argc > MAX_SOCKETS || (daemon != 0 && delay != 0))
+ syntax(1);
+ if ((prompt || lockname != NULL) &&
+ action != action_reset && action != action_adjust)
+ syntax(1);
+ if (count > 0 && count < argc-1)
+ fatal(0,"-c value less than number of addresses",NULL);
+ if (argc > 1) {
+ operation = op_client;
+ for (k = 1; k < argc; ++k) {
+ if (argv[k][0] == '\0' || argv[k][0] == '-')
+ fatal(0,"invalid Internet address '%s'",argv[k]);
+ hostnames[k-1] = argv[k];
+ }
+ nhosts = argc-1;
+ } else {
+ operation = op_listen;
+ nhosts = 0;
+ }
+ if (action == 0) action = action_display;
+ if (minerr <= 0.0) minerr = (operation == op_listen ? 0.5 : 0.1);
+ if (maxerr <= 0.0) maxerr = 5.0;
+ if (count == 0) count = (argc-1 < 5 ? 5 : argc-1);
+ if ((argc == 1 || (daemon != 0 && action != action_query)) && count < 5)
+ fatal(0,"at least 5 packets needed in this mode",NULL);
+ if ((action == action_reset || action == action_adjust) &&
+ lockname == NULL)
+ lockname = LOCKNAME;
+
+/* The '-x' option changes the implications of many other settings, though this
+is not usually apparent to the caller. Most of the time delays are to ensure
+that stuck states terminate, and do not affect the result. */
+
+ if (daemon != 0) {
+ if (minerr >= maxerr || maxerr >= daemon)
+ fatal(0,"values not in order -e < -E < -x",NULL);
+ waiting = delay = daemon *= 60;
+ } else {
+ if (savename != NULL)
+ fatal(0,"-f can be specified only with -x",NULL);
+ if (delay == 0)
+ delay = (operation == op_listen ? 300 :
+ (2*count >= 15 ? 2*count+1 :15));
+ if (operation == op_listen) {
+ if (minerr >= maxerr || maxerr >= delay/count)
+ fatal(0,"values not in order -e < -E < -d/-c",NULL);
+ } else {
+ if (minerr >= maxerr || maxerr >= delay)
+ fatal(0,"values not in order -e < -E < -d",NULL);
+ }
+ if (2*count >= delay) fatal(0,"-c must be less than half -d",NULL);
+ waiting = delay/count;
+ }
+ if (prompt == 0.0) prompt = 30.0;
+ }
+ if ((daemon || action == action_query) && savename == NULL)
+ savename = SAVENAME;
+
+/* Diagnose where we are, if requested, and separate out the classes of
+operation. The calls do not return. */
+
+ if (help) syntax(args == 1);
+ if (verbose) {
+ fprintf(stderr,"%s options: a=%d p=%d v=%d e=%.3f E=%.3f P=%.3f\n",
+ argv0,action,period,verbose,minerr,maxerr,prompt);
+ fprintf(stderr," d=%d c=%d %c=%d op=%d l=%s f=%s",
+ delay,count,'x',daemon,operation,
+ (lockname == NULL ? "" : lockname),
+ (savename == NULL ? "" : savename));
+ for (k = 0; k < MAX_SOCKETS; ++k)
+ if (hostnames[k] != NULL) fprintf(stderr," %s",hostnames[k]);
+ fprintf(stderr,"\n");
+ }
+ if (nhosts == 0) nhosts = 1; /* Kludge for broadcasts */
+ if (operation == op_server || operation == op_broadcast)
+ run_server();
+ else if (action == action_query) {
+ if (savename == NULL || savename[0] == '\0')
+ fatal(0,"no daemon save file specified",NULL);
+ else if ((savefile = fopen(savename,"rb")) == NULL)
+ fatal(0,"unable to open the daemon save file",NULL);
+ query_savefile();
+ } else if (daemon != 0) {
+ if (savename != NULL && savename[0] != '\0' &&
+ (savefile = fopen(savename,"rb+")) == NULL &&
+ (savefile = fopen(savename,"wb+")) == NULL)
+ fatal(0,"unable to open the daemon save file",NULL);
+ run_daemon(hostnames,nhosts,1);
+ while (1) run_daemon(hostnames,nhosts,0);
+ } else
+ run_client(hostnames,nhosts);
+ fatal(0,"internal error at end of main",NULL);
+ return EXIT_FAILURE;
+}
diff --git a/contrib/ntp/sntp/missing b/contrib/ntp/sntp/missing
new file mode 100755
index 000000000000..6a37006e8f0a
--- /dev/null
+++ b/contrib/ntp/sntp/missing
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing 0.4 - GNU automake"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/contrib/ntp/sntp/mkinstalldirs b/contrib/ntp/sntp/mkinstalldirs
new file mode 100755
index 000000000000..d2d5f21b6112
--- /dev/null
+++ b/contrib/ntp/sntp/mkinstalldirs
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case $1 in
+ -h | --help | --h*) # -h for help
+ echo "$usage" 1>&2
+ exit 0
+ ;;
+ -m) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --) # stop option processing
+ shift
+ break
+ ;;
+ -*) # unknown option
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *) # first non-opt arg
+ break
+ ;;
+ esac
+done
+
+for file
+do
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+ 0) exit 0 ;;
+esac
+
+case $dirmode in
+ '')
+ if mkdir -p -- . 2>/dev/null; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ fi
+ ;;
+ *)
+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ fi
+ ;;
+esac
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case $pathcomp in
+ -*) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here
diff --git a/contrib/ntp/sntp/socket.c b/contrib/ntp/sntp/socket.c
new file mode 100644
index 000000000000..75fd4613de3b
--- /dev/null
+++ b/contrib/ntp/sntp/socket.c
@@ -0,0 +1,395 @@
+/* Copyright (C) 1996, 2000 N.M. Maclaren
+ Copyright (C) 1996, 2000 The University of Cambridge
+
+This includes all of the code needed to handle Berkeley sockets. It is way
+outside current POSIX, unfortunately. It should be easy to convert to a system
+that uses another mechanism. It does not currently use socklen_t, because
+the only system that the author uses that has it is Linux. */
+
+
+
+#include "header.h"
+#include "internet.h"
+#include <fcntl.h>
+
+#define SOCKET
+#include "kludges.h"
+#undef SOCKET
+
+
+
+/* The code needs to set some variables during the open, for use by later
+functions. */
+
+static int initial = 1,
+ descriptors[MAX_SOCKETS];
+
+#ifdef HAVE_IPV6
+static struct sockaddr_storage here[MAX_SOCKETS], there[MAX_SOCKETS];
+#else
+static struct sockaddr_in here[MAX_SOCKETS], there[MAX_SOCKETS];
+#endif
+
+
+/* There needs to be some disgusting grobble for handling timeouts, that is
+identical to the grobble in internet.c. */
+
+static jmp_buf jump_buffer;
+
+static void jump_handler (int sig) {
+ longjmp(jump_buffer,1);
+}
+
+static void clear_alarm (void) {
+ int k;
+
+ k = errno;
+ alarm(0);
+ errno = 0;
+ if (signal(SIGALRM,SIG_DFL) == SIG_ERR)
+ fatal(1,"unable to reset signal handler",NULL);
+ errno = k;
+}
+
+
+
+void display_in_hex (const void *data, int length) {
+ int i;
+
+ for (i = 0; i < length; ++i)
+ fprintf(stderr,"%.2x",((const unsigned char *)data)[i]);
+}
+
+#ifdef HAVE_IPV6
+
+void display_sock_in_hex (struct sockaddr_storage *sock) {
+ int family, len;
+ struct sockaddr_in *sin;
+ struct sockaddr_in6 *sin6;
+
+ family = sock->ss_family;
+ switch(family) {
+ case AF_INET:
+ sin = (struct sockaddr_in *)sock;
+ display_in_hex(&sin->sin_addr, sizeof(struct in_addr));
+ fprintf(stderr,"/");
+ display_in_hex(&sin->sin_port, 2);
+ break;
+ case AF_INET6:
+ sin6 = (struct sockaddr_in6 *)sock;
+ display_in_hex(&sin6->sin6_addr, sizeof(struct in6_addr));
+ fprintf(stderr,"/");
+ display_in_hex(&sin6->sin6_port, 2);
+ break;
+ }
+}
+
+#else
+
+void display_sock_in_hex (struct sockaddr_in *sock) {
+ int family, len;
+ struct sockaddr_in *sin;
+
+ family = sock->sin_family;
+ switch(family) {
+ case AF_INET:
+ sin = (struct sockaddr_in *)sock;
+ display_in_hex(&sin->sin_addr, sizeof(struct in_addr));
+ fprintf(stderr,"/");
+ display_in_hex(&sin->sin_port, 2);
+ break;
+ }
+}
+#endif
+
+#ifdef HAVE_IPV6
+
+void open_socket (int which, char *hostname, int timespan) {
+
+/* Locate the specified NTP server, set up a couple of addresses and open a
+socket. */
+
+ int port, k, sl;
+ struct sockaddr_storage address, anywhere, everywhere;
+
+/* Initialise and find out the server and port number. Note that the port
+number is in network format. */
+
+ if (initial)
+ for (k = 0; k < MAX_SOCKETS; ++k)
+ descriptors[k] = -1;
+ initial = 0;
+ if (which < 0 || which >= MAX_SOCKETS || descriptors[which] >= 0)
+ fatal(0,"socket index out of range or already open",NULL);
+ if (verbose > 2)
+ fprintf(stderr,"Looking for the socket addresses\n");
+ find_address(&address,&anywhere,&everywhere,&port,hostname,timespan);
+ if (verbose > 2) {
+ fprintf(stderr,"Internet address: address=");
+ display_sock_in_hex(&address);
+ fprintf(stderr," anywhere=");
+ display_sock_in_hex(&anywhere);
+ fprintf(stderr," everywhere=");
+ display_sock_in_hex(&everywhere);
+ fputc('\n',stderr);
+ }
+
+/* Set up our own and the target addresses. Note that the target address will
+be reset before use in server mode. */
+
+ memset(&here[which], 0, sizeof(struct sockaddr_storage));
+ here[which] = anywhere;
+ if (!(operation == op_listen || operation == op_server))
+ ((struct sockaddr_in6 *)&here[which])->sin6_port = 0;
+ memset(&there[which], 0, sizeof(struct sockaddr_storage));
+ there[which] = (operation == op_broadcast ? everywhere : address);
+ if (verbose > 2) {
+ fprintf(stderr,"Initial sockets: here=");
+ display_sock_in_hex(&here[which]);
+ fprintf(stderr," there=");
+ display_sock_in_hex(&there[which]);
+ fputc('\n',stderr);
+ }
+
+/* Allocate a local UDP socket and configure it. */
+
+ switch(((struct sockaddr_in *)&there[which])->sin_family) {
+ case AF_INET:
+ sl = sizeof(struct sockaddr_in);
+ break;
+#ifdef HAVE_IPV6
+ case AF_INET6:
+ sl = sizeof(struct sockaddr_in6);
+ break;
+#endif
+ default:
+ sl = 0;
+ break;
+ }
+ errno = 0;
+ if ((descriptors[which] = socket(here[which].ss_family,SOCK_DGRAM,0)) < 0
+ || bind(descriptors[which],(struct sockaddr *)&here[which], sl) < 0)
+ fatal(1,"unable to allocate socket for NTP",NULL);
+ if (operation == op_broadcast) {
+ errno = 0;
+ k = setsockopt(descriptors[which],SOL_SOCKET,SO_BROADCAST,
+ (void *)&k,sizeof(k));
+ if (k != 0) fatal(1,"unable to set permission to broadcast",NULL);
+ }
+}
+
+#else
+
+void open_socket (int which, char *hostname, int timespan) {
+
+/* Locate the specified NTP server, set up a couple of addresses and open a
+socket. */
+
+ int port, k;
+ struct in_addr address, anywhere, everywhere;
+
+/* Initialise and find out the server and port number. Note that the port
+number is in network format. */
+
+ if (initial) for (k = 0; k < MAX_SOCKETS; ++k) descriptors[k] = -1;
+ initial = 0;
+ if (which < 0 || which >= MAX_SOCKETS || descriptors[which] >= 0)
+ fatal(0,"socket index out of range or already open",NULL);
+ if (verbose > 2) fprintf(stderr,"Looking for the socket addresses\n");
+ find_address(&address,&anywhere,&everywhere,&port,hostname,timespan);
+ if (verbose > 2) {
+ fprintf(stderr,"Internet address: address=");
+ display_in_hex(&address,sizeof(struct in_addr));
+ fprintf(stderr," anywhere=");
+ display_in_hex(&anywhere,sizeof(struct in_addr));
+ fprintf(stderr," everywhere=");
+ display_in_hex(&everywhere,sizeof(struct in_addr));
+ fputc('\n',stderr);
+ }
+
+/* Set up our own and the target addresses. Note that the target address will
+be reset before use in server mode. */
+
+ memset(&here[which],0,sizeof(struct sockaddr_in));
+ here[which].sin_family = AF_INET;
+ here[which].sin_port =
+ (operation == op_listen || operation == op_server ? port : 0);
+ here[which].sin_addr = anywhere;
+ memset(&there[which],0,sizeof(struct sockaddr_in));
+ there[which].sin_family = AF_INET;
+ there[which].sin_port = port;
+ there[which].sin_addr = (operation == op_broadcast ? everywhere : address);
+ if (verbose > 2) {
+ fprintf(stderr,"Initial sockets: here=");
+ display_in_hex(&here[which].sin_addr,sizeof(struct in_addr));
+ fputc('/',stderr);
+ display_in_hex(&here[which].sin_port,sizeof(here[which].sin_port));
+ fprintf(stderr," there=");
+ display_in_hex(&there[which].sin_addr,sizeof(struct in_addr));
+ fputc('/',stderr);
+ display_in_hex(&there[which].sin_port,sizeof(there[which].sin_port));
+ fputc('\n',stderr);
+ }
+
+/* Allocate a local UDP socket and configure it. */
+
+ errno = 0;
+ if ((descriptors[which] = socket(AF_INET,SOCK_DGRAM,0)) < 0 ||
+ bind(descriptors[which],(struct sockaddr *)&here[which],
+ sizeof(here[which])) < 0)
+ fatal(1,"unable to allocate socket for NTP",NULL);
+ if (operation == op_broadcast) {
+ errno = 0;
+ k = setsockopt(descriptors[which],SOL_SOCKET,SO_BROADCAST,
+ (void *)&k,sizeof(k));
+ if (k != 0) fatal(1,"unable to set permission to broadcast",NULL);
+ }
+}
+
+#endif
+
+extern void write_socket (int which, void *packet, int length) {
+
+/* Any errors in doing this are fatal - including blocking. Yes, this leaves a
+server vulnerable to a denial of service attack. */
+
+ int k, sl;
+
+ switch(((struct sockaddr_in *)&there[which])->sin_family) {
+ case AF_INET:
+ sl = sizeof(struct sockaddr_in);
+ break;
+#ifdef HAVE_IPV6
+ case AF_INET6:
+ sl = sizeof(struct sockaddr_in6);
+ break;
+#endif
+ default:
+ sl = 0;
+ break;
+ }
+ if (which < 0 || which >= MAX_SOCKETS || descriptors[which] < 0)
+ fatal(0,"socket index out of range or not open",NULL);
+ errno = 0;
+ k = sendto(descriptors[which],packet,(size_t)length,0,
+ (struct sockaddr *)&there[which],sl);
+ if (k != length) fatal(1,"unable to send NTP packet",NULL);
+}
+
+
+
+extern int read_socket (int which, void *packet, int length, int waiting) {
+
+/* Read a packet and return its length or -1 for failure. Only incorrect
+length and timeout are not fatal. */
+
+#ifdef HAVE_IPV6
+ struct sockaddr_storage scratch, *ptr;
+#else
+ struct sockaddr_in scratch, *ptr;
+#endif
+ int n;
+ int k;
+
+/* Under normal circumstances, set up a timeout. */
+
+ if (which < 0 || which >= MAX_SOCKETS || descriptors[which] < 0)
+ fatal(0,"socket index out of range or not open",NULL);
+ if (waiting > 0) {
+ if (setjmp(jump_buffer)) {
+ if (verbose > 2)
+ fprintf(stderr,"Receive timed out\n");
+ else if (verbose > 1)
+ fprintf(stderr,"%s: receive timed out after %d seconds\n",
+ argv0,waiting);
+ return -1;
+ }
+ errno = 0;
+ if (signal(SIGALRM,jump_handler) == SIG_ERR)
+ fatal(1,"unable to set up signal handler",NULL);
+ alarm((unsigned int)waiting);
+ }
+
+/* Get the packet and clear the timeout, if any. */
+
+ if (operation == op_server)
+ memcpy(ptr = &there[which],&here[which],sizeof(scratch));
+ else
+ memcpy(ptr = &scratch,&there[which],sizeof(scratch));
+ n = sizeof(scratch);
+ errno = 0;
+ k = recvfrom(descriptors[which],packet,(size_t)length,0,
+ (struct sockaddr *)ptr,&n);
+ if (waiting > 0) clear_alarm();
+
+/* Now issue some low-level diagnostics. */
+
+ if (k <= 0) fatal(1,"unable to receive NTP packet from server",NULL);
+ if (verbose > 2) {
+ fprintf(stderr,"Packet of length %d received from ",k);
+ display_sock_in_hex(ptr);
+ fputc('\n',stderr);
+ }
+ return k;
+}
+
+
+
+extern int flush_socket (int which) {
+
+/* Get rid of any outstanding input, because it may have been hanging around
+for a while. Ignore packet length oddities and return the number of packets
+skipped. */
+
+#ifdef HAVE_IPV6
+ struct sockaddr_storage scratch;
+#else
+ struct sockaddr_in scratch;
+#endif
+ int n;
+ char buffer[256];
+ int flags, count = 0, total = 0, k;
+
+/* The code is the obvious. */
+
+ if (which < 0 || which >= MAX_SOCKETS || descriptors[which] < 0)
+ fatal(0,"socket index out of range or not open",NULL);
+ if (verbose > 2) fprintf(stderr,"Flushing outstanding packets\n");
+ errno = 0;
+ if ((flags = fcntl(descriptors[which],F_GETFL,0)) < 0 ||
+ fcntl(descriptors[which],F_SETFL,flags|O_NONBLOCK) == -1)
+ fatal(1,"unable to set non-blocking mode",NULL);
+ while (1) {
+ n = sizeof(scratch);
+ errno = 0;
+ k = recvfrom(descriptors[which],buffer,256,0,
+ (struct sockaddr *)&scratch,&n);
+ if (k < 0) {
+ if (errno == EAGAIN || errno == EWOULDBLOCK) break;
+ fatal(1,"unable to flush socket",NULL);
+ }
+ ++count;
+ total += k;
+ }
+ errno = 0;
+ if (fcntl(descriptors[which],F_SETFL,flags) == -1)
+ fatal(1,"unable to restore blocking mode",NULL);
+ if (verbose > 2)
+ fprintf(stderr,"Flushed %d packets totalling %d bytes\n",count,total);
+ return count;
+}
+
+
+
+extern void close_socket (int which) {
+
+/* There is little point in shielding this with a timeout, because any hangs
+are unlikely to be interruptible. It can get called when the sockets haven't
+been opened, so ignore that case. */
+
+ if (which < 0 || which >= MAX_SOCKETS)
+ fatal(0,"socket index out of range",NULL);
+ if (descriptors[which] < 0) return;
+ errno = 0;
+ if (close(descriptors[which])) fatal(1,"unable to close NTP socket",NULL);
+}
diff --git a/contrib/ntp/sntp/timing.c b/contrib/ntp/sntp/timing.c
new file mode 100644
index 000000000000..30a915969557
--- /dev/null
+++ b/contrib/ntp/sntp/timing.c
@@ -0,0 +1,110 @@
+/* Copyright (C) 1996 N.M. Maclaren
+ Copyright (C) 1996 The University of Cambridge
+
+This includes all of the code needed to handle the time. It assumes rather
+more than is defined by POSIX, unfortunately. Systems that do not have the
+'X/Open' extensions may need changes. */
+
+
+
+#include "header.h"
+
+#include <sys/types.h>
+#include <sys/time.h>
+
+#define TIMING
+#include "kludges.h"
+#undef TIMING
+
+
+
+#define MILLION_L 1000000l /* For conversion to/from timeval */
+#define MILLION_D 1.0e6 /* Must be equal to MILLION_L */
+
+
+
+double current_time (double offset) {
+
+/* Get the current UTC time in seconds since the Epoch plus an offset (usually
+the time from the beginning of the century to the Epoch!) */
+
+ struct timeval current;
+
+ errno = 0;
+ if (gettimeofday(&current,NULL))
+ fatal(1,"unable to read current machine/system time",NULL);
+ return offset+current.tv_sec+1.0e-6*current.tv_usec;
+}
+
+
+
+time_t convert_time (double value, int *millisecs) {
+
+/* Convert the time to the ANSI C form. */
+
+ time_t result = (time_t)value;
+
+ if ((*millisecs = (int)(1000.0*(value-result))) >= 1000) {
+ *millisecs = 0;
+ ++result;
+ }
+ return result;
+}
+
+
+
+void adjust_time (double difference, int immediate, double ignore) {
+
+/* Adjust the current UTC time. This is portable, even if struct timeval uses
+an unsigned long for tv_sec. */
+
+ struct timeval old, new, adjust, previous;
+ char text[40];
+ long n;
+
+/* Start by converting to timeval format. Note that we have to cater for
+negative, unsigned values. */
+
+ if ((n = (long)difference) > difference) --n;
+ adjust.tv_sec = n;
+ adjust.tv_usec = (long)(MILLION_D*(difference-n));
+ errno = 0;
+ if (gettimeofday(&old,NULL))
+ fatal(1,"unable to read machine/system time",NULL);
+ new.tv_sec = old.tv_sec+adjust.tv_sec;
+ new.tv_usec = (n = (long)old.tv_usec+(long)adjust.tv_usec);
+ if (n < 0) {
+ new.tv_usec += MILLION_L;
+ --new.tv_sec;
+ } else if (n >= MILLION_L) {
+ new.tv_usec -= MILLION_L;
+ ++new.tv_sec;
+ }
+
+/* Now diagnose the situation if necessary, and perform the dirty deed. */
+
+ if (verbose > 2)
+ fprintf(stderr,
+ "Times: old=(%ld,%.6ld) new=(%ld,%.6ld) adjust=(%ld,%.6ld)\n",
+ (long)old.tv_sec,(long)old.tv_usec,
+ (long)new.tv_sec,(long)new.tv_usec,
+ (long)adjust.tv_sec,(long)adjust.tv_usec);
+ if (immediate) {
+ errno = 0;
+ /* if (settimeofday(&new,NULL))
+ fatal(1,"unable to reset current system time",NULL);*/
+ } else {
+ errno = 0;
+ /* if (adjtime(&adjust,&previous))
+ fatal(1,"unable to adjust current system time",NULL);*/
+ if (previous.tv_sec != 0 || previous.tv_usec != 0) {
+ sprintf(text,"(%ld,%.6ld)",
+ (long)previous.tv_sec,(long)previous.tv_usec);
+ if (previous.tv_sec+1.0e-6*previous.tv_usec > ignore)
+ fatal(0,"outstanding time adjustment %s",text);
+ else if (verbose)
+ fprintf(stderr,"%s: outstanding time adjustment %s\n",
+ argv0,text);
+ }
+ }
+}
diff --git a/contrib/ntp/sntp/unix.c b/contrib/ntp/sntp/unix.c
new file mode 100644
index 000000000000..c9d5d74c301d
--- /dev/null
+++ b/contrib/ntp/sntp/unix.c
@@ -0,0 +1,92 @@
+/* Copyright (C) 1996 N.M. Maclaren
+ Copyright (C) 1996 The University of Cambridge
+
+This includes code that really should have been part of ANSI/ISO C, but was
+left out for historical reasons (despite requests to define ftty), plus
+the get_lock() and log_message() functions.
+*/
+
+#include "header.h"
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <signal.h>
+
+#define UNIX
+#include "kludges.h"
+#undef UNIX
+
+
+void do_nothing (int seconds) {
+
+/* Wait for a fixed period, possibly uninterruptibly. This should not wait
+for less than the specified period, if that can be avoided. */
+
+ sleep((unsigned int)(seconds+2)); /* +2 is enough for POSIX */
+}
+
+
+
+int ftty (FILE *file) {
+
+/* Return whether the file is attached to an interactive device. */
+
+ return isatty(fileno(file));
+}
+
+
+
+void set_lock (int lock) {
+
+/* Check that we have enough privileges to reset the time and that no other
+updating msntp process is running, but don't bother with fancy interlocking.
+This function is really only to permit the daemon mode to be restarted in a
+cron job and improve the diagnostics; it can be replaced by a 'return'
+statement if it causes implementation difficulties. Note that there is little
+point in clearing the lock under Unix, but do so anyway. */
+
+ FILE *file;
+ long pid;
+
+ if (lockname == NULL || lockname[0] == '\0') return;
+ if (lock) {
+ errno = 0;
+ if ((file = fopen(lockname,"r")) != NULL &&
+ fscanf(file,"%ld",&pid) == 1 && kill(pid,0) == 0) {
+ if (verbose || isatty(STDIN_FILENO) || isatty(STDOUT_FILENO))
+ fatal(0,"another msntp process is currently running",NULL);
+ else
+ fatal(0,NULL,NULL);
+ }
+ if (file != NULL) fclose(file);
+ errno = 0;
+ if ((file = fopen(lockname,"w")) == NULL ||
+ fprintf(file,"%ld\n",(long)getpid()) <= 0 ||
+ ferror(file) || fclose(file) != 0)
+ fatal(1,"unable to write PID to %s",lockname);
+ adjust_time(0.0,1,0.0);
+ } else {
+ errno = 0;
+ if (remove(lockname) != 0)
+ fatal(1,"unable to remove the msntp lockname %s",lockname);
+ }
+}
+
+
+
+/*
+ * Log a message, crudely.
+ * This is used in only one place, but could be used more widely.
+ */
+
+void
+log_message (const char *message)
+{
+
+ syslog(
+#ifdef LOG_DAEMON
+ LOG_DAEMON |
+#endif
+ LOG_WARNING, "%s", message);
+}
diff --git a/contrib/ntp/util/Makefile.am b/contrib/ntp/util/Makefile.am
index d9a85f3a01d3..8f1ba9e9ea98 100644
--- a/contrib/ntp/util/Makefile.am
+++ b/contrib/ntp/util/Makefile.am
@@ -1,18 +1,16 @@
#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ansi2knr
-bin_PROGRAMS = @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ ntp-genkeys
-EXTRA_PROGRAMS = byteorder hist jitter kern longsize ntptime \
-precision sht testrs6000 tickadj timetrim
+AUTOMAKE_OPTIONS= ansi2knr
+bin_PROGRAMS= @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ @MAKE_NTP_KEYGEN@
+EXTRA_PROGRAMS= audio-pcm byteorder hist jitter kern longsize \
+ ntp-keygen ntptime pps-api precision sht testrs6000 tickadj timetrim
-ntp_genkeys_LDADD = ../ntpd/ntp_config$U.o ../libntp/libntp.a $(LIBRSAREF)
-ntp_genkeys_DEPENDENCIES = ../ntpd/ntp_config$U.o ../libntp/libntp.a $(LIBRSAREF)
-
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/librsaref
+INCLUDES= -I$(top_srcdir)/include
# LDADD might need RESLIB and ADJLIB
-LDADD = ../libntp/libntp.a
-#EXTRA_DIST = README TAGS
-EXTRA_DIST =
-ETAGS_ARGS = Makefile.am
+LDADD= ../libntp/libntp.a
+ntp_keygen_LDADD= @LCRYPTO@
+#EXTRA_DIST= README TAGS
+EXTRA_DIST=
+ETAGS_ARGS= Makefile.am
../libntp/libntp.a:
cd ../libntp && $(MAKE)
diff --git a/contrib/ntp/util/Makefile.in b/contrib/ntp/util/Makefile.in
index f05b7a50e5b2..50b3042bdbdd 100644
--- a/contrib/ntp/util/Makefile.in
+++ b/contrib/ntp/util/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,82 +14,79 @@
@SET_MAKE@
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
+ARLIB_DIR = @ARLIB_DIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
+LIBS = @LIBS@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
+MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@
@@ -96,48 +94,97 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
+READLINE_LIBS = @READLINE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ansi2knr
-bin_PROGRAMS = @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ ntp-genkeys
-EXTRA_PROGRAMS = byteorder hist jitter kern longsize ntptime \
-precision sht testrs6000 tickadj timetrim
+bin_PROGRAMS = @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ @MAKE_NTP_KEYGEN@
+EXTRA_PROGRAMS = audio-pcm byteorder hist jitter kern longsize \
+ ntp-keygen ntptime pps-api precision sht testrs6000 tickadj timetrim
-ntp_genkeys_LDADD = ../ntpd/ntp_config$U.o ../libntp/libntp.a $(LIBRSAREF)
-ntp_genkeys_DEPENDENCIES = ../ntpd/ntp_config$U.o ../libntp/libntp.a $(LIBRSAREF)
-
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/librsaref
+INCLUDES = -I$(top_srcdir)/include
# LDADD might need RESLIB and ADJLIB
LDADD = ../libntp/libntp.a
-#EXTRA_DIST = README TAGS
+ntp_keygen_LDADD = @LCRYPTO@
+#EXTRA_DIST= README TAGS
EXTRA_DIST =
ETAGS_ARGS = Makefile.am
subdir = util
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
-EXTRA_PROGRAMS = byteorder$(EXEEXT) hist$(EXEEXT) jitter$(EXEEXT) \
- kern$(EXEEXT) longsize$(EXEEXT) ntptime$(EXEEXT) \
+EXTRA_PROGRAMS = audio-pcm$(EXEEXT) byteorder$(EXEEXT) hist$(EXEEXT) \
+ jitter$(EXEEXT) kern$(EXEEXT) longsize$(EXEEXT) \
+ ntp-keygen$(EXEEXT) ntptime$(EXEEXT) pps-api$(EXEEXT) \
precision$(EXEEXT) sht$(EXEEXT) testrs6000$(EXEEXT) \
tickadj$(EXEEXT) timetrim$(EXEEXT)
bin_PROGRAMS = @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \
- ntp-genkeys$(EXEEXT)
+ @MAKE_NTP_KEYGEN@
PROGRAMS = $(bin_PROGRAMS)
+audio_pcm_SOURCES = audio-pcm.c
+audio_pcm_OBJECTS = audio-pcm$U.$(OBJEXT)
+audio_pcm_LDADD = $(LDADD)
+audio_pcm_DEPENDENCIES = ../libntp/libntp.a
+audio_pcm_LDFLAGS =
byteorder_SOURCES = byteorder.c
byteorder_OBJECTS = byteorder$U.$(OBJEXT)
byteorder_LDADD = $(LDADD)
@@ -163,14 +210,20 @@ longsize_OBJECTS = longsize$U.$(OBJEXT)
longsize_LDADD = $(LDADD)
longsize_DEPENDENCIES = ../libntp/libntp.a
longsize_LDFLAGS =
-ntp_genkeys_SOURCES = ntp-genkeys.c
-ntp_genkeys_OBJECTS = ntp-genkeys$U.$(OBJEXT)
-ntp_genkeys_LDFLAGS =
+ntp_keygen_SOURCES = ntp-keygen.c
+ntp_keygen_OBJECTS = ntp-keygen$U.$(OBJEXT)
+ntp_keygen_DEPENDENCIES =
+ntp_keygen_LDFLAGS =
ntptime_SOURCES = ntptime.c
ntptime_OBJECTS = ntptime$U.$(OBJEXT)
ntptime_LDADD = $(LDADD)
ntptime_DEPENDENCIES = ../libntp/libntp.a
ntptime_LDFLAGS =
+pps_api_SOURCES = pps-api.c
+pps_api_OBJECTS = pps-api$U.$(OBJEXT)
+pps_api_LDADD = $(LDADD)
+pps_api_DEPENDENCIES = ../libntp/libntp.a
+pps_api_LDFLAGS =
precision_SOURCES = precision.c
precision_OBJECTS = precision$U.$(OBJEXT)
precision_LDADD = $(LDADD)
@@ -197,27 +250,28 @@ timetrim_LDADD = $(LDADD)
timetrim_DEPENDENCIES = ../libntp/libntp.a
timetrim_LDFLAGS =
-DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/byteorder$U.Po $(DEPDIR)/hist$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/jitter$U.Po $(DEPDIR)/kern$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/longsize$U.Po $(DEPDIR)/ntp-genkeys$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/ntptime$U.Po $(DEPDIR)/precision$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/sht$U.Po $(DEPDIR)/testrs6000$U.Po \
-@AMDEP_TRUE@ $(DEPDIR)/tickadj$U.Po $(DEPDIR)/timetrim$U.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/audio-pcm$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/byteorder$U.Po ./$(DEPDIR)/hist$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/jitter$U.Po ./$(DEPDIR)/kern$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/longsize$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntp-keygen$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/ntptime$U.Po ./$(DEPDIR)/pps-api$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/precision$U.Po ./$(DEPDIR)/sht$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/testrs6000$U.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/tickadj$U.Po ./$(DEPDIR)/timetrim$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = byteorder.c hist.c jitter.c kern.c longsize.c \
- ntp-genkeys.c ntptime.c precision.c sht.c testrs6000.c \
+DIST_SOURCES = audio-pcm.c byteorder.c hist.c jitter.c kern.c longsize.c \
+ ntp-keygen.c ntptime.c pps-api.c precision.c sht.c testrs6000.c \
tickadj.c timetrim.c
-DIST_COMMON = README Makefile.am Makefile.in ansi2knr.1 ansi2knr.c
-SOURCES = byteorder.c hist.c jitter.c kern.c longsize.c ntp-genkeys.c ntptime.c precision.c sht.c testrs6000.c tickadj.c timetrim.c
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am ansi2knr.1 \
+ ansi2knr.c
+SOURCES = audio-pcm.c byteorder.c hist.c jitter.c kern.c longsize.c ntp-keygen.c ntptime.c pps-api.c precision.c sht.c testrs6000.c tickadj.c timetrim.c
all: all-am
@@ -227,9 +281,8 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu util/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@@ -237,22 +290,25 @@ install-binPROGRAMS: $(bin_PROGRAMS)
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
- f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+audio-pcm$(EXEEXT): $(audio_pcm_OBJECTS) $(audio_pcm_DEPENDENCIES)
+ @rm -f audio-pcm$(EXEEXT)
+ $(LINK) $(audio_pcm_LDFLAGS) $(audio_pcm_OBJECTS) $(audio_pcm_LDADD) $(LIBS)
byteorder$(EXEEXT): $(byteorder_OBJECTS) $(byteorder_DEPENDENCIES)
@rm -f byteorder$(EXEEXT)
$(LINK) $(byteorder_LDFLAGS) $(byteorder_OBJECTS) $(byteorder_LDADD) $(LIBS)
@@ -268,12 +324,15 @@ kern$(EXEEXT): $(kern_OBJECTS) $(kern_DEPENDENCIES)
longsize$(EXEEXT): $(longsize_OBJECTS) $(longsize_DEPENDENCIES)
@rm -f longsize$(EXEEXT)
$(LINK) $(longsize_LDFLAGS) $(longsize_OBJECTS) $(longsize_LDADD) $(LIBS)
-ntp-genkeys$(EXEEXT): $(ntp_genkeys_OBJECTS) $(ntp_genkeys_DEPENDENCIES)
- @rm -f ntp-genkeys$(EXEEXT)
- $(LINK) $(ntp_genkeys_LDFLAGS) $(ntp_genkeys_OBJECTS) $(ntp_genkeys_LDADD) $(LIBS)
+ntp-keygen$(EXEEXT): $(ntp_keygen_OBJECTS) $(ntp_keygen_DEPENDENCIES)
+ @rm -f ntp-keygen$(EXEEXT)
+ $(LINK) $(ntp_keygen_LDFLAGS) $(ntp_keygen_OBJECTS) $(ntp_keygen_LDADD) $(LIBS)
ntptime$(EXEEXT): $(ntptime_OBJECTS) $(ntptime_DEPENDENCIES)
@rm -f ntptime$(EXEEXT)
$(LINK) $(ntptime_LDFLAGS) $(ntptime_OBJECTS) $(ntptime_LDADD) $(LIBS)
+pps-api$(EXEEXT): $(pps_api_OBJECTS) $(pps_api_DEPENDENCIES)
+ @rm -f pps-api$(EXEEXT)
+ $(LINK) $(pps_api_LDFLAGS) $(pps_api_OBJECTS) $(pps_api_LDADD) $(LIBS)
precision$(EXEEXT): $(precision_OBJECTS) $(precision_DEPENDENCIES)
@rm -f precision$(EXEEXT)
$(LINK) $(precision_LDFLAGS) $(precision_OBJECTS) $(precision_LDADD) $(LIBS)
@@ -305,113 +364,158 @@ clean-krextra:
-rm -f ansi2knr
mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/byteorder$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hist$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/jitter$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kern$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/longsize$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp-genkeys$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntptime$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/precision$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sht$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/testrs6000$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tickadj$U.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/timetrim$U.Po@am__quote@
-
-distclean-depend:
- -rm -rf $(DEPDIR)
+ -test "$U" = "" || rm -f *_.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio-pcm$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/byteorder$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jitter$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kern$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/longsize$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp-keygen$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntptime$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pps-api$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/precision$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sht$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrs6000$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tickadj$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timetrim$U.Po@am__quote@
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@ fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+audio-pcm_.c: audio-pcm.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/audio-pcm.c; then echo $(srcdir)/audio-pcm.c; else echo audio-pcm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
byteorder_.c: byteorder.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/byteorder.c; then echo $(srcdir)/byteorder.c; else echo byteorder.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > byteorder_.c || rm -f byteorder_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/byteorder.c; then echo $(srcdir)/byteorder.c; else echo byteorder.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
hist_.c: hist.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hist.c; then echo $(srcdir)/hist.c; else echo hist.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > hist_.c || rm -f hist_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hist.c; then echo $(srcdir)/hist.c; else echo hist.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
jitter_.c: jitter.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/jitter.c; then echo $(srcdir)/jitter.c; else echo jitter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > jitter_.c || rm -f jitter_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/jitter.c; then echo $(srcdir)/jitter.c; else echo jitter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
kern_.c: kern.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/kern.c; then echo $(srcdir)/kern.c; else echo kern.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > kern_.c || rm -f kern_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/kern.c; then echo $(srcdir)/kern.c; else echo kern.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
longsize_.c: longsize.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/longsize.c; then echo $(srcdir)/longsize.c; else echo longsize.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > longsize_.c || rm -f longsize_.c
-ntp-genkeys_.c: ntp-genkeys.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp-genkeys.c; then echo $(srcdir)/ntp-genkeys.c; else echo ntp-genkeys.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp-genkeys_.c || rm -f ntp-genkeys_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/longsize.c; then echo $(srcdir)/longsize.c; else echo longsize.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+ntp-keygen_.c: ntp-keygen.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp-keygen.c; then echo $(srcdir)/ntp-keygen.c; else echo ntp-keygen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
ntptime_.c: ntptime.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntptime.c; then echo $(srcdir)/ntptime.c; else echo ntptime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntptime_.c || rm -f ntptime_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntptime.c; then echo $(srcdir)/ntptime.c; else echo ntptime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+pps-api_.c: pps-api.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/pps-api.c; then echo $(srcdir)/pps-api.c; else echo pps-api.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
precision_.c: precision.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/precision.c; then echo $(srcdir)/precision.c; else echo precision.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > precision_.c || rm -f precision_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/precision.c; then echo $(srcdir)/precision.c; else echo precision.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
sht_.c: sht.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sht.c; then echo $(srcdir)/sht.c; else echo sht.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > sht_.c || rm -f sht_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sht.c; then echo $(srcdir)/sht.c; else echo sht.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
testrs6000_.c: testrs6000.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/testrs6000.c; then echo $(srcdir)/testrs6000.c; else echo testrs6000.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > testrs6000_.c || rm -f testrs6000_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/testrs6000.c; then echo $(srcdir)/testrs6000.c; else echo testrs6000.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
tickadj_.c: tickadj.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tickadj.c; then echo $(srcdir)/tickadj.c; else echo tickadj.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > tickadj_.c || rm -f tickadj_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tickadj.c; then echo $(srcdir)/tickadj.c; else echo tickadj.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
timetrim_.c: timetrim.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/timetrim.c; then echo $(srcdir)/timetrim.c; else echo timetrim.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > timetrim_.c || rm -f timetrim_.c
-byteorder_.$(OBJEXT) hist_.$(OBJEXT) jitter_.$(OBJEXT) kern_.$(OBJEXT) \
-longsize_.$(OBJEXT) ntp-genkeys_.$(OBJEXT) ntptime_.$(OBJEXT) \
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/timetrim.c; then echo $(srcdir)/timetrim.c; else echo timetrim.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+audio-pcm_.$(OBJEXT) byteorder_.$(OBJEXT) hist_.$(OBJEXT) \
+jitter_.$(OBJEXT) kern_.$(OBJEXT) longsize_.$(OBJEXT) \
+ntp-keygen_.$(OBJEXT) ntptime_.$(OBJEXT) pps-api_.$(OBJEXT) \
precision_.$(OBJEXT) sht_.$(OBJEXT) testrs6000_.$(OBJEXT) \
tickadj_.$(OBJEXT) timetrim_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -424,7 +528,6 @@ all-am: Makefile $(ANSI2KNR) $(PROGRAMS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -436,6 +539,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -443,7 +547,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -453,9 +557,11 @@ clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-krextra mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
@@ -476,6 +582,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -483,18 +591,26 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-krextra distclean distclean-compile \
- distclean-depend distclean-generic distclean-tags distdir dvi \
- dvi-am info info-am install install-am install-binPROGRAMS \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-krextra ctags distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am info \
+ info-am install install-am install-binPROGRAMS install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am
+ mostlyclean-generic mostlyclean-kr pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
../libntp/libntp.a:
diff --git a/contrib/ntp/util/README b/contrib/ntp/util/README
index b9ed50e19c1e..297a562c6cbe 100644
--- a/contrib/ntp/util/README
+++ b/contrib/ntp/util/README
@@ -28,8 +28,8 @@ size (32 or 64 bits). See the configure scripts for further details.
The testrs6000.c program is used for testing purposes with the IBM
RS/6000 AIX machines. Bill Jones <jones@chpc.utexas.edu> reports:
-"I could not get a tickadj of less then 40 us to work on a RS6000.
-If you set it less then 40 us do so at your own risk!"
+"I could not get a tickadj of less than 40 us to work on a RS6000.
+If you set it less than 40 us do so at your own risk!"
The tickadj.c program can be used to read and set various kernel
parameters affecting NTP operations. See the tickadj page in the HTML
diff --git a/contrib/ntp/util/audio-pcm.c b/contrib/ntp/util/audio-pcm.c
new file mode 100644
index 000000000000..6f2e4fa84a6d
--- /dev/null
+++ b/contrib/ntp/util/audio-pcm.c
@@ -0,0 +1,154 @@
+/*
+ * audio-pcm.c - Scope out the PCM audio stuff
+ */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined(HAVE_MACHINE_SOUNDCARD_H) || defined(HAVE_SYS_SOUNDCARD_H)
+
+#include "audio.h"
+#include "ntp_stdlib.h"
+#include "ntp_syslog.h"
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <stdio.h>
+#include "ntp_string.h"
+
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif /* HAVE_SYS_IOCTL_H */
+
+#include <fcntl.h>
+
+#ifdef HAVE_MACHINE_SOUNDCARD_H
+# include <machine/soundcard.h>
+# define PCM_STYLE_SOUND
+#else
+# ifdef HAVE_SYS_SOUNDCARD_H
+# include <sys/soundcard.h>
+# define PCM_STYLE_SOUND
+# endif
+#endif
+
+/*
+ * Global variables
+ */
+static int ctl_fd; /* audio control file descriptor */
+
+const char *m_names[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES ;
+
+void
+d_fmt(
+ unsigned int format
+ )
+{
+
+ if (format & AFMT_MU_LAW) printf("MU_LAW ");
+ if (format & AFMT_A_LAW) printf("A_LAW ");
+ if (format & AFMT_IMA_ADPCM) printf("IMA_ADPCM ");
+ if (format & AFMT_U8) printf("U8 ");
+ if (format & AFMT_S16_LE) printf("S16_LE ");
+ if (format & AFMT_S16_BE) printf("S16_BE ");
+ if (format & AFMT_S8) printf("S8 ");
+ if (format & AFMT_U16_LE) printf("U16_LE ");
+ if (format & AFMT_U16_BE) printf("U16_BE ");
+ if (format & AFMT_MPEG) printf("MPEG ");
+ if (format & AFMT_AC3) printf("AC3 ");
+ printf("\n");
+}
+
+void
+d_mixer(
+ unsigned int mixer
+ )
+{
+ int i;
+ int n = 0;
+
+ for (i = 0; i < SOUND_MIXER_NRDEVICES; ++i)
+ if ((1 << i) & mixer) {
+ if (n)
+ printf(", ");
+ printf("%s", m_names[i]);
+ n = 1;
+ }
+ printf("\n");
+}
+
+int
+main( )
+{
+ int unit = 0; /* device unit (0-3) */
+# define AI_DEV "/dev/audio%d"
+# define AC_DEV "/dev/mixer%d"
+ char ai_dev[30];
+ char ac_dev[30];
+ struct snd_size s_size;
+ snd_chan_param s_c_p;
+ snd_capabilities s_c;
+ int fd;
+ int rval;
+ char *dname = ai_dev; /* device name */
+ char *actl = ac_dev;
+ int devmask = 0, recmask = 0, recsrc = 0;
+
+ (void)sprintf(ai_dev, AI_DEV, unit);
+ (void)sprintf(ac_dev, AC_DEV, unit);
+
+ /*
+ * Open audio device. Do not complain if not there.
+ */
+ fd = open(dname, O_RDWR | O_NONBLOCK, 0777);
+ if (fd < 0)
+ return (fd);
+
+ /*
+ * Open audio control device.
+ */
+ ctl_fd = open(actl, O_RDWR);
+ if (ctl_fd < 0) {
+ fprintf(stderr, "invalid control device <%s>\n", actl);
+ close(fd);
+ return(ctl_fd);
+ }
+
+ printf("input: <%s> %d\n", dname, fd);
+ printf("control: <%s> %d\n", actl, ctl_fd);
+
+ if (ioctl(ctl_fd, SOUND_MIXER_READ_DEVMASK, &devmask) == -1)
+ printf("SOUND_MIXER_READ_DEVMASK: %s\n", strerror(errno));
+ if (ioctl(ctl_fd, SOUND_MIXER_READ_RECMASK, &recmask) == -1)
+ printf("SOUND_MIXER_READ_RECMASK: %s\n", strerror(errno));
+ if (ioctl(ctl_fd, SOUND_MIXER_READ_RECSRC, &recsrc) == -1)
+ printf("SOUND_MIXER_READ_RECSRC: %s\n", strerror(errno));
+
+ printf("devmask: %#x recmask: %#x recsrc: %#x\n",
+ devmask, recmask, recsrc);
+ printf("Devmask: "); d_mixer(devmask);
+ printf("Recmask: "); d_mixer(recmask);
+ printf("RecSrc: "); d_mixer(recsrc);
+
+ /*
+ * Set audio device parameters.
+ */
+ rval = fd;
+
+ if (ioctl(fd, AIOGSIZE, &s_size) == -1)
+ printf("AIOGSIZE: %s\n", strerror(errno));
+ else
+ printf("play_size %d, rec_size %d\n",
+ s_size.play_size, s_size.rec_size);
+
+ if (ioctl(fd, AIOGFMT, &s_c_p) == -1)
+ printf("AIOGFMT: %s\n", strerror(errno));
+ else {
+ printf("play_rate %lu, rec_rate %lu, play_format %#lx, rec_format %#lx\n",
+ s_c_p.play_rate, s_c_p.rec_rate, s_c_p.play_format, s_c_p.rec_format);
+ printf("Play format: "); d_fmt(s_c_p.play_format);
+ printf("Rec format: "); d_fmt(s_c_p.rec_format);
+ }
+
+}
+#endif /* HAVE_{MACHINE_SOUNDCARD,SYS_SOUNDCARD}_H */
diff --git a/contrib/ntp/util/hist.c b/contrib/ntp/util/hist.c
index b02d73fdd7d9..c9763ce1975c 100644
--- a/contrib/ntp/util/hist.c
+++ b/contrib/ntp/util/hist.c
@@ -7,20 +7,24 @@
* runs backwards.
*/
+#if 0
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "ntp_types.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#define NBUF 100001 /* size of basic histogram */
#define NSRT 20000 /* size of overflow histogram */
#define NCNT (600 * 1000000) /* sample interval (us) */
-int col P((long *, long *));
+extern int col(hrtime_t *, hrtime_t *);
+extern hrtime_t gethrtime(void);
int
main(
@@ -28,10 +32,8 @@ main(
char *argv[]
)
{
- struct timeval ts, tr, tp;
- struct timezone tzp;
int i, j, n;
- long t, u, v, w, gtod[NBUF], ovfl[NSRT];
+ hrtime_t t, u, v, w, gtod[NBUF], ovfl[NSRT];
/*
* Force pages into memory
@@ -45,12 +47,10 @@ main(
* Construct histogram
*/
n = 0;
- gettimeofday(&ts, &tzp);
- t = ts.tv_sec * 1000000 + ts.tv_usec;
+ t = gethrtime();
v = t;
while (1) {
- gettimeofday(&tr, &tzp);
- u = tr.tv_sec * 1000000 + tr.tv_usec;
+ u = gethirestime();
if (u - v > NCNT)
break;
w = u - t;
@@ -66,7 +66,6 @@ main(
} else {
gtod[w]++;
}
- ts = tr;
t = u;
}
@@ -79,7 +78,7 @@ main(
}
if (n == 0)
return;
- qsort((char *)ovfl, (size_t)n, sizeof(long), col);
+ qsort((char *)ovfl, (size_t)n, sizeof(hrtime_t), col);
w = 0;
j = 0;
for (i = 0; i < n; i++) {
@@ -99,8 +98,8 @@ main(
int
col(
- long *x,
- long *y
+ hrtime_t *x,
+ hrtime_t *y
)
{
return (*x - *y);
diff --git a/contrib/ntp/util/ntp-keygen.c b/contrib/ntp/util/ntp-keygen.c
new file mode 100644
index 000000000000..850ae4cec49d
--- /dev/null
+++ b/contrib/ntp/util/ntp-keygen.c
@@ -0,0 +1,1953 @@
+/*
+ * Program to generate cryptographic keys for NTP clients and servers
+ *
+ * This program generates files "ntpkey_<type>_<hostname>.<filestamp>",
+ * where <type> is the file type, <hostname> is the generating host and
+ * <filestamp> is the NTP seconds in decimal format. The NTP programs
+ * expect generic names such as "ntpkey_<type>_whimsy.udel.edu" with the
+ * association maintained by soft links.
+ *
+ * Files are prefixed with a header giving the name and date of creation
+ * followed by a type-specific descriptive label and PEM-encoded data
+ * string compatible with programs of the OpenSSL library.
+ *
+ * Note that private keys can be password encrypted as per OpenSSL
+ * conventions.
+ *
+ * The file types include
+ *
+ * ntpkey_MD5key_<hostname>.<filestamp>
+ * MD5 (128-bit) keys used to compute message digests in symmetric
+ * key cryptography
+ *
+ * ntpkey_RSAkey_<hostname>.<filestamp>
+ * ntpkey_host_<hostname> (RSA) link
+ * RSA private/public host key pair used for public key signatures
+ * and data encryption
+ *
+ * ntpkey_DSAkey_<hostname>.<filestamp>
+ * ntpkey_sign_<hostname> (RSA or DSA) link
+ * DSA private/public sign key pair used for public key signatures,
+ * but not data encryption
+ *
+ * ntpkey_IFFpar_<hostname>.<filestamp>
+ * ntpkey_iff_<hostname> (IFF server/client) link
+ * ntpkey_iffkey_<hostname> (IFF client) link
+ * Schnorr (IFF) server/client identity parameters
+ *
+ * ntpkey_IFFkey_<hostname>.<filestamp>
+ * Schnorr (IFF) client identity parameters
+ *
+ * ntpkey_GQpar_<hostname>.<filestamp>,
+ * ntpkey_gq_<hostname> (GQ) link
+ * Guillou-Quisquater (GQ) identity parameters
+ *
+ * ntpkey_MVpar_<hostname>.<filestamp>,
+ * Mu-Varadharajan (MV) server identity parameters
+ *
+ * ntpkey_MVkeyX_<hostname>.<filestamp>,
+ * ntpkey_mv_<hostname> (MV server) link
+ * ntpkey_mvkey_<hostname> (MV client) link
+ * Mu-Varadharajan (MV) client identity parameters
+ *
+ * ntpkey_XXXcert_<hostname>.<filestamp>
+ * ntpkey_cert_<hostname> (RSA or DSA) link
+ * X509v3 certificate using RSA or DSA public keys and signatures.
+ * XXX is a code identifying the message digest and signature
+ * encryption algorithm
+ *
+ * Available digest/signature schemes
+ *
+ * RSA: RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, EVP-RIPEMD160
+ * DSA: DSA-SHA, DSA-SHA1
+ *
+ * Note: Once in a while because of some statistical fluke this program
+ * fails to generate and verify some cryptographic data, as indicated by
+ * exit status -1. In this case simply run the program again. If the
+ * program does complete with return code 0, the data are correct as
+ * verified.
+ *
+ * These cryptographic routines are characterized by the prime modulus
+ * size in bits. The default value of 512 bits is a compromise between
+ * cryptographic strength and computing time and is ordinarily
+ * considered adequate for this application. The routines have been
+ * tested with sizes of 256, 512, 1024 and 2048 bits. Not all message
+ * digest and signature encryption schemes work with sizes less than 512
+ * bits. The computing time for sizes greater than 2048 bits is
+ * prohibitive on all but the fastest processors. An UltraSPARC Blade
+ * 1000 took something over nine minutes to generate and verify the
+ * values with size 2048. An old SPARC IPC would take a week.
+ *
+ * The OpenSSL library used by this program expects a random seed file.
+ * As described in the OpenSSL documentation, the file name defaults to
+ * first the RANDFILE environment variable in the user's home directory
+ * and then .rnd in the user's home directory.
+ */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include "ntp_types.h"
+#include "l_stdlib.h"
+
+#ifdef SYS_WINNT
+extern int ntp_getopt P((int, char **, const char *));
+#define getopt ntp_getopt
+#define optarg ntp_optarg
+#endif
+
+#ifdef OPENSSL
+#include "openssl/bn.h"
+#include "openssl/evp.h"
+#include "openssl/err.h"
+#include "openssl/rand.h"
+#include "openssl/pem.h"
+#include "openssl/x509v3.h"
+#include <openssl/objects.h>
+#endif /* OPENSSL */
+
+/*
+ * Cryptodefines
+ */
+#define MD5KEYS 16 /* number of MD5 keys generated */
+#define JAN_1970 ULONG_CONST(2208988800) /* NTP seconds */
+#define YEAR ((long)60*60*24*365) /* one year in seconds */
+#define MAXFILENAME 256 /* max file name length */
+#define MAXHOSTNAME 256 /* max host name length */
+#ifdef OPENSSL
+#define PLEN 512 /* default prime modulus size (bits) */
+
+/*
+ * Strings used in X509v3 extension fields
+ */
+#define KEY_USAGE "digitalSignature,keyCertSign"
+#define BASIC_CONSTRAINTS "critical,CA:TRUE"
+#define EXT_KEY_PRIVATE "private"
+#define EXT_KEY_TRUST "trustRoot"
+#endif /* OPENSSL */
+
+/*
+ * Prototypes
+ */
+FILE *fheader P((const char *, const char *));
+void fslink P((const char *, const char *));
+int gen_md5 P((char *));
+#ifdef OPENSSL
+EVP_PKEY *gen_rsa P((char *));
+EVP_PKEY *gen_dsa P((char *));
+EVP_PKEY *gen_iff P((char *));
+EVP_PKEY *gen_gqpar P((char *));
+EVP_PKEY *gen_gqkey P((char *, EVP_PKEY *));
+EVP_PKEY *gen_mv P((char *));
+int x509 P((EVP_PKEY *, const EVP_MD *, char *, char *));
+void cb P((int, int, void *));
+EVP_PKEY *genkey P((char *, char *));
+u_long asn2ntp P((ASN1_TIME *));
+#endif /* OPENSSL */
+
+/*
+ * Program variables
+ */
+extern char *optarg; /* command line argument */
+int debug = 0; /* debug, not de bug */
+int rval; /* return status */
+u_int modulus = PLEN; /* prime modulus size (bits) */
+int nkeys = 0; /* MV keys */
+time_t epoch; /* Unix epoch (seconds) since 1970 */
+char *hostname; /* host name (subject name) */
+char *trustname; /* trusted host name (issuer name) */
+char filename[MAXFILENAME + 1]; /* file name */
+char *passwd1 = NULL; /* input private key password */
+char *passwd2 = NULL; /* output private key password */
+#ifdef OPENSSL
+long d0, d1, d2, d3; /* callback counters */
+#endif /* OPENSSL */
+
+#ifdef SYS_WINNT
+BOOL init_randfile();
+
+/*
+ * Don't try to follow symbolic links
+ */
+int
+readlink(char * link, char * file, int len) {
+ return (-1);
+}
+/*
+ * Don't try to create a symbolic link for now.
+ * Just move the file to the name you need.
+ */
+int
+symlink(char *filename, char *linkname) {
+ DeleteFile(linkname);
+ MoveFile(filename, linkname);
+ return 0;
+}
+void
+InitWin32Sockets() {
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ wVersionRequested = MAKEWORD(2,0);
+ if (WSAStartup(wVersionRequested, &wsaData))
+ {
+ fprintf(stderr, "No useable winsock.dll");
+ exit(1);
+ }
+}
+#endif /* SYS_WINNT */
+
+/*
+ * Main program
+ */
+int
+main(
+ int argc, /* command line options */
+ char **argv
+ )
+{
+ struct timeval tv; /* initialization vector */
+#ifdef OPENSSL
+ X509 *cert = NULL; /* X509 certificate */
+ EVP_PKEY *pkey_host = NULL; /* host key */
+ EVP_PKEY *pkey_sign = NULL; /* sign key */
+ EVP_PKEY *pkey_iff = NULL; /* IFF parameters */
+ EVP_PKEY *pkey_gq = NULL; /* GQ parameters */
+ EVP_PKEY *pkey_mv = NULL; /* MV parameters */
+ int md5key = 0; /* generate MD5 keys */
+ int hostkey = 0; /* generate RSA keys */
+ int iffkey = 0; /* generate IFF parameters */
+ int gqpar = 0; /* generate GQ parameters */
+ int gqkey = 0; /* update GQ keys */
+ int mvpar = 0; /* generate MV parameters */
+ int mvkey = 0; /* update MV keys */
+ char *sign = NULL; /* sign key */
+ EVP_PKEY *pkey = NULL; /* temp key */
+ const EVP_MD *ectx; /* EVP digest */
+ char hostbuf[MAXHOSTNAME + 1];
+ char pathbuf[MAXFILENAME + 1];
+ const char *scheme = NULL; /* digest/signature scheme */
+ char *exten = NULL; /* private extension */
+ char *grpkey = NULL; /* identity extension */
+ int nid; /* X509 digest/signature scheme */
+ FILE *fstr = NULL; /* file handle */
+ int iffsw = 0; /* IFF key switch */
+#endif /* OPENSSL */
+ u_int temp;
+
+#ifdef SYS_WINNT
+ /* Initialize before OpenSSL checks */
+ InitWin32Sockets();
+ if(!init_randfile())
+ fprintf(stderr, "Unable to initialize .rnd file\n");
+#endif
+
+#ifdef OPENSSL
+ if (SSLeay() != OPENSSL_VERSION_NUMBER) {
+ fprintf(stderr,
+ "OpenSSL version mismatch. Built against %lx, you have %lx\n",
+ OPENSSL_VERSION_NUMBER, SSLeay());
+ return (-1);
+
+ } else {
+ fprintf(stderr,
+ "Using OpenSSL version %lx\n", SSLeay());
+ }
+#endif /* OPENSSL */
+
+ /*
+ * Process options, initialize host name and timestamp.
+ */
+ gethostname(hostbuf, MAXHOSTNAME);
+ hostname = hostbuf;
+ trustname = hostbuf;
+ passwd1 = hostbuf;
+#ifndef SYS_WINNT
+ gettimeofday(&tv, 0);
+#else
+ gettimeofday(&tv);
+#endif
+ epoch = tv.tv_sec;
+ rval = 0;
+ while ((temp = getopt(argc, argv,
+ "c:deGgHIi:Mm:nPp:q:S:s:TV:v:")) != -1) {
+ switch(temp) {
+
+ /*
+ * -c select public certificate type
+ */
+ case 'c':
+ scheme = optarg;
+ continue;
+
+ /*
+ * -d debug
+ */
+ case 'd':
+ debug++;
+ continue;
+
+ /*
+ * -e write identity keys
+ */
+ case 'e':
+ iffsw++;
+ continue;
+
+ /*
+ * -G generate GQ parameters and keys
+ */
+ case 'G':
+ gqpar++;
+ continue;
+
+ /*
+ * -g update GQ keys
+ */
+ case 'g':
+ gqkey++;
+ continue;
+
+ /*
+ * -H generate host key (RSA)
+ */
+ case 'H':
+ hostkey++;
+ continue;
+
+ /*
+ * -I generate IFF parameters
+ */
+ case 'I':
+ iffkey++;
+ continue;
+
+ /*
+ * -i set issuer name
+ */
+ case 'i':
+ trustname = optarg;
+ continue;
+
+ /*
+ * -M generate MD5 keys
+ */
+ case 'M':
+ md5key++;
+ continue;
+
+
+ /*
+ * -m select modulus (256-2048)
+ */
+ case 'm':
+ if (sscanf(optarg, "%d", &modulus) != 1)
+ fprintf(stderr,
+ "invalid option -m %s\n", optarg);
+ continue;
+
+ /*
+ * -P generate PC private certificate
+ */
+ case 'P':
+ exten = EXT_KEY_PRIVATE;
+ continue;
+
+ /*
+ * -p output private key password
+ */
+ case 'p':
+ passwd2 = optarg;
+ continue;
+
+ /*
+ * -q input private key password
+ */
+ case 'q':
+ passwd1 = optarg;
+ continue;
+
+ /*
+ * -S generate sign key (RSA or DSA)
+ */
+ case 'S':
+ sign = optarg;
+ continue;
+
+ /*
+ * -s set subject name
+ */
+ case 's':
+ hostname = optarg;
+ continue;
+
+ /*
+ * -T trusted certificate (TC scheme)
+ */
+ case 'T':
+ exten = EXT_KEY_TRUST;
+ continue;
+
+ /*
+ * -V <keys> generate MV parameters
+ */
+ case 'V':
+ mvpar++;
+ if (sscanf(optarg, "%d", &nkeys) != 1)
+ fprintf(stderr,
+ "invalid option -V %s\n", optarg);
+ continue;
+
+ /*
+ * -v <key> update MV keys
+ */
+ case 'v':
+ mvkey++;
+ if (sscanf(optarg, "%d", &nkeys) != 1)
+ fprintf(stderr,
+ "invalid option -v %s\n", optarg);
+ continue;
+
+ /*
+ * None of the above.
+ */
+ default:
+ fprintf(stderr, "Option ignored\n");
+ continue;
+ }
+ }
+
+ if (passwd1 != NULL && passwd2 == NULL)
+ passwd2 = passwd1;
+#ifdef OPENSSL
+ /*
+ * Seed random number generator and grow weeds.
+ */
+ ERR_load_crypto_strings();
+ OpenSSL_add_all_algorithms();
+ if (RAND_file_name(pathbuf, MAXFILENAME) == NULL) {
+ fprintf(stderr, "RAND_file_name %s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ return (-1);
+ }
+ temp = RAND_load_file(pathbuf, -1);
+ if (temp == 0) {
+ fprintf(stderr,
+ "RAND_load_file %s not found or empty\n", pathbuf);
+ return (-1);
+ }
+ fprintf(stderr,
+ "Random seed file %s %u bytes\n", pathbuf, temp);
+ RAND_add(&epoch, sizeof(epoch), 4.0);
+
+ /*
+ * Generate new parameters and keys as requested. These replace
+ * any values already generated.
+ */
+ if (md5key)
+ gen_md5("MD5");
+ if (hostkey)
+ pkey_host = genkey("RSA", "host");
+ if (sign != NULL)
+ pkey_sign = genkey(sign, "sign");
+ if (iffkey)
+ pkey_iff = gen_iff("iff");
+ if (gqpar)
+ pkey_gq = gen_gqpar("gq");
+ if (mvpar)
+ pkey_mv = gen_mv("mv");
+
+ /*
+ * If there is no new host key, look for an existing one. If not
+ * found, create it.
+ */
+ while (pkey_host == NULL && rval == 0 && !iffsw) {
+ sprintf(filename, "ntpkey_host_%s", hostname);
+ if ((fstr = fopen(filename, "r")) != NULL) {
+ pkey_host = PEM_read_PrivateKey(fstr, NULL,
+ NULL, passwd1);
+ fclose(fstr);
+ readlink(filename, filename, sizeof(filename));
+ if (pkey_host == NULL) {
+ fprintf(stderr, "Host key\n%s\n",
+ ERR_error_string(ERR_get_error(),
+ NULL));
+ rval = -1;
+ } else {
+ fprintf(stderr,
+ "Using host key %s\n", filename);
+ }
+ break;
+
+ } else if ((pkey_host = genkey("RSA", "host")) ==
+ NULL) {
+ rval = -1;
+ break;
+ }
+ }
+
+ /*
+ * If there is no new sign key, look for an existing one. If not
+ * found, use the host key instead.
+ */
+ pkey = pkey_sign;
+ while (pkey_sign == NULL && rval == 0 && !iffsw) {
+ sprintf(filename, "ntpkey_sign_%s", hostname);
+ if ((fstr = fopen(filename, "r")) != NULL) {
+ pkey_sign = PEM_read_PrivateKey(fstr, NULL,
+ NULL, passwd1);
+ fclose(fstr);
+ readlink(filename, filename, sizeof(filename));
+ if (pkey_sign == NULL) {
+ fprintf(stderr, "Sign key\n%s\n",
+ ERR_error_string(ERR_get_error(),
+ NULL));
+ rval = -1;
+ } else {
+ fprintf(stderr, "Using sign key %s\n",
+ filename);
+ }
+ break;
+ } else {
+ pkey = pkey_host;
+ fprintf(stderr, "Using host key as sign key\n");
+ break;
+ }
+ }
+
+ /*
+ * If there is no new IFF file, look for an existing one.
+ */
+ if (pkey_iff == NULL && rval == 0) {
+ sprintf(filename, "ntpkey_iff_%s", hostname);
+ if ((fstr = fopen(filename, "r")) != NULL) {
+ pkey_iff = PEM_read_PrivateKey(fstr, NULL,
+ NULL, passwd1);
+ fclose(fstr);
+ readlink(filename, filename, sizeof(filename));
+ if (pkey_iff == NULL) {
+ fprintf(stderr, "IFF parameters\n%s\n",
+ ERR_error_string(ERR_get_error(),
+ NULL));
+ rval = -1;
+ } else {
+ fprintf(stderr,
+ "Using IFF parameters %s\n",
+ filename);
+ }
+ }
+ }
+
+ /*
+ * If there is no new GQ file, look for an existing one.
+ */
+ if (pkey_gq == NULL && rval == 0 && !iffsw) {
+ sprintf(filename, "ntpkey_gq_%s", hostname);
+ if ((fstr = fopen(filename, "r")) != NULL) {
+ pkey_gq = PEM_read_PrivateKey(fstr, NULL, NULL,
+ passwd1);
+ fclose(fstr);
+ readlink(filename, filename, sizeof(filename));
+ if (pkey_gq == NULL) {
+ fprintf(stderr, "GQ parameters\n%s\n",
+ ERR_error_string(ERR_get_error(),
+ NULL));
+ rval = -1;
+ } else {
+ fprintf(stderr,
+ "Using GQ parameters %s\n",
+ filename);
+ }
+ }
+ }
+
+ /*
+ * If there is a GQ parameter file, create GQ private/public
+ * keys and extract the public key for the certificate.
+ */
+ if (pkey_gq != NULL && rval == 0) {
+ gen_gqkey("gq", pkey_gq);
+ grpkey = BN_bn2hex(pkey_gq->pkey.rsa->q);
+ }
+
+ /*
+ * Generate a X509v3 certificate.
+ */
+ while (scheme == NULL && rval == 0 && !iffsw) {
+ sprintf(filename, "ntpkey_cert_%s", hostname);
+ if ((fstr = fopen(filename, "r")) != NULL) {
+ cert = PEM_read_X509(fstr, NULL, NULL, NULL);
+ fclose(fstr);
+ readlink(filename, filename, sizeof(filename));
+ if (cert == NULL) {
+ fprintf(stderr, "Cert \n%s\n",
+ ERR_error_string(ERR_get_error(),
+ NULL));
+ rval = -1;
+ } else {
+ nid = OBJ_obj2nid(
+ cert->cert_info->signature->algorithm);
+ scheme = OBJ_nid2sn(nid);
+ fprintf(stderr,
+ "Using scheme %s from %s\n", scheme,
+ filename);
+ break;
+ }
+ }
+ scheme = "RSA-MD5";
+ }
+ if (pkey != NULL && rval == 0 && !iffsw) {
+ ectx = EVP_get_digestbyname(scheme);
+ if (ectx == NULL) {
+ fprintf(stderr,
+ "Invalid digest/signature combination %s\n",
+ scheme);
+ rval = -1;
+ } else {
+ x509(pkey, ectx, grpkey, exten);
+ }
+ }
+
+ /*
+ * Write the IFF client parameters and keys as a DSA private key
+ * encoded in PEM. Note the private key is obscured.
+ */
+ if (pkey_iff != NULL && rval == 0 && iffsw) {
+ DSA *dsa;
+ char *sptr;
+
+ sptr = strrchr(filename, '.');
+ sprintf(filename, "ntpkey_IFFkey_%s.%s", trustname,
+ ++sptr);
+ fprintf(stderr, "Writing new IFF key %s\n", filename);
+ fprintf(stdout, "# %s\n# %s", filename, ctime(&epoch));
+ dsa = pkey_iff->pkey.dsa;
+ BN_copy(dsa->priv_key, BN_value_one());
+ pkey = EVP_PKEY_new();
+ EVP_PKEY_assign_DSA(pkey, dsa);
+ PEM_write_PrivateKey(stdout, pkey, passwd2 ?
+ EVP_des_cbc() : NULL, NULL, 0, NULL, passwd2);
+ fclose(stdout);
+ if (debug)
+ DSA_print_fp(stdout, dsa, 0);
+ }
+
+ /*
+ * Return the marbles.
+ */
+ if (grpkey != NULL)
+ OPENSSL_free(grpkey);
+ if (pkey_host != NULL)
+ EVP_PKEY_free(pkey_host);
+ if (pkey_sign != NULL)
+ EVP_PKEY_free(pkey_sign);
+ if (pkey_iff != NULL)
+ EVP_PKEY_free(pkey_iff);
+ if (pkey_gq != NULL)
+ EVP_PKEY_free(pkey_gq);
+ if (pkey_mv != NULL)
+ EVP_PKEY_free(pkey_mv);
+#endif /* OPENSSL */
+ return (rval);
+}
+
+
+#if 0
+/*
+ * Generate random MD5 key with password.
+ */
+int
+gen_md5(
+ char *id /* file name id */
+ )
+{
+ BIGNUM *key;
+ BIGNUM *keyid;
+ FILE *str;
+ u_char bin[16];
+
+ fprintf(stderr, "Generating MD5 keys...\n");
+ str = fheader("MD5key", hostname);
+ keyid = BN_new(); key = BN_new();
+ BN_rand(keyid, 16, -1, 0);
+ BN_rand(key, 128, -1, 0);
+ BN_bn2bin(key, bin);
+ PEM_write_fp(str, MD5, NULL, bin);
+ fclose(str);
+ fslink(id, hostname);
+ return (1);
+}
+
+
+#else
+/*
+ * Generate semi-random MD5 keys compatible with NTPv3 and NTPv4
+ */
+int
+gen_md5(
+ char *id /* file name id */
+ )
+{
+ u_char md5key[16]; /* MD5 key */
+ FILE *str;
+ u_int temp = 0; /* Initialize to prevent warnings during compile */
+ int i, j;
+
+ fprintf(stderr, "Generating MD5 keys...\n");
+ str = fheader("MD5key", hostname);
+ srandom(epoch);
+ for (i = 1; i <= MD5KEYS; i++) {
+ for (j = 0; j < 16; j++) {
+ while (1) {
+ temp = random() & 0xff;
+ if (temp == '#')
+ continue;
+ if (temp > 0x20 && temp < 0x7f)
+ break;
+ }
+ md5key[j] = (u_char)temp;
+ }
+ md5key[16] = '\0';
+ fprintf(str, "%2d MD5 %16s # MD5 key\n", i,
+ md5key);
+ }
+ fclose(str);
+ fslink(id, hostname);
+ return (1);
+}
+#endif /* OPENSSL */
+
+
+#ifdef OPENSSL
+/*
+ * Generate RSA public/private key pair
+ */
+EVP_PKEY * /* public/private key pair */
+gen_rsa(
+ char *id /* file name id */
+ )
+{
+ EVP_PKEY *pkey; /* private key */
+ RSA *rsa; /* RSA parameters and key pair */
+ FILE *str;
+
+ fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus);
+ rsa = RSA_generate_key(modulus, 3, cb, "RSA");
+ fprintf(stderr, "\n");
+ if (rsa == NULL) {
+ fprintf(stderr, "RSA generate keys fails\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ rval = -1;
+ return (NULL);
+ }
+
+ /*
+ * For signature encryption it is not necessary that the RSA
+ * parameters be strictly groomed and once in a while the
+ * modulus turns out to be non-prime. Just for grins, we check
+ * the primality.
+ */
+ if (!RSA_check_key(rsa)) {
+ fprintf(stderr, "Invalid RSA key\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ RSA_free(rsa);
+ rval = -1;
+ return (NULL);
+ }
+
+ /*
+ * Write the RSA parameters and keys as a RSA private key
+ * encoded in PEM.
+ */
+ str = fheader("RSAkey", hostname);
+ pkey = EVP_PKEY_new();
+ EVP_PKEY_assign_RSA(pkey, rsa);
+ PEM_write_PrivateKey(str, pkey, passwd2 ? EVP_des_cbc() : NULL,
+ NULL, 0, NULL, passwd2);
+ fclose(str);
+ if (debug)
+ RSA_print_fp(stdout, rsa, 0);
+ fslink(id, hostname);
+ return (pkey);
+}
+
+
+/*
+ * Generate DSA public/private key pair
+ */
+EVP_PKEY * /* public/private key pair */
+gen_dsa(
+ char *id /* file name id */
+ )
+{
+ EVP_PKEY *pkey; /* private key */
+ DSA *dsa; /* DSA parameters */
+ u_char seed[20]; /* seed for parameters */
+ FILE *str;
+
+ /*
+ * Generate DSA parameters.
+ */
+ fprintf(stderr,
+ "Generating DSA parameters (%d bits)...\n", modulus);
+ RAND_bytes(seed, sizeof(seed));
+ dsa = DSA_generate_parameters(modulus, seed, sizeof(seed), NULL,
+ NULL, cb, "DSA");
+ fprintf(stderr, "\n");
+ if (dsa == NULL) {
+ fprintf(stderr, "DSA generate parameters fails\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ rval = -1;
+ return (NULL);
+ }
+
+ /*
+ * Generate DSA keys.
+ */
+ fprintf(stderr, "Generating DSA keys (%d bits)...\n", modulus);
+ if (!DSA_generate_key(dsa)) {
+ fprintf(stderr, "DSA generate keys fails\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ DSA_free(dsa);
+ rval = -1;
+ return (NULL);
+ }
+
+ /*
+ * Write the DSA parameters and keys as a DSA private key
+ * encoded in PEM.
+ */
+ str = fheader("DSAkey", hostname);
+ pkey = EVP_PKEY_new();
+ EVP_PKEY_assign_DSA(pkey, dsa);
+ PEM_write_PrivateKey(str, pkey, passwd2 ? EVP_des_cbc() : NULL,
+ NULL, 0, NULL, passwd2);
+ fclose(str);
+ if (debug)
+ DSA_print_fp(stdout, dsa, 0);
+ fslink(id, hostname);
+ return (pkey);
+}
+
+
+/*
+ * Generate Schnorr (IFF) parameters and keys
+ *
+ * The Schnorr (IFF)identity scheme is intended for use when
+ * certificates are generated by some other trusted certificate
+ * authority and the parameters cannot be conveyed in the certificate
+ * itself. For this purpose, new generations of IFF values must be
+ * securely transmitted to all members of the group before use. There
+ * are two kinds of files: server/client files that include private and
+ * public parameters and client files that include only public
+ * parameters. The scheme is self contained and independent of new
+ * generations of host keys, sign keys and certificates.
+ *
+ * The IFF values hide in a DSA cuckoo structure which uses the same
+ * parameters. The values are used by an identity scheme based on DSA
+ * cryptography and described in Stimson p. 285. The p is a 512-bit
+ * prime, g a generator of Zp* and q a 160-bit prime that divides p - 1
+ * and is a qth root of 1 mod p; that is, g^q = 1 mod p. The TA rolls a
+ * private random group key b (0 < b < q), then computes public
+ * v = g^(q - a). All values except the group key are known to all group
+ * members; the group key is known to the group servers, but not the
+ * group clients. Alice challenges Bob to confirm identity using the
+ * protocol described below.
+ */
+EVP_PKEY * /* DSA cuckoo nest */
+gen_iff(
+ char *id /* file name id */
+ )
+{
+ EVP_PKEY *pkey; /* private key */
+ DSA *dsa; /* DSA parameters */
+ u_char seed[20]; /* seed for parameters */
+ BN_CTX *ctx; /* BN working space */
+ BIGNUM *b, *r, *k, *u, *v, *w; /* BN temp */
+ FILE *str;
+ u_int temp;
+
+ /*
+ * Generate DSA parameters for use as IFF parameters.
+ */
+ fprintf(stderr, "Generating IFF parameters (%d bits)...\n",
+ modulus);
+ RAND_bytes(seed, sizeof(seed));
+ dsa = DSA_generate_parameters(modulus, seed, sizeof(seed), NULL,
+ NULL, cb, "IFF");
+ fprintf(stderr, "\n");
+ if (dsa == NULL) {
+ fprintf(stderr, "DSA generate parameters fails\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ rval = -1;
+ return (NULL);;
+ }
+
+ /*
+ * Generate the private and public keys. The DSA parameters and
+ * these keys are distributed to all members of the group.
+ */
+ fprintf(stderr, "Generating IFF keys (%d bits)...\n", modulus);
+ b = BN_new(); r = BN_new(); k = BN_new();
+ u = BN_new(); v = BN_new(); w = BN_new(); ctx = BN_CTX_new();
+ BN_rand(b, BN_num_bits(dsa->q), -1, 0); /* a */
+ BN_mod(b, b, dsa->q, ctx);
+ BN_sub(v, dsa->q, b);
+ BN_mod_exp(v, dsa->g, v, dsa->p, ctx); /* g^(q - b) mod p */
+ BN_mod_exp(u, dsa->g, b, dsa->p, ctx); /* g^b mod p */
+ BN_mod_mul(u, u, v, dsa->p, ctx);
+ temp = BN_is_one(u);
+ fprintf(stderr,
+ "Confirm g^(q - b) g^b = 1 mod p: %s\n", temp == 1 ?
+ "yes" : "no");
+ if (!temp) {
+ BN_free(b); BN_free(r); BN_free(k);
+ BN_free(u); BN_free(v); BN_free(w); BN_CTX_free(ctx);
+ rval = -1;
+ return (NULL);
+ }
+ dsa->priv_key = BN_dup(b); /* private key */
+ dsa->pub_key = BN_dup(v); /* public key */
+
+ /*
+ * Here is a trial round of the protocol. First, Alice rolls
+ * random r (0 < r < q) and sends it to Bob. She needs only
+ * modulus q.
+ */
+ BN_rand(r, BN_num_bits(dsa->q), -1, 0); /* r */
+ BN_mod(r, r, dsa->q, ctx);
+
+ /*
+ * Bob rolls random k (0 < k < q), computes y = k + b r mod q
+ * and x = g^k mod p, then sends (y, x) to Alice. He needs
+ * moduli p, q and the group key b.
+ */
+ BN_rand(k, BN_num_bits(dsa->q), -1, 0); /* k, 0 < k < q */
+ BN_mod(k, k, dsa->q, ctx);
+ BN_mod_mul(v, dsa->priv_key, r, dsa->q, ctx); /* b r mod q */
+ BN_add(v, v, k);
+ BN_mod(v, v, dsa->q, ctx); /* y = k + b r mod q */
+ BN_mod_exp(u, dsa->g, k, dsa->p, ctx); /* x = g^k mod p */
+
+ /*
+ * Alice computes g^y v^r and verifies the result is equal to x.
+ * She needs modulus p, generator g, and the public key v, as
+ * well as her original r.
+ */
+ BN_mod_exp(v, dsa->g, v, dsa->p, ctx); /* g^y mod p */
+ BN_mod_exp(w, dsa->pub_key, r, dsa->p, ctx); /* v^r */
+ BN_mod_mul(v, w, v, dsa->p, ctx); /* product mod p */
+ temp = BN_cmp(u, v);
+ fprintf(stderr,
+ "Confirm g^k = g^(k + b r) g^(q - b) r: %s\n", temp ==
+ 0 ? "yes" : "no");
+ BN_free(b); BN_free(r); BN_free(k);
+ BN_free(u); BN_free(v); BN_free(w); BN_CTX_free(ctx);
+ if (temp != 0) {
+ DSA_free(dsa);
+ rval = -1;
+ return (NULL);
+ }
+
+ /*
+ * Write the IFF server parameters and keys as a DSA private key
+ * encoded in PEM.
+ *
+ * p modulus p
+ * q modulus q
+ * g generator g
+ * priv_key b
+ * public_key v
+ */
+ str = fheader("IFFpar", trustname);
+ pkey = EVP_PKEY_new();
+ EVP_PKEY_assign_DSA(pkey, dsa);
+ PEM_write_PrivateKey(str, pkey, passwd2 ? EVP_des_cbc() : NULL,
+ NULL, 0, NULL, passwd2);
+ fclose(str);
+ if (debug)
+ DSA_print_fp(stdout, dsa, 0);
+ fslink(id, trustname);
+ return (pkey);
+}
+
+
+/*
+ * Generate Guillou-Quisquater (GQ) parameters and keys
+ *
+ * The Guillou-Quisquater (GQ) identity scheme is intended for use when
+ * the parameters, keys and certificates are generated by this program.
+ * The scheme uses a certificate extension field do convey the public
+ * key of a particular group identified by a group key known only to
+ * members of the group. The scheme is self contained and independent of
+ * new generations of host keys and sign keys.
+ *
+ * The GQ parameters hide in a RSA cuckoo structure which uses the same
+ * parameters. The values are used by an identity scheme based on RSA
+ * cryptography and described in Stimson p. 300 (with errors). The 512-
+ * bit public modulus is n = p q, where p and q are secret large primes.
+ * The TA rolls private random group key b as RSA exponent. These values
+ * are known to all group members.
+ *
+ * When rolling new certificates, a member recomputes the private and
+ * public keys. The private key u is a random roll, while the public key
+ * is the inverse obscured by the group key v = (u^-1)^b. These values
+ * replace the private and public keys normally generated by the RSA
+ * scheme. Alice challenges Bob to confirm identity using the protocol
+ * described below.
+ */
+EVP_PKEY * /* RSA cuckoo nest */
+gen_gqpar(
+ char *id /* file name id */
+ )
+{
+ EVP_PKEY *pkey; /* private key */
+ RSA *rsa; /* GQ parameters */
+ BN_CTX *ctx; /* BN working space */
+ FILE *str;
+
+ /*
+ * Generate RSA parameters for use as GQ parameters.
+ */
+ fprintf(stderr,
+ "Generating GQ parameters (%d bits)...\n", modulus);
+ rsa = RSA_generate_key(modulus, 3, cb, "GQ");
+ fprintf(stderr, "\n");
+ if (rsa == NULL) {
+ fprintf(stderr, "RSA generate keys fails\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ rval = -1;
+ return (NULL);
+ }
+
+ /*
+ * Generate the group key b, which is saved in the e member of
+ * the RSA structure. These values are distributed to all
+ * members of the group, but shielded from all other groups. We
+ * don't use all the parameters, but set the unused ones to a
+ * small number to minimize the file size.
+ */
+ ctx = BN_CTX_new();
+ BN_rand(rsa->e, BN_num_bits(rsa->n), -1, 0); /* b */
+ BN_mod(rsa->e, rsa->e, rsa->n, ctx);
+ BN_copy(rsa->d, BN_value_one());
+ BN_copy(rsa->p, BN_value_one());
+ BN_copy(rsa->q, BN_value_one());
+ BN_copy(rsa->dmp1, BN_value_one());
+ BN_copy(rsa->dmq1, BN_value_one());
+ BN_copy(rsa->iqmp, BN_value_one());
+
+ /*
+ * Write the GQ parameters as a RSA private key encoded in PEM.
+ * The public and private keys are filled in later.
+ *
+ * n modulus n
+ * e group key b
+ * (remaining values are not used)
+ */
+ str = fheader("GQpar", trustname);
+ pkey = EVP_PKEY_new();
+ EVP_PKEY_assign_RSA(pkey, rsa);
+ PEM_write_PrivateKey(str, pkey, passwd2 ? EVP_des_cbc() : NULL,
+ NULL, 0, NULL, passwd2);
+ fclose(str);
+ if (debug)
+ RSA_print_fp(stdout, rsa, 0);
+ fslink(id, trustname);
+ return (pkey);
+}
+
+
+/*
+ * Update Guillou-Quisquater (GQ) parameters
+ */
+EVP_PKEY * /* RSA cuckoo nest */
+gen_gqkey(
+ char *id, /* file name id */
+ EVP_PKEY *gqpar /* GQ parameters */
+ )
+{
+ EVP_PKEY *pkey; /* private key */
+ RSA *rsa; /* RSA parameters */
+ BN_CTX *ctx; /* BN working space */
+ BIGNUM *u, *v, *g, *k, *r, *y; /* BN temps */
+ FILE *str;
+ u_int temp;
+
+ /*
+ * Generate GQ keys. Note that the group key b is the e member
+ * of
+ * the GQ parameters.
+ */
+ fprintf(stderr, "Updating GQ keys (%d bits)...\n", modulus);
+ ctx = BN_CTX_new(); u = BN_new(); v = BN_new();
+ g = BN_new(); k = BN_new(); r = BN_new(); y = BN_new();
+
+ /*
+ * When generating his certificate, Bob rolls random private key
+ * u.
+ */
+ rsa = gqpar->pkey.rsa;
+ BN_rand(u, BN_num_bits(rsa->n), -1, 0); /* u */
+ BN_mod(u, u, rsa->n, ctx);
+ BN_mod_inverse(v, u, rsa->n, ctx); /* u^-1 mod n */
+ BN_mod_mul(k, v, u, rsa->n, ctx);
+
+ /*
+ * Bob computes public key v = (u^-1)^b, which is saved in an
+ * extension field on his certificate. We check that u^b v =
+ * 1 mod n.
+ */
+ BN_mod_exp(v, v, rsa->e, rsa->n, ctx);
+ BN_mod_exp(g, u, rsa->e, rsa->n, ctx); /* u^b */
+ BN_mod_mul(g, g, v, rsa->n, ctx); /* u^b (u^-1)^b */
+ temp = BN_is_one(g);
+ fprintf(stderr,
+ "Confirm u^b (u^-1)^b = 1 mod n: %s\n", temp ? "yes" :
+ "no");
+ if (!temp) {
+ BN_free(u); BN_free(v);
+ BN_free(g); BN_free(k); BN_free(r); BN_free(y);
+ BN_CTX_free(ctx);
+ RSA_free(rsa);
+ rval = -1;
+ return (NULL);
+ }
+ BN_copy(rsa->p, u); /* private key */
+ BN_copy(rsa->q, v); /* public key */
+
+ /*
+ * Here is a trial run of the protocol. First, Alice rolls
+ * random r (0 < r < n) and sends it to Bob. She needs only
+ * modulus n from the parameters.
+ */
+ BN_rand(r, BN_num_bits(rsa->n), -1, 0); /* r */
+ BN_mod(r, r, rsa->n, ctx);
+
+ /*
+ * Bob rolls random k (0 < k < n), computes y = k u^r mod n and
+ * g = k^b mod n, then sends (y, g) to Alice. He needs modulus n
+ * from the parameters and his private key u.
+ */
+ BN_rand(k, BN_num_bits(rsa->n), -1, 0); /* k */
+ BN_mod(k, k, rsa->n, ctx);
+ BN_mod_exp(y, rsa->p, r, rsa->n, ctx); /* u^r mod n */
+ BN_mod_mul(y, k, y, rsa->n, ctx); /* y = k u^r mod n */
+ BN_mod_exp(g, k, rsa->e, rsa->n, ctx); /* g = k^b mod n */
+
+ /*
+ * Alice computes v^r y^b mod n and verifies the result is equal
+ * to g. She needs modulus n, generator g and group key b from
+ * the parameters and Bob's public key v = (u^-1)^b from his
+ * certificate.
+ */
+ BN_mod_exp(v, rsa->q, r, rsa->n, ctx); /* v^r mod n */
+ BN_mod_exp(y, y, rsa->e, rsa->n, ctx); /* y^b mod n */
+ BN_mod_mul(y, v, y, rsa->n, ctx); /* v^r y^b mod n */
+ temp = BN_cmp(y, g);
+ fprintf(stderr, "Confirm g^k = v^r y^b mod n: %s\n", temp == 0 ?
+ "yes" : "no");
+ BN_CTX_free(ctx); BN_free(u); BN_free(v);
+ BN_free(g); BN_free(k); BN_free(r); BN_free(y);
+ if (temp != 0) {
+ RSA_free(rsa);
+ rval = -1;
+ return (NULL);
+ }
+
+ /*
+ * Write the GQ parameters and keys as a RSA private key encoded
+ * in PEM.
+ *
+ * n modulus n
+ * e group key b
+ * p private key u
+ * q public key (u^-1)^b
+ * (remaining values are not used)
+ */
+ str = fheader("GQpar", trustname);
+ pkey = EVP_PKEY_new();
+ EVP_PKEY_assign_RSA(pkey, rsa);
+ PEM_write_PrivateKey(str, pkey, passwd2 ? EVP_des_cbc() : NULL,
+ NULL, 0, NULL, passwd2);
+ fclose(str);
+ if (debug)
+ RSA_print_fp(stdout, rsa, 0);
+ fslink(id, trustname);
+ return (pkey);
+}
+
+
+/*
+ * Generate Mu-Varadharajan (MV) parameters and keys
+ *
+ * The Mu-Varadharajan (MV) cryptosystem is useful when servers
+ * broadcast messages to clients, but clients never send messages to
+ * servers. There is one encryption key for the server and a separate
+ * decryption key for each client. It operates something like a
+ * pay-per-view satellite broadcasting system where the session key is
+ * encrypted by the broadcaster and the decryption keys are held in a
+ * tamperproof set-top box. We don't use it this way, but read on.
+ *
+ * The MV parameters and private encryption key hide in a DSA cuckoo
+ * structure which uses the same parameters, but generated in a
+ * different way. The values are used in an encryption scheme similar to
+ * El Gamal cryptography and a polynomial formed from the expansion of
+ * product terms (x - x[j]), as described in Mu, Y., and V.
+ * Varadharajan: Robust and Secure Broadcasting, Proc. Indocrypt 2001,
+ * 223-231. The paper has significant errors and serious omissions.
+ *
+ * Let q be the product of n distinct primes s'[j] (j = 1...n), where
+ * each s'[j] has m significant bits. Let p be a prime p = 2 * q + 1, so
+ * that q and each s'[j] divide p - 1 and p has M = n * m + 1
+ * significant bits. Let g be a generator of Zp; that is, gcd(g, p - 1)
+ * = 1 and g^q = 1 mod p. We do modular arithmetic over Zq and then
+ * project into Zp* as exponents of g. Sometimes we have to compute an
+ * inverse b^-1 of random b in Zq, but for that purpose we require
+ * gcd(b, q) = 1. We expect M to be in the 500-bit range and n
+ * relatively small, like 30. Associated with each s'[j] is an element
+ * s[j] such that s[j] s'[j] = s'[j] mod q. We find s[j] as the quotient
+ * (q + s'[j]) / s'[j]. These are the parameters of the scheme and they
+ * are expensive to compute.
+ *
+ * We set up an instance of the scheme as follows. A set of random
+ * values x[j] mod q (j = 1...n), are generated as the zeros of a
+ * polynomial of order n. The product terms (x - x[j]) are expanded to
+ * form coefficients a[i] mod q (i = 0...n) in powers of x. These are
+ * used as exponents of the generator g mod p to generate the private
+ * encryption key A. The pair (gbar, ghat) of public server keys and the
+ * pairs (xbar[j], xhat[j]) (j = 1...n) of private client keys are used
+ * to construct the decryption keys. The devil is in the details.
+ *
+ * This routine generates a private encryption file including the
+ * private encryption key E and public key (gbar, ghat). It then
+ * generates decryption files including the private key (xbar[j],
+ * xhat[j]) for each client. E is a permutation that encrypts a block
+ * y = E x. The jth client computes the inverse permutation E^-1 =
+ * gbar^xhat[j] ghat^xbar[j] and decrypts the block x = E^-1 y.
+ *
+ * The distinguishing characteristic of this scheme is the capability to
+ * revoke keys. Included in the calculation of E, gbar and ghat is the
+ * product s = prod(s'[j]) (j = 1...n) above. If the factor s'[j] is
+ * subsequently removed from the product and E, gbar and ghat
+ * recomputed, the jth client will no longer be able to compute E^-1 and
+ * thus unable to decrypt the block.
+ */
+EVP_PKEY * /* DSA cuckoo nest */
+gen_mv(
+ char *id /* file name id */
+ )
+{
+ EVP_PKEY *pkey; /* private key */
+ DSA *dsa; /* DSA parameters */
+ DSA *sdsa; /* DSA parameters */
+ BN_CTX *ctx; /* BN working space */
+ BIGNUM **x; /* polynomial zeros vector */
+ BIGNUM **a; /* polynomial coefficient vector */
+ BIGNUM **g; /* public key vector */
+ BIGNUM **s, **s1; /* private enabling keys */
+ BIGNUM **xbar, **xhat; /* private keys vector */
+ BIGNUM *b; /* group key */
+ BIGNUM *b1; /* inverse group key */
+ BIGNUM *ss; /* enabling key */
+ BIGNUM *biga; /* master encryption key */
+ BIGNUM *bige; /* session encryption key */
+ BIGNUM *gbar, *ghat; /* public key */
+ BIGNUM *u, *v, *w; /* BN scratch */
+ int i, j, n;
+ FILE *str;
+ u_int temp;
+ char ident[20];
+
+ /*
+ * Generate MV parameters.
+ *
+ * The object is to generate a multiplicative group Zp* modulo a
+ * prime p and a subset Zq mod q, where q is the product of n
+ * distinct primes s'[j] (j = 1...n) and q divides p - 1. We
+ * first generate n distinct primes, which may have to be
+ * regenerated later. As a practical matter, it is tough to find
+ * more than 31 distinct primes for modulus 512 or 61 primes for
+ * modulus 1024. The latter can take several hundred iterations
+ * and several minutes on a Sun Blade 1000.
+ */
+ n = nkeys;
+ fprintf(stderr,
+ "Generating MV parameters for %d keys (%d bits)...\n", n,
+ modulus / n);
+ ctx = BN_CTX_new(); u = BN_new(); v = BN_new(); w = BN_new();
+ b = BN_new(); b1 = BN_new();
+ dsa = malloc(sizeof(DSA));
+ dsa->p = BN_new();
+ dsa->q = BN_new();
+ dsa->g = BN_new();
+ s = malloc((n + 1) * sizeof(BIGNUM));
+ s1 = malloc((n + 1) * sizeof(BIGNUM));
+ for (j = 1; j <= n; j++)
+ s1[j] = BN_new();
+ temp = 0;
+ for (j = 1; j <= n; j++) {
+ while (1) {
+ fprintf(stderr, "Birthdays %d\r", temp);
+ BN_generate_prime(s1[j], modulus / n, 0, NULL,
+ NULL, NULL, NULL);
+ for (i = 1; i < j; i++) {
+ if (BN_cmp(s1[i], s1[j]) == 0)
+ break;
+ }
+ if (i == j)
+ break;
+ temp++;
+ }
+ }
+ fprintf(stderr, "Birthday keys rejected %d\n", temp);
+
+ /*
+ * Compute the modulus q as the product of the primes. Compute
+ * the modulus p as 2 * q + 1 and test p for primality. If p
+ * is composite, replace one of the primes with a new distinct
+ * one and try again. Note that q will hardly be a secret since
+ * we have to reveal p to servers and clients. However,
+ * factoring q to find the primes should be adequately hard, as
+ * this is the same problem considered hard in RSA. Question: is
+ * it as hard to find n small prime factors totalling n bits as
+ * it is to find two large prime factors totalling n bits?
+ * Remember, the bad guy doesn't know n.
+ */
+ temp = 0;
+ while (1) {
+ fprintf(stderr, "Duplicate keys rejected %d\r", ++temp);
+ BN_one(dsa->q);
+ for (j = 1; j <= n; j++)
+ BN_mul(dsa->q, dsa->q, s1[j], ctx);
+ BN_copy(dsa->p, dsa->q);
+ BN_add(dsa->p, dsa->p, dsa->p);
+ BN_add_word(dsa->p, 1);
+ if (BN_is_prime(dsa->p, BN_prime_checks, NULL, ctx,
+ NULL))
+ break;
+
+ j = temp % n + 1;
+ while (1) {
+ BN_generate_prime(u, modulus / n, 0, 0, NULL,
+ NULL, NULL);
+ for (i = 1; i <= n; i++) {
+ if (BN_cmp(u, s1[i]) == 0)
+ break;
+ }
+ if (i > n)
+ break;
+ }
+ BN_copy(s1[j], u);
+ }
+ fprintf(stderr, "Duplicate keys rejected %d\n", temp);
+
+ /*
+ * Compute the generator g using a random roll such that
+ * gcd(g, p - 1) = 1 and g^q = 1. This is a generator of p, not
+ * q.
+ */
+ BN_copy(v, dsa->p);
+ BN_sub_word(v, 1);
+ while (1) {
+ BN_rand(dsa->g, BN_num_bits(dsa->p) - 1, 0, 0);
+ BN_mod(dsa->g, dsa->g, dsa->p, ctx);
+ BN_gcd(u, dsa->g, v, ctx);
+ if (!BN_is_one(u))
+ continue;
+
+ BN_mod_exp(u, dsa->g, dsa->q, dsa->p, ctx);
+ if (BN_is_one(u))
+ break;
+ }
+
+ /*
+ * Compute s[j] such that s[j] * s'[j] = s'[j] for all j. The
+ * easy way to do this is to compute q + s'[j] and divide the
+ * result by s'[j]. Exercise for the student: prove the
+ * remainder is always zero.
+ */
+ for (j = 1; j <= n; j++) {
+ s[j] = BN_new();
+ BN_add(s[j], dsa->q, s1[j]);
+ BN_div(s[j], u, s[j], s1[j], ctx);
+ }
+
+ /*
+ * Setup is now complete. Roll random polynomial roots x[j]
+ * (0 < x[j] < q) for all j. While it may not be strictly
+ * necessary, Make sure each root has no factors in common with
+ * q.
+ */
+ fprintf(stderr,
+ "Generating polynomial coefficients for %d roots (%d bits)\n",
+ n, BN_num_bits(dsa->q));
+ x = malloc((n + 1) * sizeof(BIGNUM));
+ for (j = 1; j <= n; j++) {
+ x[j] = BN_new();
+ while (1) {
+ BN_rand(x[j], BN_num_bits(dsa->q), 0, 0);
+ BN_mod(x[j], x[j], dsa->q, ctx);
+ BN_gcd(u, x[j], dsa->q, ctx);
+ if (BN_is_one(u))
+ break;
+ }
+ }
+
+ /*
+ * Generate polynomial coefficients a[i] (i = 0...n) from the
+ * expansion of root products (x - x[j]) mod q for all j. The
+ * method is a present from Charlie Boncelet.
+ */
+ a = malloc((n + 1) * sizeof(BIGNUM));
+ for (i = 0; i <= n; i++) {
+ a[i] = BN_new();
+ BN_one(a[i]);
+ }
+ for (j = 1; j <= n; j++) {
+ BN_zero(w);
+ for (i = 0; i < j; i++) {
+ BN_copy(u, dsa->q);
+ BN_mod_mul(v, a[i], x[j], dsa->q, ctx);
+ BN_sub(u, u, v);
+ BN_add(u, u, w);
+ BN_copy(w, a[i]);
+ BN_mod(a[i], u, dsa->q, ctx);
+ }
+ }
+
+ /*
+ * Generate g[i] = g^a[i] mod p for all i and the generator g.
+ */
+ fprintf(stderr, "Generating g[i] parameters\n");
+ g = malloc((n + 1) * sizeof(BIGNUM));
+ for (i = 0; i <= n; i++) {
+ g[i] = BN_new();
+ BN_mod_exp(g[i], dsa->g, a[i], dsa->p, ctx);
+ }
+
+ /*
+ * Verify prod(g[i]^(a[i] x[j]^i)) = 1 for all i, j; otherwise,
+ * exit. Note the a[i] x[j]^i exponent is computed mod q, but
+ * the g[i] is computed mod p. also note the expression given in
+ * the paper is incorrect.
+ */
+ temp = 1;
+ for (j = 1; j <= n; j++) {
+ BN_one(u);
+ for (i = 0; i <= n; i++) {
+ BN_set_word(v, i);
+ BN_mod_exp(v, x[j], v, dsa->q, ctx);
+ BN_mod_mul(v, v, a[i], dsa->q, ctx);
+ BN_mod_exp(v, dsa->g, v, dsa->p, ctx);
+ BN_mod_mul(u, u, v, dsa->p, ctx);
+ }
+ if (!BN_is_one(u))
+ temp = 0;
+ }
+ fprintf(stderr,
+ "Confirm prod(g[i]^(x[j]^i)) = 1 for all i, j: %s\n", temp ?
+ "yes" : "no");
+ if (!temp) {
+ rval = -1;
+ return (NULL);
+ }
+
+ /*
+ * Make private encryption key A. Keep it around for awhile,
+ * since it is expensive to compute.
+ */
+ biga = BN_new();
+ BN_one(biga);
+ for (j = 1; j <= n; j++) {
+ for (i = 0; i < n; i++) {
+ BN_set_word(v, i);
+ BN_mod_exp(v, x[j], v, dsa->q, ctx);
+ BN_mod_exp(v, g[i], v, dsa->p, ctx);
+ BN_mod_mul(biga, biga, v, dsa->p, ctx);
+ }
+ }
+
+ /*
+ * Roll private random group key b mod q (0 < b < q), where
+ * gcd(b, q) = 1 to guarantee b^1 exists, then compute b^-1
+ * mod q. If b is changed, the client keys must be recomputed.
+ */
+ while (1) {
+ BN_rand(b, BN_num_bits(dsa->q), 0, 0);
+ BN_mod(b, b, dsa->q, ctx);
+ BN_gcd(u, b, dsa->q, ctx);
+ if (BN_is_one(u))
+ break;
+ }
+ BN_mod_inverse(b1, b, dsa->q, ctx);
+
+ /*
+ * Make private client keys (xbar[j], xhat[j]) for all j. Note
+ * that the keys for the jth client involve s[j], but not s'[j]
+ * or the product s = prod(s'[j]) mod q, which is the enabling
+ * key.
+ */
+ xbar = malloc((n + 1) * sizeof(BIGNUM));
+ xhat = malloc((n + 1) * sizeof(BIGNUM));
+ for (j = 1; j <= n; j++) {
+ xbar[j] = BN_new(); xhat[j] = BN_new();
+ BN_zero(xbar[j]);
+ BN_set_word(v, n);
+ for (i = 1; i <= n; i++) {
+ if (i == j)
+ continue;
+ BN_mod_exp(u, x[i], v, dsa->q, ctx);
+ BN_add(xbar[j], xbar[j], u);
+ }
+ BN_mod_mul(xbar[j], xbar[j], b1, dsa->q, ctx);
+ BN_mod_exp(xhat[j], x[j], v, dsa->q, ctx);
+ BN_mod_mul(xhat[j], xhat[j], s[j], dsa->q, ctx);
+ }
+
+ /*
+ * The enabling key is initially q by construction. We can
+ * revoke client j by dividing q by s'[j]. The quotient becomes
+ * the enabling key s. Note we always have to revoke one key;
+ * otherwise, the plaintext and cryptotext would be identical.
+ */
+ ss = BN_new();
+ BN_copy(ss, dsa->q);
+ BN_div(ss, u, dsa->q, s1[n], ctx);
+
+ /*
+ * Make private server encryption key E = A^s and public server
+ * keys gbar = g^s mod p and ghat = g^(s b) mod p. The (gbar,
+ * ghat) is the public key provided to the server, which uses it
+ * to compute the session encryption key and public key included
+ * in its messages. These values must be regenerated if the
+ * enabling key is changed.
+ */
+ bige = BN_new(); gbar = BN_new(); ghat = BN_new();
+ BN_mod_exp(bige, biga, ss, dsa->p, ctx);
+ BN_mod_exp(gbar, dsa->g, ss, dsa->p, ctx);
+ BN_mod_mul(v, ss, b, dsa->q, ctx);
+ BN_mod_exp(ghat, dsa->g, v, dsa->p, ctx);
+
+ /*
+ * We produce the key media in three steps. The first step is to
+ * generate the private values that do not depend on the
+ * enabling key. These include the server values p, q, g, b, A
+ * and the client values s'[j], xbar[j] and xhat[j] for each j.
+ * The p, xbar[j] and xhat[j] values are encoded in private
+ * files which are distributed to respective clients. The p, q,
+ * g, A and s'[j] values (will be) written to a secret file to
+ * be read back later.
+ *
+ * The secret file (will be) read back at some later time to
+ * enable/disable individual keys and generate/regenerate the
+ * enabling key s. The p, q, E, gbar and ghat values are written
+ * to a secret file to be read back later by the server.
+ *
+ * The server reads the secret file and rolls the session key
+ * k, which is used only once, then computes E^k, gbar^k and
+ * ghat^k. The E^k is the session encryption key. The encrypted
+ * data, gbar^k and ghat^k are transmtted to clients in an
+ * extension field. The client receives the message and computes
+ * x = (gbar^k)^xbar[j] (ghat^k)^xhat[j], finds the session
+ * encryption key E^k as the inverse x^-1 and decrypts the data.
+ */
+ BN_copy(dsa->g, bige);
+ dsa->priv_key = BN_dup(gbar);
+ dsa->pub_key = BN_dup(ghat);
+
+ /*
+ * Write the MV server parameters and keys as a DSA private key
+ * encoded in PEM.
+ *
+ * p modulus p
+ * q modulus q (used only to generate k)
+ * g E mod p
+ * priv_key gbar mod p
+ * pub_key ghat mod p
+ */
+ str = fheader("MVpar", trustname);
+ pkey = EVP_PKEY_new();
+ EVP_PKEY_assign_DSA(pkey, dsa);
+ PEM_write_PrivateKey(str, pkey, passwd2 ? EVP_des_cbc() : NULL,
+ NULL, 0, NULL, passwd2);
+ fclose(str);
+ if (debug)
+ DSA_print_fp(stdout, dsa, 0);
+ fslink(id, trustname);
+
+ /*
+ * Write the parameters and private key (xbar[j], xhat[j]) for
+ * all j as a DSA private key encoded in PEM. It is used only by
+ * the designated recipient(s) who pay a suitably outrageous fee
+ * for its use.
+ */
+ sdsa = malloc(sizeof(DSA));
+ sdsa->p = BN_dup(dsa->p);
+ sdsa->q = BN_dup(BN_value_one());
+ sdsa->g = BN_dup(BN_value_one());
+ sdsa->priv_key = BN_new();
+ sdsa->pub_key = BN_new();
+ for (j = 1; j <= n; j++) {
+ BN_copy(sdsa->priv_key, xbar[j]);
+ BN_copy(sdsa->pub_key, xhat[j]);
+ BN_mod_exp(v, dsa->priv_key, sdsa->pub_key, dsa->p,
+ ctx);
+ BN_mod_exp(u, dsa->pub_key, sdsa->priv_key, dsa->p,
+ ctx);
+ BN_mod_mul(u, u, v, dsa->p, ctx);
+ BN_mod_mul(u, u, dsa->g, dsa->p, ctx);
+ BN_free(xbar[j]); BN_free(xhat[j]);
+ BN_free(x[j]); BN_free(s[j]); BN_free(s1[j]);
+ if (!BN_is_one(u)) {
+ fprintf(stderr, "Revoke key %d\n", j);
+ continue;
+ }
+
+ /*
+ * Write the client parameters as a DSA private key
+ * encoded in PEM. We don't make links for these.
+ *
+ * p modulus p
+ * priv_key xbar[j] mod q
+ * pub_key xhat[j] mod q
+ * (remaining values are not used)
+ */
+ sprintf(ident, "MVkey%d", j);
+ str = fheader(ident, trustname);
+ pkey = EVP_PKEY_new();
+ EVP_PKEY_assign_DSA(pkey, sdsa);
+ PEM_write_PrivateKey(str, pkey, passwd2 ?
+ EVP_des_cbc() : NULL, NULL, 0, NULL, passwd2);
+ fclose(str);
+ fprintf(stderr, "ntpkey_%s_%s.%lu\n", ident, trustname,
+ epoch + JAN_1970);
+ if (debug)
+ DSA_print_fp(stdout, sdsa, 0);
+ }
+
+ /*
+ * Free the countries.
+ */
+ for (i = 0; i <= n; i++) {
+ BN_free(a[i]);
+ BN_free(g[i]);
+ }
+ BN_free(u); BN_free(v); BN_free(w); BN_CTX_free(ctx);
+ BN_free(b); BN_free(b1); BN_free(biga); BN_free(bige);
+ BN_free(ss); BN_free(gbar); BN_free(ghat);
+ DSA_free(dsa); DSA_free(sdsa);
+
+ /*
+ * Free the world.
+ */
+ free(x); free(a); free(g); free(s); free(s1);
+ free(xbar); free(xhat);
+ return (pkey);
+}
+
+
+/*
+ * Generate X509v3 scertificate.
+ *
+ * The certificate consists of the version number, serial number,
+ * validity interval, issuer name, subject name and public key. For a
+ * self-signed certificate, the issuer name is the same as the subject
+ * name and these items are signed using the subject private key. The
+ * validity interval extends from the current time to the same time one
+ * year hence. For NTP purposes, it is convenient to use the NTP seconds
+ * of the current time as the serial number.
+ */
+int
+x509 (
+ EVP_PKEY *pkey, /* generic signature algorithm */
+ const EVP_MD *md, /* generic digest algorithm */
+ char *gqpub, /* identity extension (hex string) */
+ char *exten /* private cert extension */
+ )
+{
+ X509 *cert; /* X509 certificate */
+ X509_NAME *subj; /* distinguished (common) name */
+ X509_EXTENSION *ex; /* X509v3 extension */
+ FILE *str; /* file handle */
+ ASN1_INTEGER *serial; /* serial number */
+ const char *id; /* digest/signature scheme name */
+ char pathbuf[MAXFILENAME + 1];
+
+ /*
+ * Generate X509 self-signed certificate.
+ *
+ * Set the certificate serial to the NTP seconds for grins. Set
+ * the version to 3. Set the subject name and issuer name to the
+ * subject name in the request. Set the initial validity to the
+ * current time and the final validity one year hence.
+ */
+ id = OBJ_nid2sn(md->pkey_type);
+ fprintf(stderr, "Generating certificate %s\n", id);
+ cert = X509_new();
+ X509_set_version(cert, 2L);
+ serial = ASN1_INTEGER_new();
+ ASN1_INTEGER_set(serial, epoch + JAN_1970);
+ X509_set_serialNumber(cert, serial);
+ ASN1_INTEGER_free(serial);
+ X509_gmtime_adj(X509_get_notBefore(cert), 0L);
+ X509_gmtime_adj(X509_get_notAfter(cert), YEAR);
+ subj = X509_get_subject_name(cert);
+ X509_NAME_add_entry_by_txt(subj, "commonName", MBSTRING_ASC,
+ (unsigned char *) hostname, strlen(hostname), -1, 0);
+ subj = X509_get_issuer_name(cert);
+ X509_NAME_add_entry_by_txt(subj, "commonName", MBSTRING_ASC,
+ (unsigned char *) trustname, strlen(trustname), -1, 0);
+ if (!X509_set_pubkey(cert, pkey)) {
+ fprintf(stderr, "Assign key fails\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ X509_free(cert);
+ rval = -1;
+ return (0);
+ }
+
+ /*
+ * Add X509v3 extensions if present. These represent the minimum
+ * set defined in RFC3280 less the certificate_policy extension,
+ * which is seriously obfuscated in OpenSSL.
+ */
+ /*
+ * The basic_constraints extension CA:TRUE allows servers to
+ * sign client certficitates.
+ */
+ fprintf(stderr, "%s: %s\n", LN_basic_constraints,
+ BASIC_CONSTRAINTS);
+ ex = X509V3_EXT_conf_nid(NULL, NULL, NID_basic_constraints,
+ BASIC_CONSTRAINTS);
+ if (!X509_add_ext(cert, ex, -1)) {
+ fprintf(stderr, "Add extension field fails\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ rval = -1;
+ return (0);
+ }
+ X509_EXTENSION_free(ex);
+
+ /*
+ * The key_usage extension designates the purposes the key can
+ * be used for.
+ */
+ fprintf(stderr, "%s: %s\n", LN_key_usage, KEY_USAGE);
+ ex = X509V3_EXT_conf_nid(NULL, NULL, NID_key_usage, KEY_USAGE);
+ if (!X509_add_ext(cert, ex, -1)) {
+ fprintf(stderr, "Add extension field fails\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ rval = -1;
+ return (0);
+ }
+ X509_EXTENSION_free(ex);
+ /*
+ * The subject_key_identifier is used for the GQ public key.
+ * This should not be controversial.
+ */
+ if (gqpub != NULL) {
+ fprintf(stderr, "%s\n", LN_subject_key_identifier);
+ ex = X509V3_EXT_conf_nid(NULL, NULL,
+ NID_subject_key_identifier, gqpub);
+ if (!X509_add_ext(cert, ex, -1)) {
+ fprintf(stderr,
+ "Add extension field fails\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ rval = -1;
+ return (0);
+ }
+ X509_EXTENSION_free(ex);
+ }
+
+ /*
+ * The extended key usage extension is used for special purpose
+ * here. The semantics probably do not conform to the designer's
+ * intent and will likely change in future.
+ *
+ * "trustRoot" designates a root authority
+ * "private" designates a private certificate
+ */
+ if (exten != NULL) {
+ fprintf(stderr, "%s: %s\n", LN_ext_key_usage, exten);
+ ex = X509V3_EXT_conf_nid(NULL, NULL,
+ NID_ext_key_usage, exten);
+ if (!X509_add_ext(cert, ex, -1)) {
+ fprintf(stderr,
+ "Add extension field fails\n%s\n",
+ ERR_error_string(ERR_get_error(), NULL));
+ rval = -1;
+ return (0);
+ }
+ X509_EXTENSION_free(ex);
+ }
+
+ /*
+ * Sign and verify.
+ */
+ X509_sign(cert, pkey, md);
+ if (!X509_verify(cert, pkey)) {
+ fprintf(stderr, "Verify %s certificate fails\n%s\n", id,
+ ERR_error_string(ERR_get_error(), NULL));
+ X509_free(cert);
+ rval = -1;
+ return (0);
+ }
+
+ /*
+ * Write the certificate encoded in PEM.
+ */
+ sprintf(pathbuf, "%scert", id);
+ str = fheader(pathbuf, hostname);
+ PEM_write_X509(str, cert);
+ fclose(str);
+ if (debug)
+ X509_print_fp(stdout, cert);
+ X509_free(cert);
+ fslink("cert", hostname);
+ return (1);
+}
+
+#if 0 /* asn2ntp is not used */
+/*
+ * asn2ntp - convert ASN1_TIME time structure to NTP time
+ */
+u_long
+asn2ntp (
+ ASN1_TIME *asn1time /* pointer to ASN1_TIME structure */
+ )
+{
+ char *v; /* pointer to ASN1_TIME string */
+ struct tm tm; /* time decode structure time */
+
+ /*
+ * Extract time string YYMMDDHHMMSSZ from ASN.1 time structure.
+ * Note that the YY, MM, DD fields start with one, the HH, MM,
+ * SS fiels start with zero and the Z character should be 'Z'
+ * for UTC. Also note that years less than 50 map to years
+ * greater than 100. Dontcha love ASN.1?
+ */
+ if (asn1time->length > 13)
+ return (-1);
+ v = (char *)asn1time->data;
+ tm.tm_year = (v[0] - '0') * 10 + v[1] - '0';
+ if (tm.tm_year < 50)
+ tm.tm_year += 100;
+ tm.tm_mon = (v[2] - '0') * 10 + v[3] - '0' - 1;
+ tm.tm_mday = (v[4] - '0') * 10 + v[5] - '0';
+ tm.tm_hour = (v[6] - '0') * 10 + v[7] - '0';
+ tm.tm_min = (v[8] - '0') * 10 + v[9] - '0';
+ tm.tm_sec = (v[10] - '0') * 10 + v[11] - '0';
+ tm.tm_wday = 0;
+ tm.tm_yday = 0;
+ tm.tm_isdst = 0;
+ return (mktime(&tm) + JAN_1970);
+}
+#endif
+
+/*
+ * Callback routine
+ */
+void
+cb (
+ int n1, /* arg 1 */
+ int n2, /* arg 2 */
+ void *chr /* arg 3 */
+ )
+{
+ switch (n1) {
+ case 0:
+ d0++;
+ fprintf(stderr, "%s %d %d %lu\r", (char *)chr, n1, n2,
+ d0);
+ break;
+ case 1:
+ d1++;
+ fprintf(stderr, "%s\t\t%d %d %lu\r", (char *)chr, n1,
+ n2, d1);
+ break;
+ case 2:
+ d2++;
+ fprintf(stderr, "%s\t\t\t\t%d %d %lu\r", (char *)chr,
+ n1, n2, d2);
+ break;
+ case 3:
+ d3++;
+ fprintf(stderr, "%s\t\t\t\t\t\t%d %d %lu\r",
+ (char *)chr, n1, n2, d3);
+ break;
+ }
+}
+#endif /* OPENSSL */
+
+
+/*
+ * Generate key
+ */
+EVP_PKEY * /* public/private key pair */
+genkey(
+ char *type, /* key type (RSA or DSA) */
+ char *id /* file name id */
+ )
+{
+ if (type == NULL)
+ return (NULL);
+ if (strcmp(type, "RSA") == 0)
+ return (gen_rsa(id));
+
+ else if (strcmp(type, "DSA") == 0)
+ return (gen_dsa(id));
+
+ fprintf(stderr, "Invalid %s key type %s\n", id, type);
+ rval = -1;
+ return (NULL);
+}
+
+
+/*
+ * Generate file header
+ */
+FILE *
+fheader (
+ const char *id, /* file name id */
+ const char *name /* owner name */
+ )
+{
+ FILE *str; /* file handle */
+
+ sprintf(filename, "ntpkey_%s_%s.%lu", id, name, epoch +
+ JAN_1970);
+ if ((str = fopen(filename, "w")) == NULL) {
+ perror("Write");
+ exit (-1);
+ }
+ fprintf(str, "# %s\n# %s", filename, ctime(&epoch));
+ return (str);
+}
+
+
+/*
+ * Generate symbolic links
+ */
+void
+fslink(
+ const char *id, /* file name id */
+ const char *name /* owner name */
+ )
+{
+ char linkname[MAXFILENAME]; /* link name */
+ int temp;
+
+ sprintf(linkname, "ntpkey_%s_%s", id, name);
+ remove(linkname);
+ temp = symlink(filename, linkname);
+ if (temp < 0)
+ perror(id);
+ fprintf(stderr, "Generating new %s file and link\n", id);
+ fprintf(stderr, "%s->%s\n", linkname, filename);
+}
diff --git a/contrib/ntp/util/ntptime.c b/contrib/ntp/util/ntptime.c
index 81bd2beee59e..51111bea6810 100644
--- a/contrib/ntp/util/ntptime.c
+++ b/contrib/ntp/util/ntptime.c
@@ -54,7 +54,6 @@
*/
char *sprintb P((u_int, const char *));
const char *timex_state P((int));
-volatile int debug = 0;
#ifdef SIGSYS
void pll_trap P((int));
@@ -89,13 +88,13 @@ main(
double ftemp, gtemp, htemp;
long time_frac; /* ntv.time.tv_frac_sec (us/ns) */
l_fp ts;
- unsigned ts_mask = TS_MASK; /* defaults to 20 bits (us) */
- unsigned ts_roundbit = TS_ROUNDBIT; /* defaults to 20 bits (us) */
- int fdigits = 6; /* fractional digits for us */
+ volatile unsigned ts_mask = TS_MASK; /* defaults to 20 bits (us) */
+ volatile unsigned ts_roundbit = TS_ROUNDBIT; /* defaults to 20 bits (us) */
+ volatile int fdigits = 6; /* fractional digits for us */
int c;
int errflg = 0;
int cost = 0;
- int rawtime = 0;
+ volatile int rawtime = 0;
memset((char *)&ntx, 0, sizeof(ntx));
progname = argv[0];
@@ -121,9 +120,6 @@ main(
case 'c':
cost++;
break;
- case 'd':
- debug++;
- break;
case 'e':
ntx.modes |= MOD_ESTERROR;
ntx.esterror = atoi(ntp_optarg);
@@ -166,7 +162,7 @@ main(
-m maxerror max possible error (us)\n\
-o offset current offset (ms)\n\
-r print the unix and NTP time raw\n\
--l leap Set the leap bits\n\
+-s status Set the status bits\n\
-t timeconstant log2 of PLL time constant (0 .. %d)\n",
progname, optargs,
#ifdef MOD_MICRO
@@ -305,7 +301,7 @@ main(
(int) ntv.time.tv_sec, fdigits, (int) time_frac,
ctime((const time_t *) &ntv.time.tv_sec));
#if NTP_API > 3
- printf(", TAI offset %d\n", ntv.tai);
+ printf(", TAI offset %ld\n", (long)ntv.tai);
#else
printf("\n");
#endif /* NTP_API */
diff --git a/contrib/ntp/util/pps-api.c b/contrib/ntp/util/pps-api.c
new file mode 100644
index 000000000000..60c98b84ebaf
--- /dev/null
+++ b/contrib/ntp/util/pps-api.c
@@ -0,0 +1,100 @@
+/*
+
+Try to run this program to see what the PPS-API finds. You give it the
+device as argument and you may have to modify the pp.mode = BLA assignment.
+
+Poul-Henning
+
+*/
+
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <err.h>
+#include <sys/types.h>
+#include <time.h>
+#include <sys/timepps.h>
+#include <sys/termios.h>
+
+#define timespecsub(vvp, uvp) \
+ do { \
+ (vvp)->tv_sec -= (uvp)->tv_sec; \
+ (vvp)->tv_nsec -= (uvp)->tv_nsec; \
+ if ((vvp)->tv_nsec < 0) { \
+ (vvp)->tv_sec--; \
+ (vvp)->tv_nsec += 1000000000; \
+ } \
+ } while (0)
+
+
+void
+Chew(struct timespec *tsa, struct timespec *tsc, unsigned sa, unsigned sc)
+{
+ static int idx;
+ struct timespec ts;
+
+ printf("%d.%09d ", tsa->tv_sec, tsa->tv_nsec);
+ printf("%d.%09d ", tsc->tv_sec, tsc->tv_nsec);
+ printf("%u %u ", sa, sc);
+
+ ts = *tsc;
+ timespecsub(&ts,tsa);
+ printf("%.9f ", ts.tv_sec + ts.tv_nsec / 1e9);
+ printf("\n");
+ fflush(stdout);
+}
+
+int
+main(int argc, char **argv)
+{
+ int fd;
+ pps_info_t pi;
+ pps_params_t pp;
+ pps_handle_t ph;
+ int i, mode;
+ u_int olda, oldc;
+ double d = 0;
+ struct timespec to;
+
+ if (argc < 2)
+ argv[1] = "/dev/cuaa1";
+ setbuf(stdout, 0);
+ fd = open(argv[1], O_RDONLY);
+ if (fd < 0)
+ err(1, argv[1]);
+ i = time_pps_create(fd, &ph);
+ if (i < 0)
+ err(1, "time_pps_create");
+
+ i = time_pps_getcap(ph, &mode);
+ if (i < 0)
+ err(1, "time_pps_getcap");
+
+ pp.mode = PPS_CAPTUREASSERT | PPS_ECHOASSERT;
+ pp.mode = PPS_CAPTUREBOTH;
+ /* pp.mode = PPS_CAPTUREASSERT; */
+
+ i = time_pps_setparams(ph, &pp);
+ if (i < 0)
+ err(1, "time_pps_setparams");
+
+ while (1) {
+ to.tv_nsec = 0;
+ to.tv_sec = 0;
+ i = time_pps_fetch(ph, PPS_TSFMT_TSPEC, &pi, &to);
+ if (i < 0)
+ err(1, "time_pps_fetch");
+ if (olda == pi.assert_sequence &&
+ oldc == pi.clear_sequence) {
+ usleep(10000);
+ continue;
+ }
+
+ Chew(&pi.assert_timestamp, &pi.clear_timestamp,
+ pi.assert_sequence, pi.clear_sequence);
+ olda = pi.assert_sequence;
+ oldc = pi.clear_sequence;
+ }
+
+ return(0);
+}
diff --git a/contrib/ntp/util/sht.c b/contrib/ntp/util/sht.c
index 4abd350505e1..b993de907d08 100644
--- a/contrib/ntp/util/sht.c
+++ b/contrib/ntp/util/sht.c
@@ -177,7 +177,7 @@ main (
p->valid=1;
}
else {
- printf ("p->valid still set\n"); // not an error!
+ printf ("p->valid still set\n"); /* not an error! */
}
}
break;
diff --git a/contrib/ntp/util/tickadj.c b/contrib/ntp/util/tickadj.c
index 4f524b129f2e..4a7f2c44274a 100644
--- a/contrib/ntp/util/tickadj.c
+++ b/contrib/ntp/util/tickadj.c
@@ -755,8 +755,8 @@ getoffsets(
else
{
(void) fprintf(stderr,
- "%s: nlist didn't find needed symbols from <%s>: %m\n",
- progname, *kname);
+ "%s: nlist didn't find needed symbols from <%s>: %s\n",
+ progname, *kname, strerror(errno));
}
}
if (*kname == NULL)
diff --git a/contrib/ntp/util/timetrim.c b/contrib/ntp/util/timetrim.c
index 8f0a9ba0d746..911ea2840989 100644
--- a/contrib/ntp/util/timetrim.c
+++ b/contrib/ntp/util/timetrim.c
@@ -1,4 +1,4 @@
-#ifdef sgi
+#if defined(sgi) || defined(_UNICOSMP)
/*
* timetrim.c
*
@@ -31,6 +31,9 @@
#ifdef HAVE_SYS_SYSSGI_H
# include <sys/syssgi.h>
#endif
+#ifdef HAVE_SYS_SYSTUNE_H
+# include <sys/systune.h>
+#endif
#define abs(X) (((X) < 0) ? -(X) : (X))
#define USAGE "usage: timetrim [-n] [[-i] value]\n"
@@ -62,10 +65,18 @@ main(
}
}
+#ifdef HAVE_SYS_SYSSGI_H
if (syssgi(SGI_GETTIMETRIM, &timetrim) < 0) {
perror("syssgi");
exit(2);
}
+#endif
+#ifdef HAVE_SYS_SYSTUNE_H
+ if (systune(SYSTUNE_GET, "timetrim", &timetrim) < 0) {
+ perror("systune");
+ exit(2);
+ }
+#endif
if (argc == 0) {
if (ntpunits)
@@ -87,10 +98,18 @@ main(
timetrim += value;
else
timetrim = value;
+#ifdef HAVE_SYS_SYSSGI_H
if (syssgi(SGI_SETTIMETRIM, timetrim) < 0) {
perror("syssgi");
exit(2);
}
+#endif
+#ifdef HAVE_SYS_SYSTUNE_H
+ if (systune(SYSTUNE_SET, "timer", "timetrim", &timetrim) < 0) {
+ perror("systune");
+ exit(2);
+ }
+#endif
}
return 0;
}
diff --git a/contrib/ntp/version b/contrib/ntp/version
index 162682cdf475..a4b697fc4ced 100644
--- a/contrib/ntp/version
+++ b/contrib/ntp/version
@@ -1 +1 @@
-1.829
+1.1161